hsh19900502 1.0.22 → 1.0.24

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 (61) hide show
  1. package/.claude/commands/speckit.analyze.md +4 -4
  2. package/.claude/commands/speckit.checklist.md +22 -15
  3. package/.claude/commands/speckit.clarify.md +58 -57
  4. package/.claude/commands/speckit.constitution.md +5 -4
  5. package/.claude/commands/speckit.implement.md +21 -22
  6. package/.claude/commands/speckit.plan.md +2 -1
  7. package/.claude/commands/speckit.specify.md +107 -111
  8. package/.claude/commands/speckit.tasks.md +0 -3
  9. package/.claude/settings.local.json +7 -1
  10. package/.prettierignore +5 -0
  11. package/.prettierrc.json +10 -0
  12. package/.specify/memory/constitution.md +11 -6
  13. package/.specify/templates/agent-file-template.md +6 -1
  14. package/.specify/templates/checklist-template.md +3 -3
  15. package/.specify/templates/plan-template.md +7 -6
  16. package/.specify/templates/spec-template.md +7 -7
  17. package/.specify/templates/tasks-template.md +13 -13
  18. package/CLAUDE.md +4 -4
  19. package/README.md +9 -1
  20. package/dist/commands/cloud.d.ts +1 -1
  21. package/dist/commands/cloud.js +30 -21
  22. package/dist/commands/git.js +4 -4
  23. package/dist/commands/ide/index.d.ts +2 -0
  24. package/dist/commands/ide/index.js +160 -0
  25. package/dist/commands/mcp.js +5 -5
  26. package/dist/commands/mono.js +8 -7
  27. package/dist/commands/url.d.ts +3 -0
  28. package/dist/commands/url.js +142 -0
  29. package/dist/hsh.js +48 -12
  30. package/dist/types/index.d.ts +3 -0
  31. package/dist/util.js +6 -6
  32. package/docs/FUZZY_SEARCH_FEATURE.md +240 -0
  33. package/eslint.config.js +47 -0
  34. package/package.json +13 -2
  35. package/specs/001-cloud-login-feature/contracts/cloud-command.ts +3 -3
  36. package/specs/001-cloud-login-feature/contracts/config-service.ts +5 -2
  37. package/specs/001-cloud-login-feature/data-model.md +24 -1
  38. package/specs/001-cloud-login-feature/plan.md +7 -6
  39. package/specs/001-cloud-login-feature/quickstart.md +24 -15
  40. package/specs/001-cloud-login-feature/research.md +35 -6
  41. package/specs/001-cloud-login-feature/spec.md +15 -1
  42. package/specs/001-cloud-login-feature/tasks.md +8 -2
  43. package/specs/001-cloud-scp-command/data-model.md +13 -13
  44. package/specs/001-cloud-scp-command/plan.md +30 -21
  45. package/specs/001-cloud-scp-command/quickstart.md +33 -11
  46. package/specs/001-cloud-scp-command/research.md +44 -9
  47. package/specs/001-cloud-scp-command/spec.md +30 -0
  48. package/specs/001-cloud-scp-command/tasks.md +41 -21
  49. package/src/commands/cloud.ts +75 -47
  50. package/src/commands/git.ts +14 -14
  51. package/src/commands/ide/index.ts +203 -0
  52. package/src/commands/mcp.ts +14 -19
  53. package/src/commands/mono.ts +23 -24
  54. package/src/commands/url.ts +166 -0
  55. package/src/hsh.ts +68 -26
  56. package/src/types/index.ts +4 -1
  57. package/src/util.ts +12 -8
  58. package/tsconfig.json +2 -2
  59. package/dist/commands/ide.d.ts +0 -2
  60. package/dist/commands/ide.js +0 -104
  61. package/src/commands/ide.ts +0 -130
@@ -126,16 +126,16 @@ Output a Markdown report (no file writes) with the following structure:
126
126
 
