codeforge-dev 1.10.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/.devcontainer/CHANGELOG.md +69 -0
  2. package/.devcontainer/CLAUDE.md +15 -6
  3. package/.devcontainer/README.md +22 -11
  4. package/.devcontainer/config/defaults/main-system-prompt.md +104 -152
  5. package/.devcontainer/config/defaults/rules/session-search.md +66 -0
  6. package/.devcontainer/config/defaults/rules/spec-workflow.md +39 -12
  7. package/.devcontainer/config/defaults/settings.json +2 -1
  8. package/.devcontainer/config/defaults/writing-system-prompt.md +143 -0
  9. package/.devcontainer/config/file-manifest.json +12 -0
  10. package/.devcontainer/devcontainer.json +9 -2
  11. package/.devcontainer/features/ccms/README.md +50 -0
  12. package/.devcontainer/features/ccms/devcontainer-feature.json +21 -0
  13. package/.devcontainer/features/ccms/install.sh +105 -0
  14. package/.devcontainer/features/ccstatusline/install.sh +24 -2
  15. package/.devcontainer/plugins/devs-marketplace/.claude-plugin/marketplace.json +8 -1
  16. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/architect.md +1 -0
  17. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/claude-guide.md +1 -1
  18. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/doc-writer.md +4 -4
  19. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/generalist.md +1 -0
  20. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/agents/spec-writer.md +8 -8
  21. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/hooks/hooks.json +10 -0
  22. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/__pycache__/skill-suggester.cpython-314.pyc +0 -0
  23. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/git-state-injector.py +15 -4
  24. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/inject-cwd.py +37 -0
  25. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/skill-suggester.py +24 -0
  26. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/scripts/spec-reminder.py +3 -2
  27. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/SKILL.md +353 -0
  28. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-build/references/review-checklist.md +175 -0
  29. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-check/SKILL.md +15 -14
  30. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/SKILL.md +12 -11
  31. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/backlog-template.md +1 -1
  32. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/milestones-template.md +32 -0
  33. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/SKILL.md +17 -18
  34. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-new/references/template.md +12 -2
  35. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-review/SKILL.md +229 -0
  36. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-update/SKILL.md +6 -2
  37. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/specification-writing/SKILL.md +1 -1
  38. package/.devcontainer/plugins/devs-marketplace/plugins/codeforge-lsp/.claude-plugin/plugin.json +38 -5
  39. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/.claude-plugin/plugin.json +7 -0
  40. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/hooks/hooks.json +17 -0
  41. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/__pycache__/guard-workspace-scope.cpython-314.pyc +0 -0
  42. package/.devcontainer/plugins/devs-marketplace/plugins/workspace-scope-guard/scripts/guard-workspace-scope.py +132 -0
  43. package/.devcontainer/scripts/setup-aliases.sh +68 -75
  44. package/package.json +1 -1
  45. package/.devcontainer/plugins/devs-marketplace/plugins/code-directive/skills/spec-init/references/roadmap-template.md +0 -33
@@ -5,14 +5,14 @@ description: >-
5
5
  "set up specs", "bootstrap specs", "start using specs", "create spec
6
6
  directory", "init specs for this project", or needs to set up the
7
7
  .specs/ directory structure for a project that doesn't have one yet.
8
- version: 0.1.0
8
+ version: 0.2.0
9
9
  ---
10
10
 
11
11
  # Initialize Specification Directory
12
12
 
13
13
  ## Mental Model
14
14
 
15
- Before any spec can be created, the project needs a `.specs/` directory with its supporting files: a ROADMAP (what each version delivers) and a BACKLOG (deferred items). This skill bootstraps that structure so `/spec-new` has a home.
15
+ Before any spec can be created, the project needs a `.specs/` directory with its supporting files: a MILESTONES tracker (what each milestone delivers) and a BACKLOG (deferred items). This skill bootstraps that structure so `/spec-new` has a home.
16
16
 
17
17
  ---
18
18
 
