|
| 1 | +--- |
| 2 | +version: 0.3 |
| 3 | +project: (fill with repo name) |
| 4 | +baseline_commit: (git SHA or tag) |
| 5 | +curated_by: (name or org) |
| 6 | +--- |
| 7 | + |
| 8 | +# AI Curator Recipe — Baseline (v0.3) |
| 9 | + |
| 10 | +> This file defines the common framework for Software Curatorship projects. |
| 11 | +> Each repository customizes **§2 Product Contract**, **§10 Releases**, and **Appendix A**. |
| 12 | +> All other sections remain normatively identical across curated projects. |
| 13 | +
|
| 14 | +## 1) Intent & Scope <!-- @curator:required --> |
| 15 | +- Keep runtime minimal; favor clarity and determinism. |
| 16 | +- All user-visible behavior is test-backed and explained via ADRs. |
| 17 | +- Provenance is transparent (README “Attribution & Curation”, ADR-0010, AUTHORS). |
| 18 | +- Optional per-repo goals may be listed here. |
| 19 | + |
| 20 | +## 2) Product Contract (plain language) <!-- @curator:required --> |
| 21 | +Describe the externally visible behavior of the CLI, API, or service. |
| 22 | + |
| 23 | +| Aspect | Description | |
| 24 | +|--------|--------------| |
| 25 | +| **Inputs** | Command-line args, API payloads, files, env vars | |
| 26 | +| **Outputs/streams** | stdout → data; stderr → diagnostics | |
| 27 | +| **Exit codes** | Enumerate all used numeric codes | |
| 28 | +| **Determinism** | Define ordering, rounding, locale, or sampling rules | |
| 29 | + |
| 30 | +> See Appendix A for detailed project-specific contracts. |
| 31 | +
|
| 32 | +## 3) Curation Principles <!-- @curator:required --> |
| 33 | +- AI drafts; human curator approves and is accountable. |
| 34 | +- Non-trivial changes: add/update tests and ADRs. |
| 35 | +- Prefer stdlib/zero-deps unless ADR justifies otherwise. |
| 36 | +- Maintain transparency of reasoning and provenance. |
| 37 | + |
| 38 | +## 4) Repository Map <!-- @curator:required --> |
| 39 | +List canonical folders and files expected to exist. |
| 40 | +Example: `src/`, `tests/`, `docs/adr/`, `scripts/`, `.github/workflows/ci.yml`, `.pre-commit-config.yaml`. |
| 41 | + |
| 42 | +## 5) ADR Policy <!-- @curator:required --> |
| 43 | +- Sections: **Context · Decision · Consequences** |
| 44 | +- Status flow: Proposed → Accepted → Superseded |
| 45 | +- Index file `docs/adr/README.md` auto-maintained; CI fails if stale. |
| 46 | + |
| 47 | +## 6) Testing Strategy <!-- @curator:required --> |
| 48 | +- Cover contracts (inputs, outputs, invariants). |
| 49 | +- Add at least one edge case per behavior change. |
| 50 | +- Keep deterministic; network-free fast subset (`scripts/fast_tests.sh`). |
| 51 | + |
| 52 | +## 7) Automation — Self-Verifying <!-- @curator:required --> |
| 53 | +| Stage | Tools | Purpose | |
| 54 | +|--------|--------|---------| |
| 55 | +| **Local (pre-commit)** | Ruff, mypy, ADR guards, print-guard, fast tests | Prevent regressions early | |
| 56 | +| **CI** | Lint → Type → Tests → Build → ADR checks | Guarantee reproducibility | |
| 57 | + |
| 58 | +Optional additions: locale pinning, determinism diff, version parity check. |
| 59 | + |
| 60 | +## 8) Definition of Done <!-- @curator:required --> |
| 61 | +- Lint/types/tests/build all green. |
| 62 | +- Tests cover new/changed behavior. |
| 63 | +- Docs/ADRs updated. |
| 64 | +- Provenance intact. |
| 65 | +- Packaging/version sanity verified. |
| 66 | + |
| 67 | +## 9) AI Assistant Operating Procedure <!-- @curator:required --> |
| 68 | +1. Read tree & targets. |
| 69 | +2. Expand curator’s ask → checklist. |
| 70 | +3. Propose minimal diffs. |
| 71 | +4. Run checks; iterate to green or mark deferrals. |
| 72 | +5. Summarize deltas (Done/Deferred). |
| 73 | +6. Keep attribution; never remove license/provenance. |
| 74 | + |
| 75 | +## 10) Releases & Versioning <!-- @curator:required --> |
| 76 | +- Semantic Versioning. |
| 77 | +- Define single source of truth for version. |
| 78 | +- Tag `vX.Y.Z`; CI green required. |
| 79 | +- Release notes + changelog optional but recommended. |
| 80 | + |
| 81 | +## 11) Maintenance Rhythm <!-- @curator:optional --> |
| 82 | +Periodic curator duties: run pre-commit on all files, review README accuracy, ADR housekeeping, close incidents with guardrails. |
| 83 | + |
| 84 | +## Deferred with Rationale <!-- @curator:required --> |
| 85 | +List any postponed improvements and explain why. |
| 86 | + |
| 87 | +## Appendix A — Project-Specific Contracts <!-- @curator:required --> |
| 88 | +Use structured bullets mirroring §2. |
| 89 | +Include any CLI/API specifics, determinism rules, and domain invariants. |
| 90 | +All listed behaviors must have at least one validating test. |
| 91 | + |
| 92 | +> Validated against `ai_curator_recipe.schema.json` |
| 93 | +> Last baseline change: 2025-10-25 |
0 commit comments