원클릭으로
check-specs-alignment
Verify alignment between code and specs. Usage /groundwork:check-specs-alignment
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Verify alignment between code and specs. Usage /groundwork:check-specs-alignment
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
This skill should be used when the user wants to switch between projects in a monorepo - lists projects from .groundwork.yml and sets the active project
Generate implementation tasks from architecture document. Usage /groundwork:create-tasks
Create detailed product requirements document (PRD) for a feature. Usage /groundwork:design-product
Create design system with foundations, brand identity, and UX patterns. Usage /groundwork:ux-design
Build a feature from description with worktree isolation and TDD. Usage /groundwork:build-unplanned "Add user login"
This skill should be used when investigating bugs, unexpected behavior, test failures, or any code that does not work as expected - enforces systematic root cause analysis before any fix
| name | check-specs-alignment |
| description | Verify alignment between code and specs. Usage /groundwork:check-specs-alignment |
| argument-hint | [alignment-context] |
| allowed-tools | ["Read","Glob","Grep","Task","Skill"] |
Verifies that implementation aligns with product specs and architecture, surfacing misalignments for resolution.
Your current effort level is {{effort_level}}.
Skip this step silently if effort is high, xhigh, or max (the scale is low < medium < high < xhigh < max, so xhigh and max are already above high) AND you are Sonnet or Opus.
If effort is low or medium (i.e. below high), you MUST show the recommendation prompt — regardless of model.
If you are not Sonnet or Opus, you MUST show the recommendation prompt - regardless of effort level.
Otherwise → use AskUserQuestion:
{
"questions": [{
"question": "Do you want to switch? Drift detection and categorization across implementation and specs benefits from consistent reasoning.\n\nTo switch: cancel, run `/effort high` (and `/model sonnet` if on Haiku), then re-invoke this skill.",
"header": "Recommended: Sonnet or Opus at high effort",
"options": [
{ "label": "Continue" },
{ "label": "Cancel — I'll switch first" }
],
"multiSelect": false
}]
}
If the user selects "Cancel — I'll switch first": output the switching commands above and stop. Do not proceed with the skill.
Before loading specs, ensure project context is resolved:
.groundwork.yml exist at the repo root?
{{project_name}} non-empty?
Skill(skill="groundwork:select-project") to select a project, then restart this skill.{{project_name}}, specs at {{specs_dir}}/..groundwork.yml).AskUserQuestion:
"You're working from
<cwd>(inside [cwd-project]), but the selected Groundwork project is [selected-project] ([selected-project-path]/). What would you like to do?"
- "Switch to [cwd-project]"
- "Stay with [selected-project]" If the user switches, invoke
Skill(skill="groundwork:select-project").
{{specs_dir}}/ paths will resolve to the correct location.Read the following specs (each may be a single file or directory):
Product specs - PRD with EARS requirements
{{specs_dir}}/product_specs.md{{specs_dir}}/product_specs/ (aggregate all .md files)Architecture - Architecture decisions
{{specs_dir}}/architecture.md{{specs_dir}}/architecture/ (aggregate all .md files)Tasks - Task list (if exists)
{{specs_dir}}/tasks.md{{specs_dir}}/tasks/ (aggregate all .md files)Detection: Check for file first (takes precedence), then directory. When reading a directory, aggregate all .md files recursively with _index.md first, then numerically-prefixed files, then alphabetically.
Scan codebase for implementation:
If specs are missing:
"Cannot check alignment - missing specs:
- [List missing specs]
Run the appropriate commands to create them:
- PRD:
/groundwork:design-product- Architecture:
/groundwork:design-architecture- Tasks:
/groundwork:create-tasks"
For each EARS requirement in the PRD:
Search codebase for implementation evidence using the requirement's keywords and expected behavior
Categorize the implementation status:
Detect undocumented features - Code functionality that doesn't trace to any PRD requirement
For each architecture decision (DR-NNN):
Verify implementation follows the decision by examining:
Detect deviations:
Present the alignment report in a structured format:
## Alignment Report
### PRD Alignment
| Requirement | Status | Notes |
|-------------|--------|-------|
| PRD-XXX-REQ-001 | Implemented | Found in src/auth/login.ts |
| PRD-XXX-REQ-002 | Partial | Missing error handling for edge case |
| PRD-XXX-REQ-003 | Not Implemented | - |
| PRD-YYY-REQ-001 | Deviated | Uses polling instead of WebSocket |
**Summary:** X/Y requirements implemented, Z partial, W not implemented, V deviated
**Undocumented Features:**
- Feature X in src/foo.ts has no PRD requirement
- [Or "None detected" if clean]
### Architecture Alignment
| Decision | Status | Notes |
|----------|--------|-------|
| DR-001 | Aligned | PostgreSQL used as documented |
| DR-002 | Deviated | Using REST instead of GraphQL |
| DR-003 | Aligned | - |
**Summary:** X/Y decisions aligned, Z deviated
**Undocumented Components:**
- src/cache/ not mentioned in architecture
- [Or "None detected" if clean]
### Task Status Consistency
| Condition | Count | Tasks |
|-----------|-------|-------|
| Marked complete but code missing | N | TASK-003, TASK-007 |
| Code present but task not complete | N | TASK-005 |
Based on findings, provide actionable next steps:
For undocumented features:
"Run
/groundwork:design-productto add requirements for undocumented feature X"
For PRD deviations:
"Either:
- Run
/groundwork:source-product-specs-from-codeto update the PRD to match implementation, OR- Fix the implementation to match PRD requirement PRD-XXX-REQ-NNN"
For architecture deviations:
"Either:
- Run
/groundwork:source-architecture-from-codeto update architecture to match implementation, OR- Refactor code to follow DR-NNN (currently using [actual] instead of [documented])"
For missing implementations:
"Run
/groundwork:work-on-next-taskto implement missing requirements, or/groundwork:work-on Nto work on specific tasks"
Offer resolution options:
"Found [N] misalignments. Would you like me to:
- Update specs to match implementation (
/groundwork:source-product-specs-from-code,/groundwork:source-architecture-from-code)- List implementation changes needed to match specs
- Go through each misalignment individually"
| Status | Meaning | Resolution |
|---|---|---|
| Implemented | Code matches requirement | None needed |
| Partial | Some aspects implemented | Complete implementation or update PRD scope |
| Not Implemented | No code for requirement | Implement via tasks or remove from PRD |
| Deviated | Different from spec | Align code OR update PRD |
| Status | Meaning | Resolution |
|---|---|---|
| Aligned | Implementation follows decision | None needed |
| Deviated | Different approach used | Refactor OR update architecture |
When searching for implementation evidence:
src/ - Main source code
lib/ - Libraries
app/ - Application code (Next.js, Rails, etc.)
api/ - API routes
components/ - UI components
services/ - Service layer
models/ - Data models
database/ - Migrations, schemas
config/ - Configuration
tests/ - Test files (can verify expected behavior)