127
127
  ## Specification Analysis Report
128
128
 
129
- | ID | Category | Severity | Location(s) | Summary | Recommendation |
130
- |----|----------|----------|-------------|---------|----------------|
131
- | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
129
+ | ID | Category | Severity | Location(s) | Summary | Recommendation |
130
+ | --- | ----------- | -------- | ---------------- | ---------------------------- | ------------------------------------ |
131
+ | A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |
132
132
 
133
133
  (Add one row per finding; generate stable IDs prefixed by category initial.)
134
134
 
135
135
  **Coverage Summary Table:**
136
136
 
137
137
  | Requirement Key | Has Task? | Task IDs | Notes |
138
- |-----------------|-----------|----------|-------|
138
+ | --------------- | --------- | -------- | ----- |
139
139
 
140
140
  **Constitution Alignment Issues:** (if any)
141
141
 
@@ -7,12 +7,14 @@ description: Generate a custom checklist for the current feature based on user r
7
7
  **CRITICAL CONCEPT**: Checklists are **UNIT TESTS FOR REQUIREMENTS WRITING** - they validate the quality, clarity, and completeness of requirements in a given domain.
8
8
 
9
9
  **NOT for verification/testing**:
10
+
10
11
  - ❌ NOT "Verify the button clicks correctly"
11
12
  - ❌ NOT "Test error handling works"
12
13
  - ❌ NOT "Confirm the API returns 200"
13
14
  - ❌ NOT checking if code/implementation matches the spec
14
15
 
15
16
  **FOR requirements quality validation**:
17
+
16
18
  - ✅ "Are visual hierarchy requirements defined for all card types?" (completeness)
17
19
  - ✅ "Is 'prominent display' quantified with specific sizing/positioning?" (clarity)
18
20
  - ✅ "Are hover state requirements consistent across all interactive elements?" (consistency)
@@ -77,7 +79,7 @@ You **MUST** consider the user input before proceeding (if not empty).
77
79
  - spec.md: Feature requirements and scope
78
80
  - plan.md (if exists): Technical details, dependencies
79
81
  - tasks.md (if exists): Implementation tasks
80
-
82
+
81
83
  **Context Loading Strategy**:
82
84
  - Load only necessary portions relevant to active focus areas (avoid full-file dumping)
83
85
  - Prefer summarizing long sections into concise scenario/requirement bullets
@@ -88,7 +90,7 @@ You **MUST** consider the user input before proceeding (if not empty).
88
90
  - Create `FEATURE_DIR/checklists/` directory if it doesn't exist
89
91
  - Generate unique checklist filename:
90
92
  - Use short, descriptive name based on domain (e.g., `ux.md`, `api.md`, `security.md`)
91
- - Format: `[domain].md`
93
+ - Format: `[domain].md`
92
94
  - If file exists, append to existing file
93
95
  - Number items sequentially starting from CHK001
94
96
  - Each `/speckit.checklist` run creates a NEW file (never overwrites existing checklists)
@@ -100,7 +102,7 @@ You **MUST** consider the user input before proceeding (if not empty).
100
102
  - **Consistency**: Do requirements align with each other?
101
103
  - **Measurability**: Can requirements be objectively verified?
102
104
  - **Coverage**: Are all scenarios/edge cases addressed?
103
-
105
+
104
106
  **Category Structure** - Group items by requirement quality dimensions:
105
107
  - **Requirement Completeness** (Are all necessary requirements documented?)
106
108
  - **Requirement Clarity** (Are requirements specific and unambiguous?)
@@ -111,14 +113,14 @@ You **MUST** consider the user input before proceeding (if not empty).
111
113
  - **Non-Functional Requirements** (Performance, Security, Accessibility, etc. - are they specified?)
112
114
  - **Dependencies & Assumptions** (Are they documented and validated?)
113
115
  - **Ambiguities & Conflicts** (What needs clarification?)
