Document Scope
The service uses formal CTX repository documents to preserve the operating instructions, metadata, refresh scripts, source locations, validation rules, and AI-agent usage guidance for each third-party vendor documentation context repository.
This document defines the documentation standard for individual CTX repository update documents. It covers frontmatter requirements, product-purpose statements, required sections, script placement, AI-agent instructions, human operator notes, validation checklists, internal admin document-library publication, and ongoing maintenance.
This document does not define the infrastructure process for creating and refreshing CTX repositories. That infrastructure process belongs in CTX Repository Infrastructure Standard.
1. Purpose
Every CTX repository must have a formal Markdown file in the internal admin document library.
The purpose of the Markdown file is to make the CTX repository's refresh process understandable and repeatable for human operators, AI agents, AI-assisted development tools, automation workers, and future MCP/RAG tooling.
The document must explain what the vendor product is used for, what official source material is copied, where the local repository lives, where temporary source folders are created, what remote Git repository is used, what PowerShell refresh script should be run, what successful output looks like, and how AI agents should use the local context material.
2. Internal Admin Document Library
CTX repository documents must be published to the private internal admin document library, not the public customer-facing documentation library.
The internal admin document library currently lives at:
http://127.0.0.1:42000/docs/
A Cloudflare Tunnel access URL may be added later. Do not delay creating or updating CTX documentation while waiting for the Cloudflare Tunnel URL. After tunnel access is configured, update the relevant document-library access section with the external/private-access URL.
3. File Naming Standard
Every individual CTX repository update document must use this file naming pattern:
ctx-<product>-repo-update.md
Examples:
ctx-better-auth-repo-update.md
ctx-brevo-repo-update.md
ctx-resend-repo-update.md
The product portion must match the lowercase kebab-case CTX repository slug, without the leading ctx-.
4. Title and Slug Standard
The title pattern is:
CTX <Product> Repo Update
Examples:
CTX Better Auth Repo Update
CTX Brevo Repo Update
CTX Resend Repo Update
The slug pattern is:
ctx-<product>-repo-update
Examples:
ctx-better-auth-repo-update
ctx-brevo-repo-update
ctx-resend-repo-update
5. Frontmatter Standard
Each individual CTX update document must use frontmatter with this structure:
---
title: CTX <Product> Repo Update
slug: ctx-<product>-repo-update
description: Instructions for refreshing the local and remote <Product> documentation context repository. <Product purpose statement for the service.>
category: Reference Operations
subcategory: External Content Sync
status: published
createdDate: MM/DD/YYYY
lastUpdated: MM/DD/YYYY
searchable: true
---
The description field must identify the product's purpose inside the service.
Do not write the description as only a generic repository description. The reader must be able to understand what the product is used for without already knowing the vendor.
Examples:
Instructions for refreshing the local and remote Better Auth documentation context repository. Better Auth as the authentication framework for user accounts, login, sessions, and account-access control.
Instructions for refreshing the local and remote Brevo documentation context repository. Brevo as an email delivery provider for transactional email, SMTP relay, and related email-sending infrastructure.
Instructions for refreshing the local and remote Resend documentation context repository. Resend as an email delivery provider for transactional email, SMTP relay, and related email-sending infrastructure.
6. Document Scope Standard
The first sentence under # Document Scope must identify the product's purpose inside the service.
Use this structure:
The service uses <Product> as <plain-language purpose statement>.
Examples:
The service uses Better Auth as the authentication framework for user accounts, login, sessions, and account-access control.
The service uses Brevo as an email delivery provider for transactional email, SMTP relay, and related email-sending infrastructure.
The service uses Resend as an email delivery provider for transactional email, SMTP relay, and related email-sending infrastructure.
After the product-purpose sentence, the document scope must explain that the document defines the repeatable process for updating the product's documentation context repository and preserving selected official reference material for local development, human review, AI-agent usage, AI-assisted development-tool usage, automation, and future MCP/RAG workflows.
7. Required Sections
Each individual CTX update document must include these sections:
# Document Scope
## 1. Purpose
## 2. Operational Use
## 3. Source and Destination
## 4. What This Script Does
## 5. PowerShell Refresh Script
## 6. Expected Result
## 7. AI Agent Instructions
## 8. Human Operator Notes
## 9. Validation Checklist
## 10. Related Repositories
Do not omit these sections unless a later documentation standard explicitly replaces this structure.
8. Required Content by Section
The document must explain:
- What the product is used for inside the service.
- Why the CTX repository exists.
- What official sources are copied.
- Where the local repository lives.
- Where the temporary source checkout folders live.
- What remote Git repository is used.
- How to run the repeat-safe refresh script.
- What successful output looks like.
- How AI agents should use the repository.
- What the repository does not contain.
- What validation checks must be completed.
- Which application repository owns the production implementation.
The document must avoid unnecessary repetition of the company name or product brand. Use neutral references such as the company, the service, the application, the internal admin document library, or the applicable service application repository when the specific name is not needed.
9. PowerShell Script Documentation Standard
The PowerShell refresh script included in the formal Markdown file must match the cheat-sheet script for that CTX repository.
Every PowerShell script or code block must start with a cd line so the operator is placed in the correct working directory before the script runs.
Required opening pattern:
cd C:\dev
$ErrorActionPreference = "Stop"
The script section must be titled:
## 5. PowerShell Refresh Script
The text immediately above the script should say:
Run this block from a normal PowerShell window.
The script must be placed inside a fenced code block marked as PowerShell:
```powershell
The script must be repeat-safe and must commit only if content changed.
10. AI Agent Instructions Standard
The ## 7. AI Agent Instructions section must instruct AI agents to treat the local CTX repository as the first reference source for work involving that product.
The section must state that the official vendor website or public upstream source may still be used when the local context appears incomplete, stale, or insufficient for a specific implementation question.
The section must also state that a normal git pull inside the CTX repository does not refresh vendor content. A normal git pull only updates the local copy from the configured remote Git repository. To refresh current official vendor content, the repeat-safe PowerShell refresh script must be run.
11. Human Operator Notes Standard
The ## 8. Human Operator Notes section must state that the refresh script is safe to run repeatedly.
The section must state that the script does not store SSH keys, passphrases, API keys, SMTP credentials, vendor secrets, company secrets, service secrets, environment files, or application configuration secrets.
The section must state that Git authentication is handled by the existing local SSH configuration on the operator's computer.
12. Validation Checklist Standard
The ## 9. Validation Checklist section must include product-specific file and folder checks.
It must also include these general checks:
- The expected local context repository exists.
- The expected key content folders or files exist.
- The local context repository contains selected official vendor reference material.
git statusdoes not show unexpected staged changes.- If changes were found, a commit was created.
- If a commit was created, it was pushed to the remote Git repository.
- Temporary source checkout folders were removed.
The validation checklist must be specific enough that a human operator or AI agent can verify whether the refresh process worked.
13. Related Repositories Standard
The ## 10. Related Repositories section must identify the CTX repository only.
It must also state that the CTX repository does not define the production implementation itself. Product implementation belongs in the applicable service application repository.
Example:
This document concerns the documentation context repository only:
C:\dev\ctx-resend
It does not define the service's email, SMTP, transactional email, notification, React Email, or template implementation itself. The implementation belongs in the applicable service application repository.
14. Existing Individual CTX Documents
Current individual CTX update documents include:
ctx-better-auth-repo-update.md
ctx-brevo-repo-update.md
ctx-resend-repo-update.md
These documents should be used as the model for future third-party vendor documentation context repository update documents, subject to this standard.
15. Relationship to Infrastructure Standard
This document controls the drafting and publication standard for CTX repository Markdown files.
The infrastructure setup and refresh process is controlled by:
CTX Repository Infrastructure Standard
When creating a new CTX repository, complete the infrastructure work first, then create the formal Markdown document using this documentation standard.
16. Publication Validation Checklist
A CTX repository documentation file is complete only after all of the following are true:
- The Markdown file name follows the
ctx-<product>-repo-update.mdpattern. - The frontmatter uses the required fields.
- The frontmatter description identifies the product's purpose inside the service.
- The first sentence under
# Document Scopeidentifies the product's purpose inside the service. - The document includes all required sections.
- The PowerShell refresh script starts with a
cdline. - The PowerShell refresh script matches the cheat-sheet script.
- The AI Agent Instructions section tells agents to search the local CTX repository first.
- The Human Operator Notes section states that secrets are not stored.
- The Validation Checklist is product-specific.
- The Related Repositories section identifies the CTX repository and the implementation boundary.
- The Markdown file is placed in the internal admin document library.
- The document can be found through the admin document library search or category view.