@codeyam/codeyam-cli 0.1.0-staging.25a2014 → 0.1.0-staging.26dc674
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/analyzer-template/.build-info.json +7 -7
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +2 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +5 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +10 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/gatherEntityMap.ts +9 -12
- package/analyzer-template/packages/analyze/src/lib/files/analyzeChange.ts +4 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyzeInitial.ts +4 -0
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/database/package.json +1 -1
- package/analyzer-template/packages/database/src/lib/loadAnalysis.ts +19 -15
- package/analyzer-template/packages/database/src/lib/loadEntity.ts +19 -8
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadAnalysis.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts +4 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js +5 -5
- package/analyzer-template/packages/github/dist/database/src/lib/loadEntity.js.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts +3 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js +22 -1
- package/analyzer-template/packages/utils/dist/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/analyzer-template/packages/utils/src/lib/fs/rsyncCopy.ts +27 -0
- package/analyzer-template/project/analyzeFileEntities.ts +26 -0
- package/background/src/lib/virtualized/project/analyzeFileEntities.js +22 -0
- package/background/src/lib/virtualized/project/analyzeFileEntities.js.map +1 -1
- package/codeyam-cli/src/cli.js +15 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/__tests__/editor.stepDispatch.test.js +9 -9
- package/codeyam-cli/src/commands/editor.js +981 -344
- package/codeyam-cli/src/commands/editor.js.map +1 -1
- package/codeyam-cli/src/commands/init.js +1 -0
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +1274 -33
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js +137 -0
- package/codeyam-cli/src/utils/__tests__/editorCaptureScenarioSeeding.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js +66 -0
- package/codeyam-cli/src/utils/__tests__/editorEntityHelpers.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js +67 -0
- package/codeyam-cli/src/utils/__tests__/editorGuardMiddleware.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js +70 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarioSwitch.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +71 -1
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js +233 -1
- package/codeyam-cli/src/utils/__tests__/entityChangeStatus.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js +177 -0
- package/codeyam-cli/src/utils/__tests__/glossaryAdd.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js +16 -1
- package/codeyam-cli/src/utils/__tests__/journalCaptureStabilization.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js +127 -0
- package/codeyam-cli/src/utils/__tests__/registerScenarioResult.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js +57 -0
- package/codeyam-cli/src/utils/__tests__/scenarioCoverage.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js +41 -0
- package/codeyam-cli/src/utils/__tests__/scenariosManifest.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js +84 -0
- package/codeyam-cli/src/utils/__tests__/screenshotHash.test.js.map +1 -0
- package/codeyam-cli/src/utils/analysisRunner.js +8 -6
- package/codeyam-cli/src/utils/analysisRunner.js.map +1 -1
- package/codeyam-cli/src/utils/analyzer.js +8 -0
- package/codeyam-cli/src/utils/analyzer.js.map +1 -1
- package/codeyam-cli/src/utils/editorAudit.js +277 -37
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -1
- package/codeyam-cli/src/utils/editorGuard.js +36 -0
- package/codeyam-cli/src/utils/editorGuard.js.map +1 -0
- package/codeyam-cli/src/utils/editorRecapture.js +109 -0
- package/codeyam-cli/src/utils/editorRecapture.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarioSwitch.js +24 -2
- package/codeyam-cli/src/utils/editorScenarioSwitch.js.map +1 -1
- package/codeyam-cli/src/utils/editorScenarios.js +65 -6
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -1
- package/codeyam-cli/src/utils/entityChangeStatus.js +31 -3
- package/codeyam-cli/src/utils/entityChangeStatus.js.map +1 -1
- package/codeyam-cli/src/utils/glossaryAdd.js +74 -0
- package/codeyam-cli/src/utils/glossaryAdd.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +5 -0
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +6 -3
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/registerScenarioResult.js +52 -0
- package/codeyam-cli/src/utils/registerScenarioResult.js.map +1 -0
- package/codeyam-cli/src/utils/scenarioCoverage.js +4 -1
- package/codeyam-cli/src/utils/scenarioCoverage.js.map +1 -1
- package/codeyam-cli/src/utils/scenariosManifest.js +28 -0
- package/codeyam-cli/src/utils/scenariosManifest.js.map +1 -1
- package/codeyam-cli/src/utils/screenshotHash.js +26 -0
- package/codeyam-cli/src/utils/screenshotHash.js.map +1 -0
- package/codeyam-cli/src/utils/simulationGateMiddleware.js +9 -0
- package/codeyam-cli/src/utils/simulationGateMiddleware.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js +68 -1
- package/codeyam-cli/src/webserver/__tests__/clientErrors.test.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js +123 -21
- package/codeyam-cli/src/webserver/__tests__/idleDetector.test.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js +135 -0
- package/codeyam-cli/src/webserver/__tests__/stripClaudeCommand.test.js.map +1 -0
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js +22 -1
- package/codeyam-cli/src/webserver/app/lib/clientErrors.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-recapture-stale-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-save-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-schema-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{cy-logo-cli-CCKUIm0S.svg → cy-logo-cli-CJzc4vOH.svg} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DODLxLcw.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-Dx-h1rJK.js +130 -0
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-NTuLi4Xg.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.dev-CUobbQdQ.js → entity._sha.scenarios._scenarioId.dev-BA5L8bU-.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha.scenarios._scenarioId.fullscreen-C6eeL24i.js → entity._sha.scenarios._scenarioId.fullscreen-D4dmRgvO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-BrPXT1iR.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/manifest-5025e428.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{root-DB3O9_9j.js → root-BCx1S8Z3.js} +26 -13
- package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-C1kjC9UJ.js +13 -0
- package/codeyam-cli/src/webserver/build/server/assets/{index-CEaDhUiv.js → index-C91yWWCI.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/{init-DA7guOrE.js → init-Dkas-RUS.js} +2 -2
- package/codeyam-cli/src/webserver/build/server/assets/server-build-pulXLTrG.js +640 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/idleDetector.js +41 -8
- package/codeyam-cli/src/webserver/idleDetector.js.map +1 -1
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +53 -0
- package/codeyam-cli/src/webserver/server.js +52 -14
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +141 -27
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
- package/codeyam-cli/templates/__tests__/editor-step-hook.prompt-capture.test.ts +118 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +2 -0
- package/codeyam-cli/templates/codeyam-editor-reference.md +214 -0
- package/codeyam-cli/templates/editor-step-hook.py +93 -46
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +19 -1
- package/package.json +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +4 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +3 -2
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js +9 -7
- package/packages/analyze/src/lib/files/analyze/gatherEntityMap.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeChange.js +1 -0
- package/packages/analyze/src/lib/files/analyzeChange.js.map +1 -1
- package/packages/analyze/src/lib/files/analyzeInitial.js +1 -0
- package/packages/analyze/src/lib/files/analyzeInitial.js.map +1 -1
- package/packages/database/src/lib/loadAnalysis.js +1 -1
- package/packages/database/src/lib/loadAnalysis.js.map +1 -1
- package/packages/database/src/lib/loadEntity.js +5 -5
- package/packages/database/src/lib/loadEntity.js.map +1 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js +22 -1
- package/packages/utils/src/lib/fs/rsyncCopy.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/cy-logo-cli-DcX-ZS3p.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-B7xQ9Sjy.js +0 -58
- package/codeyam-cli/src/webserver/build/client/assets/editorPreview-CxmrE6AF.js +0 -41
- package/codeyam-cli/src/webserver/build/client/assets/globals-fAqOD9ex.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-5d53342d.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/analysisRunner-DcJSnBCE.js +0 -13
- package/codeyam-cli/src/webserver/build/server/assets/server-build-juyiY2m6.js +0 -551
|
@@ -15,40 +15,44 @@ from datetime import datetime, timezone
|
|
|
15
15
|
|
|
16
16
|
STEP_LABELS = {
|
|
17
17
|
1: "Plan",
|
|
18
|
-
2: "
|
|
19
|
-
3: "
|
|
20
|
-
4: "
|
|
21
|
-
5: "
|
|
22
|
-
6: "
|
|
23
|
-
7: "
|
|
24
|
-
8: "
|
|
25
|
-
9: "
|
|
26
|
-
10: "
|
|
27
|
-
11: "
|
|
28
|
-
12: "
|
|
29
|
-
13: "
|
|
30
|
-
14: "
|
|
31
|
-
15: "
|
|
32
|
-
16: "
|
|
18
|
+
2: "Prepare",
|
|
19
|
+
3: "Prototype",
|
|
20
|
+
4: "Verify Prototype",
|
|
21
|
+
5: "Confirm",
|
|
22
|
+
6: "Deconstruct",
|
|
23
|
+
7: "Extract",
|
|
24
|
+
8: "Glossary",
|
|
25
|
+
9: "Analyze",
|
|
26
|
+
10: "App Scenarios",
|
|
27
|
+
11: "User Scenarios",
|
|
28
|
+
12: "Verify",
|
|
29
|
+
13: "Journal",
|
|
30
|
+
14: "Review",
|
|
31
|
+
15: "Present",
|
|
32
|
+
16: "Commit",
|
|
33
|
+
17: "Finalize",
|
|
34
|
+
18: "Push",
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
STEP_RESTRICTIONS = {
|
|
36
38
|
1: "Do NOT write any code. Plan and describe only. Wait for user confirmation.",
|
|
37
|
-
2: "Do NOT
|
|
38
|
-
3: "
|
|
39
|
-
4: "
|
|
40
|
-
5: "
|
|
41
|
-
6: "Do NOT write
|
|
42
|
-
7: "
|
|
43
|
-
8: "Do NOT
|
|
44
|
-
9: "
|
|
45
|
-
10: "
|
|
46
|
-
11: "
|
|
47
|
-
12: "Verify
|
|
48
|
-
13: "
|
|
49
|
-
14: "
|
|
50
|
-
15: "
|
|
51
|
-
16: "
|
|
39
|
+
2: "Do NOT write any code or build features. Set up the project and prepare the database only.",
|
|
40
|
+
3: "Do NOT create scenarios or run codeyam analyze. Build fast — working prototype with real data.",
|
|
41
|
+
4: "Verify the prototype works. Do NOT add features — only fix broken functionality.",
|
|
42
|
+
5: "Present a selection menu (AskUserQuestion) for confirmation. Do NOT refactor or create scenarios until approved.",
|
|
43
|
+
6: "Do NOT write any code. Read every file, identify all extractable pieces, write a numbered plan. Planning only.",
|
|
44
|
+
7: "Execute the extraction plan from step 6. Components first (no tests), then library functions via TDD. Page files must contain ZERO direct JSX.",
|
|
45
|
+
8: "Do NOT write application code or scenarios. Update the glossary only.",
|
|
46
|
+
9: "Create isolation routes for visual components, run tests for library functions. Register component scenarios via codeyam editor register.",
|
|
47
|
+
10: "Do NOT modify application code. Create and register app-level scenarios only.",
|
|
48
|
+
11: "Do NOT modify application code. Create user-persona scenarios only (or skip if no users).",
|
|
49
|
+
12: "Verify component isolation screenshots AND editor scenarios. After ANY code fix, re-register affected components. Fix only — do NOT add features.",
|
|
50
|
+
13: "Create or update the journal entry for this feature. Do NOT create a duplicate — check if one exists first.",
|
|
51
|
+
14: "Verify ALL screenshots exist and NO client-side errors (/api/editor-client-errors). Run codeyam editor audit. Do not proceed until all checks pass.",
|
|
52
|
+
15: "Show the results panel, present summary, then selection menu (AskUserQuestion): Save or make changes.",
|
|
53
|
+
16: "Hide the results panel and commit all changes. Do NOT push — that happens in step 18.",
|
|
54
|
+
17: "Update the journal entry with the commit SHA and amend the commit to include the journal update.",
|
|
55
|
+
18: "Check for a git remote and offer to push. WAIT for the user's answer before starting the next feature.",
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
MIGRATION_STEP_LABELS = {
|
|
@@ -127,18 +131,34 @@ def main():
|
|
|
127
131
|
# Detect event early so we can capture the user prompt even before state exists
|
|
128
132
|
event_type, event_data = detect_event()
|
|
129
133
|
|
|
130
|
-
# Capture the
|
|
131
|
-
#
|
|
134
|
+
# Capture the user's feature request prompt.
|
|
135
|
+
# Write when: (a) no prompt file yet, (b) no state file (between features),
|
|
136
|
+
# or (c) previous feature is done (step >= 18). This ensures the prompt
|
|
137
|
+
# is refreshed for each new feature instead of persisting stale text.
|
|
132
138
|
# Skip slash commands (e.g. /codeyam-editor) — they aren't user prompts.
|
|
133
|
-
if event_type == "user_prompt"
|
|
139
|
+
if event_type == "user_prompt":
|
|
134
140
|
prompt_text = event_data.get("prompt", "").strip()
|
|
135
141
|
if prompt_text and not prompt_text.startswith("/"):
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
should_capture = not os.path.exists(prompt_path)
|
|
143
|
+
if not should_capture:
|
|
144
|
+
# Overwrite stale prompt when between features
|
|
145
|
+
if not os.path.exists(state_path):
|
|
146
|
+
should_capture = True
|
|
147
|
+
else:
|
|
148
|
+
try:
|
|
149
|
+
with open(state_path, "r") as f:
|
|
150
|
+
prev = json.load(f)
|
|
151
|
+
if prev.get("step", 0) >= 18:
|
|
152
|
+
should_capture = True
|
|
153
|
+
except Exception:
|
|
154
|
+
pass
|
|
155
|
+
if should_capture:
|
|
156
|
+
try:
|
|
157
|
+
os.makedirs(os.path.dirname(prompt_path), exist_ok=True)
|
|
158
|
+
with open(prompt_path, "w") as f:
|
|
159
|
+
f.write(prompt_text)
|
|
160
|
+
except Exception:
|
|
161
|
+
pass # Best-effort
|
|
142
162
|
|
|
143
163
|
if not os.path.exists(state_path):
|
|
144
164
|
return
|
|
@@ -157,6 +177,27 @@ def main():
|
|
|
157
177
|
if not step:
|
|
158
178
|
return
|
|
159
179
|
|
|
180
|
+
# ── Task tracking ──────────────────────────────────────────────────
|
|
181
|
+
# Track whether TaskCreate was called between step transitions.
|
|
182
|
+
# If Claude advances to the next step without creating a task, block it.
|
|
183
|
+
task_tracking_path = os.path.join(project_dir, ".codeyam", "editor-task-tracking.json")
|
|
184
|
+
|
|
185
|
+
if event_type == "post_tool_use":
|
|
186
|
+
tool_name = event_data.get("tool_name", "")
|
|
187
|
+
|
|
188
|
+
# Record when TaskCreate is called
|
|
189
|
+
if tool_name == "TaskCreate":
|
|
190
|
+
try:
|
|
191
|
+
tracking = {}
|
|
192
|
+
if os.path.exists(task_tracking_path):
|
|
193
|
+
with open(task_tracking_path, "r") as f:
|
|
194
|
+
tracking = json.load(f)
|
|
195
|
+
tracking["taskCreated"] = True
|
|
196
|
+
with open(task_tracking_path, "w") as f:
|
|
197
|
+
json.dump(tracking, f)
|
|
198
|
+
except Exception:
|
|
199
|
+
pass
|
|
200
|
+
|
|
160
201
|
# Log the hook firing
|
|
161
202
|
log_data = {"step": step, "label": label, "feature": feature, "hook": event_type}
|
|
162
203
|
if migration:
|
|
@@ -171,7 +212,7 @@ def main():
|
|
|
171
212
|
next_cmd = f"codeyam editor migrate {step + 1}" if step < 10 else "codeyam editor migrate next"
|
|
172
213
|
else:
|
|
173
214
|
restriction = STEP_RESTRICTIONS.get(step, "")
|
|
174
|
-
next_cmd = f"codeyam editor {step + 1}" if step <
|
|
215
|
+
next_cmd = f"codeyam editor {step + 1}" if step < 18 else "codeyam editor 1"
|
|
175
216
|
|
|
176
217
|
# UserPromptSubmit: concise workflow reminder injected before Claude processes the user's message
|
|
177
218
|
if event_type == "user_prompt":
|
|
@@ -212,14 +253,14 @@ def main():
|
|
|
212
253
|
"The change workflow ensures Working Session Results are shown to the user. "
|
|
213
254
|
"If the user chose to commit, run `codeyam editor migrate next` to advance to the next page."
|
|
214
255
|
)
|
|
215
|
-
elif step in (
|
|
256
|
+
elif step in (15, 16, 17, 18) and not migration:
|
|
216
257
|
lines.append(
|
|
217
258
|
"If the user is requesting changes (even indirectly), "
|
|
218
259
|
"run `codeyam editor change` BEFORE making any modifications "
|
|
219
260
|
"(code, scenarios, data, styles — everything). "
|
|
220
261
|
"The change command gives you the post-change checklist. "
|
|
221
262
|
"The change workflow ensures Working Session Results are shown to the user. "
|
|
222
|
-
"If the user chose to commit, run `codeyam editor
|
|
263
|
+
"If the user chose to commit, run `codeyam editor 16` to advance to the commit step."
|
|
223
264
|
)
|
|
224
265
|
elif migration:
|
|
225
266
|
lines.append(
|
|
@@ -270,9 +311,9 @@ def main():
|
|
|
270
311
|
tracker.append(f"{DIM} \u2502 \u25cb {cntnt}\u2502{RESET}")
|
|
271
312
|
tracker.append(f"{DIM} \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518{RESET}")
|
|
272
313
|
else:
|
|
273
|
-
# Standard progress tracker (
|
|
314
|
+
# Standard progress tracker (18 steps)
|
|
274
315
|
tracker = [f"{DIM} \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510{RESET}"]
|
|
275
|
-
for i in range(1,
|
|
316
|
+
for i in range(1, 19):
|
|
276
317
|
lbl = STEP_LABELS[i].ljust(28)
|
|
277
318
|
num = f" {i}" if i < 10 else f"{i}"
|
|
278
319
|
content = f"{num}. {lbl}"
|
|
@@ -291,7 +332,7 @@ def main():
|
|
|
291
332
|
"\u2713 (done) or \u2717 (skipped + reason)."
|
|
292
333
|
)
|
|
293
334
|
|
|
294
|
-
if event_type == "stop" and ((step in (
|
|
335
|
+
if event_type == "stop" and ((step in (15, 16) and not migration) or (step == 8 and migration)):
|
|
295
336
|
import subprocess as _sp
|
|
296
337
|
try:
|
|
297
338
|
_result = _sp.run(
|
|
@@ -309,9 +350,15 @@ def main():
|
|
|
309
350
|
)
|
|
310
351
|
lines.append(
|
|
311
352
|
f"\033[31mRun `codeyam editor change` if you haven't already, then complete the "
|
|
312
|
-
f"checklist and run `{'codeyam editor migrate 8' if migration else 'codeyam editor
|
|
353
|
+
f"checklist and run `{'codeyam editor migrate 8' if migration else 'codeyam editor 15'}` to show results to the user.\033[0m"
|
|
313
354
|
)
|
|
314
355
|
|
|
356
|
+
if event_type == "stop":
|
|
357
|
+
lines.append(
|
|
358
|
+
f"\n\033[2mReminder: Only use `codeyam editor` subcommands in the Build terminal. "
|
|
359
|
+
f"Follow `codeyam editor steps` when changing code.\033[0m"
|
|
360
|
+
)
|
|
361
|
+
|
|
315
362
|
lines.append(f"When this step is complete, run: {next_cmd}")
|
|
316
363
|
|
|
317
364
|
print("\n".join(lines))
|
|
@@ -16,6 +16,15 @@ You MUST follow a step-by-step workflow driven by `codeyam editor` commands. Eac
|
|
|
16
16
|
|
|
17
17
|
**The rule:** After completing what a command tells you to do, run the NEXT command it specifies. The commands are your instructions — follow them one at a time.
|
|
18
18
|
|
|
19
|
+
## TASK Directive
|
|
20
|
+
|
|
21
|
+
Some `codeyam editor N` commands output a `━━━ TASK ━━━` section with an `EXACT_TASK_TITLE:` line. When you see one:
|
|
22
|
+
|
|
23
|
+
1. Mark your current task as complete (if one exists)
|
|
24
|
+
2. Run TaskCreate with the EXACT title from the `EXACT_TASK_TITLE:` line — copy it character-for-character, do NOT paraphrase
|
|
25
|
+
|
|
26
|
+
Do NOT create tasks on your own. Only create them when a `━━━ TASK ━━━` directive tells you to.
|
|
27
|
+
|
|
19
28
|
## Migration Mode
|
|
20
29
|
|
|
21
30
|
When `codeyam editor steps` shows **"Project Migration"** instead of "Feature Cycle", the project is being migrated from an existing codebase. Follow the `codeyam editor migrate` commands instead of the normal 13-step cycle.
|
|
@@ -117,6 +126,9 @@ This command gives you the post-change checklist (re-register scenarios, re-run
|
|
|
117
126
|
## Key Rules
|
|
118
127
|
|
|
119
128
|
- **Run the commands** — they ARE your instructions, not suggestions
|
|
129
|
+
- **One step at a time** — run each `codeyam editor N` command, read its FULL output, complete every checklist item, then advance. The CLI enforces a minimum time per step.
|
|
130
|
+
- **NEVER batch-run steps** — `for step in 5 6 7 8; do codeyam editor $step; done` or piping to `head` defeats the entire workflow. Each step has unique instructions you must read and follow.
|
|
131
|
+
- **NEVER delegate multiple steps to a subagent** — each step must be run, read, and completed in the main conversation. You MAY use subagents for parallelizable work _within_ a single step (e.g. extracting components + writing tests in step 5).
|
|
120
132
|
- **Every feature gets scenarios** — this is the core value of CodeYam
|
|
121
133
|
- **Always scaffold with a database** (Prisma + SQLite)
|
|
122
134
|
- **Build real API routes** — the proxy handles scenario data transparently
|
|
@@ -176,7 +188,13 @@ codeyam editor register '{"name":"Full Catalog","type":"application","url":"/","
|
|
|
176
188
|
# Register app scenario with localStorage (for apps using client-side storage instead of a database)
|
|
177
189
|
codeyam editor register '{"name":"Full Library","type":"application","url":"/","dimensions":["<name from screenSizes>"],"localStorage":{"articles":[...],"collections":[...]}}'
|
|
178
190
|
|
|
179
|
-
#
|
|
191
|
+
# BULK REGISTRATION (preferred — register all scenarios at once):
|
|
192
|
+
# Write an array of scenarios to a temp file, then register with @ prefix.
|
|
193
|
+
# This is faster and avoids repeated screenshot capture overhead.
|
|
194
|
+
# File format: [{"name":"...","type":"...","url":"...","seed":{...}}, ...]
|
|
195
|
+
codeyam editor register @.codeyam/tmp/scenarios.json
|
|
196
|
+
|
|
197
|
+
# Single scenario from file (for large seed/localStorage data):
|
|
180
198
|
codeyam editor register @/tmp/scenario-data.json
|
|
181
199
|
|
|
182
200
|
# Journal entry (one per feature, references scenario names)
|
package/package.json
CHANGED
|
@@ -650,7 +650,10 @@ export class ScopeDataStructure {
|
|
|
650
650
|
addEquivalency(path, equivalentPath, equivalentScopeName, scopeNode, equivalencyReason, equivalencyValueChain, traceId) {
|
|
651
651
|
var _a;
|
|
652
652
|
addEquivalencyCallCount++;
|
|
653
|
-
|
|
653
|
+
const limit = typeof globalThis.__CODEYAM_EQUIVALENCY_LIMIT === 'number'
|
|
654
|
+
? globalThis.__CODEYAM_EQUIVALENCY_LIMIT
|
|
655
|
+
: 50000;
|
|
656
|
+
if (addEquivalencyCallCount > limit) {
|
|
654
657
|
console.error('INFINITE LOOP DETECTED in addEquivalency', {
|
|
655
658
|
callCount: addEquivalencyCallCount,
|
|
656
659
|
path,
|