114
-
116
+
115
117
  **HOW TO WRITE CHECKLIST ITEMS - "Unit Tests for English"**:
116
-
118
+
117
119
  ❌ **WRONG** (Testing implementation):
118
120
  - "Verify landing page displays 3 episode cards"
119
121
  - "Test hover states work on desktop"
120
122
  - "Confirm logo click navigates home"
121
-
123
+
122
124
  ✅ **CORRECT** (Testing requirements quality):
123
125
  - "Are the exact number and layout of featured episodes specified?" [Completeness]
124
126
  - "Is 'prominent display' quantified with specific sizing/positioning?" [Clarity]
@@ -127,7 +129,7 @@ You **MUST** consider the user input before proceeding (if not empty).
127
129
  - "Is the fallback behavior specified when logo image fails to load?" [Edge Cases]
128
130
  - "Are loading states defined for asynchronous episode data?" [Completeness]
129
131
  - "Does the spec define visual hierarchy for competing UI elements?" [Clarity]
130
-
132
+
131
133
  **ITEM STRUCTURE**:
132
134
  Each item should follow this pattern:
133
135
  - Question format asking about requirement quality
@@ -135,28 +137,28 @@ You **MUST** consider the user input before proceeding (if not empty).
135
137
  - Include quality dimension in brackets [Completeness/Clarity/Consistency/etc.]
136
138
  - Reference spec section `[Spec §X.Y]` when checking existing requirements
137
139
  - Use `[Gap]` marker when checking for missing requirements
138
-
140
+
139
141
  **EXAMPLES BY QUALITY DIMENSION**:
140
-
142
+
141
143
  Completeness:
142
144
  - "Are error handling requirements defined for all API failure modes? [Gap]"
143
145
  - "Are accessibility requirements specified for all interactive elements? [Completeness]"
144
146
  - "Are mobile breakpoint requirements defined for responsive layouts? [Gap]"
145
-
147
+
146
148
  Clarity:
147
149
  - "Is 'fast loading' quantified with specific timing thresholds? [Clarity, Spec §NFR-2]"
148
150
  - "Are 'related episodes' selection criteria explicitly defined? [Clarity, Spec §FR-5]"
149
151
  - "Is 'prominent' defined with measurable visual properties? [Ambiguity, Spec §FR-4]"
150
-
152
+
151
153
  Consistency:
152
154
  - "Do navigation requirements align across all pages? [Consistency, Spec §FR-10]"
153
155
  - "Are card component requirements consistent between landing and detail pages? [Consistency]"
154
-
156
+
155
157
  Coverage:
156
158
  - "Are requirements defined for zero-state scenarios (no episodes)? [Coverage, Edge Case]"
157
159
  - "Are concurrent user interaction scenarios addressed? [Coverage, Gap]"
158
160
  - "Are requirements specified for partial data loading failures? [Coverage, Exception Flow]"
159
-
161
+
160
162
  Measurability:
161
163
  - "Are visual hierarchy requirements measurable/testable? [Acceptance Criteria, Spec §FR-1]"
162
164
  - "Can 'balanced visual weight' be objectively verified? [Measurability, Spec §FR-2]"
@@ -192,7 +194,7 @@ You **MUST** consider the user input before proceeding (if not empty).
192
194
  - ❌ "Click", "navigate", "render", "load", "execute"
193
195
  - ❌ Test cases, test plans, QA procedures
194
196
  - ❌ Implementation details (frameworks, APIs, algorithms)
195
-
197
+
196
198
  **✅ REQUIRED PATTERNS** - These test requirements quality:
197
199
  - ✅ "Are [requirement type] defined/specified/documented for [scenario]?"
198
200
  - ✅ "Is [vague term] quantified/clarified with specific criteria?"
@@ -222,6 +224,7 @@ To avoid clutter, use descriptive types and clean up obsolete checklists when do
222
224
  **UX Requirements Quality:** `ux.md`
223
225
 
224
226
  Sample items (testing the requirements, NOT the implementation):
227
+
225
228
  - "Are visual hierarchy requirements defined with measurable criteria? [Clarity, Spec §FR-1]"
226
229
  - "Is the number and positioning of UI elements explicitly specified? [Completeness, Spec §FR-1]"
227
230
  - "Are interaction state requirements (hover, focus, active) consistently defined? [Consistency]"
@@ -232,6 +235,7 @@ Sample items (testing the requirements, NOT the implementation):
232
235
  **API Requirements Quality:** `api.md`
233
236
 
234
237
  Sample items:
238
+
235
239
  - "Are error response formats specified for all failure scenarios? [Completeness]"
236
240
  - "Are rate limiting requirements quantified with specific thresholds? [Clarity]"
237
241
  - "Are authentication requirements consistent across all endpoints? [Consistency]"
@@ -241,6 +245,7 @@ Sample items:
241
245
  **Performance Requirements Quality:** `performance.md`
242
246
 
243
247
  Sample items:
248
+
244
249
  - "Are performance requirements quantified with specific metrics? [Clarity]"
245
250
  - "Are performance targets defined for all critical user journeys? [Coverage]"
246
251
  - "Are performance requirements under different load conditions specified? [Completeness]"
@@ -250,6 +255,7 @@ Sample items:
250
255
  **Security Requirements Quality:** `security.md`
251
256
 
252
257
  Sample items:
258
+
253
259
  - "Are authentication requirements specified for all protected resources? [Coverage]"
254
260
  - "Are data protection requirements defined for sensitive information? [Completeness]"
255
261
  - "Is the threat model documented and requirements aligned to it? [Traceability]"
