|
1 | 1 | # AGENTS.md |
2 | 2 |
|
3 | | -> Start with `.rabbit/context.yaml` for full repo context. Run `dev.kit repo` to refresh. |
| 3 | +_Auto-generated by `dev.kit agent`. Source of truth: `.rabbit/context.yaml`._ |
4 | 4 |
|
5 | | -## documented-shell-repo |
| 5 | +## Rules |
6 | 6 |
|
7 | | -Library or CLI tool — reusable code published as a package or standalone command-line tool |
| 7 | +1. **Do NOT scan the filesystem.** No `find`, `ls -R`, `glob`, or recursive directory walks. All paths you need are listed in this file. |
| 8 | +2. **Read only files listed in Priority refs and Config manifests.** If a file is not listed, do not read it unless a listed file explicitly references it. |
| 9 | +3. **Verify locally before committing.** Run the verify command below before reporting work as done. Do not skip this step. |
| 10 | +4. **Follow the Workflow below as your execution contract.** Do not invent ad hoc steps or skip workflow phases. |
| 11 | +5. **Use config manifests as traceable dependencies.** When you need to understand how something works, check the YAML manifest that defines it — not the code that reads it. |
8 | 12 |
|
9 | | -## Start here |
| 13 | +## Repo: documented-shell-repo |
10 | 14 |
|
11 | | -- ./.rabbit/context.yaml |
12 | | -- ./README.md |
13 | | -- ./.rabbit |
14 | | -- ./scripts |
15 | | -- ./tests |
16 | | -- /Users/jonyfq/git/udx/dev.kit/.github/ISSUE_TEMPLATE |
| 15 | +- archetype: library-cli |
| 16 | +- profile: shell |
17 | 17 |
|
18 | 18 | ## Commands |
19 | 19 |
|
20 | | -- **verify**: `bash tests/run.sh` |
| 20 | +``` |
| 21 | + verify: bash tests/run.sh |
| 22 | +``` |
| 23 | + |
| 24 | +## Priority refs |
| 25 | + |
| 26 | +Read these for full context. Do not explore beyond them. |
| 27 | + |
| 28 | + - ./README.md |
| 29 | + - ./.rabbit |
| 30 | + - ./scripts |
| 31 | + - ./tests |
| 32 | + - /Users/jonyfq/.udx/dev.kit/src/configs/github-issues.yaml |
| 33 | + - /Users/jonyfq/.udx/dev.kit/src/configs/github-prs.yaml |
| 34 | + - https://raw.githubusercontent.com/udx/dev.kit/main/.github/ISSUE_TEMPLATE |
| 35 | + - https://raw.githubusercontent.com/udx/dev.kit/main/.github/PULL_REQUEST_TEMPLATE.md |
21 | 36 |
|
22 | 37 | ## Gaps |
23 | 38 |
|
24 | | -- **architecture** (partial) — Some architectural boundaries are visible, but the repository structure is not fully normalized yet. Separate commands, modules, templates, and config more explicitly. |
25 | | -- **config** (missing) — Externalize configuration and document the environment contract so the repo can move cleanly across environments. |
| 39 | + - architecture (partial) |
| 40 | + - config (missing) |
26 | 41 |
|
27 | 42 | ## Workflow |
28 | 43 |
|
29 | | -- Read the highest-priority repo refs first: ./.rabbit/context.yaml, ./README.md, ./.rabbit, ./scripts, ./tests, /Users/jonyfq/git/udx/dev.kit/.github/ISSUE_TEMPLATE, /Users/jonyfq/git/udx/dev.kit/.github/PULL_REQUEST_TEMPLATE.md, /Users/jonyfq/git/udx/dev.kit/src/configs/github-issues.yaml, /Users/jonyfq/git/udx/dev.kit/src/configs/github-prs.yaml |
30 | | -- Run the canonical verification command: `bash tests/run.sh` |
31 | | -- Review lessons-learned and follow-up outputs after changes stabilize: `dev.kit learn` |
| 44 | +Follow these steps in order. Steps with notes contain operational guidance — read them. |
| 45 | + |
| 46 | + - Refresh repo context: If .rabbit/context.yaml is stale or absent, run `dev.kit repo` then `dev.kit agent` before starting work. A current context.yaml is the source of truth for refs, commands, gaps, and lessons. Do not rely on ad hoc prompt memory when the repo contract can be read from disk. |
| 47 | + - Read linked GitHub issue and confirm scope: If a GitHub issue URL is available, read the full body and comments, confirm the repo matches the issue scope, and map acceptance criteria before writing any code. Use the issue URL as the cross-repo context root. |
| 48 | + - Inspect git status |
| 49 | + - Analyze local changes |
| 50 | + - Analyze branch state |
| 51 | + - Group logical commits |
| 52 | + - Bump version and changelog if supported |
| 53 | + - Create or validate feature branch |
| 54 | + - Push branch to remote |
| 55 | + - Generate pull request description: Pick the PR template type from src/configs/github-prs.yaml (feature, deployment, ops, hotfix). Fill every required section. Include "Closes #N" for linked issues. Add a "Backlog from this investigation" section for any new gaps found. Use .github/PULL_REQUEST_TEMPLATE.md as the base form. |
| 56 | + - Create pull request |
| 57 | + - Read and respond to automated reviews: After PR creation, wait for Copilot, Devin, and CodeQL reviews. Read each review from github-prs.yaml bot guidance. Address actionable findings — reply to each bot comment. Do not request human review while bot findings are unaddressed. |
| 58 | + - Verify required status checks: All required checks must pass before requesting human review. For infra PRs, open check details and review the Terraform plan output. For CodeQL, review findings in the Security tab. |
| 59 | + - Post close-out comment on linked issue: After PR is created, post a brief comment on the linked issue with the PR URL, what changed, and any follow-up items. GitHub auto-closes the issue on merge when "Closes #N" is in the PR body — do not close manually. |
| 60 | + - Post-merge close-out and backlog: After merge: verify issue auto-closed, post close-out comment, open issues for any backlog items from the PR, verify monitoring changes are live. See post_merge steps in github-prs.yaml. |
| 61 | + |
| 62 | +## Engineering practices |
| 63 | + |
| 64 | + - Keep the repository as the primary source of truth so context-driven engineering comes from repo contracts, docs, tests, config, and repo-native notes instead of agent memory. |
| 65 | + - Prefer repo-centric mechanisms that discover workflows, tools, formats, and refs dynamically instead of hardcoding per-agent assumptions. |
| 66 | + - Keep markdown, yaml, diagrams, tests, and command contracts self-contained in the repo so local and remote UDX workflows stay aligned. |
| 67 | + - Keep deterministic workflow logic in repo config and scripts, and reserve AI agents for reading that contract, generating grounded summaries, and handling non-deterministic judgment without inventing hidden rules. |
| 68 | + - Do not require custom repo files for dev.kit to work. Prefer standard engineering signals such as README, docs, tests, manifests, workflows, and deployment config, with dev.kit-owned continuity treated as optional acceleration only. |
| 69 | + - Make sure to develop and test incrementally, so it is easier to detect problems early and build on verified behavior. |
| 70 | + - Make sure to protect development executions with scoped and limited tasks, so failures are easier to isolate and blast radius stays low. |
32 | 71 |
|
0 commit comments