@atlashub/smartstack-cli 2.7.3 → 2.8.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 (56) hide show
  1. package/.documentation/agents.html +0 -4
  2. package/.documentation/business-analyse.html +0 -4
  3. package/.documentation/cli-commands.html +0 -4
  4. package/.documentation/commands.html +0 -77
  5. package/.documentation/css/styles.css +0 -8
  6. package/.documentation/efcore.html +0 -4
  7. package/.documentation/gitflow.html +0 -4
  8. package/.documentation/hooks.html +0 -4
  9. package/.documentation/index.html +2 -28
  10. package/.documentation/init.html +8 -14
  11. package/.documentation/installation.html +0 -11
  12. package/.documentation/js/app.js +2 -16
  13. package/.documentation/ralph-loop.html +0 -4
  14. package/.documentation/test-web.html +0 -4
  15. package/README.md +0 -1
  16. package/dist/index.js +100 -23
  17. package/dist/index.js.map +1 -1
  18. package/package.json +2 -3
  19. package/templates/agents/docs-sync-checker.md +2 -2
  20. package/templates/hooks/docs-drift-check.md +4 -5
  21. package/templates/skills/_resources/context-digest-template.md +2 -2
  22. package/templates/skills/_resources/doc-context-cache.md +0 -2
  23. package/templates/skills/_resources/docs-manifest-schema.md +1 -3
  24. package/templates/skills/_resources/mcp-validate-documentation-spec.md +1 -3
  25. package/templates/skills/_shared.md +24 -25
  26. package/templates/skills/application/steps/step-04-backend.md +185 -11
  27. package/templates/skills/application/steps/step-06-migration.md +41 -2
  28. package/templates/skills/application/templates-seed.md +151 -0
  29. package/templates/skills/business-analyse/steps/step-05-handoff.md +59 -17
  30. package/templates/skills/controller/steps/step-01-analyze.md +1 -1
  31. package/templates/skills/ralph-loop/steps/step-01-task.md +21 -1
  32. package/templates/skills/ralph-loop/steps/step-02-execute.md +75 -3
  33. package/.documentation/apex.html +0 -1027
  34. package/templates/skills/apex/SKILL.md +0 -297
  35. package/templates/skills/apex/steps/step-00-init.md +0 -212
  36. package/templates/skills/apex/steps/step-01-analyze.md +0 -263
  37. package/templates/skills/apex/steps/step-02-plan.md +0 -255
  38. package/templates/skills/apex/steps/step-03-execute.md +0 -217
  39. package/templates/skills/apex/steps/step-04-validate.md +0 -273
  40. package/templates/skills/apex/steps/step-04b-doc-sync.md +0 -162
  41. package/templates/skills/apex/steps/step-05-examine.md +0 -214
  42. package/templates/skills/apex/steps/step-06-resolve.md +0 -181
  43. package/templates/skills/apex/steps/step-07-tests.md +0 -206
  44. package/templates/skills/apex/steps/step-08-run-tests.md +0 -207
  45. package/templates/skills/apex/templates/00-context.md +0 -46
  46. package/templates/skills/apex/templates/01-analyze.md +0 -63
  47. package/templates/skills/apex/templates/02-plan.md +0 -63
  48. package/templates/skills/apex/templates/03-execute.md +0 -34
  49. package/templates/skills/apex/templates/04-validate.md +0 -61
  50. package/templates/skills/apex/templates/04b-doc-sync.md +0 -31
  51. package/templates/skills/apex/templates/05-examine.md +0 -58
  52. package/templates/skills/apex/templates/06-resolve.md +0 -39
  53. package/templates/skills/apex/templates/07-tests.md +0 -56
  54. package/templates/skills/apex/templates/08-run-tests.md +0 -41
  55. package/templates/skills/apex/templates/README.md +0 -69
  56. package/templates/skills/apex/templates/context-digest.md +0 -35
@@ -1,207 +0,0 @@
1
- ---
2
- name: step-08-run-tests
3
- description: Test runner - execute tests until all pass
4
- prev_step: steps/step-07-tests.md
5
- next_step: COMPLETE
6
- ---
7
-
8
- # Step 8: Run Tests
9
-
10
- ## MANDATORY EXECUTION RULES:
11
-
12
- - NEVER claim tests pass when they don't
13
- - NEVER give up after first failure
14
- - ALWAYS run full test suite
15
- - ALWAYS fix failing tests before proceeding
16
- - ALWAYS re-run after each fix
17
- - YOU ARE A TEST RUNNER, ensuring green build
18
- - FORBIDDEN to proceed with failing tests
19
-
20
- ## YOUR TASK:
21
-
22
- Run the test suite, fix any failures, and ensure all tests pass.
23
-
24
- ---
25
-
26
- <available_state>
27
- From previous steps:
28
-
29
- | Variable | Description |
30
- |----------|-------------|
31
- | `{task_description}` | What was implemented |
32
- | `{task_id}` | Kebab-case identifier |
33
- | `{auto_mode}` | Auto-fix test failures |
34
- | `{save_mode}` | Save outputs to files |
35
- | `{output_dir}` | Path to output (if save_mode) |
36
- | Tests created | From step-07 |
37
- </available_state>
38
-
39
- ---
40
-
41
- ## EXECUTION SEQUENCE:
42
-
43
- ### 1. Run Test Suite
44
-
45
- ```bash
46
- pnpm run test
47
- ```
48
-
49
- Or for specific tests:
50
- ```bash
51
- pnpm run test -- --filter="auth"
52
- ```
53
-
54
- ### 2. Analyze Results
55
-
56
- **If ALL PASS:**
57
- Skip to step 5 (Summary).
58
-
59
- **If FAILURES:**
60
- For each failing test:
61
-
62
- ```markdown
63
- ## Failing Test Analysis
64
-
65
- ### Test: `validateToken should throw for expired token`
66
- **File:** `src/auth/__tests__/handler.test.ts:25`
67
- **Error:** `Expected: "Token expired", Received: "Invalid token"`
68
-
69
- **Root Cause Analysis:**
70
- - [ ] Test bug: Incorrect assertion
71
- - [x] Code bug: Wrong error message
72
- - [ ] Setup issue: Missing mock
73
-
74
- **Fix:** Update error message in `validateToken` to be "Token expired"
75
- ```
76
-
77
- ### 3. Fix Failures
78
-
79
- **Loop until green:**
80
-
81
- ```
82
- WHILE tests failing:
83
- 1. Identify root cause (test bug vs code bug)
84
- 2. Apply fix
85
- 3. Re-run tests
86
- 4. Log result
87
- ```
88
-
89
- **If `{auto_mode}` = true:**
90
- Auto-fix obvious issues, continue loop.
91
-
92
- **If `{auto_mode}` = false AND stuck:**
93
-
94
- ```yaml
95
- questions:
96
- - header: "Test Fix"
97
- question: "Test is still failing. How should we proceed?"
98
- options:
99
- - label: "Try alternative fix (Recommended)"
100
- description: "Attempt a different approach"
101
- - label: "Skip this test"
102
- description: "Mark as skipped with TODO"
103
- - label: "Discuss the issue"
104
- description: "Need help understanding the failure"
105
- multiSelect: false
106
- ```
107
-
108
- ### 4. Verify All Green
109
-
110
- Final run:
111
- ```bash
112
- pnpm run test
113
- ```
114
-
115
- **MUST show all tests passing.**
116
-
117
- ### 5. Save Output (if save_mode)
118
-
119
- **If `{save_mode}` = true:**
120
-
121
- Write to `{output_dir}/08-run-tests.md`:
122
- - Test run results
123
- - Failures encountered and fixes
124
- - Final status
125
- - Timestamp
126
- - Update 00-context.md Progress table: 08-run-tests -> Complete
127
-
128
- ### 6. Test Summary
129
-
130
- ```
131
- **Test Run Complete**
132
-
133
- **Total tests:** {count}
134
- **Passing:** {count}
135
- **Failed:** 0
136
-
137
- **Iterations to green:** {count}
138
-
139
- **Fixes applied:**
140
- - Fixed error message in validateToken
141
- - Fixed mock setup in route.test.ts
142
-
143
- **All tests passing.**
144
- ```
145
-
146
- ### 7. Determine Next Step
147
-
148
- ```
149
- IF {examine_mode} = true AND not already examined:
150
- -> Load step-05-examine.md
151
-
152
- ELSE:
153
- -> Workflow complete - show final summary
154
- ```
155
-
156
- ---
157
-
158
- ## SUCCESS METRICS:
159
-
160
- - All tests executed
161
- - All failures investigated
162
- - Root causes identified
163
- - Fixes applied correctly
164
- - All tests passing at end
165
-
166
- ## FAILURE MODES:
167
-
168
- - Claiming green when tests fail
169
- - Giving up after first failure
170
- - Skipping tests without good reason
171
- - Not re-running after fixes
172
- - Not logging fix iterations
173
-
174
- ---
175
-
176
- ## NEXT STEP:
177
-
178
- - **If examine_mode and not examined:** Load `./step-05-examine.md`
179
- - **Otherwise:** Workflow complete - show final summary
180
-
181
- ## FINAL SUMMARY TEMPLATE:
182
-
183
- ```
184
- **APEX Workflow Complete**
185
-
186
- **Task:** {task_description}
187
- **Task ID:** {task_id}
188
-
189
- **Implementation:**
190
- - Files modified: {count}
191
- - Files created: {count}
192
-
193
- **Quality:**
194
- - Typecheck: Pass
195
- - Lint: Pass
196
- - Tests: {count}/{count} passing
197
-
198
- **Review:** {examined ? "Complete" : "Skipped"}
199
- **Findings resolved:** {count}
200
-
201
- **Output saved:** {output_dir or "Not saved"}
202
-
203
- **Next steps:**
204
- - [ ] Review changes: `git diff`
205
- - [ ] Commit: `git commit -m "{task_description}"`
206
- - [ ] Push and create PR
207
- ```
@@ -1,46 +0,0 @@
1
- # APEX Task: {{task_id}}
2
-
3
- **Created:** {{timestamp}}
4
- **Task:** {{task_description}}
5
-
6
- ---
7
-
8
- ## Configuration
9
-
10
- | Flag | Value |
11
- |------|-------|
12
- | Auto mode (`-a`) | {{auto_mode}} |
13
- | Examine mode (`-x`) | {{examine_mode}} |
14
- | Save mode (`-s`) | {{save_mode}} |
15
- | Test mode (`-t`) | {{test_mode}} |
16
- | Economy mode (`-e`) | {{economy_mode}} |
17
-
18
- ---
19
-
20
- ## User Request
21
-
22
- ```
23
- {{original_input}}
24
- ```
25
-
26
- ---
27
-
28
- ## Acceptance Criteria
29
-
30
- _To be defined in step-01-analyze_
31
-
32
- ---
33
-
34
- ## Progress
35
-
36
- | Step | Status |
37
- |------|--------|
38
- | 00-init | {{init_status}} |
39
- | 01-analyze | Pending |
40
- | 02-plan | Pending |
41
- | 03-execute | Pending |
42
- | 04-validate | Pending |
43
- | 05-examine | {{examine_status}} |
44
- | 06-resolve | {{examine_status}} |
45
- | 07-tests | {{test_status}} |
46
- | 08-run-tests | {{test_status}} |
@@ -1,63 +0,0 @@
1
- # Step 01: Analyze
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Context Discovery
9
-
10
- ### Search Keywords
11
- _Keywords extracted from task description_
12
-
13
- ### Related Files Found
14
-
15
- | File | Lines | Contains |
16
- |------|-------|----------|
17
- | | | |
18
-
19
- ### Patterns Observed
20
- _Patterns discovered in existing code_
21
-
22
- ### Utilities Available
23
- _Existing utilities that can be reused_
24
-
25
- ### Similar Implementations
26
- _Reference implementations found_
27
-
28
- ### Test Patterns
29
- _How tests are structured in this project_
30
-
31
- ---
32
-
33
- ## Documentation Insights
34
-
35
- ### Libraries Used
36
- _Libraries and their usage patterns_
37
-
38
- ---
39
-
40
- ## Research Findings
41
-
42
- ### Common Approaches
43
- _Best practices discovered_
44
-
45
- ---
46
-
47
- ## Inferred Acceptance Criteria
48
-
49
- - [ ] AC1:
50
- - [ ] AC2:
51
- - [ ] AC3:
52
-
53
- ---
54
-
55
- ## Summary
56
-
57
- **Files analyzed:**
58
- **Patterns identified:**
59
- **Utilities found:**
60
-
61
- ---
62
-
63
- **Status:** _Pending_
@@ -1,63 +0,0 @@
1
- # Step 02: Plan
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Implementation Plan
9
-
10
- ### Overview
11
- _High-level strategy and approach_
12
-
13
- ### Prerequisites
14
- - [ ] _Prerequisite 1_
15
- - [ ] _Prerequisite 2_
16
-
17
- ---
18
-
19
- ## File Changes
20
-
21
- ### `path/to/file1.ts`
22
- - _Change 1_
23
- - _Change 2_
24
-
25
- ### `path/to/file2.ts` (NEW FILE)
26
- - _What to create_
27
-
28
- ---
29
-
30
- ## Testing Strategy
31
-
32
- ### New Tests
33
- - `path/to/file1.test.ts`
34
- - _Test case 1_
35
- - _Test case 2_
36
-
37
- ### Update Existing Tests
38
- - _Existing test file to update_
39
-
40
- ---
41
-
42
- ## Acceptance Criteria Mapping
43
-
44
- - [ ] AC1: Satisfied by _changes in file1.ts_
45
- - [ ] AC2: Satisfied by _changes in file2.ts_
46
-
47
- ---
48
-
49
- ## Risks & Considerations
50
-
51
- - _Risk 1 and mitigation_
52
-
53
- ---
54
-
55
- ## Summary
56
-
57
- **Files to modify:**
58
- **New files:**
59
- **Tests planned:**
60
-
61
- ---
62
-
63
- **Status:** _Pending_
@@ -1,34 +0,0 @@
1
- # Step 03: Execute
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Implementation Log
9
-
10
- ### Files Modified
11
-
12
- #### `path/to/file1.ts`
13
- - _Change applied (lines X-Y)_
14
-
15
- #### `path/to/file2.ts`
16
- - _Change applied_
17
-
18
- ---
19
-
20
- ## Validation
21
-
22
- **Typecheck:** _Pending_
23
- **Lint:** _Pending_
24
-
25
- ---
26
-
27
- ## Summary
28
-
29
- **Files modified:**
30
- **Todos completed:**
31
-
32
- ---
33
-
34
- **Status:** _Pending_
@@ -1,61 +0,0 @@
1
- # Step 04: Validate
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Validation Results
9
-
10
- ### Typecheck
11
- **Status:** _Pending_
12
- **Output:**
13
- ```
14
- ```
15
-
16
- ### Lint
17
- **Status:** _Pending_
18
- **Output:**
19
- ```
20
- ```
21
-
22
- ### Tests
23
- **Status:** _Pending_
24
- **Passing:** _/_
25
- **Output:**
26
- ```
27
- ```
28
-
29
- ---
30
-
31
- ## Self-Audit Checklist
32
-
33
- ### Tasks Complete
34
- - [ ] All todos marked complete
35
- - [ ] No tasks skipped
36
-
37
- ### Tests Passing
38
- - [ ] All existing tests pass
39
- - [ ] New tests written
40
-
41
- ### Acceptance Criteria
42
- - [ ] AC1: _Verified by..._
43
- - [ ] AC2: _Verified by..._
44
-
45
- ### Patterns Followed
46
- - [ ] Code follows existing patterns
47
- - [ ] Error handling consistent
48
- - [ ] Naming conventions match
49
-
50
- ---
51
-
52
- ## Summary
53
-
54
- **Typecheck:**
55
- **Lint:**
56
- **Tests:**
57
- **AC Verified:**
58
-
59
- ---
60
-
61
- **Status:** _Pending_
@@ -1,31 +0,0 @@
1
- # Step 04b: Documentation Sync
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Manifest Status
9
- - **Found:** Yes | No
10
- - **Modules in manifest:** {{count}}
11
-
12
- ## Affected Modules
13
-
14
- | Module | Changed Files | Impacted Sections | Updated |
15
- |--------|---------------|-------------------|---------|
16
-
17
- ## Documentation Updates
18
-
19
- ### Module: {{module_path}}
20
- - **doc-data.ts:** Updated fields: {{fields}}
21
- - **i18n FR:** {{updated|no_change}}
22
- - **Manifest:** Status → synced
23
-
24
- ## Summary
25
-
26
- - **Modules checked:** {{count}}
27
- - **Modules updated:** {{count}}
28
- - **Modules skipped:** {{count}} (no documentation)
29
- - **Sections updated:** {{count}}
30
-
31
- **Status:** Complete
@@ -1,58 +0,0 @@
1
- # Step 05: Examine (Adversarial Review)
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Files Reviewed
9
-
10
- | File | Type |
11
- |------|------|
12
- | | source |
13
- | | test |
14
-
15
- ---
16
-
17
- ## Security Checklist
18
-
19
- - [ ] No SQL injection (parameterized queries)
20
- - [ ] No XSS (output encoding)
21
- - [ ] No secrets in code
22
- - [ ] Input validation present
23
- - [ ] Auth checks on protected routes
24
-
25
- ## Logic Checklist
26
-
27
- - [ ] Error handling for all failure modes
28
- - [ ] Edge cases handled
29
- - [ ] Null/undefined checks
30
- - [ ] Race conditions considered
31
-
32
- ## Quality Checklist
33
-
34
- - [ ] Follows existing patterns
35
- - [ ] No code duplication
36
- - [ ] Clear naming
37
-
38
- ---
39
-
40
- ## Findings
41
-
42
- | ID | Severity | Category | Location | Issue | Validity |
43
- |----|----------|----------|----------|-------|----------|
44
- | | | | | | |
45
-
46
- ---
47
-
48
- ## Summary
49
-
50
- **Total findings:**
51
- **Critical:**
52
- **High:**
53
- **Medium:**
54
- **Low:**
55
-
56
- ---
57
-
58
- **Status:** _Pending_
@@ -1,39 +0,0 @@
1
- # Step 06: Resolve Findings
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Resolution Log
9
-
10
- ### Fixed
11
-
12
- | ID | Location | Fix Applied |
13
- |----|----------|-------------|
14
- | | | |
15
-
16
- ### Skipped
17
-
18
- | ID | Location | Reason |
19
- |----|----------|--------|
20
- | | | |
21
-
22
- ---
23
-
24
- ## Post-Fix Validation
25
-
26
- **Typecheck:** _Pending_
27
- **Lint:** _Pending_
28
-
29
- ---
30
-
31
- ## Summary
32
-
33
- **Findings fixed:**
34
- **Findings skipped:**
35
- **Validation:**
36
-
37
- ---
38
-
39
- **Status:** _Pending_
@@ -1,56 +0,0 @@
1
- # Step 07: Test Analysis & Creation
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Test Coverage Analysis
9
-
10
- ### Existing Test Structure
11
- - **Framework:** _vitest/jest_
12
- - **Pattern:** _describe/it_
13
- - **Location:** _**/__tests__/_
14
-
15
- ### Coverage Gaps
16
-
17
- | File | Existing | New Code | Gap |
18
- |------|----------|----------|-----|
19
- | | | | |
20
-
21
- ---
22
-
23
- ## Test Plan
24
-
25
- ### New Test Files
26
-
27
- | File | Tests Planned |
28
- |------|---------------|
29
- | | |
30
-
31
- ### Test Cases
32
-
33
- | File | Function | Test Case | Priority |
34
- |------|----------|-----------|----------|
35
- | | | | |
36
-
37
- ---
38
-
39
- ## Tests Created
40
-
41
- ### `path/to/file.test.ts`
42
- ```typescript
43
- // Test code added
44
- ```
45
-
46
- ---
47
-
48
- ## Summary
49
-
50
- **New test files:**
51
- **Test cases added:**
52
- **Coverage improvement:**
53
-
54
- ---
55
-
56
- **Status:** _Pending_
@@ -1,41 +0,0 @@
1
- # Step 08: Run Tests
2
-
3
- **Task:** {{task_description}}
4
- **Started:** {{timestamp}}
5
-
6
- ---
7
-
8
- ## Test Run Log
9
-
10
- ### Run 1
11
- **Command:** `pnpm run test`
12
- **Result:** _Pending_
13
- **Output:**
14
- ```
15
- ```
16
-
17
- ### Failures & Fixes
18
-
19
- | Test | Error | Root Cause | Fix |
20
- |------|-------|------------|-----|
21
- | | | | |
22
-
23
- ---
24
-
25
- ## Final Results
26
-
27
- **Total tests:**
28
- **Passing:**
29
- **Failed:** 0
30
-
31
- **Iterations to green:**
32
-
33
- ---
34
-
35
- ## Summary
36
-
37
- All tests passing: _Yes/No_
38
-
39
- ---
40
-
41
- **Status:** _Pending_