|
| 1 | +# Context Contract |
| 2 | + |
| 3 | +`dev.kit` is a deterministic repo tool. It reads repo-owned evidence, emits a compact generated contract, and exposes weak coverage so humans, agents, scripts, and CI/CD can work from the same repository state. |
| 4 | + |
| 5 | +The generated contract is `.rabbit/context.yaml`. |
| 6 | + |
| 7 | +## What dev.kit Reads |
| 8 | + |
| 9 | +`dev.kit` should prefer repo-owned surfaces that a maintainer can review and repair: |
| 10 | + |
| 11 | +- `.rabbit/context.yaml` when checking existing generated context state |
| 12 | +- `AGENTS.md`, `CLAUDE.md`, and similar repo-owned instruction files |
| 13 | +- `README.md`, `changes.md`, and focused docs |
| 14 | +- `.github/workflows/` |
| 15 | +- manifests such as `deploy.yml`, package manifests, Docker files, and structured YAML configs |
| 16 | +- scripts, Makefiles, tests, and checked-in examples that define runnable behavior |
| 17 | + |
| 18 | +Live services such as GitHub issues, PRs, reviews, and workflow runs can help a current task, but they should not become durable repo truth inside `.rabbit/context.yaml`. |
| 19 | + |
| 20 | +## What dev.kit Emits |
| 21 | + |
| 22 | +`.rabbit/context.yaml` should contain generated repo evidence and deterministic interpretation: |
| 23 | + |
| 24 | +- generator metadata, version, source refs, and generation timestamp |
| 25 | +- repo identity and archetype |
| 26 | +- direct-read refs for humans and agents |
| 27 | +- detected verify, build, and run commands with sources |
| 28 | +- coverage gaps with evidence and repair targets |
| 29 | +- dependency contracts such as reusable workflows, images, and versioned manifests |
| 30 | +- manifest inventory with provenance and usage evidence |
| 31 | + |
| 32 | +The artifact should be portable. It must not contain machine-local absolute paths, temp files, cache paths, or generated evidence that only exists on one workstation. |
| 33 | + |
| 34 | +## What dev.kit Must Not Own |
| 35 | + |
| 36 | +`dev.kit` must not become the source of truth for: |
| 37 | + |
| 38 | +- global UDX strategy |
| 39 | +- app-specific runtime truth |
| 40 | +- secrets, credentials, or local machine state |
| 41 | +- issue, PR, or Slack conversation history |
| 42 | +- long-form agent prompts or subjective workflow narration |
| 43 | +- hand-authored corrections to generated context |
| 44 | + |
| 45 | +If a gap needs durable meaning, repair the owning repo asset and rerun `dev.kit repo`. |
| 46 | + |
| 47 | +## Workflow Boundary |
| 48 | + |
| 49 | +The command surface stays small: |
| 50 | + |
| 51 | +- `dev.kit` inspects environment and repo context status. |
| 52 | +- `dev.kit env` reports tool, credential, and capability coverage. |
| 53 | +- `dev.kit repo` generates or refreshes `.rabbit/context.yaml`. |
| 54 | + |
| 55 | +Inspection should be read-only unless the command is explicitly a writer. Repair should happen in repo-owned assets, not in generated output. |
| 56 | + |
| 57 | +## Integrity Rules |
| 58 | + |
| 59 | +The context contract is useful only when it stays traceable: |
| 60 | + |
| 61 | +- Prefer structured evidence over inferred prose. |
| 62 | +- Keep observed facts and inferred relationships visibly separate. |
| 63 | +- Emit gaps instead of guessing. |
| 64 | +- Record source paths for commands, manifests, and repair references. |
| 65 | +- Keep direct-read refs concise. |
| 66 | +- Keep generated output portable across machines. |
| 67 | +- Treat stale or legacy generator metadata as a reason to rerun `dev.kit repo`. |
| 68 | + |
| 69 | +For the stable machine-readable shapes, see [Reference: Output Schemas](references/output-schemas.md). |
0 commit comments