plan-architecture
Skill4 starsChanged 6 days agoMITView on GitHub
Architecture design for the Planning phase — codebase convention discovery, 2-3 option trade-off analysis, and the PLAN.md structure that Codex executes against.
5 other projects use a version of this.
Adopted by
Most recently taken up by
- a3449731/chinese-agent-skillstheir own version, first seen Nov 29, 2026
- jamal-gml/anthropicatheir own version, first seen Nov 22, 2026
- coleam00/skillstheir own version, first seen Nov 21, 2026
- eider404/agent-forgetheir own version, first seen Oct 20, 2026
- nobufumi-tego/gcp-agile-templatetheir own version, first seen May 4, 2026
Used with
Projects with it also use piv-implement, piv-plan-implementation and 8 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
a3449731Skillpiv-implement
按计划逐任务执行实现,每一步都做验证。当你有一份完成的特性计划并想一次实现它时使用。
Also in 3 projects that use this
a3449731Skillpiv-plan-implementation
通过深度代码库分析、一次简短的澄清访谈和外部调研,创建一份全面、上下文丰富的实现计划。输入可以是工单系统的 ticket(Jira/Linear/GitHub 的 key 或 URL,从工单系统获取),也可以是自由描述的特性需求。当你有 ticket 或特性需求、希望在写任何代码之前拿到一份一步到位(one-pass)的现成计划时使用。
Also in 3 projects that use this
acgs-aiSkillrules-check-drift
Check whether your rules file (CLAUDE.md or AGENTS.md) still matches the codebase after recent changes — run before a merge, or fold into your code-review pass. Reports stale/now-false rules, drifted architecture-map entries, and any new invariant worth adding, each with the minimal edit. Advisory and anti-bloat: it keeps the rules file true, never longer than it needs to be.
Also in 3 projects that use this
- +7 more from a3449731
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- coleam00/skills★ 802same name
- a3449731/chinese-agent-skills★ 1same name
- eider404/agent-forge★ 1same name
- jamal-gml/anthropica★ 0same name
- nobufumi-tego/gcp-agile-template★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository76 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accounting-bookkeepingSkill
- agent-context-persistenceSkill
- asoSkill
- brainstorm-argumentationSkill
- brainstorm-debateSkill
- brainstorm-lensesSkill
- causal-inferenceSkill
- context-disciplineSkill
- creative-briefSkill
- customer-support-opsSkill
- data-quality-checksSkill
- design-fundamentalsSkill
- ecommerce-operationsSkill
- event-taxonomySkill
- exec-coding-standardsSkill
- exec-cppSkill
- exec-csharpSkill
- exec-deliverableSkill
- exec-github-actionsSkill
- exec-goSkill
- exec-jvmSkill
- exec-phpSkill
- exec-pythonSkill
- exec-rubySkill
- exec-rustSkill
- exec-self-testingSkill
- exec-swiftSkill
- exec-typescriptSkill
- executor-fallbackSkill
- exec-visualizationSkill
- fast-pathSkill
- final-reviewSkill
- financial-auditSkill
- hr-recruitingSkill
- influencer-strategySkill
- interview-ask-backSkill
- interview-elicitationSkill
- jev-assistSkill
- json-data-wranglingSkill
- legal-contract-basicsSkill
- localization-copySkill
- manufacturing-ops-planningSkill
- marketing-attributionSkill
- media-planningSkill
- okr-planningSkill
- pack-game-analyticsSkill
- parallel-executionSkill
- performance-marketingSkill
- personal-financeSkill
- plan-backlogSkill
- plan-research-firstSkill
- preflightSkill
- profile-contentSkill
- profile-designSkill
- profile-pilotSkill
- profile-planSkill
- real-estate-analysisSkill
- review-conformanceSkill
- review-dualSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 4 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Never present only one option — the first idea is rarely the best, and the comparison is what makes the plan reviewable.
- Distinctive: line 47
Use the full structure the flow executes against (all sections — the reviewer reads these back in Phase 5):
- Very specific: line 75
Keep ## Context to one paragraph followed by a bullet list of conventions.
- Distinctive: line 79
After each task passes, append exactly one block using this schema.
- Very specific: line 86
After appending, run node "${CLAUDE_PLUGIN_ROOT}/scripts/context-slice.mjs" --check-plan.
- Very specific: line 89
When appending either schema, have that single writer run git rev-parse HEAD and record the result in Anchor.
- Distinctive: line 116
Design for the diff: prefer changes that stay localized and additive over invasive rewrites, so each task produces a small diff a reviewer …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Architecture Planning
Helpers: required — context-slice.mjs (helper rule).
Step 1 — Discover conventions before designing
Read .codex-flow/PROJECT.md first when it exists — it is the durable project context. Then read the codebase until you can answer: How are modules organized (by feature or by layer)? How do errors propagate? Where does validation live? How is the existing code tested? What naming style rules? Your design must read like the codebase's current author wrote it — deviations are review findings waiting to happen.
Step 2 — Compare options before choosing
For any non-trivial design decision, write 2–3 realistic options with trade-offs:
### Decision: <what>
- Option A: … | + simple, matches existing pattern X | − doesn't scale past Y
- Option B: … | + handles Y | − new dependency, more moving parts
→ Chosen: A, because Y is out of scope (see requirements).Never present only one option — the first idea is rarely the best, and the comparison is what makes the plan reviewable. Tie every "chosen because" back to a confirmed requirement.
Step 3 — Define the contracts, then the component→files map
This is the step that makes the backlog sliceable and the review deterministic. Before writing tasks:
- Contract-first: pin down the seams between components — function/method signatures, data shapes (types/schemas), API request/response contracts, event/DB record shapes. Write them in PLAN.md concretely, not "a service that returns users". Once a boundary's contract is fixed, work on either side of it becomes independent and each task reviews against a stable contract instead of a moving target. Shared contracts (types, interfaces, schema/migration) become the FIRST tasks so everything downstream can build — and be reviewed — against them.
- Component → files map: for each component the change touches, list the exact files to create
or modify. This is what the backlog slices along; keeping the per-component file sets disjoint is
what later lets
task-wavesrun tasks in parallel. Overlapping file sets = tasks that must serialize — call that out here. - Codex is repo-blind: it sees only the prompt + files it opens. Name the exact existing files
it should read for patterns (
follow the shape of src/api/orders.ts), and spell out any repo-wide convention it can't infer from the task's files alone.
Step 4 — Write PLAN.md
Use the full structure the flow executes against (all sections — the reviewer reads these back in Phase 5):
# Plan: <feature>
## Context — what the project is; conventions Codex MUST follow (list them explicitly)
## Objective — confirmed goal from the interview
## Architecture — components touched, data flow, decisions + why (from step 2)
## Contracts — the fixed seams from step 3: signatures, data shapes, API/event contracts
## Component → files — each component mapped to the exact files it creates/modifies (feeds the backlog)
## Risk & blast radius — sensitive areas touched (auth, data, migrations, config), what could
break beyond the target files, and the rollback point (Phase 0 baseline ref)
## Skills plan
- *Verdict per facet* — `LOAD` / `VET` / `AUTHOR` for every facet the plan depends on; no empty state (a facet with no match resolves to `AUTHOR`, never to `—`)
- *Skills to use* — domain skills selected via skill-selection (name, path, what each informs), plus any authored in this flow
- *Skills to create* — outstanding `AUTHOR` verdicts (working name, gap filled, rules inline); write `—` only when every facet resolved to `LOAD` or `VET`
## Known-red baseline — pre-existing test failures recorded in Phase 0 (so review blames only new ones)
## Out of scope — things Codex must NOT do or touch
## Acceptance criteria — verifiable checks for the whole feature
## Decision log — empty, append-only; after each task passes, append one block:
### T<n> — <title>
- Decision: <what was decided or deviated from the plan>
- Why: <reason tied to a requirement/finding>
- Constraint for later tasks: <what future tasks must respect> | —
- Contracts touched: <signatures/shapes changed or confirmed> | —
- Anchor: <git HEAD sha at append time>
- Applies to: <task IDs, files, or contract labels — 'all' for run-wide constraints>Keep ## Context to one paragraph followed by a bullet list of conventions. Duplicate those
conventions into the nearest applicable AGENTS.md (their durable per-package home) instead of
growing Context with more prose.
After each task passes, append exactly one block using this schema. The log must let a FRESH Claude session resume from disk without the original conversation. Decisions without their constraints are not a handoff.
The ONLY per-task writer is the post-review step: Phase 4 step 6 in sequential mode, or the
coordinator after the wave merge in parallel mode. Review steps and worktree subagents provide
their outcomes to that writer and never append a second task block.
After appending, run node "${CLAUDE_PLUGIN_ROOT}/scripts/context-slice.mjs"
--check-plan; fix failures before the next task.
When appending either schema, have that single writer run git rev-parse HEAD and record the
result in Anchor. Reference code only as path:line plus the enclosing symbol; never paste code
snippets into a Decision-log block.
Writers SHOULD fill Applies to; run-wide constraints use all.
For wave integrations, the final review, and declined improvements, append one non-task event block
using the same schema with T<n> replaced by the event name:
### <event> — <label>
- Decision: <what was decided or what happened>
- Why: <reason tied to a requirement/finding>
- Constraint for later tasks: <what future tasks must respect> | —
- Contracts touched: <signatures/shapes changed or confirmed> | —
- Anchor: <git HEAD sha at append time>
- Applies to: <task IDs, files, or contract labels — 'all' for run-wide constraints>A non-task event block must carry the first four fields; Anchor and Applies to are required
only in task blocks.
Design principles
- Smallest architecture that satisfies the confirmed requirements — no speculative extension points (YAGNI).
- Respect existing boundaries; don't introduce a new layer/pattern unless an option-analysis justifies it.
- Design for testability: seams (injected dependencies) where Codex will need to fake I/O.
- Design for the diff: prefer changes that stay localized and additive over invasive rewrites, so each task produces a small diff a reviewer can fully verify in one pass (and stays under the 64 KB diff cap). A change that forces edits sprawling across many files is a design smell — revisit.
- Design for independence: minimize cross-task coupling by fixing contracts up front (step 3); the fewer files two tasks share, the better they slice, parallelize, and review.
- Flag risky areas (migrations, shared state, public API changes) so the backlog isolates them into their own tasks.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

