easysdd-architecture
is the "map" of the project — read it for positioning before writing a feature-design plan, read it to understand module boundaries during issue-analyze root cause analysis, and new team members read it to get a general understanding of the system. This map won't generate or maintain accuracy on its own — someone needs to draft, refresh, and audit it at the right time. This skill serves as the unified entry point for these three tasks.
The value of architecture documents lies in accuracy, stability, and searchability. Several common issues when AI writes or checks architecture documents directly undermine these three points:
- Inventing systems out of thin air — the document states "AuthManager coordinates TokenService", but there is no layer in the code at all.
- Making architecture decisions on behalf of users — secretly choosing a certain layering approach, leading readers to believe it is an established fact.
- Writing documents as code retellings — each section only says "what's here" instead of "why it's divided this way", providing the same amount of information as after reading.
- "Glancing and feeling it's okay" during checks — no specific location evidence is provided, leaving users unable to judge if it's actually okay.
The entire set of rules below is designed to prevent these situations.
See
easysdd/reference/shared-conventions.md
for shared paths and naming conventions.
See
in the same directory for document structure templates, check coverage lists, and report formats.
Mode Diversion
First determine the mode at startup, choose one of three — AI automatically judges based on what the user says, no menu selection required for users:
| What the user says | Mode |
|---|
| "Fill in an architecture doc", "Draft the architecture document for {module}", "Write down the structure of this part" | |
| "Refresh {a certain document}", "The code has changed, sync the architecture doc", "Update the architecture directory to the latest version" | |
| "Check if the design is internally consistent", "Does the plan match the code?", "Are there conflicts among several architecture documents?", "Conduct an architecture health check" | |
If unable to determine, ask the user instead of guessing.
Single-Target Rule
Run only one mode each time, and lock only one target within that mode:
- : Draft a new architecture document (
easysdd/architecture/{type}-{slug}.md
, or update itself)
- : Refresh an existing architecture document based on the latest code status + new user materials
- : One of three sub-goals
- — Internal consistency of a single feature design document
- — Consistency between a single feature design and code
architecture-folder-internal
— Consistency among multiple architecture documents under
Why not allow multiple tasks at once? When drafting, users can't review multiple AI-generated documents at once; during checks, the three sub-goals have completely different perspectives and reference materials, doing them simultaneously will lead to shallow coverage and unclear responsibility for mixed issues. If the user proposes multiple targets, ask them to choose one and leave the rest for next time.
Workflow Skeleton (Shared by Three Modes)
All modes go through six phases, with details diverging by mode:
Phase 1: Lock Target
Phase 2: Read Materials
Phase 3: Execute (new/update = draft; check = inspect)
Phase 4: Self-Review (new/update) or Output Report (check)
Phase 5: User Review
Phase 6: Finalize (new/update) or Wait for User's Next Decision (check)
Phase 1: Lock Target (All Modes)
Confirm three things:
- Mode ( / / )
- Target object:
- : New slug + audience + scope
- : Path of existing document
- : Sub-goal + inspection object (feature name / architecture sub-scope)
- Scope covered this time (full document / specific sections / specific documents)
If the scope is not converged, ask the user to converge — if an architecture document requires "full module rewrite", it often means there are multiple relatively independent subsystems underneath, which should be split into separate tasks; a report covering the entire
directory at once is hard to focus on key points.
Phase 2: Read Materials
Mandatory reading for all modes:
easysdd/reference/shared-conventions.md
easysdd/architecture/DESIGN.md
(main entry point)
- Other architecture documents under (judge whether to cross-reference or if there are duplicates)
Additional mandatory reading for new / update (see "Reading List" in
):
- Code entry and core files of the target module / subsystem (identified by user or grep first then report candidates for user confirmation)
- Materials provided by user (oral description, scattered documents, whiteboard photo transcription)
- Relevant compound沉淀 (decision / explore / learning)
- Existing feature plans related to this module
- update-specific: Full text of current version document + code changes after the document's date (rough scan via )
Additional mandatory reading for check (varies by sub-goal, see
for details):
- / : Full text of plan doc + relevant documents in architecture center directory
- additional: Code files directly corresponding to Sections 2/3 of the design
architecture-folder-internal
: The specified easysdd/architecture/**/*.md
documents (or all documents of the same type under a certain type) + index + referenced documents found via links (no expansion to code)
Phase 3: Execute
new / update mode: Write a
complete first draft according to the "Document Structure" in
, do not output semi-finished products in batches. Batch review prevents users from seeing global consistency — the structure described in Section 2 and the decisions recorded in Section 4 often have cross-section conflicts, which can only be seen when presented together.
check mode: Execute item by item according to the "Check Coverage Items" in
(6 categories for each of the three sub-goals). Record
locatable positions (
or "Section X of design") + phenomenon + impact + repair suggestion for each inconsistency.
Phase 4: Self-Review (new/update) or Output Report (check)
new / update: Run through the "Self-Review List" (7 items) in
on the spot, and fix issues before submitting to user review (delete / mark TODO / rewrite). Briefly report the self-review results to the user — state if issues were found and how they were handled, do not treat it as an invisible "formality" step.
check: Output a complete report according to the "Report Template" in
, including inspection summary / inconsistency list (table with severity levels) / observation items (out of scope) / consistent items / suggested next steps.
Phase 5: User Review
new / update: Paste the complete first draft to the user and prompt review. Revise according to user feedback until the user explicitly confirms "this doc is ready".
check: Send the report to the user and wait for confirmation of conclusions — whether to accept, add another type of check, or proceed to the next step decided by the user. This skill does not make decisions on behalf of users.
Phase 6: Finalize (new/update) or End (check)
new mode:
- Write to
easysdd/architecture/{type}-{slug}.md
(naming rules see Section 0 of easysdd/reference/shared-conventions.md
), set frontmatter , fill with the current date
- Same-Type Aggregation Check (mandatory before finalization): Judge if the number of documents of a certain type in the root directory reaches ≥6 after this finalization according to the "Architecture Doc Grouping Rules" in shared-conventions — if the threshold is hit, move all documents of this type to the subdirectory, remove the filename prefix, and update all relevant links in ; the relocation list must be reviewed by the user together in Phase 5
- Index Update: Open
easysdd/architecture/DESIGN.md
and add a reference link to the new document — this must be done in new mode; otherwise, the document will be written but never read; changes to DESIGN.md must also be reviewed by the user, do not modify secretly
update mode:
- Overwrite the existing file, update to the current date
- If there are major structural changes, add an entry "YYYY-MM-DD: {one-sentence description}" in the "Change Log" section at the end of the document
- Update DESIGN.md only if scope or summary changes affect the index description
check mode: No finalization, end the process. Users may decide to trigger
/
or other workflows based on the report — that will be handled in the next round.
Hard Boundaries
- Anchor only to code, do not invent systems (new / update) — each structured assertion must be anchored to ; if unable to anchor, mark , do not allow "speculation based on naming".
- Do not make decisions on behalf of users (new / update) — substantive content in key decision sections must come from users or traceable decision documents. AI only drafts the structure and connects the language.
- Only check, do not fix (check) — prohibit modifying design / code / configuration. Separate checking and fixing so users can see the complete inconsistency list before deciding priorities as a whole.
- Evidence-based (check) — each inconsistency must have a locatable position ( or "Section X of design").
- Executable suggestions (check) — specific to "what to change and how to change", but do not finalize.
- Single-target (all modes) — run only one mode at a time, and lock only one target within that mode.
- Do not modify code or spec (all modes) — this skill only writes architecture docs or generates inspection reports. If issues are found in code / plan doc / decision, record them as "observation items" and let users decide whether to initiate another workflow.
- Do not diverge (all modes) — do not expand to issues outside the user-described scope, just record them as observation items.
Exit Conditions
Common to all modes:
Additional for new / update:
Additional for check:
Relationship with Other Workflows
| Direction | Relationship |
|---|
| Cooperation with | Requirements describe "why this capability is needed", this skill describes "what structure to use for implementation"; the frontmatter of the architecture doc links back to the req slug it carries |
| Upstream of | When writing "which architecture this feature connects to" in design, read the docs produced by this skill; after design is completed, trigger the check mode for a self-consistency health check |
Downstream of easysdd-feature-acceptance
| During the acceptance phase, actually update the docs produced by this skill (acceptance handles merging itself, does not call back this skill's new/update); trigger the sub-goal of the check mode to confirm alignment between implementation and design |
| Cooperation with | After an architecture decision is made, this skill's can add references to Section 4 of relevant architecture docs |
| Reader of | Read the docs produced by this skill to locate module boundaries during root cause analysis |
| Creator of | Create a placeholder during onboarding, then fill it in / expand it via this skill |
Common Mistakes
Common pitfalls for new / update:
- Inventing systems out of thin air: A "coordination layer / hub / manager" that does not exist in the code appears in the document
- Making architecture decisions on behalf of users: The selection reasons in key decision sections are actually made up by AI
- Retelling code: Each section only lists "what's here" without explaining "why it's divided this way"
- Drafting semi-finished products in batches: Users can't see cross-section conflicts, leading to shallow review
- Term conflicts: Newly introduced names conflict with existing ones in code / other architecture docs / compounds without awareness
- Writing / modifying multiple documents at once: Unable to review thoroughly, resulting in rough integration
- Continuing despite conflicts with existing decisions: Writing a version that contradicts established decisions
- Forgetting to add an index in after finalizing in new mode: The document is written but cannot be found
- Adding new content in update mode without code basis: Just "reads more complete", which is the start of content deviating from reality
- Modifying code / plan doc along the way: Overstepping boundaries, this skill only modifies architecture docs
- Continuing to place same-type documents in the root directory when there are ≥6: Triggering the grouping rule but not relocating
- Filename does not follow : Unable to aggregate same-type documents in the future, making the grouping rule useless
Common pitfalls for check:
- Doing multiple sub-goals at once (only one of design-internal / design-vs-code / architecture-folder-internal can be selected)
- Reading code to verify during
architecture-folder-internal
— that's the job of
- Modifying code or documents immediately after finding issues
- Only saying "something is wrong here" without providing evidence location
- Suggestions are too abstract ("optimize the architecture")
- Unlimited expansion from one target to full repository audit