repo-development
Skill0 starsChanged 7 days agoMITView on GitHub
Modify, test, and commit this repository safely. Use for any NMG code, test, CI, packaging, or repository-tooling change.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- complexity-reductionSkill
- doc-maintenanceSkill
- nmg-memorySkill
- script-reuseSkill
- verification-traceabilitySkill
- working-state-maintenanceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
17 rules. About 0 are common, 9 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 10
Keep the workflow small, evidence-based, and friendly to concurrent Agents.
- Distinctive: line 16
Treat the repository as the Agent's working environment.
- Distinctive: line 19
Treat an Agent completion claim as a proposal.
- Distinctive: line 31
Keep the repository's spending bounded: never invoke live LLM, embedding, or full benchmark workloads unless the task explicitly calls for …
- Distinctive: line 33
Keep one authoritative writer for each fact.
- Very specific: line 51
When ownership or checks are unclear, use npm run agent:context -- <target-path>.
- Distinctive: line 57
Read the applicable sections of the owning design and the exact code you will modify.
- Distinctive: line 75
Do not publish progress updates.
- Distinctive: line 90
Do not turn a temporary test into permanent architecture by accident.
- Distinctive: line 96
When adding or changing an environment gate, mode flag, or non-default feature, apply the hidden-feature registration rule in the same …
- Very specific: line 99
Update the owning design when behavior or process changes.
- Very specific: line 106
Run the targeted test, then npm run agent:verify.
- Very specific: line 112
Run long checks detached and collect them before the commit.
- Very specific: line 162
Use npm run test:research only for research adapters.
- Very specific: line 168
Commit one coherent change with only owned files.
- Very specific: line 169
Commit messages follow the repository's conventional style (type(scope): summary + a body that says what changed and why, one change per …
- Very specific: line 177
When opening a pull request, read .github/pull_request_template.md and follow it as the PR prompt: fill the three description blocks (What …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository development
简体中文 · Terms used
Keep the workflow small, evidence-based, and friendly to concurrent Agents. The code and logic should be easy to maintain. Complexity must be kept within a limit of 15.
Repository governance
- Treat the repository as the Agent's working environment. When a recurring task is hard to route or verify, improve its existing owner, route, or Skill instead of adding a private workaround or another source of truth.
- Treat an Agent completion claim as a proposal. Targeted tests, independent verification, clean CI, and—when the change crosses an external boundary—a real integration run determine whether the change holds. Each proof is scoped to what it actually measured.
- Move work, PRs, decisions, guardrails, and releases only through their explicit lifecycle operations. Do not infer a state transition from phrases such as "done" or "ship it" and do not bypass its prerequisites.
- Detect entropy aggressively: stale temporary work, expired guardrails, duplicate tests, unused compatibility layers, and superseded abstractions. Automatically remove only generated, cached, or explicitly expiring material; propose reviewable candidates before deleting source, history, public interfaces, issues, or pull requests.
- Keep the repository's spending bounded: never invoke live LLM, embedding, or full benchmark workloads unless the task explicitly calls for them.
- Keep one authoritative writer for each fact. Observe or reference GitHub, Contracts, repository state, verification receipts, and NMG memory through their owning interfaces rather than mirroring them into a competing store.
- In a shared or parallel-Agent worktree, isolate before you commit. Run
git status --shortfirst: other Agents' uncommitted changes, or a HEAD that moved under you, mean the tree is shared. Nevergit add -Aorgit commit -athere; stage only your owned paths. When the worktree is actively shared, prefer a dedicatedgit worktree addfor your change, commit only your files, and hand the shared tree back by reverting only your files to HEAD. A commit that silently swallows another Agent's working tree is a coordination failure, not a merge. When the change lands or is abandoned, remove the dedicated worktree and its branch (git worktree remove <path>thengit branch -D <name>) so used-up worktrees do not accumulate.
Before editing
- Locate the target and its owning contract using the
discovery protocol.
When ownership or checks are unclear, use
npm run agent:context -- <target-path>. Its owner paths are lookup candidates, not a requirement to read whole files. Positional paths select explicit scope;--changedadds dirty Git paths. Reconciliationunknownmeans missing applicable evidence;driftedmeans inspect the reported mismatch. Neither status is an architectural verdict. - Inspect
git status --short; preserve unrelated changes and commit only your files. - Read the applicable sections of the owning design and the exact code you will modify. For documentation or process changes, follow doc-maintenance; for scripts, analysis tools, probes or maintenance automation, including retained and resumable jobs, follow script-reuse.
- State a testable outcome. For defects and lifecycle work, write the failing behavior test first.
Immediately before the first substantive file write, register one open in-flight goal on the
repo-developmentTask Board channel. Its content contains onlygoal,approach, andscope; use one entry for the coherent task, not one per file or step. Follow the daemon ownership rules innmg-memory, and retain the returned entry ID:nmg board put repo-development \ "goal=<outcome>; approach=<intended method>; scope=<owned paths>" \ --agent <stable-agent-id> --kind goal --ttl-seconds 86400 --jsonDo not publish progress updates. Writer attribution marks the initial worker; another Agent may claim the same open entry if it must take over. If the board is unavailable because this task is repairing NMG lifecycle or board code, report that limitation and continue rather than making the repository unrepairable.
Classify tests
- Safety: prevents corruption, leaks, unsafe deletion, or security regressions. Blocking and durable.
- Contract: protects a public API, protocol, package, persistence, or supported integration. Blocking and durable.
- Guardrail: temporarily blocks a known regression while the design is being repaired. Put it under
tests/guardrails/<id>/withguardrail.yaml; recordreason,review_after, andexit_criteria. - Characterization/research: measures current behavior or hypotheses. It must not redefine product correctness and is non-blocking in CI.
Do not turn a temporary test into permanent architecture by accident. Promote it to safety/contract, or remove it when its exit criteria are met.
Implement and verify
- Make the smallest coherent change; keep optional infrastructure behind a narrow adapter. When adding or changing an environment gate, mode flag, or non-default feature, apply the hidden-feature registration rule in the same change.
- Update the owning design when behavior or process changes. A non-trivial
change also adds or updates at least one record under
docs/decisions/in the same commit. It is non-trivial when it alters behavior, a contract shared across files or packages, package or module structure, process or tooling, test strategy, or an on-disk, wire, or configuration format; formatting, comment wording, typo fixes, and behavior-free dependency bumps are exempt. Followdoc-maintenance. - Run the targeted test, then
npm run agent:verify. With no arguments it automatically detects Git changes, selects routes, executes the exact blocking checks, and overwrites.nmg/verification/latest.jsonwith structured evidence. In a shared dirty worktree, pass-- <owned-path>so unrelated changes stay outside the plan. Use--include-advisoryonly when research or chaos cost is intentional. Run long checks detached and collect them before the commit. The cheap decisive checks — LSP diagnostics on touched files, format, lint,
complexity:gate,docs:check— stay synchronous; the expensive three — fullmutation:teeth,test:product, theevals/**suites — are launched as soon as the code they measure is final, while the documentation and the cheap lane are written:{ echo "started=$(date -Is)"; echo "snapshot=$(git rev-parse HEAD)"; } > .temp/x.state (npm run X > .temp/x.log 2>&1; echo "exit=$?" >> .temp/x.state) & echo "pid=$!" >> .temp/x.stateEach launch is its own statement, header in the foreground:
A && B &backgrounds the whole list, which truncates the state file after itspid=line — the one state that cannot be read.A launch returns immediately and is never followed by a wait — no
sleep, no poll loop, no peeking to see whether the state is worth reading yet: the collector reads it at the next natural checkpoint while the time goes to the rest of the change. With nothing else to do, run the check synchronously instead.Read a detached run's state as three outcomes, not two. Finished: the state file carries
exit=<code>, and that code is the result. Still running: noexit=yet and the recorded pid is alive (kill -0 <pid>from a later shell); elapsed time is not a state, so a long runtime is never read as a failure, and telling working from wedged uses the check's own progress rather than the clock. What that progress is depends on the check, and the two are not interchangeable: an npm test lane streams its TAP (one line per test), whilemutation:teethwrites its summary only at the end — its live signal is the lock file'starget, which moves as it takes each target, plus the target file's mtime as it substitutes and restores. Measuring progress by the wrong one reads a working sweep as wedged. Died: noexit=and the pid is gone, so nothing wrote a code — the run was killed, and it may have left a mutant in the tree; the lock says which target, andgit diffit first.A detached run records the tree it measured, and the collector compares that with the current one: a code change means re-run. Never edit or stage a file a mutation run is rewriting — a running run shows its current target as modified in
git status, holding a live mutant, and anything staged then is the mutant, not the work — and scoped--targets=runs during a change and one full run before a push answer different questions. The measured costs and traps are in the decision.A running sweep makes the tree unreadable, not only unwritable. Between its substitution and its restore the target file is the mutant, so
lint,complexity:gateand any other check run in that window report on the mutant — and a check that passes there is evidence about code that never existed. The sweep now says so in the tree (.temp/mutation-lock.json,tools/mutation-lock.ts),npm run agent:verifyrefuses while it is held rather than reporting on a mutant, andnpm run agent:contextprints it. Never re-derive that from memory: the whole failure class is post-mortem 0003.- Use
npm run test:researchonly for research adapters; usenpm run test:chaosfor explicit lifecycle fault testing. Neither substitutes for product tests. - For CI, packaging, or generated-output changes (see
builds and generated artifacts), validate from a clean checkout
or use
--require-cleanin an equivalent clean tree. CI automatically runs the namedverify:*package contracts on push and pull request. - Commit one coherent change with only owned files. Leave unrelated user or Agent work untouched.
Commit messages follow the repository's conventional style
(
type(scope): summary+ a body that says what changed and why, one change per commit). A commit is a proposal, not a proof: the verification evidence (targeted test +agent:verify) is what makes it hold, so do not claim a check passed in the message unless it ran. Evidence has no third state: a failure that cannot be reproduced is recorded with its reproduction attempt and rate, or left open — never as "flaky", which is a label that closes a question nobody answered (post-mortem 0004). - When opening a pull request, read
.github/pull_request_template.mdand follow it as the PR prompt: fill the three description blocks (What / Why / Changes) from the change plus未验证项, which names the surface the change did not exercise — a route that did not run, a platform or environment that was not built or booted, a build mode, or a behavior with no reproducer. WriteNone.only when nothing is outstanding. That declaration states scope; it never replaces a check and a green gate never makes it unnecessary. Then self-check every box in the completion checklist before marking the PR ready — the checklist is the same contract CI enforces, and it catches locally what a CI round-trip would cost. Draft PRs and CI status are owned by the forge; the template checklist is the submitter's own pre-flight, not a substitute forAll checks passed. - Resolve the in-flight goal after the task is completed or deliberately abandoned. The board records that work is active, not a step-by-step history; Git and verification evidence remain the source of actual implementation state.
When to read the manual
Everything above is the path an ordinary change walks. Two subjects are only needed for a specific kind of change:
- For RCP operations
agent:verifydoes not cover (forge status, plan/compile, receipts, an explicit reconcile, PR binding), and for the rule against scanning oversized trees by default: control plane - For building this repository, regenerating outputs, subpackage installs, or lockfile drift: builds and generated artifacts
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