@@ -279,9 +285,10 @@ Sample items:
279
285
  ```
280
286
 
281
287
  **Key Differences:**
288
+
282
289
  - Wrong: Tests if the system works correctly
283
290
  - Correct: Tests if the requirements are written correctly
284
291
  - Wrong: Verification of behavior
285
292
  - Correct: Validation of requirement quality
286
- - Wrong: "Does it do X?"
293
+ - Wrong: "Does it do X?"
287
294
  - Correct: "Is X clearly specified?"
@@ -82,69 +82,69 @@ Execution steps:
82
82
  - Information is better deferred to planning phase (note internally)
83
83
 
84
84
  3. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
85
- - Maximum of 10 total questions across the whole session.
86
- - Each question must be answerable with EITHER:
87
- * A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR
88
- * A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words").
85
+ - Maximum of 10 total questions across the whole session.
86
+ - Each question must be answerable with EITHER:
87
+ - A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR
88
+ - A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words").
89
89
  - Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation.
90
90
  - Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved.
91
91
  - Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness).
92
92
  - Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests.
93
- - If more than 5 categories remain unresolved, select the top 5 by (Impact * Uncertainty) heuristic.
93
+ - If more than 5 categories remain unresolved, select the top 5 by (Impact \* Uncertainty) heuristic.
94
94
 
95
95
  4. Sequential questioning loop (interactive):
96
- - Present EXACTLY ONE question at a time.
97
- - For multiple‑choice questions:
98
- * **Analyze all options** and determine the **most suitable option** based on:
99
- - Best practices for the project type
100
- - Common patterns in similar implementations
101
- - Risk reduction (security, performance, maintainability)
102
- - Alignment with any explicit project goals or constraints visible in the spec
103
- * Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences explaining why this is the best choice).
104
- * Format as: `**Recommended:** Option [X] - <reasoning>`
105
- * Then render all options as a Markdown table:
106
-
107
- | Option | Description |
108
- |--------|-------------|
109
- | A | <Option A description> |
110
- | B | <Option B description> |
111
- | C | <Option C description> | (add D/E as needed up to 5)
112
- | Short | Provide a different short answer (<=5 words) | (Include only if free-form alternative is appropriate)
113
-
114
- * After the table, add: `You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.`
115
- - For short‑answer style (no meaningful discrete options):
116
- * Provide your **suggested answer** based on best practices and context.
117
- * Format as: `**Suggested:** <your proposed answer> - <brief reasoning>`
118
- * Then output: `Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.`
119
- - After the user answers:
120
- * If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer.
121
- * Otherwise, validate the answer maps to one option or fits the <=5 word constraint.
122
- * If ambiguous, ask for a quick disambiguation (count still belongs to same question; do not advance).
123
- * Once satisfactory, record it in working memory (do not yet write to disk) and move to the next queued question.
124
- - Stop asking further questions when:
125
- * All critical ambiguities resolved early (remaining queued items become unnecessary), OR
126
- * User signals completion ("done", "good", "no more"), OR
127
- * You reach 5 asked questions.
128
- - Never reveal future queued questions in advance.
129
- - If no valid questions exist at start, immediately report no critical ambiguities.
96
+ - Present EXACTLY ONE question at a time.
97
+ - For multiple‑choice questions:
98
+ - **Analyze all options** and determine the **most suitable option** based on:
99
+ - Best practices for the project type
100
+ - Common patterns in similar implementations
101
+ - Risk reduction (security, performance, maintainability)
102
+ - Alignment with any explicit project goals or constraints visible in the spec
103
+ - Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences explaining why this is the best choice).
104
+ - Format as: `**Recommended:** Option [X] - <reasoning>`
105
+ - Then render all options as a Markdown table:
106
+
107
+ | Option | Description |
108
+ | ------ | -------------------------------------------- | ------------------------------------------------------ |
109
+ | A | <Option A description> |
110
+ | B | <Option B description> |
111
+ | C | <Option C description> | (add D/E as needed up to 5) |
112
+ | Short | Provide a different short answer (<=5 words) | (Include only if free-form alternative is appropriate) |
113
+ - After the table, add: `You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.`
114
+
115
+ - For short‑answer style (no meaningful discrete options):
116
+ - Provide your **suggested answer** based on best practices and context.
117
+ - Format as: `**Suggested:** <your proposed answer> - <brief reasoning>`
118
+ - Then output: `Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.`
119
+ - After the user answers:
120
+ - If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer.
121
+ - Otherwise, validate the answer maps to one option or fits the <=5 word constraint.
122
+ - If ambiguous, ask for a quick disambiguation (count still belongs to same question; do not advance).
123
+ - Once satisfactory, record it in working memory (do not yet write to disk) and move to the next queued question.
124
+ - Stop asking further questions when:
125
+ - All critical ambiguities resolved early (remaining queued items become unnecessary), OR
126
+ - User signals completion ("done", "good", "no more"), OR
127
+ - You reach 5 asked questions.
128
+ - Never reveal future queued questions in advance.
129
+ - If no valid questions exist at start, immediately report no critical ambiguities.
130
130
 
131
131
  5. Integration after EACH accepted answer (incremental update approach):
132
- - Maintain in-memory representation of the spec (loaded once at start) plus the raw file contents.
133
- - For the first integrated answer in this session:
134
- * Ensure a `## Clarifications` section exists (create it just after the highest-level contextual/overview section per the spec template if missing).
135
- * Under it, create (if not present) a `### Session YYYY-MM-DD` subheading for today.
136
- - Append a bullet line immediately after acceptance: `- Q: <question> → A: <final answer>`.
137
- - Then immediately apply the clarification to the most appropriate section(s):
138
- * Functional ambiguity → Update or add a bullet in Functional Requirements.
139
- * User interaction / actor distinction → Update User Stories or Actors subsection (if present) with clarified role, constraint, or scenario.
140
- * Data shape / entities → Update Data Model (add fields, types, relationships) preserving ordering; note added constraints succinctly.
141
- * Non-functional constraint → Add/modify measurable criteria in Non-Functional / Quality Attributes section (convert vague adjective to metric or explicit target).
142
- * Edge case / negative flow → Add a new bullet under Edge Cases / Error Handling (or create such subsection if template provides placeholder for it).
143
- * Terminology conflict → Normalize term across spec; retain original only if necessary by adding `(formerly referred to as "X")` once.
144
- - If the clarification invalidates an earlier ambiguous statement, replace that statement instead of duplicating; leave no obsolete contradictory text.
145
- - Save the spec file AFTER each integration to minimize risk of context loss (atomic overwrite).
146
- - Preserve formatting: do not reorder unrelated sections; keep heading hierarchy intact.
147
- - Keep each inserted clarification minimal and testable (avoid narrative drift).
132
+ - Maintain in-memory representation of the spec (loaded once at start) plus the raw file contents.
133
+ - For the first integrated answer in this session:
134
+ - Ensure a `## Clarifications` section exists (create it just after the highest-level contextual/overview section per the spec template if missing).
135
+ - Under it, create (if not present) a `### Session YYYY-MM-DD` subheading for today.
136
+ - Append a bullet line immediately after acceptance: `- Q: <question> → A: <final answer>`.
137
+ - Then immediately apply the clarification to the most appropriate section(s):
138
+ - Functional ambiguity → Update or add a bullet in Functional Requirements.
139
+ - User interaction / actor distinction → Update User Stories or Actors subsection (if present) with clarified role, constraint, or scenario.
140
+ - Data shape / entities → Update Data Model (add fields, types, relationships) preserving ordering; note added constraints succinctly.
141
+ - Non-functional constraint → Add/modify measurable criteria in Non-Functional / Quality Attributes section (convert vague adjective to metric or explicit target).
142
+ - Edge case / negative flow → Add a new bullet under Edge Cases / Error Handling (or create such subsection if template provides placeholder for it).
143
+ - Terminology conflict → Normalize term across spec; retain original only if necessary by adding `(formerly referred to as "X")` once.
144
+ - If the clarification invalidates an earlier ambiguous statement, replace that statement instead of duplicating; leave no obsolete contradictory text.
145
+ - Save the spec file AFTER each integration to minimize risk of context loss (atomic overwrite).
146
+ - Preserve formatting: do not reorder unrelated sections; keep heading hierarchy intact.
147
+ - Keep each inserted clarification minimal and testable (avoid narrative drift).
148
148
 
149
149
  6. Validation (performed after EACH write plus final pass):
150
150
  - Clarifications session contains exactly one bullet per accepted answer (no duplicates).
@@ -165,12 +165,13 @@ Execution steps:
165
165
  - Suggested next command.
166
166
 
167
167
  Behavior rules:
168
+
168
169
  - If no meaningful ambiguities found (or all potential questions would be low-impact), respond: "No critical ambiguities detected worth formal clarification." and suggest proceeding.
169
170
  - If spec file missing, instruct user to run `/speckit.specify` first (do not create a new spec here).
170
171
  - Never exceed 5 total asked questions (clarification retries for a single question do not count as new questions).
171
172
  - Avoid speculative tech stack questions unless the absence blocks functional clarity.
172
173
  - Respect user early termination signals ("stop", "done", "proceed").
173
- - If no questions asked due to full coverage, output a compact coverage summary (all categories Clear) then suggest advancing.
174
- - If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale.
174
+ - If no questions asked due to full coverage, output a compact coverage summary (all categories Clear) then suggest advancing.
175
+ - If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale.
175
176
 
176
177
  Context for prioritization: $ARGUMENTS
@@ -18,16 +18,16 @@ Follow this execution flow:
18
18
 
19
19
  1. Load the existing constitution template at `.specify/memory/constitution.md`.
20
20
  - Identify every placeholder token of the form `[ALL_CAPS_IDENTIFIER]`.
21
- **IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
21
+ **IMPORTANT**: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
22
22
 
23
23
  2. Collect/derive values for placeholders:
