一键导入
qfai-sdd
Triage incoming requirements against existing specs, then create or update layered SDD artifacts (_policies + spec-*) in one workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Triage incoming requirements against existing specs, then create or update layered SDD artifacts (_policies + spec-*) in one workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Implement automated acceptance tests (E2E/API/Integration) aligned with US/TC/CON-API obligations from specs and contracts.
Analyze the repository and tune qfai.config.yaml (testFileGlobs, exclude globs, optional specSections).
Run structured discussion that defines exploration conditions, evaluation rubric, and anti-goals for downstream prototyping.
Unified implementation skill that orchestrates the full TDD micro-cycle (Red/Green/Refactor) one test at a time using test-list.md as the execution ledger.
Iterate one prototype through up to 10 cycles of generate-capture-review against a frozen DESIGN.md, focusing on information architecture, navigation flow, usability, and functionality.
Run and document quality gates (repo + qfai validate/report), fix until PASS.
| name | qfai-sdd |
| title | QFAI SDD Unified (Triage/Outline/Slice/Plan/Delta) |
| description | Triage incoming requirements against existing specs, then create or update layered SDD artifacts (_policies + spec-*) in one workflow. |
| argument-hint | [<spec-id-or-name>] [--auto] |
| allowed-tools | ["Read","Glob","Write","TodoWrite","Task","Bash"] |
| roles | ["orchestrator","delivery-planner","requirements-analyst","solution-architect","test-design-analyst","qa-strategist","completion-reviewer","architecture-reviewer","implementation-reviewer","product-surface-reviewer","qa-gatekeeper"] |
| routing-profile | default |
| mode | approval-gated |
[DRIFT-PROTOCOL:MANDATORY]
Stage 0 Preflight -> Stage 1 Triage -> Phase 0 Contracts-first
-> Phase 1 Outline -> Phase 2 Slice (per spec)
-> Phase 3 Plan finalize -> Phase 4 Delta update
references/sdd-execution-playbook.md.references/sdd-phase-checklists.md.Follow .qfai/assistant/constitution/shared-skill-operating-baseline.md#stage-0---steering-completion-refresh-mandatory.
Stop if the latest discussion-pack is missing, incomplete, or has blocking OQ.
On validate / doctor / quality-gate failures, follow .qfai/assistant/constitution/shared-skill-operating-baseline.md#gate-failure-autorepair-protocol.
Before any spec edit:
superseded / deprecated / removed)._policies/11_Slice-Policy.md:
QFAI-TRIAGE-003/004) and references/sdd-triage.md.CAP-NNNN row to _policies/03_Capabilities.md, then cite it in the CREATE row Rationale (QFAI-TRIAGE-006). See references/sdd-triage.md for the precise APPEND-vs-CREATE algorithm.<spec>/09_delta.md (per-spec) or _policies/10_delta.md (cross-spec / policy).Procedure: references/sdd-triage.md. Validators: QFAI-TRIAGE-001..006.
Every 01_Spec.md declares - Status: active | superseded | deprecated | removed.
superseded requires - Superseded-by: spec-NNNN pointing to an existing spec.deprecated / removed require - Deprecated-at: YYYY-MM-DD.Validators: QFAI-STATUS-001..006.
Follow .qfai/assistant/constitution/shared-skill-operating-baseline.md#user-questions-askuserquestion-protocol.
Approval-required ops in Stage 1 above MUST go through AskUserQuestion.
.qfai/assistant/constitution/shared-skill-operating-baseline.md#format-ssot-mandatory..qfai/**:
.qfai/assistant/skills/qfai-discussion/references/discussion-artifact-rules.md.qfai/assistant/skills/qfai-sdd/references/spec-traceability-rules.md.qfai/assistant/skills/qfai-sdd/references/contract-artifact-rules.md.qfai/assistant/skills/qfai-sdd/references/sdd-triage.md.qfai/assistant/skills/qfai-prototyping/references/evidence-requirements.md.qfai/assistant/manifest/agent-catalog.yml.qfai/assistant/manifest/agent-routing.yml.qfai/assistant/manifest/review-profiles.yml.qfai/discussion/discussion-*/ pack (lexicographically largest), validated by Stage 0..qfai/assistant/constitution/* (post-recut: normative invariants — formerly .qfai/assistant/constitution/*).qfai/assistant/manifest/* + .qfai/assistant/catalog/* (post-recut routing manifests + reference catalogs — formerly .qfai/assistant/manifest/* + .qfai/assistant/catalog/*).qfai/specs/_policies/03_Capabilities.md + active spec summaries (Stage 1 input).qfai/specs/<spec-id>/** for the targeted specs.qfai/discussion/**, .qfai/contracts/**Follow .qfai/assistant/constitution/shared-skill-delegation-baseline.md.
Stage minimum roles:
requirements-analyst drafts requirement-aligned spec content.solution-architect drafts structural / contract / architecture sections.test-design-analyst drafts traceability, examples, and test-design.product-experience-architect is added when the target is UI-bearing.orchestrator integrates outputs and presents for confirmation; never drafts the primary artifact and never self-approves.completion-reviewer is delegated independently. Required field: Status (PASS/REVISE).Reviewer routing is fixed by .qfai/assistant/manifest/agent-routing.yml and .qfai/assistant/manifest/review-profiles.yml.
completion-reviewer.architecture-reviewer (structural / contract / CLI), product-surface-reviewer (UI-bearing), qa-gatekeeper (validate / coverage / runtime / prototyping evidence affected)..qfai/assistant/catalog/test-layers.md; layer pinning is enforced (US→E2E, TC→Integration, CON-API→API).PASS._policies/03_Capabilities.md.Per-spec evidence at .qfai/evidence/sdd-<spec-id>.md is mandatory and MUST include ## Work Orders Summary. Use the shared schema from shared-skill-delegation-baseline.md.
references/review-cycle-playbook.md.references/rcp_footer.md.PASS and FAIL.US -> AC -> BR -> EX -> TC must be present.Follow .qfai/assistant/constitution/shared-skill-operating-baseline.md#delta-rejected-guard-mandatory.
_policies/11_Slice-Policy.md is the SSOT for the 8 ops and ID stability rules./qfai-sdd <spec-id-or-name> [--auto]): update only the matched single spec target./qfai-sdd): target all capabilities listed in _policies/03_Capabilities.md..qfai/assistant/skills/qfai-sdd/templates/contracts, templates/report, and templates/specs..qfai/report/preflight_summary.md before generating shared/spec artifacts..qfai/contracts/design/** and .qfai/contracts/ui/** per references/ui-design-contract-normalization.md. UI-bearing targets MUST also validate the consuming-project root DESIGN.md and freeze its sha256 into .qfai/contracts/design/DESIGN.md.lock.yaml (see Phase 0 DESIGN.md Freeze below)._policies/05_Contracts.md must include a Contract Index aligned with .qfai/contracts/**._policies/04_Business-Flow.md must be Markdown with Mermaid flowchart or sequenceDiagram.05_Examples.md must include EX-ID and BR-Ref mappings.06_Test-Cases.md must include TC-ID, EX-Ref, AC-Refs, and Type, with normal-path plus error/boundary coverage.qfai validate --profile sdd --fail-on error --format github | tee .qfai/report/validate.log exits with error=0..qfai/report/preflight_summary.md.DESIGN.md per the Phase 0 DESIGN.md Freeze step below)._policies/01..11).error=0..qfai/report/specs-coverage/spec-*.md._policies/01..11 filesspec-*/01..10 files (with valid Status: bullet)09_delta.md (per-spec) or _policies/10_delta.md (cross-spec).qfai/contracts/**; UI-bearing targets normalize design/ui contracts.qfai/report/preflight_summary.md.qfai/evidence/sdd-<spec-id>.mdThe canonical file set is defined by skill templates under .qfai/assistant/skills/qfai-sdd/templates/.
When the target spec is UI-bearing, Phase 0 MUST freeze the brand SSOT:
DESIGN.md at <consuming-project-root>/DESIGN.md. If
missing, stop and ask the user to run /qfai-discussion (which
emits the draft) or to author it manually using the sample at
.qfai/assistant/skills/qfai-prototyping/templates/DESIGN.md.sample.parseDesignMd(text). If the result is { error: ParseError },
stop and report path / code / message for the parse error.
Otherwise the result is { data: DesignMd; body: string }; pass
data to validateDesignMd(data). If that issue list is
non-empty, stop and report each issue. Both functions, together with
hashDesignMd and the DesignMd / ParseError / ParseResult /
ValidationIssue types, are re-exported from the public qfai
package entry (import { parseDesignMd, validateDesignMd, hashDesignMd } from "qfai").hashDesignMd(text) to compute sha256 over the raw bytes..qfai/contracts/design/DESIGN.md.lock.yaml from the
template at
templates/contracts/design-md-lock.sample.yaml with these fields:
designMdPath: "DESIGN.md"designMdSha256: <hex>frozenAt: <UTC ISO-8601>schemaTokens.colors, fontFamilies, radii, shadows
enumerated per the sample._policies/05_Contracts.md under the Contract
Index. The lock yaml plus root DESIGN.md are the only brand
contract; per-aspect brand yaml contracts have been removed./qfai-prototyping re-checks the lock sha256 against the live
DESIGN.md on every cycle and exits 2 on mismatch.
Run the full checklist from references/sdd-quality-gate.md. The gate also covers status-field and Triage-section checks.
Create .qfai/evidence/sdd-<spec-id>.md with: Objective, Inputs reviewed, Preflight summary path, Triage decisions (op + approver per row), Open questions, Decisions made, Work performed, Commands executed, Validate evidence paths, Work Orders Summary, Gaps / Open risks, Final status.
When declaring DONE, include:
09_delta.mdWhen this skill completes, provide a final user-facing message enumerating next steps:
/qfai-prototyping./qfai-atdd./qfai-sdd and regenerate evidence._policies/05_Contracts.md exist under .qfai/contracts/**.The skill collapses avoidable per-session prompts to 0-1 by classifying every decision into one of three named buckets:
package.json#version, branch pin)companyNameprimarySpecId (when absent from inputs)A skill MAY narrow the auto-decide bucket (drop entries) but MUST NOT widen it. Widening triggers a Reviewer-Gate finding.
project_memory: