一键导入
speckit-reconcile-run
Reconcile implementation drift by updating the feature's own spec, plan, and tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reconcile implementation drift by updating the feature's own spec, plan, and tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | speckit-reconcile-run |
| description | Reconcile implementation drift by updating the feature's own spec, plan, and tasks |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"extension:reconcile"} |
| mode | speckit.reconcile-run |
Act as the Chief Software Architect and Implementation Auditor. A feature implementation has landed, but "artifact drift" has been discovered (e.g., missing routes, updated behavior, or unlinked UI). Your goal is to reconcile this drift by surgically amending the feature's own specification, plan, and task artifacts.
$ARGUMENTS
The input $ARGUMENTS is a Gap Report — a natural language description of what is missing or changed in the implementation versus the documentation.
Examples:
If $ARGUMENTS contains any of these flags, respect them (optional):
--spec-only — update only spec.md--plan-only — update only plan.md--tasks-only — update only tasks.mdIf $ARGUMENTS is empty, output ERROR: No gap report provided. Usage: /speckit.reconcile.run [gap report text] and stop.
Run .specify/scripts/bash/check-prerequisites.sh --json --paths-only --include-tasks to identify the active feature directory and its artifacts. This script is mandatory for path discovery. If the script is missing, stop and inform the user.
Derive absolute paths for:
FEATURE_DIR (e.g., specs/###-feature-name/)FEATURE_SPEC (FEATURE_DIR/spec.md)IMPL_PLAN (FEATURE_DIR/plan.md)TASKS_FILE (FEATURE_DIR/tasks.md)Validation: Ensure spec.md and plan.md exist. If either is missing, stop with:
⚠️ Missing required files in
FEATURE_DIR. Expected: spec.md, plan.md. Run/speckit.specifyand/speckit.planfirst.
If tasks.md does not exist, create it with a ## Remediation: Gaps heading before appending tasks.
Read FEATURE_SPEC, IMPL_PLAN, and TASKS_FILE.
Also read .specify/memory/constitution.md if it exists. If found, extract MUST-level constraints and Architecture Standards. These are enforced in Step 1 — any remediation item that conflicts with a MUST principle is flagged as CRITICAL:
🔴 CONSTITUTION CONFLICT: [remediation item] conflicts with [principle]
→ This must be resolved in Step 2 clarification before edits proceed.
Analyze the user's Gap Report and normalize it into structured remediation items:
| Category | Typical Issues | Action |
|---|---|---|
| Wiring & Navigation | Missing routes, menu items, sidebar links | Add to plan.md, create tasks in tasks.md |
| Contracts | API field mismatches, missing headers | Update plan.md contracts, create tasks |
| Acceptance Criteria | Implementation behaves differently than planned | Update spec.md scenarios/criteria |
| Test Coverage | New wiring/navigation without verification | Add task for Integration Test |
| Logic/UX | Success toasts missing, error handling gaps | Add tasks for implementation |
For each normalized item, verify it does not conflict with any MUST-level constitution constraint loaded in Step 0.2. Flag any conflicts as CRITICAL and include them in Step 2 clarification.
If the gap report is ambiguous (e.g., "the button doesn't work" without saying which button), ask targeted questions.
Use this format and wait for answers:
## Question [N]: [Topic]
**Context**: [Relevant implementation detail]
**Decision Needed**: [1 sentence]
**Suggested Answers**: [Table with Option A/B/C]
**Your choice**: _[Wait for user response]_
Rules:
NEEDS CLARIFICATION markers in output — beyond that, pick reasonable defaults and note them in the Sync Impact Report.Before making any edits, produce a brief impact map:
### Sync Impact Map
| Artifact | Changes | Tasks Generated |
|----------|---------|-----------------|
| `spec.md` | Update AC-04, add User Scenario "Error Handling" | None |
| `plan.md` | Add Route `/settings`, update API contract | None |
| `tasks.md` | Append remediation tasks | T045, T046, T047 |
Constraint: Operate strictly in place. Do not create branches, switch branches, or run feature-creation scripts. All edits target existing files in FEATURE_DIR.
spec.md)### Revision: Implementation Sync [YYYY-MM-DD]
- Reason: [Summary of drift reconciled]
plan.md)tasks.md)This is the most critical step. Create remediation tasks to close the drift.
Task Formatting:
- [ ] T{NNN} [P] [{story}] {action verb} {what} in {exact/file/path.ext} [Sync: Gap Report]
Where [P] is an optional priority flag — include it only for tasks that are blocking or high-urgency. Omit for normal priority. The [Sync: Gap Report] tag is always appended for traceability.
Rules for Tasks:
T### in tasks.md. Start new tasks from max + 1. Never reuse or renumber.## [US2] Settings Dashboard). If no phase fits, create a ## Remediation: Gaps section at the end.Output the final report:
# Sync Impact Report
## Changed Files
| File (absolute path) | Change Summary |
|----------------------|----------------|
| `/absolute/path/to/spec.md` | Updated AC, Scenarios |
| `/absolute/path/to/plan.md` | Updated Routing/Contracts |
| `/absolute/path/to/tasks.md` | Added [N] remediation tasks |
## New Remediation Tasks
[List the new tasks added, e.g.]
- **T045**: Add sidebar link in `src/components/Sidebar.tsx`
- **T046**: Update router in `src/router/index.ts`
- **T047**: Integration test: navigate to Settings in `tests/integration/navigation.test.ts`
## Outstanding Decisions
[List any `NEEDS CLARIFICATION` items or "None"]
## Next Step
[Recommend based on what changed:]
- If remediation tasks were added → `/speckit.implement` to execute them
- If plan was significantly updated → `/speckit.plan` to review architecture
- If only spec was updated → Review changes and proceed with implementation
spec.md and plan.md surgically updated.tasks.md updated with incremented T### IDs and exact file paths.Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
Generate a custom checklist for the current feature based on user requirements.
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
Execute the implementation plan by processing and executing all tasks defined in tasks.md
Execute the implementation planning workflow using the plan template to generate design artifacts.