用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tomevault-io/skills-registry --skill specification-refiner命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
基于 SOC 职业分类
正在显示 SKILL.md
| name | specification-refiner |
| description | > Use when this capability is needed. |
Systematically analyze and refine specifications, requirements, and architectural designs through iterative gap analysis with persistent memory, sequential clarification, and explicit user confirmation at each phase.
0. ASSESS → Evaluate complexity, select mode, confirm with user
1. INGEST → Load document, confirm understanding with user
2. ANALYZE → Run SEAMS + Critical Path, build coverage map
3. CLARIFY → Sequential questions (one at a time), immediate integration
4. PRESENT → Surface detailed findings, manage remaining questions
5. ITERATE → Accept changes, re-analyze, present deltas
6. SYNTHESIZE → Present comprehensive summary for user approval
7. OUTPUT → Generate refined specification(s) in Draft status
8. VALIDATE → Review, validate traceability, advance status
Each phase ends with a full summary gate requiring user confirmation before proceeding.
This skill integrates with knowledge-mcp to ground analysis in engineering standards (IEEE, ISO, INCOSE).
During Phase 2 (ANALYZE), the skill automatically queries knowledge-mcp for relevant standards:
Inline citations appear in findings:
"Per ISO/IEC/IEEE 12207:2017, Clause 6.4.2, requirements SHALL include verification criteria."
Before querying, check MCP availability:
Never hallucinate citations. If MCP unavailable, state clearly:
"Note: Knowledge base unavailable. Analysis proceeds without standards context."
If knowledge-mcp fails mid-analysis:
Query the knowledge base for specific standards information.
Syntax: /lookup-standard [natural language query]
Examples:
/lookup-standard what does ISO say about traceability/lookup-standard IEEE 15288 verification methods/lookup-standard INCOSE requirements attributesResponse Format:
## Standards Lookup: [query]
### Result 1 (87% relevant)
**Source**: ISO/IEC/IEEE 12207:2017, Clause 6.4.2, p.23
[Content excerpt]
### Result 2 (74% relevant)
**Source**: INCOSE SE Handbook, Section 4.2, pp.45-47
[Content excerpt]
---
Showing 5 of 12 results. Say "show more" for additional results.
No Results:
No direct matches found for "[query]". Did you mean: [suggested related topics]?
On receiving a specification document, first assess complexity to determine the appropriate mode.
Evaluate these factors:
Present to user:
Based on initial assessment:
- Document size: [X pages / Y words]
- Domains identified: [list domains]
- Stakeholder count: [N stakeholders]
- Scope clarity: [Clear/Moderate/Ambiguous]
Recommended mode: [SIMPLE/COMPLEX]
Options:
1. Proceed with recommended mode
2. Override to SIMPLE mode
3. Override to COMPLEX mode
4. Explain the modes in more detail
Your choice:
SIMPLE Mode: Single-domain, <10 pages, clear scope
A-REQ-NNN)COMPLEX Mode: Multi-domain, >10 pages, ambiguous scope
references/spec-hierarchy.md)Present gate summary (see references/gate-templates.md for full format). Wait for user confirmation before proceeding.
analysis-state.md using template from assets/analysis-state-template.mdPresent full summary including: document info, sections identified, key entities, dependencies, and question status. See references/gate-templates.md for format. Wait for user confirmation—user may answer questions here.
Run analysis frameworks based on mode AND build the coverage map for clarification.
Standards Integration: Before beginning analysis, check if knowledge_search tool is available. If available, automatically query relevant standards during analysis to ground findings in engineering best practices.
Run SEAMS Analysis only (see references/seams-framework.md).
Auto-query pattern:
Run BOTH frameworks in parallel:
Structure → Execution → Assumptions → Mismatches → Stakeholders
Auto-query before SEAMS: Query "requirements engineering best practices [domain]"
| Lens | Questions to Answer |
|---|---|
| Structure | Completeness of I/O paths? Cohesion? Coupling risks? Boundary clarity? |
| Execution | Happy path works? Edge cases covered? Failure modes handled? |
| Assumptions | Technical assumptions? Organizational? Environmental? |
| Mismatches | Requirements ↔ Design aligned? Design ↔ Implementation consistent? |
| Stakeholders | Operator view? Security view? Integrator view? End-user view? |
For each finding: Query relevant standards topic to validate and cite authoritative sources. Include inline citations in finding descriptions when standards support the observation.
See references/critical-path-analysis.md for detailed methods.
Auto-query before Critical Path: Query "dependency analysis systems engineering"
For each critical finding: Query standards for validation and citation.
CRITICAL: Build a structured coverage map using the 11-category taxonomy:
| Category | Status | Gap Count | Impact |
|---|---|---|---|
| Functional Scope & Behavior | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Domain & Data Model | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Interaction & UX Flow | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Non-Functional Quality Attributes | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Integration & External Dependencies | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Edge Cases & Failure Handling | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Constraints & Tradeoffs | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Terminology & Consistency | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Completion Signals | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Assumptions & Risks | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
| Misc & Placeholders | [Clear/Partial/Missing] | [N] | [High/Med/Low] |
This map drives the CLARIFY phase question prioritization.
Present preliminary findings summary with severity counts, coverage map summary, top 3 issues, and blocked findings. Prompt to proceed to CLARIFY phase. See references/gate-templates.md for format.
CRITICAL: This phase uses SEQUENTIAL QUESTIONING to reduce cognitive load and enable immediate integration.
Generate prioritized queue using Impact × Uncertainty scoring:
Score each potential question:
Apply constraints:
Select top 5 by priority score
When discrete options exist, present as:
### CLARIFY-001 [CATEGORY]
[Context: What triggered this question]
**Question**: [The specific question]
**Recommended:** Option [X] - [1-2 sentence reasoning based on best practices, risk reduction, or project context]
| Option | Description |
|--------|-------------|
| A | [Option A description] |
| B | [Option B description] |
| C | [Option C description] |
| D | [Option D description] (if needed) |
| Short | Provide a different short answer (≤5 words) |
Reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.
When no meaningful discrete options exist:
### CLARIFY-001 [CATEGORY]
[Context: What triggered this question]
**Question**: [The specific question]
**Suggested:** [Your proposed answer] - [Brief reasoning]
Format: Short answer (≤5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.
AFTER EACH accepted answer (not at end of phase):
Create Clarifications section (if first answer this session):
## Clarifications
### Session YYYY-MM-DD
- Q: [question] → A: [final answer]
Apply to appropriate section(s):
| Answer Type | Update Location |
|---|---|
| Functional ambiguity | Functional Requirements section |
| User interaction/actor | User Stories or Actors subsection |
| Data shape/entities | Data Model section (fields, types, relationships) |
| Non-functional constraint | Quality Attributes section (convert vague → metric) |
| Edge case/negative flow | Edge Cases / Error Handling section |
| Terminology conflict | Normalize term across entire spec |
Handle conflicts:
Save immediately: Atomic write after each integration
Update analysis-state.md: Log question as answered
Stop asking questions when:
If no valid questions exist (full coverage), immediately report:
No critical ambiguities detected requiring formal clarification.
All categories show Clear status.
Recommend proceeding to Phase 4 (PRESENT).
Present clarification summary:
PHASE 3 COMPLETE: CLARIFICATION
Questions asked this session: [N]
Total questions asked (all phases): [M]
COVERAGE UPDATE:
| Category | Before | After | Notes |
|----------|--------|-------|-------|
| Functional Scope | Partial | Clear | Q1 resolved |
| Data Model | Missing | Clear | Q2, Q3 resolved |
| Edge Cases | Partial | Partial | Deferred (low impact) |
...
Clarifications integrated:
1. [Q1]: [Answer] → Updated [Section]
2. [Q2]: [Answer] → Updated [Section]
...
DEFERRED TO LATER:
- [Category]: [Reason - e.g., better suited for planning phase]
OUTSTANDING (low impact):
- [Category]: [Why not addressed - e.g., exceeds question quota]
Options:
1. Proceed to Phase 4 (PRESENT) with findings
2. Run another clarification session (if quota allows)
3. Review updated specification sections
Your choice:
For EACH identified issue, include: ID, title, category, severity, confidence, blocked-by status, description, evidence, impact, remediation options (with trade-offs), and related issues. See references/gate-templates.md for full template.
Present findings grouped by:
Present findings summary with severity counts, question status, and assumptions made. Offer options: (1) Iterate, (2) Skip to Synthesize, (3) Run more clarification, (4) Review details. See references/gate-templates.md for format.
When user provides new information, constraints, or requests changes:
If iteration reveals new ambiguities:
Present delta summary: changes incorporated, coverage map update, new/modified/resolved findings, key changes, question status. Offer options: (1) Continue iterating, (2) Synthesize, (3) Run clarification, (4) Review findings. See references/gate-templates.md for format.
Before generating any output, present a comprehensive summary for user approval.
Present comprehensive summary covering:
See references/gate-templates.md for full format.
Offer options: (1) Approve and output, (2) Return to iterate, (3) Modify structure, (4) Answer questions. Wait for explicit approval before generating output.
Generate refined specification(s) based on mode, all in Draft status.
Generate single A-Spec document (refined-specification.md) with:
A-REQ-001, A-REQ-002, etc.)Generate specification hierarchy per domain:
A-Spec files (one per domain):
[domain]-a-spec.mdA-REQ-[DOMAIN]-NNNB-Spec files (one or more per domain):
[domain]-[subsystem]-b-spec.mdB-REQ-[DOMAIN]-NNNTraces to: A-REQ-XXX-NNNSupporting files:
traceability-matrix.md - Full RTM (see assets/traceability-matrix-template.md)clarifications-log.md - All clarification sessionscross-cutting-concerns.md (if applicable)open-items.mdSee references/spec-hierarchy.md for detailed format specifications.
traceability-matrix.mdanalysis-state.md with RTM summaryanalysis-state.md with completion status and RTM summaryPresent: mode, files created with requirement counts, RTM summary (COMPLEX mode), findings addressed, clarifications integrated, assumptions documented. Prompt user to proceed to Phase 8. See references/gate-templates.md for format.
Final review and validation phase ensuring specifications are comprehensive, traceable, and approved. Mandatory for both SIMPLE and COMPLEX modes.
Specifications progress through statuses:
Draft → Reviewed → Approved → Baselined
analysis-state.md with new status and history| Transition | Requirements |
|---|---|
| Draft → Reviewed | No critical RTM gaps, completeness checks pass |
| Reviewed → Approved | All high-priority issues resolved, stakeholder review |
| Approved → Baselined | Formal approval documented, change control established |
Present validation summary with:
See references/gate-templates.md for full template.
Map to the 11-category taxonomy for better coverage tracking.
Track questions in analysis-state.md using tables:
Unanswered:
| ID | Question | Category | Raised In | Priority Score | Blocks |
|---|
Answered:
| ID | Question | Answer | Category | Asked In | Integrated To |
|---|
Deferred:
| ID | Question | Category | Reason | Deferred In | Revisit When |
|---|
analysis-state.mdUse the template from assets/analysis-state-template.md. Key sections:
After EACH phase AND after EACH clarification answer:
analysis-state.mdMatch depth to document maturity:
| Document Stage | Analysis Focus |
|---|---|
| Concept/Idea | Feasibility, scope clarity, key assumptions |
| Draft Spec | Completeness, internal consistency, missing sections |
| Detailed Design | Interface contracts, error handling, edge cases |
| Implementation Plan | Dependencies, sequencing, resource conflicts |
| Review/Audit | Full SEAMS sweep, stakeholder perspectives |
For rapid feedback when full analysis is not needed:
Note: Quick Assessment skips the full phase gate workflow but still creates analysis-state.md.
When specifications are incomplete:
Converted and distributed by TomeVault — claim your Tome and manage your conversions.