@@ -25,7 +25,7 @@ Glob: .specs/**/*.md
25
25
  ```
26
26
 
27
27
  **If `.specs/` already exists:**
28
- - Report current state: how many specs, versions, whether ROADMAP.md and BACKLOG.md exist
28
+ - Report current state: how many specs, domains, whether MILESTONES.md and BACKLOG.md exist
29
29
  - Suggest `/spec-check` to audit health instead
30
30
  - Do NOT recreate or overwrite anything
31
31
  - Stop here
@@ -36,9 +36,9 @@ Glob: .specs/**/*.md
36
36
 
37
37
  Create the `.specs/` directory at the project root.
38
38
 
39
- ### Step 3: Create ROADMAP.md
39
+ ### Step 3: Create MILESTONES.md
40
40
 
41
- Write `.specs/ROADMAP.md` using the template from `references/roadmap-template.md`.
41
+ Write `.specs/MILESTONES.md` using the template from `references/milestones-template.md`.
42
42
 
43
43
  ### Step 4: Create BACKLOG.md
44
44
 
@@ -63,15 +63,16 @@ Summarize what was created:
63
63
 
64
64
  Created:
65
65
  - `.specs/` directory
66
- - `.specs/ROADMAP.md` — version tracking table
66
+ - `.specs/MILESTONES.md` — milestone tracker
67
67
  - `.specs/BACKLOG.md` — deferred items list
68
68
 
69
69
  Next steps:
70
70
  - Add features to `BACKLOG.md` with priority grades (P0–P3)
71
- - Pull features into a version in `ROADMAP.md` when ready to scope
72
- - Use `/spec-new <feature-name> <version>` to create a spec
71
+ - Pull features into a milestone in `MILESTONES.md` when ready to scope
72
+ - Use `/spec-new <feature-name>` to create a spec (domain is inferred)
73
73
  - Use `/spec-refine <feature-name>` to validate before implementation
74
- - After implementing, use `/spec-update` to close the loop
74
+ - After implementing, use `/spec-review <feature-name>` to verify against the spec
75
+ - Then use `/spec-update` to close the loop
75
76
  - Use `/spec-check` to audit spec health at any time
76
77
  ```
77
78
 
@@ -87,7 +88,7 @@ Next steps:
87
88
  ## Ambiguity Policy
88
89
 
89
90
  - If the user runs this in a workspace root with multiple projects, ask which project to initialize.
90
- - If `.specs/` exists but is missing ROADMAP.md or BACKLOG.md, offer to create only the missing files.
91
+ - If `.specs/` exists but is missing MILESTONES.md or BACKLOG.md, offer to create only the missing files.
91
92
 
92
93
  ---
93
94
 
@@ -95,5 +96,5 @@ Next steps:
95
96
 
96
97
  | File | Contents |
97
98
  |------|----------|
98
- | `references/roadmap-template.md` | Starter ROADMAP with version table format |
99
+ | `references/milestones-template.md` | Starter MILESTONES with milestone table format |
99
100
  | `references/backlog-template.md` | Starter BACKLOG with item format |
@@ -1,6 +1,6 @@
1
1
  # Backlog
2
2
 
3
- Priority-graded feature and infrastructure backlog. Items are pulled into versions when ready to scope and spec. See `ROADMAP.md` for the versioning workflow.
3
+ Priority-graded feature and infrastructure backlog. Items are pulled into milestones when ready to scope and spec. See `MILESTONES.md` for the milestone workflow.
4
4
 
5
5
  ## P0 — High Priority
6
6
 
@@ -0,0 +1,32 @@
1
+ # Milestones
2
+
3
+ > Features are organized by domain in `.specs/`. Milestones group features
4
+ > into deliverable increments. See `BACKLOG.md` for the feature backlog.
5
+
6
+ ## How Milestones Work
7
+
8
+ 1. **Backlog** — All desired features live in `BACKLOG.md`, graded by priority.
9
+ 2. **Milestone scoping** — When ready to plan a deliverable, pull features from the backlog.
10
+ 3. **Spec first** — Each feature gets a spec (via `/spec-new`) before implementation begins.
11
+ 4. **Ship** — A milestone is done when all its specs are implemented and verified.
12
+
13
+ Only the **current milestone** is defined in detail. Everything else is backlog.
14
+
15
+ ## Released
16
+
17
+ _None yet._
18
+
19
+ ## Current
20
+
21
+ ### [Milestone Name]
22
+
23
+ - [ ] `domain/feature-name.md` — [Brief description]
24
+ - [ ] `domain/feature-name.md` — [Brief description]
25
+
26
+ ## Next
27
+
28
+ > Scoped from `BACKLOG.md` when the current milestone is complete.
29
+
30
+ ## Out of Scope
31
+
32
+ - [Items explicitly not planned]
@@ -5,7 +5,7 @@ description: >-
5
5
  "new feature spec", "write a spec for", "spec this feature",
6
6
  "start a new spec", "plan a feature", or needs to create a new
7
7
  specification file from the standard template.
8
- version: 0.1.0
8
+ version: 0.2.0
9
9
  ---
10
10
 
11
11
  # Create New Feature Specification
@@ -14,7 +14,7 @@ version: 0.1.0
14
14
 
15
15
  A specification is a contract between the person requesting a feature and the person building it. Writing the spec BEFORE implementation forces you to think through edge cases, acceptance criteria, and scope boundaries while changes are cheap — before any code exists.
16
16
 
17
- Every project uses `.specs/` as the specification directory. Specs are version-organized, independently loadable, and should aim for ~200 lines.
17
+ Every project uses `.specs/` as the specification directory. Specs are domain-organized, independently loadable, and should aim for ~200 lines.
18
18
 
19
19
  ---
20
20
 
@@ -22,33 +22,32 @@ Every project uses `.specs/` as the specification directory. Specs are version-o
22
22
 
23
23
  ### Step 1: Parse Arguments
24
24
 
25
- Extract the feature name and version from `$ARGUMENTS`:
25
+ Extract the feature name from `$ARGUMENTS`:
26
26
  - **Feature name**: kebab-case identifier (e.g., `session-history`, `auth-flow`)
27
- - **Version**: semver string (e.g., `v0.3.0`)
28
27
 
29
- If arguments are missing, ask the user for:
30
- 1. Feature name (what is being built)
31
- 2. Target version (which release this belongs to)
28
+ If the feature name is missing, ask the user what they want to spec.
32
29
 
33
- **Note:** Features should be pulled from the project's backlog (`BACKLOG.md`) into a version before creating a spec. If the feature isn't in the backlog yet, add it first, then assign it to a version.
30
+ **Note:** Features should be pulled from the project's backlog (`BACKLOG.md`) into a milestone before creating a spec. If the feature isn't in the backlog yet, add it first, then assign it to a milestone.
34
31
 
35
- ### Step 2: Determine File Path
32
+ ### Step 2: Determine Domain and File Path
36
33
 
37
- - **Multi-feature version** (directory already exists or multiple features planned):
38
- `.specs/{version}/{feature-name}.md`
39
- - **Single-feature version** (one spec covers the whole version):
40
- `.specs/{version}.md`
34
+ Analyze the feature name and description to infer an appropriate domain folder:
35
+ - Look at existing domain folders in `.specs/` for a natural fit
36
+ - Consider the feature's area: `auth`, `search`, `ui`, `api`, `onboarding`, etc.
37
+ - Present the inferred domain to the user for confirmation or override
38
+
39
+ The file path is always: `.specs/{domain}/{feature-name}.md`
41
40
 
42
41
  If `.specs/` does not exist at the project root, create it.
43
42
 
44
- If `.specs/{version}/` does not exist and you're using the directory form, create it.
43
+ If `.specs/{domain}/` does not exist, create it.
45
44
 
46
45
  ### Step 3: Create the Spec File
47
46
 
48
47
  Write the file using the standard template from `references/template.md`.
49
48
 
50
49
  Pre-fill:
51
- - **Version**: from arguments
50
+ - **Domain**: from the inferred/confirmed domain
52
51
  - **Status**: `planned`
