Flat must-do/never-do rules sheet per system and layer, extracted from Accepted ADRs. ADRs explain why; this is actionable.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-create-control-manifest-62cf6724466a ,按照其中的说明把「create-control-manifest」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
!bash "${CLAUDE_SKILL_DIR}/../../hooks/yaml-helper.sh" resolve_config --keys automation
The Control Manifest is a flat, actionable rules sheet for programmers. It answers "what do I do?" and "what must I never do?" — organized by architectural layer, extracted from all Accepted ADRs, technical preferences, and engine reference docs. Where ADRs explain why, the manifest tells you what.
Output: docs/architecture/control-manifest.md
When to run: After /architecture-review passes and ADRs are in Accepted
status. Re-run whenever new ADRs are accepted or existing ADRs are revised.
Every AskUserQuestion call follows .claude/docs/automation-modes.md
(collaborative asks always · guided major-only · autonomous logs and proceeds;
automation_always_ask categories always prompt).
Establish the denominator first. Glob docs/architecture/adr-*.md. Call the
count N. If N is 0: "No ADRs found — run /architecture-decision before
building a control manifest." Stop.
Resolve status without reading the ADRs — the filter must precede the read, not follow it:
Grep pattern="^## Status" glob="docs/architecture/adr-*.md" output_mode="content" -A 3
Interpret against N:
| Result | Meaning | Action |
|---|---|---|
N matches, some read Accepted | Normal. | The Accepted set is A; proceed with A. |
N matches, none Accepted | Genuinely no Accepted ADRs. | "[N] ADRs found, none Accepted. A manifest built from Proposed ADRs would encode decisions that may still change." Ask whether to proceed with Proposed or stop. Do not silently emit an empty manifest. |
| 0 matches, N > 0 | Malformed ADRs — not an empty Accepted set. ## Status is BLOCKING-if-missing. | "[N] ADRs found, none has a ## Status section — acceptance cannot be determined. Run /architecture-decision [file] retrofit on each." Stop. Do not treat all ADRs as Accepted; do not emit a manifest. |
naming.* and performance.* from project.yaml; for any key absent or
empty, fall back to .claude/docs/technical-preferences.md.claude/docs/technical-preferences.md (not migrated to project.yaml)docs/engine-reference/[engine]/VERSION.md for engine + versiondocs/engine-reference/[engine]/deprecated-apis.md — these become
forbidden API entriesdocs/engine-reference/[engine]/current-best-practices.md if it existsReport: "Loaded [N] Accepted ADRs, engine: [name + version]."
Read only these four sections per Accepted ADR — not the whole file. Context, Consequences, Migration Plan and Validation Criteria explain why a decision was made; the manifest records what to do, so they are not needed here:
Grep pattern="^## (Decision|Alternatives Considered|Performance Implications|Engine Compatibility)" glob="docs/architecture/adr-*.md" output_mode="content" -A 30
Filter the results to the Accepted set A resolved above. If a section is
absent for a given ADR, note it per ADR and continue; if a section is absent
across all of A, report "No Accepted ADR contains a [section] section — the
manifest's [category] rules will be empty. Verify this is intended." Escalate to
a full read of one ADR only when its scanned sections cross-reference material
outside them (e.g. a Decision that says "subject to the constraints in Context").
For each Accepted ADR, extract:
## Decision section)### Implementation Guidelines sub-heading when the ADR has one
(newer ADRs emit it; older ones state mandates directly in ## Decision). Never
scan for ### Implementation Guidelines alone — it is absent from many
skill-authored ADRs, and scanning for it yields an empty Required Patterns
section on a manifest that should have been full.Classify each rule by the architectural layer of the system it governs:
If an ADR spans multiple layers, duplicate the rule into each relevant layer.
Combine rules that apply to all layers:
project.yaml, else technical-preferences.md):naming.*: classes, variables, signals/events, files, constantsperformance.*: target framerate, frame budget, draw call limits, memory ceilingEach entry must apply to what this project actually builds.
deprecated-apis.mdmixes dimensions and subsystems: itsGodotPhysics3D → Jolt Physics 3Drow is 3D-only, so emitting it unqualified gives a 2D project a global rule about a physics engine it never uses. If you cannot tell whether an entry applies — 2D vs 3D, a module the project does not include — either scope the rule ("when using 3D physics: ...") or omit it and note it as unresolved. A manifest of rules that do not apply is one nobody reads, and/create-storiesconsumes this file.
Before writing the manifest, present a summary to the user:
## Control Manifest Preview
Engine: [name + version]
ADRs covered: [list ADR numbers]
Total rules extracted:
- Foundation layer: [N] required, [M] forbidden, [P] guardrails
- Core layer: [N] required, [M] forbidden, [P] guardrails
- Feature layer: ...
- Presentation layer: ...
- Global: [N] naming conventions, [M] forbidden APIs, [P] approved libraries
Use AskUserQuestion:
[A] Yes — looks good, run the director review and write the manifest[B] Add rules — I have additional rules to include before writing[C] Remove rules — some extracted rules should be dropped[D] Stop here — I need to review the ADRs firstReview mode check — apply before spawning TD-MANIFEST:
solo → skip. Note: "TD-MANIFEST skipped — Solo mode." Proceed to Phase 5.lean → skip. Note: "TD-MANIFEST skipped — Lean mode." Proceed to Phase 5.full → spawn as normal.Spawn technical-director via Agent using gate TD-MANIFEST (.claude/docs/director-gates/td-manifest.md).
Pass: the Control Manifest Preview from Phase 4 (rule counts per layer, full extracted rule list), the list of ADRs covered, engine version, and any rules sourced from technical-preferences.md or engine reference docs.
The technical-director reviews whether:
Apply the verdict:
AskUserQuestion with options: Revise flagged rules / Accept and proceed / Discuss furtherUse AskUserQuestion:
[A] Yes — write to docs/architecture/control-manifest.md[B] Show me the full draft first, then ask again[C] Not yet — I want to make more changesFormat:
# Control Manifest
> **Engine**: [name + version]
> **Last Updated**: [date]
> **Manifest Version**: [date]
> **ADRs Covered**: [ADR-NNNN, ADR-MMMM, ...]
> **Status**: [Active — regenerate with `/create-control-manifest update` when ADRs change]
`Manifest Version` is the date this manifest was generated. Story files embed
this date when created. `/story-readiness` compares a story's embedded version
to this field to detect stories written against stale rules. Always matches
`Last Updated` — they are the same date, serving different consumers.
This manifest is a programmer's quick-reference extracted from all Accepted ADRs,
technical preferences, and engine reference docs. For the reasoning behind each
rule, see the referenced ADR.
---
## Foundation Layer Rules
*Applies to: scene management, event architecture, save/load, engine initialisation*
### Required Patterns
- **[rule]** — source: [ADR-NNNN]
- **[rule]** — source: [ADR-NNNN]
### Forbidden Approaches
- **Never [anti-pattern]** — [brief reason] — source: [ADR-NNNN]
### Performance Guardrails
- **[system]**: max [N]ms/frame — source: [ADR-NNNN]
---
## Core Layer Rules
*Applies to: core gameplay loop, main player systems, physics, collision*
### Required Patterns
...
### Forbidden Approaches
...
### Performance Guardrails
...
---
## Feature Layer Rules
*Applies to: secondary mechanics, AI systems, secondary features*
### Required Patterns
...
### Forbidden Approaches
...
---
## Presentation Layer Rules
*Applies to: rendering, audio, UI, VFX, shaders, animations*
### Required Patterns
...
### Forbidden Approaches
...
---
## Global Rules (All Layers)
### Naming Conventions
| Element | Convention | Example |
|---------|-----------|---------|
| Classes | [from naming.* in project.yaml, else technical-preferences.md] | [example] |
| Variables | [from naming.* in project.yaml, else technical-preferences.md] | [example] |
| Signals/Events | [from naming.* in project.yaml, else technical-preferences.md] | [example] |
| Files | [from naming.* in project.yaml, else technical-preferences.md] | [example] |
| Constants | [from naming.* in project.yaml, else technical-preferences.md] | [example] |
### Performance Budgets
| Target | Value |
|--------|-------|
| Framerate | [from performance.* in project.yaml, else technical-preferences.md] |
| Frame budget | [from performance.* in project.yaml, else technical-preferences.md] |
| Draw calls | [from performance.* in project.yaml, else technical-preferences.md] |
| Memory ceiling | [from performance.* in project.yaml, else technical-preferences.md] |
### Approved Libraries / Addons
- [library] — approved for [purpose]
### Forbidden APIs ([engine version])
These APIs are deprecated or unverified for [engine + version]:
- `[api name]` — deprecated since [version] / unverified post-cutoff
- Source: `docs/engine-reference/[engine]/deprecated-apis.md`
### Cross-Cutting Constraints
- [constraint that applies everywhere, regardless of layer]
After writing the manifest:
/create-epics layer: foundation then /create-stories [epic-slug] — programmers
can now use this manifest when writing story implementation notes."Applies in collaborative mode (the default). For guided and
autonomous modes, see .claude/docs/automation-modes.md — the rules below
describe what collaborative mode requires, not universal behavior.