magic-spec 1.5.48 → 1.5.132
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.
- package/CHANGELOG.md +221 -213
- package/README.md +3 -3
- package/installers/config.json +19 -2
- package/installers/node/index.js +72 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,213 +1,221 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [1.5.
|
|
9
|
-
|
|
10
|
-
###
|
|
11
|
-
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- **
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
- **
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- **
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
- **
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- **
|
|
67
|
-
- **
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- **
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
- **
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- **
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
- **
|
|
160
|
-
- **
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- **
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
- **
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
- **
|
|
197
|
-
- **
|
|
198
|
-
- **
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
- **
|
|
208
|
-
- **
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [1.5.132] - 2026-04-04
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Internationalization (En-En)**: Translated remaining Russian instructions in `docs/checksums.md` to English.
|
|
13
|
+
- **Engine Versioning**: Synchronized all manifest files with the base version `1.5.132` (C14).
|
|
14
|
+
|
|
15
|
+
## [1.5.131] - 2026-04-04
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- **Internationalization (En-En)**: Fixed remaining Russian examples in `.magic/analyze.md` that were missed in the previous version sync.
|
|
20
|
+
- **Engine Versioning**: Synchronized all manifest files with the base version `1.5.131` (C14).
|
|
21
|
+
|
|
22
|
+
## [1.5.130] - 2026-04-04
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- **Internationalization (En-En)**: Translated all remaining Russian examples and rule titles to English across the engine core (`.magic/`) to ensure a consistent, professional English-only codebase (Rule 3.1).
|
|
27
|
+
- Translated constitutional rule titles in `RULES.md` (e.g., `C12 — Quarantine Cascade`).
|
|
28
|
+
- Updated simulation test suite (`suite.md`) to reflect translated inputs and expected output strings.
|
|
29
|
+
|
|
30
|
+
### Meta
|
|
31
|
+
|
|
32
|
+
- **Automated Update**: Engine version bumped to `1.5.130`, history updated, and checksums regenerated (C14).
|
|
33
|
+
|
|
34
|
+
## [1.5.129] - 2026-04-03
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- **Structural Harmonization**: Refactored `retrospective.md` to use header-based logic. This resolves `MD029` (ordered list prefix) and `MD007` (list indentation) warnings caused by complex content and personification blocks (C24) breaking list continuity. Fixed sequential numbering (1, 2, 3, 4, 5, 2 -> 1, 2, 3, 4, 5, 6, 7).
|
|
39
|
+
- **C24 Independent Analyst**: Upgraded the persona block in `retrospective.md` to a dedicated sub-heading for better visibility and structural compliance.
|
|
40
|
+
|
|
41
|
+
### Meta
|
|
42
|
+
|
|
43
|
+
- **Automated Update**: Engine version bumped to `1.5.129`, history updated, and checksums regenerated (C14).
|
|
44
|
+
|
|
45
|
+
## [1.5.128] - 2026-04-03
|
|
46
|
+
|
|
47
|
+
### Fixed
|
|
48
|
+
|
|
49
|
+
- **Markdown Lint (MD012)**: Fixed a recurring issue where `CONTRIBUTING.md` would be regenerated with multiple consecutive blank lines. Added `.trim()` to `{{workflows_table}}` placeholder in `sync-docs.js` to ensure proper spacing between the table and the following section.
|
|
50
|
+
- **Engine Versioning**: Synchronized engine version across all manifests and documentation (C14).
|
|
51
|
+
|
|
52
|
+
## [1.5.126] - 2026-04-03
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- **C24 — Unified Role-Switching Gate**: Expanded the mandatory internal review system into a unified constitutional rule across all key SDD workflows (Spec, Task, Run, Retro, Analyze, Rule, Simulate).
|
|
57
|
+
- **Workflow Personas**: Integrated 7 specialized personas (Critic, Skeptic, QA, Analyst, Auditor, Reviewer) to eliminate cognitive bias and ensure rigorous evidence-based verification before any artifact is finalized.
|
|
58
|
+
- **Structural Harmonization**: Refactored workflow steps in `analyze.md`, `rule.md`, and `simulate.md` to use header-based logic, resolving deep-seated markdown lint errors caused by intervening non-list elements.
|
|
59
|
+
|
|
60
|
+
## [1.5.120] - 2026-04-03
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
- **C24 — Unified Role-Switching Gate**: Expanded the mandatory internal review system into a unified constitutional rule across all key SDD workflows. This forces the agent to adopt specialized personas to eliminate cognitive bias before artifacts are finalized:
|
|
65
|
+
- **Spec Workflow**: Persona **Project Critic** (L1 tech-neutrality, invariant completeness).
|
|
66
|
+
- **Task Workflow**: Persona **Planning Skeptic** (Optimism bias detection, dependency risk analysis).
|
|
67
|
+
- **Run Workflow**: Persona **QA Tester** (Invariant verification, boundary condition audit).
|
|
68
|
+
- **Workflow Integration**: Hardened `.magic/spec.md`, `.magic/task.md`, and `.magic/run.md` with explicit role-based checkpoints and updated completion checklists.
|
|
69
|
+
- **Rules Versioning**: Updated `RULES.md` to version 1.5.126 with the expanded C24 definition.
|
|
70
|
+
|
|
71
|
+
## [1.5.115] - 2026-04-02
|
|
72
|
+
|
|
73
|
+
### Added
|
|
74
|
+
|
|
75
|
+
- **Installer `--dev` Flag**: Implemented a comprehensive development mode across Node.js and Python installers.
|
|
76
|
+
- Enabled installation/synchronization of development-specific instruments (simulation workflows, testing suites, engine scripts).
|
|
77
|
+
- Added `devSkills` registry to `installers/config.json` for canonical tracking of dev agent skills.
|
|
78
|
+
- Hardened update logic to ensure dev instruments are correctly synchronized when `--dev` is provided during an update.
|
|
79
|
+
|
|
80
|
+
## [1.5.114] - 2026-04-02
|
|
81
|
+
|
|
82
|
+
### Changed
|
|
83
|
+
|
|
84
|
+
- **Core Invariant #2 (Prohibitions)** in `spec.md`: Refined the "No code in specs" rule to explicitly permit **Technical Contracts** (interfaces, types, API schemas) and **Reference Snippets** (marked as `[REFERENCE]`). This ensures architectural precision while maintaining the prohibition on functional implementation code before the `run` phase.
|
|
85
|
+
- **Task Completion Checklist**: Updated to reflect the permission of contracts and references in specifications.
|
|
86
|
+
|
|
87
|
+
### Meta
|
|
88
|
+
|
|
89
|
+
- **Automated Update**: Engine version bumped to `1.5.114`, history updated, and checksums regenerated (C14).
|
|
90
|
+
|
|
91
|
+
## [1.5.112] - 2026-04-02
|
|
92
|
+
|
|
93
|
+
### Added
|
|
94
|
+
|
|
95
|
+
- **Anti-Fabrication Rule (Invariant 6)** in `simulate.md`: New Core Invariant that legitimizes `0 rough edges` as a valid outcome and mandates evidence-linked claims (file, line, verbatim quote, verification command) for every finding. Findings without evidence are automatically INVALID.
|
|
96
|
+
- **Pre-flight Hard Gate** in `simulate.md`: Upgraded Pre-flight from "recommended" to a non-negotiable blocking HALT. Simulations without recorded `check-prerequisites` output are INVALID.
|
|
97
|
+
- **Read-Before-Claim Gate** in `simulate.md`: New mandatory Grounding Phase requiring all target workflow files to be read (with line counts recorded) before any analysis begins. Claims about unread files are automatically INVALID.
|
|
98
|
+
- **Regression Tests (T185–T189)**: 5 new scenarios covering Explore Mode write isolation (T185), Pre-flight Hard Gate enforcement (T186), Evidence-Linked Claims validation (T187), Null-Result Acceptance (T188), and Read-Before-Claim Gate (T189).
|
|
99
|
+
|
|
100
|
+
### Fixed
|
|
101
|
+
|
|
102
|
+
- **Zero-Prompt Parity**: Aligned `init.md` and `analyze.md` Core Invariant #1 with the canonical cascade formula used by all other workflow files, eliminating sync risk from divergent wording.
|
|
103
|
+
- **Script History Leak**: Fixed `executor.js` Auto-Detect creating spurious history files for scripts in `scripts/` directory (e.g., `sync-skills.md`). Scripts are now tracked via checksums but inherit the `--workflow` flag instead of getting standalone history entries.
|
|
104
|
+
- **Orphan Cleanup**: Removed `history/sync-skills.md` — a phantom artifact created by the above bug.
|
|
105
|
+
|
|
106
|
+
### Meta
|
|
107
|
+
|
|
108
|
+
- **Automated Update**: Engine version bumped to `1.5.112`, history updated, and checksums regenerated (C14).
|
|
109
|
+
|
|
110
|
+
## [1.5.105] - 2026-03-31
|
|
111
|
+
|
|
112
|
+
### Fixed
|
|
113
|
+
|
|
114
|
+
- **Engine History**: Resolved a ReferenceError in `executor.js` where `automatedMsg` was used before being defined.
|
|
115
|
+
- **Collapsing Logic**: Improved the history collapsing mechanism to correctly merge both automated and custom messages into compact version ranges.
|
|
116
|
+
|
|
117
|
+
### Meta
|
|
118
|
+
|
|
119
|
+
- **Automated Update**: Engine version bumped to `1.5.104`, history entries consolidated, and checksums regenerated.
|
|
120
|
+
|
|
121
|
+
## [1.5.72] - 2026-03-30
|
|
122
|
+
|
|
123
|
+
### Fixed
|
|
124
|
+
|
|
125
|
+
- **AI Hallucinations**: Rephrased the directive `auto-run .magic/init.md` to `silently execute .magic/init.md (do not prompt user)` across all engine workflows. This prevents intelligent agents from incorrectly proposing the internal `.magic/init.md` script as a user-facing `/magic.init` slash command.
|
|
126
|
+
|
|
127
|
+
### Meta
|
|
128
|
+
|
|
129
|
+
- **Automated Update**: Engine version bumped to `1.5.72`, history updated, and checksums regenerated (C14).
|
|
130
|
+
|
|
131
|
+
## [1.5.70] - 2026-03-30
|
|
132
|
+
|
|
133
|
+
### Changed
|
|
134
|
+
|
|
135
|
+
- **Documentation**: Updated `README.md` and `docs/README.md` to include a mandatory recommendation to run `/magic.analyze` after updating the Magic Spec engine. This ensures that specifications and engine metadata remain synchronized after a core logic update.
|
|
136
|
+
|
|
137
|
+
### Meta
|
|
138
|
+
|
|
139
|
+
- **Automated Update**: Engine version bumped to `1.5.70`, history updated, and checksums regenerated (C14).
|
|
140
|
+
|
|
141
|
+
## [1.5.132] - 2026-03-26
|
|
142
|
+
|
|
143
|
+
### Added
|
|
144
|
+
|
|
145
|
+
- **Gitignore Safety (Invariant 8)** in `analyze.md`: The agent now MUST scan and apply `.gitignore` patterns before any project scan or architecture inference. This prevents `node_modules`, `dist`, `.venv`, and other build artifacts from leaking into the analysis reports or coverage checks.
|
|
146
|
+
|
|
147
|
+
### Changed
|
|
148
|
+
|
|
149
|
+
- **Stack & Structure**: Refined the initial scan step to build the high-level project map only *after* applying gitignore filters.
|
|
150
|
+
|
|
151
|
+
### Meta
|
|
152
|
+
|
|
153
|
+
- **Automated Update**: Engine version bumped to `1.5.132`, history updated, and checksums regenerated (C14).
|
|
154
|
+
|
|
155
|
+
## [1.5.50] - 2026-03-26
|
|
156
|
+
|
|
157
|
+
### Added
|
|
158
|
+
|
|
159
|
+
- **Anti-Stall Mechanism (Invariant 12)**: Solved the "AI holds specs in mind" issue (reported by user). The agent is now forced to write a `Draft` spec if it asks more than one clarifying question without file creation. Added `<!-- TBD -->` inline markers for ambiguous sections.
|
|
160
|
+
- **Mode Transition Protocol**: Defined explicit triggers to exit `Explore Mode` and enter `Dispatch Mode` automatically (3+ topics, confirmation words, or 2nd idea exchange in Trust Mode).
|
|
161
|
+
- **Non-Blocking Dispatch Notice**: Reframed "Notice of Intent" as a statement of action rather than a question to prevent infinite loops.
|
|
162
|
+
|
|
163
|
+
### Changed
|
|
164
|
+
|
|
165
|
+
- **Analysis Mode Scope**: Strictly limited the "do not modify specs/registry" prohibition to `Project Analysis Delegation` mode, allowing normal `Dispatch` to proceed without friction.
|
|
166
|
+
- **Workflow Wrapper**: Updated `.agents/workflows/magic.spec.md` to align with the new non-blocking exploration logic.
|
|
167
|
+
|
|
168
|
+
### Meta
|
|
169
|
+
|
|
170
|
+
- **Automated Update**: Engine version bumped to `1.5.50`, history updated, and checksums regenerated (C14).
|
|
171
|
+
|
|
172
|
+
## [1.5.49] - 2026-03-25
|
|
173
|
+
|
|
174
|
+
### Added
|
|
175
|
+
|
|
176
|
+
- **Config Drift Guard**: `check-prerequisites` now detects uncommitted manual changes to `RULES.md` via `git diff` and emits a non-blocking `CONFIG_DRIFT` advisory warning. Supports workspace-specific `RULES.md` per C22. Gracefully skips when git is unavailable.
|
|
177
|
+
- **Init Workflow**: Added Config Drift Advisory sub-step to pre-flight check (show diff / proceed / restore options).
|
|
178
|
+
- **Test Suite**: Added cognitive tests T168-T170 for config drift detection (drift present, no git, workspace C22). Suite version bumped to 1.9.51.
|
|
179
|
+
- **Engine Spec**: New `config-drift-guard.md` specification (Stable, L1) in engine workspace.
|
|
180
|
+
|
|
181
|
+
## [1.5.48] - 2026-03-24
|
|
182
|
+
|
|
183
|
+
### Added
|
|
184
|
+
|
|
185
|
+
- **Publish Workflow**: Restored `.agents/workflows/publish.md` for engine maintenance and registry publishing.
|
|
186
|
+
- **History Tracking**: Initialized history for `magic.analyze` and `magic.dev.simulate` wrappers to ensure full auditability.
|
|
187
|
+
|
|
188
|
+
### Changed
|
|
189
|
+
|
|
190
|
+
- **Version Synchronization**: Unified project version to `1.5.132` across all manifests (`package.json`, `pyproject.toml`, and installer init files) and the `.magic/.version` engine core.
|
|
191
|
+
- **Instruction Density**: Refined `.magic/simulate.md` (Context Bleed Warning) to remove vague qualifiers ("high-confidence" -> "strictly unbiased"), reaching a density score of 10/10.
|
|
192
|
+
- **Engine Integrity**: Optimized `generate-checksums.js` to exclude the `.checksums` file from its own mapping, preventing confusion and unstable hash values.
|
|
193
|
+
|
|
194
|
+
### Fixed
|
|
195
|
+
|
|
196
|
+
- **Testing Logic**: Corrected `run_tests.py` to properly set `PYTHONPATH` for Python installer subprocesses and fixed an `os.environ` access bug.
|
|
197
|
+
- **Sandbox Cleanup**: Removed dev-only `simulate.md` from installer test sandbox.
|
|
198
|
+
- **RULES Template**: Added missing conventions C18-C23 to `init.js` RULES.md generator.
|
|
199
|
+
- **Python Installer**: Fixed `_resolve_package_version()` to read actual package version.
|
|
200
|
+
- **Engine Scripts**: Deduplicated `workspace.json` reads in `executor.js`.
|
|
201
|
+
- **History Cleanup**: Removed legacy `audit.md` and `docs.md` files from `.magic/history/`.
|
|
202
|
+
|
|
203
|
+
## [1.5.30] - 2026-03-24
|
|
204
|
+
|
|
205
|
+
### Fixed
|
|
206
|
+
|
|
207
|
+
- **Version Synchronization**: Unified project version across `package.json` (was 1.5.0), `pyproject.toml` (was 1.4.162), and `__init__.py` (was 1.4.162) to a single `1.5.30`. Previously 5 different versions existed across 5 sources.
|
|
208
|
+
- **CONTEXT.md**: Regenerated stale context file (was 9 days old).
|
|
209
|
+
|
|
210
|
+
## [1.5.29] - 2026-03-16
|
|
211
|
+
|
|
212
|
+
### Added
|
|
213
|
+
|
|
214
|
+
- **Argument Routing (A–D)** for `task.md` and `run.md`: Both workflows now accept optional arguments — workspace name, directive text, or both. Consistent with `analyze.md` pattern. Includes Workspace Fallback, Disambiguation, and Handoff Propagation rules.
|
|
215
|
+
- **T4 Inline Guards** in `spec.md`: When spec workflow captures a standing rule via T4 trigger ("remember that..."), it now applies Tier Routing (global vs workspace RULES.md), Duplication Check (across both tiers), and Constitutional Guard (§1–6 protection) — matching `rule.md` safety guarantees without breaking T4's "Apply Immediately" semantics.
|
|
216
|
+
- **Regression Tests (T153–T161)**: 9 new scenarios covering argument routing (scoped planning, workspace fallback, disambiguation, targeted task/phase execution, cross-workflow handoff propagation) and T4 inline guards (tier routing, duplication detection, constitutional block).
|
|
217
|
+
|
|
218
|
+
### Changed
|
|
219
|
+
|
|
220
|
+
- **AGENTS.md**: Clarified C14 Enforcement scope — explicitly covers all `.magic/` content (workflows, scripts, templates, tests, config), not just workflow files. Added description of what `update-engine-meta` does (bumps `.version`, regenerates `.checksums`).
|
|
221
|
+
- **`run.md` Argument Routing**: Detection column harmonized with `analyze.md` — accepts both quoted text and non-workspace tokens (e.g., unquoted `T-1A01` or `phase-2`).
|
package/README.md
CHANGED
|
@@ -36,7 +36,7 @@ After running the installer, your project directory will be augmented with the f
|
|
|
36
36
|
|
|
37
37
|
```plaintext
|
|
38
38
|
root-project/
|
|
39
|
-
├── .agents/workflows/
|
|
39
|
+
├── .agents/workflows/ # Slash commands wrapper (e.g., magic.spec, magic.task)
|
|
40
40
|
├── .magic/ # The SDD Engine (workflow logic and scripts - read-only)
|
|
41
41
|
└── .design/ # Your Project Design Workspace (INDEX.md, RULES.md, PLAN.md)
|
|
42
42
|
```
|
|
@@ -237,7 +237,7 @@ npx magic-spec@latest --update
|
|
|
237
237
|
```
|
|
238
238
|
|
|
239
239
|
> [!TIP]
|
|
240
|
-
> The update process preserves your `.design/` workspace and automatically creates backups of `.magic/` and `.agents/` folders. If you have modified core engine files, the installer will detect conflicts and ask for your preference (overwrite, skip, or abort).
|
|
240
|
+
> The update process preserves your `.design/` workspace and automatically creates backups of `.magic/` and `.agents/` folders. If you have modified core engine files, the installer will detect conflicts and ask for your preference (overwrite, skip, or abort). **After updating Magic Spec, it is highly recommended to run the `/magic.analyze` command to ensure your project's specifications and engine metadata are fully synchronized.**
|
|
241
241
|
|
|
242
242
|
### Post-Install: `.gitignore`
|
|
243
243
|
|
|
@@ -320,4 +320,4 @@ Distributed under the [MIT License](./LICENSE).
|
|
|
320
320
|
|
|
321
321
|
## 📊 Project Status
|
|
322
322
|
|
|
323
|
-
**Active Development** (v1.
|
|
323
|
+
**Active Development** (v1.5.129). We are constantly refining the SDD engine based on real-world usage.
|
package/installers/config.json
CHANGED
|
@@ -16,6 +16,12 @@
|
|
|
16
16
|
"magic.spec",
|
|
17
17
|
"magic.task"
|
|
18
18
|
],
|
|
19
|
+
"devWorkflows": [
|
|
20
|
+
"magic.dev.simulate"
|
|
21
|
+
],
|
|
22
|
+
"devSkills": [
|
|
23
|
+
"magic.dev.simulate"
|
|
24
|
+
],
|
|
19
25
|
"magicFiles": [
|
|
20
26
|
"analyze.md",
|
|
21
27
|
"init.md",
|
|
@@ -31,11 +37,17 @@
|
|
|
31
37
|
"scripts/generate-checksums.js",
|
|
32
38
|
"scripts/generate-context.js",
|
|
33
39
|
"scripts/init.js",
|
|
40
|
+
"scripts/sync-skills.js",
|
|
34
41
|
"templates/plan.md",
|
|
35
42
|
"templates/retrospective.md",
|
|
36
43
|
"templates/spec.md",
|
|
37
44
|
"templates/tasks.md"
|
|
38
45
|
],
|
|
46
|
+
"devMagicFiles": [
|
|
47
|
+
"simulate.md",
|
|
48
|
+
"tests/engine.js",
|
|
49
|
+
"tests/suite.md"
|
|
50
|
+
],
|
|
39
51
|
"download": {
|
|
40
52
|
"timeoutMs": 10000,
|
|
41
53
|
"tempPrefix": "magic-spec-tmp-"
|
|
@@ -48,6 +60,7 @@
|
|
|
48
60
|
"targets": [
|
|
49
61
|
".magic",
|
|
50
62
|
".agents",
|
|
63
|
+
"skills",
|
|
51
64
|
"installers"
|
|
52
65
|
]
|
|
53
66
|
},
|
|
@@ -55,10 +68,14 @@
|
|
|
55
68
|
"versionFiles": [
|
|
56
69
|
"package.json",
|
|
57
70
|
"pyproject.toml",
|
|
58
|
-
"installers/python/magic_spec/__init__.py"
|
|
71
|
+
"installers/python/magic_spec/__init__.py",
|
|
72
|
+
".magic/.version",
|
|
73
|
+
".magic/.checksums"
|
|
59
74
|
],
|
|
60
75
|
"docsTargets": [
|
|
61
|
-
"CHANGELOG.md"
|
|
76
|
+
"CHANGELOG.md",
|
|
77
|
+
"README.md",
|
|
78
|
+
"docs/README.md"
|
|
62
79
|
]
|
|
63
80
|
},
|
|
64
81
|
"tests": {
|
package/installers/node/index.js
CHANGED
|
@@ -70,12 +70,16 @@ function loadInstallerConfig() {
|
|
|
70
70
|
const defaultExt = requireNonEmptyString(parsed.defaultExt, 'defaultExt');
|
|
71
71
|
const workflows = Array.isArray(parsed.workflows) ? parsed.workflows : null;
|
|
72
72
|
if (!workflows) {
|
|
73
|
-
failConfig("field 'workflows' must be
|
|
73
|
+
failConfig("field 'workflows' must be a non-empty array");
|
|
74
74
|
}
|
|
75
|
+
const devWorkflows = Array.isArray(parsed.devWorkflows) ? parsed.devWorkflows : [];
|
|
76
|
+
|
|
75
77
|
const magicFiles = Array.isArray(parsed.magicFiles) ? parsed.magicFiles : null;
|
|
76
78
|
if (!magicFiles) {
|
|
77
|
-
failConfig("field 'magicFiles' must be
|
|
79
|
+
failConfig("field 'magicFiles' must be a non-empty array");
|
|
78
80
|
}
|
|
81
|
+
const devMagicFiles = Array.isArray(parsed.devMagicFiles) ? parsed.devMagicFiles : [];
|
|
82
|
+
const devSkills = Array.isArray(parsed.devSkills) ? parsed.devSkills : [];
|
|
79
83
|
|
|
80
84
|
const designDir = requireNonEmptyString(parsed.designDir, 'designDir');
|
|
81
85
|
const versionFile = requireNonEmptyString(parsed.versionFile, 'versionFile');
|
|
@@ -95,7 +99,10 @@ function loadInstallerConfig() {
|
|
|
95
99
|
historyDir,
|
|
96
100
|
defaultExt,
|
|
97
101
|
workflows,
|
|
102
|
+
devWorkflows,
|
|
98
103
|
magicFiles,
|
|
104
|
+
devMagicFiles,
|
|
105
|
+
devSkills,
|
|
99
106
|
download: { timeoutMs, tempPrefix },
|
|
100
107
|
userAgent: { node: nodeUserAgent },
|
|
101
108
|
ejectTargets: parsed.eject.targets
|
|
@@ -109,8 +116,11 @@ const ENGINE_DIR = INSTALLER_CONFIG.engineDir;
|
|
|
109
116
|
const AGENT_DIR = INSTALLER_CONFIG.agentDir;
|
|
110
117
|
const WORKFLOWS_DIR = INSTALLER_CONFIG.workflowsDir;
|
|
111
118
|
const DEFAULT_EXT = INSTALLER_CONFIG.defaultExt;
|
|
112
|
-
|
|
113
|
-
|
|
119
|
+
let WORKFLOWS = [...INSTALLER_CONFIG.workflows];
|
|
120
|
+
let MAGIC_FILES = [...INSTALLER_CONFIG.magicFiles];
|
|
121
|
+
const DEV_WORKFLOWS = INSTALLER_CONFIG.devWorkflows;
|
|
122
|
+
const DEV_MAGIC_FILES = INSTALLER_CONFIG.devMagicFiles;
|
|
123
|
+
const DEV_SKILLS = INSTALLER_CONFIG.devSkills;
|
|
114
124
|
const DESIGN_DIR = INSTALLER_CONFIG.designDir;
|
|
115
125
|
const VERSION_FILE = INSTALLER_CONFIG.versionFile;
|
|
116
126
|
const CHECKSUMS_FILE = INSTALLER_CONFIG.checksumsFile;
|
|
@@ -130,6 +140,7 @@ const isListEnvs = args.includes('--list-envs');
|
|
|
130
140
|
const isEject = args.includes('--eject');
|
|
131
141
|
const isFallbackMain = args.includes('--fallback-main');
|
|
132
142
|
const isLocal = args.includes('--local');
|
|
143
|
+
const isDev = args.includes('--dev');
|
|
133
144
|
const autoAccept = args.includes('--yes') || args.includes('-y');
|
|
134
145
|
|
|
135
146
|
function parseCsvValues(raw) {
|
|
@@ -331,24 +342,16 @@ function installAdapter(sourceRoot, env, adapters, conflictsToSkip = []) {
|
|
|
331
342
|
}
|
|
332
343
|
|
|
333
344
|
function runDoctor() {
|
|
334
|
-
const
|
|
335
|
-
const checkScript = isWindows
|
|
336
|
-
? path.join(cwd, ENGINE_DIR, 'scripts', 'check-prerequisites.ps1')
|
|
337
|
-
: path.join(cwd, ENGINE_DIR, 'scripts', 'check-prerequisites.sh');
|
|
345
|
+
const checkScript = path.join(cwd, ENGINE_DIR, 'scripts', 'check-prerequisites.js');
|
|
338
346
|
|
|
339
347
|
if (!fs.existsSync(checkScript)) {
|
|
340
|
-
console.error('❌ Error: SDD engine not initialized. Run magic-spec first.');
|
|
348
|
+
console.error('❌ Error: SDD engine not initialized or check-prerequisites.js missing. Run magic-spec first.');
|
|
341
349
|
process.exit(1);
|
|
342
350
|
}
|
|
343
351
|
|
|
344
352
|
console.log(`🔍 ${PACKAGE_NAME} Doctor:`);
|
|
345
353
|
try {
|
|
346
|
-
|
|
347
|
-
if (isWindows) {
|
|
348
|
-
result = spawnSync('powershell.exe', ['-ExecutionPolicy', 'Bypass', '-File', checkScript, '-json'], { encoding: 'utf-8' });
|
|
349
|
-
} else {
|
|
350
|
-
result = spawnSync('bash', [checkScript, '--json'], { encoding: 'utf-8' });
|
|
351
|
-
}
|
|
354
|
+
const result = spawnSync('node', [checkScript, '--json'], { encoding: 'utf-8' });
|
|
352
355
|
|
|
353
356
|
if (result.error) {
|
|
354
357
|
console.error('❌ Failed to run doctor prerequisite check:', result.error.message);
|
|
@@ -763,6 +766,7 @@ async function main() {
|
|
|
763
766
|
console.log(" --env <adapter> Specify environment adapter");
|
|
764
767
|
console.log(" --<adapter> Shortcut for --env <adapter> (e.g. --cursor)");
|
|
765
768
|
console.log(" --update Update engine and adapter files");
|
|
769
|
+
console.log(" --dev Install development instruments (simulation, testing)");
|
|
766
770
|
console.log(" --local Use local project files instead of GitHub");
|
|
767
771
|
console.log(" --fallback-main Pull payload from main branch");
|
|
768
772
|
console.log(" --yes, -y Auto-accept prompts");
|
|
@@ -775,6 +779,13 @@ async function main() {
|
|
|
775
779
|
createBackup();
|
|
776
780
|
}
|
|
777
781
|
|
|
782
|
+
if (isDev) {
|
|
783
|
+
console.log("🛠️ Development instruments enabled.");
|
|
784
|
+
// Append dev workflows and engine files to the active set
|
|
785
|
+
WORKFLOWS = [...WORKFLOWS, ...DEV_WORKFLOWS];
|
|
786
|
+
MAGIC_FILES = [...MAGIC_FILES, ...DEV_MAGIC_FILES];
|
|
787
|
+
}
|
|
788
|
+
|
|
778
789
|
const versionToFetch = isFallbackMain ? 'main' : version;
|
|
779
790
|
let sourceRoot = null;
|
|
780
791
|
|
|
@@ -912,6 +923,39 @@ async function main() {
|
|
|
912
923
|
}
|
|
913
924
|
}
|
|
914
925
|
|
|
926
|
+
// If `--dev` is specified during update, ensure dev tools are present
|
|
927
|
+
if (isUpdate && isDev) {
|
|
928
|
+
const srcEng = path.join(sourceRoot, AGENT_DIR);
|
|
929
|
+
const destEng = path.join(cwd, AGENT_DIR);
|
|
930
|
+
|
|
931
|
+
// Sync dev workflows
|
|
932
|
+
const srcWfDir = path.join(srcEng, WORKFLOWS_DIR);
|
|
933
|
+
const destWfDir = path.join(destEng, WORKFLOWS_DIR);
|
|
934
|
+
if (fs.existsSync(srcWfDir)) {
|
|
935
|
+
fs.mkdirSync(destWfDir, { recursive: true });
|
|
936
|
+
for (const wf of DEV_WORKFLOWS) {
|
|
937
|
+
const file = wf + DEFAULT_EXT;
|
|
938
|
+
const sf = path.join(srcWfDir, file);
|
|
939
|
+
if (fs.existsSync(sf)) {
|
|
940
|
+
fs.copyFileSync(sf, path.join(destWfDir, file));
|
|
941
|
+
}
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
|
|
945
|
+
// Sync dev skills
|
|
946
|
+
const srcSkillsDir = path.join(srcEng, 'skills');
|
|
947
|
+
const destSkillsDir = path.join(destEng, 'skills');
|
|
948
|
+
if (fs.existsSync(srcSkillsDir)) {
|
|
949
|
+
fs.mkdirSync(destSkillsDir, { recursive: true });
|
|
950
|
+
for (const sk of DEV_SKILLS) {
|
|
951
|
+
const ss = path.join(srcSkillsDir, sk);
|
|
952
|
+
if (fs.existsSync(ss) && fs.statSync(ss).isDirectory()) {
|
|
953
|
+
copyDir(ss, path.join(destSkillsDir, sk));
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
|
|
915
959
|
// 3. Init script
|
|
916
960
|
if (!isUpdate) {
|
|
917
961
|
const isWindows = process.platform === 'win32';
|
|
@@ -954,6 +998,18 @@ async function main() {
|
|
|
954
998
|
console.log(`✅ ${PACKAGE_NAME} updated successfully!`);
|
|
955
999
|
}
|
|
956
1000
|
|
|
1001
|
+
// 3.5. Sync Skill Wrappers
|
|
1002
|
+
const syncScript = path.join(cwd, ENGINE_DIR, 'scripts', 'sync-skills.js');
|
|
1003
|
+
if (fs.existsSync(syncScript)) {
|
|
1004
|
+
console.log('🔄 Projecting Workflows to Skill Wrappers...');
|
|
1005
|
+
const syncResult = spawnSync('node', [syncScript], { cwd });
|
|
1006
|
+
if (syncResult.error || syncResult.status !== 0) {
|
|
1007
|
+
console.warn(`⚠️ Skill synchronization failed: ${syncResult.stderr || syncResult.error?.message}`);
|
|
1008
|
+
} else {
|
|
1009
|
+
console.log('✅ Skills synchronized.');
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
|
|
957
1013
|
// 4. Write version file - [T-2B01]
|
|
958
1014
|
try {
|
|
959
1015
|
const versionFileDest = path.join(cwd, ENGINE_DIR, VERSION_FILE);
|
|
@@ -963,7 +1019,7 @@ async function main() {
|
|
|
963
1019
|
}
|
|
964
1020
|
|
|
965
1021
|
// 5. Auto-update .gitignore
|
|
966
|
-
const gitignoreEntries = [ENGINE_DIR];
|
|
1022
|
+
const gitignoreEntries = [ENGINE_DIR, 'skills'];
|
|
967
1023
|
if (envValues.length > 0) {
|
|
968
1024
|
for (const env of envValues) {
|
|
969
1025
|
const adapter = ADAPTERS[env];
|