24
24
  - If user input (conversation) supplies a value, use it.
25
25
  - Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
26
26
  - For governance dates: `RATIFICATION_DATE` is the original adoption date (if unknown ask or mark TODO), `LAST_AMENDED_DATE` is today if changes are made, otherwise keep previous.
27
27
  - `CONSTITUTION_VERSION` must increment according to semantic versioning rules:
28
- * MAJOR: Backward incompatible governance/principle removals or redefinitions.
29
- * MINOR: New principle/section added or materially expanded guidance.
30
- * PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
28
+ - MAJOR: Backward incompatible governance/principle removals or redefinitions.
29
+ - MINOR: New principle/section added or materially expanded guidance.
30
+ - PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
31
31
  - If version bump type ambiguous, propose reasoning before finalizing.
32
32
 
33
33
  3. Draft the updated constitution content:
@@ -65,6 +65,7 @@ Follow this execution flow:
65
65
  - Suggested commit message (e.g., `docs: amend constitution to vX.Y.Z (principle additions + governance update)`).
66
66
 
67
67
  Formatting & Style Requirements:
68
+
68
69
  - Use Markdown headings exactly as in the template (do not demote/promote levels).
69
70
  - Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
70
71
  - Keep a single blank line between sections.
@@ -17,9 +17,9 @@ You **MUST** consider the user input before proceeding (if not empty).
17
17
  2. **Check checklists status** (if FEATURE_DIR/checklists/ exists):
18
18
  - Scan all checklist files in the checklists/ directory
19
19
  - For each checklist, count:
20
- * Total items: All lines matching `- [ ]` or `- [X]` or `- [x]`
21
- * Completed items: Lines matching `- [X]` or `- [x]`
22
- * Incomplete items: Lines matching `- [ ]`
20
+ - Total items: All lines matching `- [ ]` or `- [X]` or `- [x]`
21
+ - Completed items: Lines matching `- [X]` or `- [x]`
22
+ - Incomplete items: Lines matching `- [ ]`
23
23
  - Create a status table:
24
24
  ```
25
25
  | Checklist | Total | Completed | Incomplete | Status |
@@ -29,19 +29,17 @@ You **MUST** consider the user input before proceeding (if not empty).
29
29
  | security.md | 6 | 6 | 0 | ✓ PASS |
30
30
  ```
31
31
  - Calculate overall status:
32
- * **PASS**: All checklists have 0 incomplete items
33
- * **FAIL**: One or more checklists have incomplete items
34
-
32
+ - **PASS**: All checklists have 0 incomplete items
33
+ - **FAIL**: One or more checklists have incomplete items
35
34
  - **If any checklist is incomplete**:
36
- * Display the table with incomplete item counts
37
- * **STOP** and ask: "Some checklists are incomplete. Do you want to proceed with implementation anyway? (yes/no)"
38
- * Wait for user response before continuing
39
- * If user says "no" or "wait" or "stop", halt execution
40
- * If user says "yes" or "proceed" or "continue", proceed to step 3
41
-
35
+ - Display the table with incomplete item counts
36
+ - **STOP** and ask: "Some checklists are incomplete. Do you want to proceed with implementation anyway? (yes/no)"
37
+ - Wait for user response before continuing
38
+ - If user says "no" or "wait" or "stop", halt execution
39
+ - If user says "yes" or "proceed" or "continue", proceed to step 3
42
40
  - **If all checklists are complete**:
43
- * Display the table showing all checklists passed
44
- * Automatically proceed to step 3
41
+ - Display the table showing all checklists passed
42
+ - Automatically proceed to step 3
45
43
 
46
44
  3. Load and analyze the implementation context:
47
45
  - **REQUIRED**: Read tasks.md for the complete task list and execution plan
@@ -53,23 +51,24 @@ You **MUST** consider the user input before proceeding (if not empty).
53
51
 
54
52
  4. **Project Setup Verification**:
