视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
accelint-architecture-doc【文档与办公】Create or update a living ARCHITECTURE.md for a codebase. Use when the user wants to write, refresh, restructure, or maintain an architecture document; document how the system is organized across tech stack, deployment model, services, components, and data stores; or turn codebase findings into durable architecture docs for engineers or agents. Trigg…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate or update a living ARCHITECTURE.md for the current codebase. It should give agents and engineers a fast, complete view of the system structure, tech stack, and deployment model.
<!-- TODO: fill in --> rather than guessing. Wrong infrastructure docs cause real confusion during incidents.node_modules, dist, .git, __pycache__) and annotate each entry with its architectural role.<!-- TODO --> — scan aggressively first. Most sections can be filled at least partially through inference. A document full of TODOs appears complete but misleads every reader.Check these points before you start. Do them in order.
pnpm-workspace.yaml, turbo.json, nx.json, lerna.json, or a workspaces field in package.json. If you are inside a package, also check whether a root-level ARCHITECTURE.md already exists.Purpose: keep workflow state visible during create, refresh, or restructure handling.
Do this before any other stage work when the task requires create, refresh, or restructure handling. Create a short progress checklist in your working state or reply. Update it after each stage.
Done when: the checklist exists and will be updated after each stage.
Purpose: determine scope, detect related files, and activate the correct mode gate before discovery or interview work begins.
Determine whether the current working directory is a monorepo root or a package inside a monorepo. Do this before you detect mode.
Monorepo signals to check:
| Signal | File |
|---|---|
| PNPM workspaces | pnpm-workspace.yaml |
| npm/Yarn workspaces | package.json → workspaces field |
| Turborepo | turbo.json |
| Nx | nx.json |
| Lerna | lerna.json |
| Package inside monorepo | Parent dirs contain any of the above |
If at the monorepo root:
If inside a monorepo package:
"I found a root-level ARCHITECTURE.md at [path]. I'll use it as context and generate a package-specific doc here that references it rather than duplicating shared infra." The package-level doc should include a header reference:
<!-- Part of monorepo: see [relative path to root ARCHITECTURE.md] for system-wide architecture -->
If not a monorepo: proceed normally — ARCHITECTURE.md covers the whole project.
Default scope rule: if you are invoked from inside a package directory, assume the user wants a package-level ARCHITECTURE.md unless they clearly ask for a repo-wide document. If both root and package docs are missing, stay with the local package scope by default rather than expanding outward on your own.
Requires: Step 1 scope detection is complete.
Do this before you detect ARCHITECTURE.md state.
openspec/config.yml or openspec/config.yaml.
This step reduces scanning work and helps keep the doc consistent with the project's defined stack.
Done when: you know whether openspec/config.yml or openspec/config.yaml exists and have read it if present.
Requires: Step 1 and Step 1.1 are complete.
Classify the task in this order:
ARCHITECTURE.md exists at the target location.
< ~10 meaningful lines) → MODE 1: Create (confirm first)(offer proactively — see below)MODE 3: Restructure — When the file has real content in an unrecognized shape and restructuring would improve usability, surface this immediately. Require an explicit user choice before you modify that structure:
"ARCHITECTURE.md exists but doesn't follow the standard template structure. I recommend restructuring it — this makes it consistent for agents and engineers onboarding to the codebase. How would you like to proceed?
(a) Restructure (recommended) — I'll import your existing content into the 11-section template, fill gaps with codebase scanning, and show a full preview before writing anything.
(b) Append — I'll add the missing template sections below your existing content without modifying what's already there.
(c) Dry run — I'll show exactly what the restructured doc would look like with no filesystem changes. Use this to evaluate fit before committing."
If (a) is chosen, carry all existing content forward into the appropriate template sections. Flag any content that does not map cleanly. Present it to the user and ask where it belongs rather than silently dropping it.
If MODE 3 applies, stop here after you present options (a), (b), and (c). Do not restructure, append to, or rewrite the existing file until the user explicitly chooses one option.
MODE 2: Refresh — When the file follows the template structure, run this sequence in order:
findings: list.
findings: section. It must be a bulleted list of factual statements."I found [N] external findings and [M] sections that may have drifted. I'll only ask about those — the rest looks current."
Done when: you know whether the task is Create, Refresh, or Restructure, and any required wait state or approval gate is active before later stages begin.
Purpose: build a merged discovery map before you ask the user about missing facts.
Stage rules:
Requires: Step 2 is complete, and any MODE 3 wait state has been resolved.
Collect structured findings across the discovery domains below. Do not start Stage 3 until you have merged the discovery results.
Discovery domains to cover simultaneously when subagents are available:
Agent A — Project Identity & Structure
node_modules, dist, .git, __pycache__, .next, build)Agent B — Tech Stack & Components
package.json (frontend and backend deps), requirements.txt / pyproject.toml, go.mod, Cargo.toml, build.gradlenext.config.*, vite.config.*, nuxt.config.*, angular.json, svelte.config.*server.ts, app.py, main.go, Application.java, config/application.rbdocker-compose.yml — services, ports, environment vars, inter-service dependenciesAgent C — Infrastructure, CI/CD & Deployment
terraform/, pulumi/, cdk/, serverless.yml, k8s/ or kubernetes/Dockerfile* (per service), docker-compose.yml deployment config.github/workflows/, .circleci/, Jenkinsfile, .gitlab-ci.yml, Procfile*.aws.json, .aws/, gcp/, azure/, base images in DockerfilesAgent D — Data, Security & External APIs
prisma/schema.prisma, alembic/, migrations/, ORM config, DATABASE_URL in .env.example, Redis/Kafka/RabbitMQ deps.env.example key prefixes (STRIPE_, SENDGRID_, TWILIO_, OPENAI_, etc.), SDK packages in depsAgent E — Testing & Code Quality (can run concurrently with the others)
jest.config.*, vitest.config.*, pytest.ini, pyproject.toml [tool.pytest], Playwright config, Cypress config.eslintrc*, biome.json, .prettierrc*, mypy.ini, ruff.toml, sonar-project.propertiesMakefile, CONTRIBUTING.md, docker-compose.yml dev targetsAfter all agents complete, merge their findings into a unified discovery map. Tag each field as INFERRED [source] or UNKNOWN. Fields tagged UNKNOWN become Stage 3 interview questions.
Do not ask interview questions until this merged map exists.
Done when: you have one merged discovery map and know which fields still require interview questions.
Purpose: resolve only the gaps that discovery could not determine.
Stage rule:
Requires: Step 3 is complete.
Group related questions into natural conversational turns. Ask only the turns that match remaining gaps.
Turn 1 — Gaps in Components (if services or components were unclear)
Turn 2 — Infrastructure & Deployment (only if cloud provider or deployment model is UNKNOWN)
Turn 3 — Security (only if auth mechanism is UNKNOWN)
Turn 4 — Roadmap & Future Plans (always ask — cannot be inferred)
Turn 5 — Identity & Glossary (if not found in README or package.json)
Done when: every remaining gap is answered, or the unresolved gap is represented as <!-- TODO: fill in --> in the preview.
Purpose: require a preview checkpoint before any write, then write approved files and summarize open TODOs.
Stage rule:
Requires: Step 4 is complete, or Step 3 already resolved all unknowns.
ARCHITECTURE.md before you write.
# inferred from [file].<!-- TODO: fill in -->.Do not write or edit ARCHITECTURE.md, AGENTS.md, or CLAUDE.md until you have shown the preview for the chosen mode and received confirmation to proceed.
Do not treat silence, partial feedback, or implied approval as confirmation.
Done when: the user has reviewed the preview and explicitly confirmed that you may write.
Requires: Step 5 is complete.
ARCHITECTURE.md at the target location, root or package dir.
AGENTS.md or CLAUDE.md, check whether it references ARCHITECTURE.md. If not, append a reference block to help agents understand the system structure. Treat this as a secondary follow-up edit after the architecture document itself is ready, as described below.<!-- TODO --> sections still need human input.Done when: the approved files are written and the remaining TODOs are summarized.
<!-- TODO --> markers is actionable. A doc with missing sections silently misleads.Load references/template.md for the full 11-section ARCHITECTURE.md skeleton.
Monorepo package docs: Include the following immediately after the opening heading:
<!-- Part of monorepo: see [../../ARCHITECTURE.md](../../ARCHITECTURE.md) for system-wide architecture -->
Adjust the relative path to point at the actual root ARCHITECTURE.md.
ARCHITECTURE.md is a technical document about system structure. Do not reference agent behavior files from it. Agent behavior files such as AGENTS.md or CLAUDE.md should reference ARCHITECTURE.md because system structure may inform agent behavior.
After you write ARCHITECTURE.md, if Agent A found AGENTS.md or CLAUDE.md, do this in order:
ARCHITECTURE.md.CLAUDE.md and it simply points to AGENTS.md, for example @AGENTS.md, update AGENTS.md instead. Do not modify the pointer file. Treat pointer files as routing stubs, not as the place to add architecture guidance.ARCHITECTURE.md reference exists, add or update a ## Related Documentation section that follows the same structure used by accelint-onboard-agents (bottom of file):## Related Documentation
- **ARCHITECTURE.md** — System architecture, deployment overview, component interactions
_(Reference this when behavioral decisions depend on understanding system structure)_
## Related Documentation. Format each entry as:- **<filename>** — description
_(Condition or scenario by which this file is used)_
## Related Documentation section already exists, add the ARCHITECTURE.md entry to that list instead of creating a duplicate section. Preserve the existing list style. Keep the explanatory usage note on its own indented line.Done when: the architecture guidance lives in the real agent behavior file, uses the ## Related Documentation structure, and does not modify a pointer stub.