Template & Example File Inventory¶
This project includes templates, examples, and starter files across many directories. Before creating a new file, check whether a relevant template already exists — following the established pattern saves time and keeps the project consistent.
Quick Reference¶
| Category | Template / Example | Location | Notes |
|---|---|---|---|
| ADR | ADR template | docs/adr/template.md |
Copy to NNN-short-title.md, fill in sections |
| Exploration | Exploration template | docs/explorations/template.md |
Copy to NNN-short-description.md, fill in sections |
| Blueprint | Blueprint template | docs/blueprints/template.md |
Copy to NNN-short-description.md, fill in sections |
| Impl Plan | Implementation plan template | docs/implementation-plans/template.md |
Copy to NNN-short-description.md, fill in sections |
| Workflow | Any existing workflow | .github/workflows/*.yml |
Follow repo guard pattern, SHA-pinned actions, naming conventions |
| Script (CLI) | Any script in scripts/ |
scripts/ |
Use argparse, shebang, logging; mark executable in git |
| Script (lib) | Shared progress module | scripts/_progress.py |
Underscore prefix = internal module, not a CLI |
| MkDocs hook | repo_links hook | mkdocs-hooks/repo_links.py |
Register in mkdocs.yml under hooks: |
| Migration | Example SQL migration | db/migrations/001_example_migration.sql |
Numbered, idempotent, with rollback |
| Seed | Example seed data | db/seeds/001_example_seed.sql |
Numbered, idempotent |
| SQL query | Example queries | db/queries/example_queries.sql |
Documented queries for common operations |
| Security policy | Standard (no bounty) | docs/templates/SECURITY_no_bounty.md |
Copy to repo root as SECURITY.md |
| Security policy | With bug bounty | docs/templates/SECURITY_with_bounty.md |
Copy to repo root as SECURITY.md |
| Bug bounty | Standalone bounty policy | docs/templates/BUG_BOUNTY.md |
Link from SECURITY.md |
| PR template | Pull request description | docs/templates/pull-request-draft.md |
Copy to .github/PULL_REQUEST_TEMPLATE.md |
| Issue template | Bug report, feature request, docs | .github/ISSUE_TEMPLATE/*.yml |
YAML-based issue forms |
| Issue template | Additional templates (question, perf) | docs/templates/issue_templates/ |
Copy what you need to .github/ISSUE_TEMPLATE/ |
| VS Code | Workspace settings | *.code-workspace |
Extensions, settings, file exclusions |
| Experiment | API test, data exploration | experiments/ |
Throwaway scripts, not part of the package |
| Commit message | Conventional commit template | .gitmessage.txt |
git config commit.template .gitmessage.txt |
| Repo doctor | Health check rules | repo_doctor.d/*.toml |
Add new .toml rule files per category |
Conventions When Creating New Files¶
Scripts¶
- Add
#!/usr/bin/env python3shebang, then mark executable:git add --chmod=+x scripts/my_script.py - Use
argparsefor CLI flags (--help,--version,--dry-run) - Use
loggingfor status messages,print()only for primary output - Internal/shared modules use
_prefix (e.g.,_progress.py) - After creating: update
scripts/README.mdand re-runpython scripts/generate_command_reference.py
MkDocs Hooks¶
- Place in
mkdocs-hooks/directory - Register in
mkdocs.ymlunderhooks: - Update
mkdocs-hooks/README.mdinventory - Follow the pattern in existing hooks (module docstring, logging, version constant)
Workflows¶
- SHA-pin all GitHub Actions (ADR 004)
- Include repository guard pattern (ADR 011)
- Add
TODO (template users)comment for enabling the guard - Update
docs/workflows.mdinventory - Update
REQUIRED_CHECKSinci-gate.ymlif the workflow is a required check
ADRs¶
- Copy
docs/adr/template.mdtodocs/adr/NNN-short-title.md - Update
docs/adr/README.mdindex table - Update
mkdocs.ymlnav under ADRs section - Update
.github/copilot-instructions.mdADR table if the ADR affects day-to-day work
Database Files¶
- Migrations: numbered (
NNN_description.sql), idempotent, include rollback - Seeds: numbered, idempotent
- Queries: documented with comments explaining purpose
Related Docs¶
- Repo layout — what each top-level directory contains
- Script conventions — full ADR on script patterns
- Documentation organization — where docs go
- scripts/README.md — script inventory with descriptions
- mkdocs-hooks/README.md — hook inventory