/groundwork:check-specs-alignment [context]from groundwork
Verifies that implementation aligns with product specs and architecture, surfacing misalignments for resolution. Supports scoped checks by requirement ID, task, or component.
Ships in groundwork. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole 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. Otherwise ask via AskUserQuestion (header "Model check"; options "Continue anyway" / "Cancel — I'll switch first"):
"Do you want to switch? Drift detection and categorization across implementation and specs benefits from consistent reasoning.
Recommended: Sonnet or Opus at high effort.
To switch: cancel, run
/effort high(and/model sonnetif on Haiku), then re-invoke this skill."
If the user selects "Cancel — I'll switch first": output the switching commands and stop. Do not proceed with the skill. Ask once per conversation: a skill invoked by another skill skips this step when the recommendation was already shown. In a non-interactive run (--noninteractive, GROUNDWORK_RUNNER_MODE=true, or GROUNDWORK_BATCH_MODE=true), skip the prompt and continue on the current model.
.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}}/.--project.
.groundwork.yml: the repo root or the selected project's path → fine, proceed; no project's path → proceed without warning (shared directory).--noninteractive, keep the selected project and continue; otherwise warn via 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").
Scope: With no argument, check everything. With an argument, the argument names the scope of this check — a requirement or decision ID (PRD-XXX-REQ-002, DR-003), a task ID, a feature or component name, or a path. Limit the search and the report to it, title the report ## Alignment Report — [scope], and list in one line what was left unchecked.
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 a single file first (it takes precedence), then a directory. Read a directory as all its .md files recursively — _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:
This step produces the "Task Status Consistency" table of the report. When the task catalog exists (single file {{specs_dir}}/tasks.md, or the {{specs_dir}}/tasks/ directory — read its _index.md status table first), compare each task's recorded status with the code:
Complete, look for implementation evidence of its goal and acceptance criteria (its component, its files by convention). A task with no trace of its criteria in the code belongs in this row.Not Started or Blocked, check whether its acceptance criteria are already satisfied in the code. If they are, the status is stale, not the code.Without a task catalog, write "No task catalog" in that section of the report.
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 | Partially Implemented | 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 partially implemented, 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 |
| Partially Implemented | 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:
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (etr/groundwork) — no native marketplace selected
npx claudepluginhub p/etr-groundwork44 skills in this plugin
/build-unplannedBuild a feature from a description with worktree isolation and TDD. Optional flag - --on-unrelated-failure stop-and-ask|expand-and-fix|ignore-and-merge - how validation treats gate failures unrelated to the active project (default stop-and-ask)./create-tasksGenerate implementation tasks from architecture document./debugUse when investigating bugs, unexpected behavior, test failures, or any code that does not work as expected - enforces systematic root cause analysis before any fix/design-architectureUse when the user asks to design system architecture, make architectural decisions, or translate PRD into technical design/design-it-twiceUse before committing to a non-trivial module, service boundary, or public API - generate 2-3 divergent interface designs, compare them on depth/locality/seam, and recommend one/design-productCreate detailed product requirements document (PRD) for a feature.Other plugins' skills for the same job