55
53
  - **REQUIRED**: Create/verify ignore files based on actual project setup:
56
-
54
+
57
55
  **Detection & Creation Logic**:
58
56
  - Check if the following command succeeds to determine if the repository is a git repo (create/verify .gitignore if so):
59
57
 
60
58
  ```sh
61
59
  git rev-parse --git-dir 2>/dev/null
62
60
  ```
63
- - Check if Dockerfile* exists or Docker in plan.md → create/verify .dockerignore
61
+
62
+ - Check if Dockerfile\* exists or Docker in plan.md → create/verify .dockerignore
64
63
  - Check if .eslintrc* or eslint.config.* exists → create/verify .eslintignore
65
- - Check if .prettierrc* exists → create/verify .prettierignore
64
+ - Check if .prettierrc\* exists → create/verify .prettierignore
66
65
  - Check if .npmrc or package.json exists → create/verify .npmignore (if publishing)
67
- - Check if terraform files (*.tf) exist → create/verify .terraformignore
66
+ - Check if terraform files (\*.tf) exist → create/verify .terraformignore
68
67
  - Check if .helmignore needed (helm charts present) → create/verify .helmignore
69
-
68
+
70
69
  **If ignore file already exists**: Verify it contains essential patterns, append missing critical patterns only
71
70
  **If ignore file missing**: Create with full pattern set for detected technology
72
-
71
+
73
72
  **Common Patterns by Technology** (from plan.md tech stack):
74
73
  - **Node.js/JavaScript**: `node_modules/`, `dist/`, `build/`, `*.log`, `.env*`
75
74
  - **Python**: `__pycache__/`, `*.pyc`, `.venv/`, `venv/`, `dist/`, `*.egg-info/`
@@ -77,7 +76,7 @@ You **MUST** consider the user input before proceeding (if not empty).
77
76
  - **C#/.NET**: `bin/`, `obj/`, `*.user`, `*.suo`, `packages/`
78
77
  - **Go**: `*.exe`, `*.test`, `vendor/`, `*.out`
79
78
  - **Universal**: `.DS_Store`, `Thumbs.db`, `*.tmp`, `*.swp`, `.vscode/`, `.idea/`
80
-
79
+
81
80
  **Tool-Specific Patterns**:
82
81
  - **Docker**: `node_modules/`, `.git/`, `Dockerfile*`, `.dockerignore`, `*.log*`, `.env*`, `coverage/`
83
82
  - **ESLint**: `node_modules/`, `dist/`, `build/`, `coverage/`, `*.min.js`
@@ -92,7 +91,7 @@ You **MUST** consider the user input before proceeding (if not empty).
92
91
 
93
92
  6. Execute implementation following the task plan:
94
93
  - **Phase-by-phase execution**: Complete each phase before moving to the next
95
- - **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
94
+ - **Respect dependencies**: Run sequential tasks in order, parallel tasks [P] can run together
96
95
  - **Follow TDD approach**: Execute test tasks before their corresponding implementation tasks
97
96
  - **File-based coordination**: Tasks affecting the same files must run sequentially
98
97
  - **Validation checkpoints**: Verify each phase completion before proceeding
@@ -37,6 +37,7 @@ You **MUST** consider the user input before proceeding (if not empty).
37
37
  - For each integration → patterns task
38
38
 
39
39
  2. **Generate and dispatch research agents**:
40
+
40
41
  ```
41
42
  For each unknown in Technical Context:
42
43
  Task: "Research {unknown} for {feature context}"
@@ -72,7 +73,7 @@ You **MUST** consider the user input before proceeding (if not empty).
72
73
  - Add only new technology from current plan
73
74
  - Preserve manual additions between markers
74
75
 
75
- **Output**: data-model.md, /contracts/*, quickstart.md, agent-specific file
76
+ **Output**: data-model.md, /contracts/\*, quickstart.md, agent-specific file
76
77
 
77
78
  ## Key rules
78
79