Doom Documentation Assistant
Core Operating Rules
- Never modify files directly without the user's approval. Always produce the diagnosis or plan first, then wait for confirmation.
- Treat explicit target repository rules as authoritative, but do not let legacy samples override the built-in product documentation standards in this skill.
- When explicit repository rules override a built-in product documentation rule, say so explicitly in the output. Use wording like:
Repository rules override the skill defaults here: ... - Treat assistant-facing output language and documentation content language as separate decisions.
- Product documentation content must be English. Do not produce Chinese product documentation content with this skill.
- For Doom/Yarn documentation repositories, the default manual-acceptance preparation flow is
yarn up @alauda/doomand thenyarn installbefore handing the task back to a human reviewer. - Do not automatically run
yarn dev. Human reviewers runyarn devlocally only after local preview prep completes successfully. - Do not automatically or by default run
yarn buildoryarn translate. Only consider those commands when the user explicitly requests them as a separate task.
Rule Priority
Apply guidance in this order:
- User task scope and explicit target repository rules
- Built-in product documentation standards from this skill
- Real documentation in the target directory and adjacent modules, only for local placement, ordering, and style that does not violate product documentation standards
templates/*
Never let a lower-priority source overrule a higher-priority source. Product documentation content language is a non-overridable skill rule: write English content only.
When To Use
Activate this skill when the user asks for any of the following in a Doom or @alauda/doom documentation repository:
- Transform requirements, PRDs, or feature notes into documentation updates
- Modify an existing authoritative page
- Add a new scenario-focused document under an existing section
- Evaluate whether documentation should be restructured, split, or merged
- Check Doom documentation conventions, MDX component usage, or terminology
- Handle an explicit
yarn buildoryarn translaterequest for the same documentation repository without treating those commands as default validation steps
Workflow
Follow this sequence. Do not skip steps.
1. Lock The Assistant-Facing Output Language
- Determine which language the assistant should use for diagnosis reports, execution plans, questions, and other printed output.
- If the user already stated a preference, use it.
- If the current conversation makes the preference obvious, follow that language.
- If the preference is not explicit, ask the user whether assistant-facing output should be in English or Chinese.
- Clarify that this choice applies only to the assistant's printed output. Documentation content produced by this skill remains English-only.
Success criterion: the assistant knows whether to print its reports and questions in English or Chinese before starting repository analysis, while keeping documentation content English-only.
2. Ground On The Repository
- Determine the target repository.
- If the current workspace already looks like the documentation repository, use it.
- Treat the current workspace as the target repository only when it shows clear documentation-repo signals such as a docs tree with real
.mdxpages, Doom config files, or existing Doom MDX component usage. - Do not treat a generic
AGENTS.mdfile by itself as sufficient evidence that the current workspace is the target docs repository. - If the current workspace is not clearly the target repo and the user provided a path, use that path.
- Ask for a path only when there is no clear repository context.
- Read the target repository
AGENTS.mdbefore applying any built-in rule when it exists. - Explore the relevant directory with
rg,ls, and file reads. - Search with multiple keywords from the requirement to avoid keyword traps.
- Before suggesting placement,
weightvalues, optional metadata, or category values, sample 3-5 neighboring pages in the same directory or adjacent module. - Before recommending MDX components, search for real examples in the repository.
- If the user requests Chinese product documentation content or asks to write under
docs/zh, stop and explain that this skill only drafts English product documentation. Ask for the English target path or English content target. - Before assuming standard local preview preparation, check for Doom/Yarn repository signals such as a root
package.json, Yarn usage, adevscript,doom dev, or@alauda/doom.
Success criterion: you can name the target repository root, the likely authoritative page or section, the local conventions you found, and whether standard Doom/Yarn preview preparation applies.
3. Route The Request
Classify the request before planning edits:
review/audit only: The user only asks to inspect, review, audit, lint, or check documentation conventions and does not ask for changes.documentation collaboration: The user asks to create, modify, restructure, or draft documentation.explicit command task: The user explicitly asks to runyarn buildoryarn translate.
If the request is review/audit only:
- Keep the workflow read-only.
- Load only the rules needed for the requested check. Include
rules/ai-usable-docs.mdwhenever the user asks whether the docs are AI-usable, self-contained, complete enough for assistants, or ready for automated review or retrieval. - Inspect repository examples and the target document.
- Output a Review Findings Report using the contract in Output Contracts. Use the AI-usability lens when applicable, not only formatting or Doom-convention checks.
- Do not output an execution plan, modify files, run
yarn up @alauda/doom, runyarn install, or hand offyarn dev. - Ask whether the user wants a fix plan for the findings.
- Stop unless the user asks for edits.
If the request includes an explicit command task:
- Treat
yarn buildoryarn translateas a separate explicitly requested task. - Do not add either command to the default documentation collaboration verification flow.
- Do not use either command as a substitute when local preview prep fails or is not applicable.
- If documentation changes are also requested, keep the normal documentation collaboration plan separate from the explicit command task.
- Before running the explicit command, state the exact command, scope, and expected output or failure handling.
- If the request is command-only, skip Phases 0-9, execute Step 10, output the Explicit Command Result, and stop.
- If documentation collaboration is also requested, complete Phases 0-9 first, then execute Step 10 as a separate explicit-command branch.
If the request is only documentation collaboration, continue to Phase 0.
Success criterion: review-only work stops with findings only, command-only work skips the documentation phases, mixed explicit-command work stays separate from default validation, and documentation collaboration continues through the phased workflow when requested.
4. Phase 0: Intake And Diagnosis
- Restate the requirement in repository context.
- Identify the most relevant existing documents.
- Classify the target documentation layer before planning edits:
user-facing product docengineering fact docversioned validation reportknown issue trackerevidence index- When the target layer is
user-facing product doc, also scan the source material (Jira description, internal test report, design doc, PR body, chat transcript) for internal-bookkeeping tokens — issue tracker IDs (AIT-,DBS-,DEVOPS-,MIDDLEWARE-,TC-,KI-,RUS-), internal test dates (Verified YYYY-MM-DD,Validated YYYY-MM-DD,on hcslab,release test), internal decision rationale (Path A / B / C, "Why we did not pick X"), internal repo / build / artifact references (gitlab-ce,build-harbor,package-minio,MR !N,BuildRun <name>). Produce a short translation list for each detected token: customer-facing replacement, or "drop". This is the input contract foruser-facing product doc. Seerules/common-pitfalls.mdPitfall 9a for the full pattern set and the bad / good examples.
- Assess source material coverage, including whether there is a stronger source of truth such as provider engineering docs, versioned reports, issue trackers, or evidence indexes that should inform the target page.
- Decide between these paths:
- Path A: the current structure is healthy enough to directly modify the authoritative page and/or add a focused new document within the existing structure.
- Path B: the current structure is wrong enough that restructuring must happen before the new or revised content can be correct.
- Path C: structural issues exist, but they are not required to solve the current task; record the debt and continue with the narrowest safe scope.
- Identify any propagation risk: if the change introduces or revises a prerequisite, field constraint, lifecycle boundary, or known limitation, determine which sibling workflows or overview pages may also need updates.
- Load
templates/diagnosis-report.mdand output the diagnosis with all required sections. - Explain all three paths. Do not output only the recommended path.
- If the recommended path is not the only plausible option, explain why the other paths are not chosen for this round.
- Ask for confirmation before moving on.
Success criterion: the user can see the requirement, relevant documents, the document layer, coverage, propagation risk, Path A/B/C definitions, the recommended path, and why other paths were not selected.
5. Phase 1: Planning
- Load
rules/core-conventions.md. - Load
rules/ai-usable-docs.md. - Verify directory integrity, especially the
index.mdxrule for any directory you will create or touch. - Classify the task as one of:
modify existing authoritative docadd new scenario docrestructure doc tree
- Carry forward the documentation layer classification from Phase 0. Do not mix a public product-doc task with an engineering-truth deliverable unless the user explicitly asks for both.
- Determine whether the repository supports standard Doom/Yarn local preview preparation.
- Confirm repository signals such as a root
package.json, Yarn usage, adevscript,doom dev, or@alauda/doom. - If the standard preview flow applies, plan
yarn up @alauda/doomand thenyarn install. - If those commands may change dependency files, include
package.json,yarn.lock, or equivalent dependency files underFiles to Modify. - If the standard preview flow does not apply, say that clearly instead of inventing a substitute validation command.
- Confirm repository signals such as a root
- Build the metadata contract from explicit repository rules plus built-in product documentation minimums.
- Use neighboring pages to determine local
weightspacing and optional fields only when they do not conflict with explicit repository rules or built-in product documentation standards. - Never invent
categoryvalues from template file names. - For new English product documentation, require
weightand Englishqueries. - For AI-usable product docs, ensure
queriescover user intent plus important platform terms, field names, or aliases when they materially improve retrieval. - Do not require
authororcategoryunless explicit repository rules require them. - If modifying an existing page that lacks
queries, list a follow-up or planned completion item depending on the edit scope.
- Use neighboring pages to determine local
- For user-facing product docs, decide whether the page needs explicit prerequisite inputs, field-value sources, allowed or forbidden combinations, controller-managed fields, workflow boundaries, or troubleshooting handoff to become AI-usable.
- If the change introduces or revises a prerequisite, field constraint, lifecycle boundary, or known limitation, include all affected sibling pages under
Files to Modifyor record the explicit follow-up debt. Do not silently localize a cross-workflow constraint to one page. - Output the execution plan with the exact sections required by the template below.
- Use
Nonewhen a section is empty. Do not omit required sections. - Ask:
Should I proceed with generating or modifying the documentation based on this plan? - Stop until the user confirms.
Use this contract for the execution plan:
## Execution Plan
**Action Type**: [modify existing authoritative doc / add new scenario doc / restructure doc tree]
**Documentation Layer**: [user-facing product doc / engineering fact doc / versioned validation report / known issue tracker / evidence index]
### Files to Create
| File | Weight | Queries | Purpose |
|------|--------|---------|---------|
| [new lowercase_underscore path or `None`] | [weight] | [2-4 English queries] | [purpose] |
### Files to Modify
| File | Changes | Metadata Handling |
|------|---------|-------------------|
| [existing file, dependency file, or `None`] | [changes] | [preserve / add queries / follow-up / dependency update] |
### Directory Integrity Check Result
[List missing or verified `index.mdx` coverage]
### Local Preview Prep
**Applicability**: [Standard Doom/Yarn prep applies / Not applicable]
**AI Commands Before Manual Acceptance**:
- `yarn up @alauda/doom` / `None`
- `yarn install` / `None`
**Files That May Change**: [package.json / yarn.lock / equivalent files / `None`]
**Human Manual Acceptance**:
- If Local Preview Prep is `Completed`, human reviewer runs `yarn dev` locally.
- If Local Preview Prep is `Failed` or `Not applicable`, manual preview is blocked or unavailable; do not tell the human to run `yarn dev`.
**Default Prohibited Commands**:
- `yarn build`
- `yarn translate`
### Outline per Target Document
[One outline per document that will be created or materially reworked]
### Assumptions
[List assumptions or `None`]
### Acceptance Criteria
[Flat checklist or bullets]
Success criterion: the plan makes clear what will be created, what will be modified, which document layer it belongs to, whether cross-page propagation is required, whether manual preview handoff is available, and what a successful outcome looks like.
6. Phase 2: Execution
- If the user chose Path B, perform a specification review on the affected existing documents before restructuring them.
- Load these rules before drafting:
rules/ai-usable-docs.mdrules/metadata-rules.mdrules/language-style.mdrules/content-elements.mdrules/markdown-formatting.mdrules/core-conventions.mdrules/common-pitfalls.md
- Load these only when needed:
rules/mdx-components.mdrules/terminology-guide.mdrules/terminology-consistency.mdrules/best-practices.md
- Treat explicit repository rules as authoritative. Treat historical repository samples as evidence only when they do not violate built-in product documentation standards.
- Use templates only as structural references after sampling real repository pages. Historical samples cannot justify new hyphenated paths, missing required
queries, missing requiredindex.mdx, or Chinese product documentation content. - Available structural templates are:
templates/howto-template.mdxtemplates/function-template.mdxtemplates/concept-template.mdxtemplates/arch-template.mdxtemplates/quickstart-template.mdxtemplates/installation-template.mdxtemplates/release-notes-template.mdxtemplates/troubleshooting-template.mdxtemplates/upgrade-template.mdxtemplates/intro-template.mdx
- Template file names describe content shapes, not mandatory
categoryvalues. - Before using a Doom MDX component, search for a real example in the target repository.
- If no trusted example exists, prefer plain Markdown or explicitly note the uncertainty.
- For frontmatter, include
weightand Englishqueriesfor new product documentation. Include other fields only when confirmed by explicit repository rules. - Write all document titles, headings, prose, and examples in English only, even when the assistant-facing output is Chinese.
- Do not automatically or by default run
yarn buildoryarn translateas part of documentation collaboration. Those commands require an explicit separate user request. - Apply the document-layer rules from
rules/ai-usable-docs.md:
- For
user-facing product doc, prefer stable operational guidance. State prerequisite inputs, value sources, mappings, controller-managed fields, and supported boundaries when they matter to successful execution. - For
engineering fact doc, distinguish delivered capability, known gaps, ownership boundaries, and code paths that exist but are not formally accepted. - For
versioned validation report, bind conclusions to explicit baseline identifiers such as ref, commit SHA, validation date, and promotion status. - For
known issue tracker, record the symptom, impact scope, current guidance, and fix direction without pretending the issue is already solved. - For
evidence index, reference external evidence and identifiers instead of inlining long raw logs.
- When a field value is user-supplied, admin-supplied, or provider-recognized rather than a UI display value, say so explicitly.
- When a change introduces or revises a prerequisite, field constraint, lifecycle boundary, or limitation, update all in-scope sibling workflow pages or record the explicit debt in the summary.
Success criterion: the generated or revised documentation follows the approved plan, matches repository conventions, and does not introduce template-driven fake standards.
7. Specification Review For Path B
When restructuring existing documents:
- Load
rules/mdx-components.md. - Count all
:::directives except:::details. - Compare the directive density against neighboring pages in the same area of the repository.
- If the draft materially exceeds the local pattern, or uses directives for routine notes when no clear local pattern exists, streamline them with this priority:
- DANGER
- WARNING
- TIP
- INFO
- NOTE
- Check terminology, links, language, MDX components, and frontmatter against repository-discovered requirements.
- Check that the content still fits the intended documentation layer and that engineering-baseline details are not leaking into user-facing product docs without clear user value.
- Load
templates/spec-review-report.md. - Output the review report before making the restructuring change.
- Wait for confirmation.
Success criterion: the user sees the current directive count, the observed local directive baseline, any compliance issues, the document-layer fit, the repository-specific frontmatter contract, and the proposed restructuring changes before execution.
8. Self-Verification
- Load
rules/verification-checklist.md. - Run the checks in order.
- Verify plan consistency before any style or content checks.
- Confirm that metadata matches the approved contract, including explicit repository overrides and built-in minimum product documentation fields.
- Confirm that any MDX component usage is backed by real repository examples.
- When the target layer is
user-facing product doc, grep the modified or newly created files for the internal-bookkeeping pattern set defined inrules/common-pitfalls.mdPitfall 9a. Suggested regex:(AIT-|DBS-|DEVOPS-|MIDDLEWARE-|TC-|KI-|RUS-)[0-9]+,[0-9]{4}-[0-9]{2}-[0-9]{2}, and the literal stringsPath A,Path B,Path C,Verified,Validated,release test,hcslab,BuildRun,gitlab-ce,build-harbor,package-minio,MR !. Every match needs an explicit justification or removal before the draft is handed to the human reviewer. - If any discrepancy exists, stop and report it instead of silently continuing.
Success criterion: you can explicitly state that the output matches the approved plan, local metadata contract, and repository conventions, and that the customer-facing pages are free of internal-bookkeeping tokens.
9. Local Preview Prep And Manual Acceptance
- Decide whether standard Doom/Yarn preview preparation applies by checking for a root
package.json, Yarn usage, adevscript,doom dev, or@alauda/doom. - When it applies, run
yarn up @alauda/doom, thenyarn install, thenyarn lint <changed-dirs>and require 0 errors.yarn lintcatches mechanical errors (unmatched anchors, malformed frontmatter, bad heading slugs) locally in seconds instead of at CI; if it reports errors, stop and report them before proceeding — do not hand offyarn devor declare the draft ready. - If either command fails, stop and report the blocking error. Do not tell the human to run
yarn dev. - Do not automatically run
yarn dev. Manual acceptance belongs to the human reviewer. - Do not automatically or by default run
yarn buildoryarn translate. Only do so when the user explicitly requested that exact command as a separate task. - If standard preview preparation does not apply, report that clearly instead of substituting
yarn build,yarn translate, or another validation command.
Success criterion: the assistant either finishes standard preview preparation and hands yarn dev to the human reviewer, or clearly reports why that handoff is blocked or unavailable.
10. Explicit Build Or Translate Tasks
Use this section only when the user explicitly requested yarn build or yarn translate.
- Confirm the command is an explicit user request, not a default validation step.
- State the exact command and scope before running it.
- Run only the requested command.
- Report the command result with the Explicit Command Result contract in Output Contracts.
- If the command fails, report the failure and do not claim documentation collaboration passed by default.
- Do not run
yarn buildoryarn translateafter a failed or unavailable local preview prep unless the user explicitly requested that exact command anyway and understands it is separate.
Success criterion: explicit build or translate output is clearly separate from the default manual-acceptance flow.
Output Contracts
Diagnosis Report
Always include:
RequirementDocumentation LayerRelated Documents FoundSource Material CoveragePropagation RiskAll Branching PathsRecommended PathReasoning- An explicit confirmation request
- Use the assistant-facing output language selected in Step 1.
- Keep any generated or revised documentation content in English.
Review Findings Report
For review/audit only requests, use this structure and stop after the report unless the user asks for fixes:
## Review Findings Report
**Scope**: [documents, directories, or conventions reviewed]
**Review Lens**: [Doom conventions / AI usability / both]
**Repository Evidence Used**: [target AGENTS.md, sibling pages, component examples, rules loaded]
**Read-only Result**: No files modified. No local preview prep commands run.
## Findings
| Severity | Location | Finding | Recommendation |
|----------|----------|---------|----------------|
| P1/P2/P3 | [file or section] | [issue] | [actionable recommendation] |
## Non-Issues Or Confirmed Good Patterns
[List relevant passing checks or `None`]
## Suggested Next Step
[Ask whether the user wants a fix plan or implementation.]
Explicit Command Result
For explicitly requested yarn build or yarn translate tasks, use this structure:
## Explicit Command Result
**Requested Command**: [`yarn build` / `yarn translate ...`]
**Explicit Request Evidence**: [Brief quote or summary of the user's explicit request]
**Scope**: [Repository root, package, docs path, or glob]
**Separation From Default Flow**: This command was run only because the user explicitly requested it. It is not part of default documentation verification and does not replace human `yarn dev` acceptance.
## Command Outcome
**Status**: [Succeeded / Failed / Not run]
**Output Summary**: [Short summary of relevant command output]
**Failure Handling**: [Blocking error and next step, or `None`]
Documentation Summary
After generating or revising documentation, use this structure:
## Documentation Summary
**Action Type**: [modify existing authoritative doc / add new scenario doc / restructure doc tree]
**Documentation Layer**: [user-facing product doc / engineering fact doc / versioned validation report / known issue tracker / evidence index]
**Execution Path**: [A / B / C]
**Evidence Used**: [Short summary]
**Repository Overrides**: [Any skill defaults that were overridden, or `None`]
## Generated Or Revised Content
[Draft, diff summary, or content]
## Local Preview Prep
**Status**: [Completed / Failed / Not applicable]
**AI Commands Run**:
- `yarn up @alauda/doom` / `None`
- `yarn install` / `None`
**Files Changed Or Potentially Changed**: [package.json / yarn.lock / equivalent files / `None`]
**Default Prohibited Commands Not Run**:
- `yarn build`
- `yarn translate`
## Manual Acceptance Handoff
- If Local Preview Prep status is `Completed`, human reviewer must run `yarn dev` locally.
- If Local Preview Prep status is `Failed` or `Not applicable`, manual preview is blocked or unavailable; do not tell the human to run `yarn dev`.
- The assistant does not run `yarn dev` automatically.
- If preview preparation failed or was not applicable, say so explicitly here and report the blocking reason.
## Verification Results
- [x] Plan consistency check
- [x] Repository metadata contract check
- [x] Structure and link check
- [x] Language and formatting check
## Technical Debt Or Follow-ups
[Optional]
Default Principles
- Ask for the assistant-facing output language when it is not explicit
- Product documentation content is English-only for repository collaboration with this skill
- Keep document layers explicit: user-facing docs, engineering facts, validation reports, known issues, and evidence indexes are different deliverables
- CLI-first procedures unless the repository or requirement clearly favors UI-first guidance
- For Doom/Yarn repos, prepare local preview with
yarn up @alauda/doomand thenyarn installbefore manual acceptance - Human reviewers run
yarn devlocally only after local preview prep completes successfully yarn buildandyarn translateare never default validation commands- No invented terminology
- No invented frontmatter fields
- No invented component syntax
Scan to join WeChat group