53
52
  - **Last Updated**: today's date (YYYY-MM-DD)
54
53
  - **Approval**: `draft`
@@ -73,7 +72,7 @@ After creating the file, guide the user through filling it out:
73
72
  ### Step 5: Validate
74
73
 
75
74
  Before finishing:
76
- - [ ] If the file exceeds ~200 lines, consider splitting into sub-specs
75
+ - [ ] If the file exceeds ~200 lines, consider splitting into separate specs in the domain folder
77
76
  - [ ] No source code, SQL, or type definitions reproduced inline
78
77
  - [ ] Status is `planned` and Approval is `draft`
79
78
  - [ ] All required sections present (even if some are "N/A" or "TBD")
@@ -88,7 +87,7 @@ The `/spec-refine` skill walks through every `[assumed]` requirement with the us
88
87
 
89
88
  ## Sizing Guidelines
90
89
 
91
- - **Aim for ~200 lines per spec.** If a feature needs more, consider splitting into sub-specs with a parent `_overview.md` linking them.
90
+ - **Aim for ~200 lines per spec.** If a feature needs more, consider splitting into separate specs in the domain folder.
92
91
  - **Reference, don't reproduce.** Write `see src/engine/db/migrations/002.sql lines 48-70` — never paste the SQL.
93
92
  - **Independently loadable.** Each spec file must be useful without loading any other file.
94
93
  - **EARS format for requirements.** Use the `specification-writing` skill for templates and examples.
@@ -97,7 +96,7 @@ The `/spec-refine` skill walks through every `[assumed]` requirement with the us
97
96
 
98
97
  ## Ambiguity Policy
99
98
 
100
- - If the user doesn't specify a version, ask do not assume.
99
+ - If the user doesn't specify a domain, infer one from the feature name and existing `.specs/` structure, then confirm with the user.
101
100
  - If the feature scope is unclear, write a minimal spec with `## Open Questions` listing what needs clarification.
102
101
  - If a spec already exists for this feature, inform the user and suggest `/spec-update` instead.
103
102
 
@@ -9,7 +9,7 @@ Standard template for all feature specifications. Copy this structure when creat
9
9
  ```markdown
10
10
  # Feature: [Name]
11
11
 
12
- **Version:** v0.X.0
12
+ **Domain:** [domain-name]
13
13
  **Status:** planned
14
14
  **Last Updated:** YYYY-MM-DD
15
15
  **Approval:** draft
@@ -22,6 +22,8 @@ Standard template for all feature specifications. Copy this structure when creat
22
22
 
23
23
  [Testable criteria. Use Given/When/Then for complex flows, checklists for simple features, or tables for business rules. Every criterion must be verifiable.]
24
24
 
25
+ [Markers: `[ ]` = not started, `[~]` = implemented but not yet verified, `[x]` = verified (tests pass). During `/spec-build`, criteria progress from `[ ]` to `[~]` during implementation, then to `[x]` after review.]
26
+
25
27
  - [ ] [Criterion 1]
26
28
  - [ ] [Criterion 2]
27
29
  - [ ] [Criterion 3]
@@ -126,4 +128,12 @@ Standard template for all feature specifications. Copy this structure when creat
126
128
  | `draft` | Spec has unvalidated assumptions — NOT approved for implementation |
127
129
  | `user-approved` | All requirements are `[user-approved]` — ready for implementation |
128
130
 
129
- **Workflow:** `/spec-new` creates → `/spec-refine` validates → implementation begins → `/spec-update` closes the loop.
131
+ ## Acceptance Criteria Markers
132
+
133
+ | Marker | Meaning |
134
+ |--------|---------|
135
+ | `[ ]` | Not started |
136
+ | `[~]` | Implemented, not yet verified — code written, tests not confirmed |
137
+ | `[x]` | Verified — tests pass, behavior confirmed |
138
+
139
+ **Workflow:** `/spec-new` creates → `/spec-refine` validates → `/spec-build` implements + closes the loop (or implement manually → `/spec-review` verifies → `/spec-update` closes the loop).
@@ -0,0 +1,229 @@
1
+ ---
2
+ name: spec-review
3
+ description: >-
4
+ This skill should be used when the user asks to "review the spec",
5
+ "check spec adherence", "verify implementation", "spec-review",
6
+ "does code match spec", "audit implementation", or needs a standalone
7
+ deep implementation review that reads the code and confirms full
8
+ adherence to a specification.
9
+ version: 0.1.0
10
+ ---
11
+
12
+ # Spec Implementation Review
13
+
14
+ ## Mental Model
15
+
16
+ A spec is a contract — but contracts only matter if someone verifies them. `/spec-review` is the verification step: given a spec and the code that claims to implement it, does the code actually do what the spec says?
17
+
18
+ This is a standalone, single-spec, deep implementation review. Unlike `/spec-check` (which audits metadata health across all specs without reading code) and unlike `/spec-build` Phase 4 (which is locked inside the build workflow), `/spec-review` can be invoked independently at any time after implementation exists.
19
+
20
+ Use cases:
21
+
22
+ - **Manual implementation** — you built a feature without `/spec-build` and want to verify the work before running `/spec-update`
23
+ - **Post-change regression check** — re-verify after modifying an already-implemented feature
24
+ - **Pre-release audit** — confirm a feature still matches its spec before shipping
25
+ - **Onboarding verification** — check if what's in the code matches what the spec says
26
+
27
+ ```
28
+ Lifecycle positioning:
29
+
30
+ /spec-new → /spec-refine → implement (manually or via /spec-build) → /spec-review → /spec-update
31
+
32
+ Or with /spec-build (which has its own Phase 4):
33
+ /spec-new → /spec-refine → /spec-build (includes review) → done
34
+
35
+ /spec-review is independent — usable at any time after implementation exists.
36
+ ```
37
+
38
+ ---
39
+
40
+ ## Relationship to Other Skills
41
+
42
+ | Skill | What it does | How `/spec-review` differs |
43
+ |-------|-------------|---------------------------|
44
+ | `/spec-check` | Batch metadata audit (all specs, no code reading) | Single-spec deep code audit |
45
+ | `/spec-build` Phase 4 | Same depth, but embedded in the build workflow | Standalone, invokable independently |
46
+ | `/spec-update` | Updates spec metadata after implementation | `/spec-review` audits first, then recommends `/spec-update` |
47
+
48
+ ---
49
+
50
+ ## Spec Edits During Review
51
+
52
+ `/spec-review` makes limited spec edits — just enough to record what it verified:
53
+
54
+ - Upgrade `[ ]` or `[~]` → `[x]` for criteria verified by passing tests
55
+ - Downgrade `[x]` → `[ ]` if a previously-verified criterion now fails (regression)
56
+ - Add entries to `## Discrepancies` for gaps found
57
+ - Update `## Key Files` if paths are stale (files moved/deleted/added)
58
+ - Update `**Last Updated:**` date
59
+
60
+ It does NOT change `**Status:**` or add `## Implementation Notes` — that's `/spec-update`'s job. Clear boundary: `/spec-review` verifies and records findings; `/spec-update` closes the loop.
61
+
62
+ ---
63
+
64
+ ## Workflow
65
+
66
+ ### Step 1: Discovery
67
+
68
+ **Find the spec.** Match `$ARGUMENTS` (feature name or path) against:
69
+
70
+ ```
71
+ Glob: .specs/**/*.md
72
+ ```
73
+
74
+ If ambiguous, list matching specs and ask which one to review.
75
+
76
+ **Read the full spec.** Extract:
77
+
78
+ - All FR-* and NFR-* requirements with their EARS-format text
79
+ - All acceptance criteria with current markers (`[ ]`, `[~]`, `[x]`)
80
+ - Key Files — every file path listed
81
+ - Out of Scope — boundaries to respect
82
+ - Discrepancies — any existing entries
83
+
84
+ **Gate check.** `/spec-review` works on any spec with implementation to review:
85
+
86
+ | Approval | Status | Action |
87
+ |----------|--------|--------|
88
+ | `user-approved` | `planned` | Proceed (reviewing work done against approved spec) |
89
+ | `user-approved` | `partial` or `implemented` | Proceed (re-reviewing) |
90
+ | `draft` | any | **Warn**: "This spec is `draft`. Requirements may not be validated. Consider running `/spec-refine` first. Proceed anyway?" |
91
+
92
+ Unlike `/spec-build` which hard-blocks on `draft` (because it's about to write code), `/spec-review` is read-heavy — reviewing existing code against a draft spec is still useful, even if the spec itself isn't finalized.
93
+
94
+ **Read every Key File.** Read all files listed in the spec's `## Key Files` section. These are the files the spec author identified as implementing the feature. Understanding them is prerequisite to the audit.
95
+
96
+ ---
97
+
98
+ ### Step 2: Requirement Coverage Audit
99
+
100
+ Walk every FR-* and NFR-* requirement from the spec. Use the Spec Implementation Review Checklist at `spec-build/references/review-checklist.md` sections 4A and 4D as the authoritative guide.
101
+
102
+ **For each FR-* requirement:**
103
+
104
+ 1. Identify the file(s) and function(s) that implement it
105
+ 2. Verify the implementation matches the EARS-format requirement text
106
+ 3. Confirm the requirement is fully addressed (not partially)
107
+ 4. Note if the requirement was met through a different approach than planned
108
+
109
+ **For each NFR-* requirement:**
110
+
111
+ 1. Identify how the non-functional requirement is enforced
112
+ 2. Verify measurable NFRs have been tested or measured
113
+ 3. Confirm the NFR is met under expected conditions, not just ideal conditions
114
+
115
+ **Cross-checks:**
116
+
117
+ - Every FR-* has corresponding code — no requirements were skipped
118
+ - Every NFR-* has corresponding enforcement — no hand-waving
119
+ - No code was written that doesn't map to a requirement (scope creep check)
120
+ - Out of Scope items from the spec were NOT implemented
121
+
122
+ ---
123
+
124
+ ### Step 3: Acceptance Criteria Verification
125
+
126
+ For each acceptance criterion, locate or write the corresponding test. Use the Spec Implementation Review Checklist at `spec-build/references/review-checklist.md` sections 4B and 4C as the authoritative guide.
127
+
128
+ **For each criterion:**
129
+
130
+ 1. Locate the corresponding test (unit, integration, or manual verification)
131
+ 2. If no test exists: **write one** — verification requires evidence, "no test exists" is not a valid review outcome
132
+ 3. Run the test
133
+ 4. If test passes → upgrade marker to `[x]` in the spec
134
+ 5. If test fails → note the failure, set marker to `[ ]`, document the issue
135
+
136
+ **Summary checks:**
137
+
138
+ - Count total criteria vs. verified `[x]` — report the ratio
139
+ - Flag any criteria still `[ ]` (not started or regressed)
140
+ - Flag any criteria that cannot be tested — document why and note as discrepancy
141
+ - Verify tests actually test the criterion, not just exercise the code path
142
+
143
+ **Code quality spot-check** per checklist section 4C:
144
+
145
+ - Error handling at appropriate boundaries
146
+ - No hardcoded values that should be configurable
147
+ - Functions short and single-purpose
148
+ - Nesting depth within limits
149
+ - No regressions in existing tests
150
+
151
+ ---
152
+
153
+ ### Step 4: Report & Spec Updates
154
+
155
+ #### Summary Report
156
+
157
+ Present a structured report:
158
+
159
+ ```
160
+ ## Spec Implementation Review
161
+
162
+ **Spec:** [feature name] ([spec file path])
163
+ **Date:** YYYY-MM-DD
164
+ **Reviewer:** /spec-review
165
+
166
+ ### Requirement Coverage
167
+ - Functional: N/M addressed
168
+ - Non-Functional: N/M addressed
169
+ - Gaps: [list or "None"]
170
+
171
+ ### Acceptance Criteria
172
+ - [x] Verified: N
173
+ - [~] Implemented, pending: N
174
+ - [ ] Not started / regressed: N
175
+ - Failures: [list or "None"]
176
+
177
+ ### Code Quality
178
+ - Issues found: [list or "None"]
179
+ - Regressions: [list or "None"]
180
+
181
+ ### Spec Consistency
182
+ - Key Files updates needed: [list or "None"]
183
+ - Discrepancies: [list or "None"]
184
+
185
+ ### Recommendation
186
+ [ ] All clear — run `/spec-update` to close the loop
187
+ [ ] Fix issues first: [specific list]
188
+ [ ] Requires user input: [specific questions]
189
+ ```
190
+
191
+ #### Spec Edits
192
+
193
+ Apply limited edits to the spec file:
194
+
195
+ 1. **Acceptance criteria markers** — update based on test results:
196
+ - Passed tests: upgrade `[ ]` or `[~]` → `[x]`
197
+ - Failed tests: downgrade `[x]` → `[ ]` (regression), keep `[ ]` or `[~]` as-is
198
+ 2. **Discrepancies** — add entries for any gaps found between spec and implementation
199
+ 3. **Key Files** — update paths if files moved, were deleted, or new files were created
200
+ 4. **Last Updated** — set to today's date
201
+
202
+ Do NOT modify `**Status:**` or `## Implementation Notes` — those are `/spec-update`'s responsibility.
203
+
204
+ #### Next Action
205
+
206
+ Based on the review outcome, recommend:
207
+
208
+ - **All clear**: "Run `/spec-update` to close the loop and mark the spec as implemented."
209
+ - **Issues found**: "Fix the issues listed above, then re-run `/spec-review` to verify."
210
+ - **User input needed**: Present specific questions and wait for direction.
211
+
212
+ ---
213
+
214
+ ## Ambiguity Policy
215
+
216
+ - If `$ARGUMENTS` matches multiple specs, list them and ask which to review.
217
+ - If a spec has no acceptance criteria, warn and offer to review requirements only.
218
+ - If Key Files reference paths that don't exist, flag them as stale in the report and update the spec's Key Files section.
219
+ - If the spec has no requirements section, warn that there's nothing to audit against and suggest running `/spec-new` or `/spec-update` to add requirements.
220
+ - If all criteria are already `[x]`, still run the full review — regressions happen.
221
+
222
+ ---
223
+
224
+ ## Anti-Patterns
225
+
226
+ - **Skipping test verification**: Marking criteria as `[x]` without running actual tests. Every `[x]` must be backed by a passing test or confirmed behavior.
227
+ - **Reviewing without reading code**: The review must read the implementation files, not just check metadata. That's what `/spec-check` is for.
228
+ - **Modifying implementation**: `/spec-review` is a review, not a fix. Report issues; don't fix them. The user decides what to do next.
229
+ - **Changing spec status**: `/spec-review` records findings. `/spec-update` changes status. Respect the boundary.
@@ -26,6 +26,8 @@ Before performing an as-built update, check the spec's `**Approval:**` status:
26
26
 
27
27
  This is a warning, not a blocker — the user decides whether to refine first or update as-is.
28
28
 
29
+ For manually-implemented features (not using `/spec-build`), consider running `/spec-review` first to verify implementation adherence before updating the spec.
30
+
29
31
  ---
30
32
 
31
33
  ## The 6-Step Workflow
@@ -56,6 +58,7 @@ Review each acceptance criterion in the spec:
56
58
  - Mark as `[x]` if the criterion is met and verified (tests pass, behavior confirmed)
57
59
  - Leave as `[ ]` if not yet implemented
58
60
  - Add a note next to deferred criteria explaining why
61
+ - If a criterion is marked `[~]` (implemented but not yet verified from a `/spec-build` run), treat it as `[ ]` — verify it now and upgrade to `[x]` if confirmed, or leave as `[ ]` if unverifiable
59
62
 
60
63
  If criteria were met through different means than originally planned, note the deviation.
61
64
 
@@ -81,7 +84,7 @@ Verify paths exist before listing them. Use absolute project-relative paths.
81
84
  ### Step 6: Update Metadata
82
85
 
83
86
  - Set `**Last Updated:**` to today's date (YYYY-MM-DD)
84
- - Verify `**Version:**` is correct
87
+ - Verify `**Domain:**` is correct
85
88
  - Preserve the `**Approval:**` status — do NOT downgrade `user-approved` to `draft`
86
89
  - If the as-built update introduces new decisions not in the original spec, add them to `## Resolved Questions` if the user confirmed them, or `## Open Questions` if they were assumed during implementation
87
90
 
@@ -121,9 +124,10 @@ Before finishing the update:
121
124
  - [ ] Implementation Notes document deviations from original spec
122
125
  - [ ] File paths in Key Files are accurate and verified
123
126
  - [ ] Last Updated date is today
127
+ - [ ] `**Domain:**` is correct for the spec's location
124
128
  - [ ] `**Approval:**` status is preserved (not downgraded)
125
129
  - [ ] New implementation decisions are tracked in Resolved Questions or Open Questions
126
- - [ ] If the spec has grown past ~200 lines, note it and suggest splitting in a future pass
130
+ - [ ] If the spec has grown past ~200 lines, note it and suggest splitting into separate specs in the domain folder
127
131
  - [ ] If `**Approval:**` is still `draft`, user was warned and confirmed proceeding
128
132
  - [ ] No source code was pasted inline (references only)
129
133
 
@@ -176,7 +176,7 @@ Every spec file starts with metadata:
176
176
 
177
177
  ```
178
178
  # Feature: [Name]
179
- **Version:** v0.X.0
179
+ **Domain:** [domain-name]
180
180
  **Status:** implemented | partial | planned
181
181
  **Last Updated:** YYYY-MM-DD
182
182
  **Approval:** draft | user-approved
@@ -1,7 +1,40 @@
1
1
  {
2
- "name": "codeforge-lsp",
3
- "description": "LSP servers for CodeForge (Python, TypeScript, Go)",
4
- "author": {
5
- "name": "AnExiledDev"
6
- }
2
+ "name": "codeforge-lsp",
3
+ "description": "LSP servers for CodeForge (Python, TypeScript, Go)",
4
+ "author": {
5
+ "name": "AnExiledDev"
6
+ },
7
+ "lspServers": {
8
+ "pyright": {
9
+ "command": "pyright-langserver",
10
+ "args": ["--stdio"],
11
+ "extensionToLanguage": {
12
+ ".py": "python",
13
+ ".pyi": "python"
14
+ }
15
+ },
16
+ "typescript": {
17
+ "command": "typescript-language-server",
18
+ "args": ["--stdio"],
19
+ "extensionToLanguage": {
20
+ ".ts": "typescript",
21
+ ".tsx": "typescriptreact",
22
+ ".js": "javascript",
23
+ ".jsx": "javascriptreact",
24
+ ".mts": "typescript",
25
+ ".cts": "typescript",
26
+ ".mjs": "javascript",
27
+ ".cjs": "javascript"
28
+ }
29
+ },
30
+ "gopls": {
31
+ "command": "gopls",
32
+ "args": ["serve"],
33
+ "extensionToLanguage": {
34
+ ".go": "go",
35
+ ".mod": "go.mod",
36
+ ".sum": "go.sum"
37
+ }
38
+ }
39
+ }
7
40
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "workspace-scope-guard",
3
+ "description": "Enforces working directory scope — blocks writes and warns on reads outside the project",
4
+ "author": {
5
+ "name": "AnExiledDev"
6
+ }
7
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "description": "Enforce workspace scope for file operations",
3
+ "hooks": {
4
+ "PreToolUse": [
5
+ {
6
+ "matcher": "Read|Write|Edit|NotebookEdit|Glob|Grep",
7
+ "hooks": [
8
+ {
9
+ "type": "command",
10
+ "command": "python3 ${CLAUDE_PLUGIN_ROOT}/scripts/guard-workspace-scope.py",
11
+ "timeout": 5
12
+ }
13
+ ]
14
+ }
15
+ ]
16
+ }
17
+ }