@codeyam/codeyam-cli 0.1.29 → 0.1.31
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 +1 -1
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/database/package.json +1 -1
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js +39 -3
- package/codeyam-cli/src/commands/__tests__/init.gitignore.test.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +133 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -1
- package/codeyam-cli/src/commands/init.js +20 -0
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js +98 -1
- package/codeyam-cli/src/utils/__tests__/editorProxySession.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorRoadmap.test.js +712 -2
- package/codeyam-cli/src/utils/__tests__/editorRoadmap.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/envFile.test.js +125 -0
- package/codeyam-cli/src/utils/__tests__/envFile.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/handoffContext.test.js +500 -0
- package/codeyam-cli/src/utils/__tests__/handoffContext.test.js.map +1 -0
- package/codeyam-cli/src/utils/editorRoadmap.js +290 -17
- package/codeyam-cli/src/utils/editorRoadmap.js.map +1 -1
- package/codeyam-cli/src/utils/envFile.js +90 -0
- package/codeyam-cli/src/utils/envFile.js.map +1 -0
- package/codeyam-cli/src/utils/handoffContext.js +257 -0
- package/codeyam-cli/src/utils/handoffContext.js.map +1 -0
- package/codeyam-cli/src/utils/install-skills.js +36 -6
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/techStackConfig.js +38 -0
- package/codeyam-cli/src/utils/techStackConfig.js.map +1 -0
- package/codeyam-cli/src/utils/techStackConfig.test.js +85 -0
- package/codeyam-cli/src/utils/techStackConfig.test.js.map +1 -0
- package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js +119 -1
- package/codeyam-cli/src/webserver/__tests__/buildPtyEnv.test.js.map +1 -1
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js +115 -0
- package/codeyam-cli/src/webserver/__tests__/editorProxy.test.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{MiniClaudeChat-BusrvT2F.js → MiniClaudeChat-Bs2_Oua4.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-database-verify-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-github-verify-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-handoff-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-hosting-verify-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-DOXe0Qx7.js +161 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._-Ce1s4OQ1.js → entity._sha._-pc-vc6wO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-L-aUIeux.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/manifest-30c44d84.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{root-CVjDQwjJ.js → root-CLedrjXQ.js} +7 -7
- package/codeyam-cli/src/webserver/build/server/assets/{analysisRunner-CTJYMVFP.js → analysisRunner-CuR5TvUx.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/{index-CCth4Hgw.js → index-D4MWAsqb.js} +1 -1
- package/codeyam-cli/src/webserver/build/server/assets/init-JObA4lXD.js +14 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-i8OXK4oL.js +765 -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/editorProxy.js +77 -4
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +81 -11
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -1
- package/codeyam-cli/templates/codeyam-editor-codex.md +61 -0
- package/codeyam-cli/templates/codeyam-editor-gemini.md +59 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +1 -0
- package/codeyam-cli/templates/seed-adapters/supabase.ts +185 -84
- package/package.json +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/editor.entity.(_sha)-785deXbZ.js +0 -147
- package/codeyam-cli/src/webserver/build/client/assets/globals-Bt7TsgQz.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-3d8cde80.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/init-UXl-3vVp.js +0 -10
- package/codeyam-cli/src/webserver/build/server/assets/server-build-DSW2mE30.js +0 -741
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"buildTimestamp": "2026-
|
|
3
|
-
"buildTime":
|
|
4
|
-
"gitCommit": "
|
|
5
|
-
"nodeVersion": "v20.20.
|
|
2
|
+
"buildTimestamp": "2026-04-04T16:37:04.184Z",
|
|
3
|
+
"buildTime": 1775320624184,
|
|
4
|
+
"gitCommit": "633ad0efb9f5d80434350c1d085083b4cf52b1fb",
|
|
5
|
+
"nodeVersion": "v20.20.2",
|
|
6
6
|
"contentHash": "c92230c027acb71cab56d2a696876a6a52206bfadd59fbc31a512b00a7ee8826",
|
|
7
|
-
"buildNumber":
|
|
8
|
-
"semanticVersion": "0.1.
|
|
9
|
-
"version": "0.1.
|
|
7
|
+
"buildNumber": 1348,
|
|
8
|
+
"semanticVersion": "0.1.1348",
|
|
9
|
+
"version": "0.1.1348 (2026-04-04T16:37+c92230c)"
|
|
10
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
[
|
|
3
|
-
[
|
|
2
|
+
[4/4/2026, 4:37:04 PM] > codeyam-combo@1.0.0 mergeDependencies
|
|
3
|
+
[4/4/2026, 4:37:04 PM] > node ./scripts/mergePackageJsonFiles.cjs
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
[
|
|
6
|
+
[4/4/2026, 4:37:04 PM] Merged dependencies into root package.json
|
|
7
7
|
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@aws-sdk/client-ecr": "^3.1019.0",
|
|
18
18
|
"@aws-sdk/client-ecs": "^3.1009.0",
|
|
19
19
|
"@aws-sdk/client-s3": "^3.1019.0",
|
|
20
|
-
"@aws-sdk/client-sqs": "^3.
|
|
20
|
+
"@aws-sdk/client-sqs": "^3.1020.0",
|
|
21
21
|
"@aws-sdk/lib-storage": "^3.1019.0",
|
|
22
22
|
"@aws-sdk/s3-request-presigner": "^3.1019.0",
|
|
23
23
|
"@aws-sdk/util-dynamodb": "^3.990.0"
|
|
@@ -17,8 +17,10 @@ const CODEYAM_GITIGNORE_ENTRIES = [
|
|
|
17
17
|
'.codeyam/active-scenario.json',
|
|
18
18
|
'.codeyam/editor-step.json',
|
|
19
19
|
'.codeyam/editor-user-prompt.txt',
|
|
20
|
+
'.codeyam/claude-session-id.txt',
|
|
20
21
|
'.codeyam/editor-mode-context.md',
|
|
21
22
|
'.codeyam/dev-mode-context.md',
|
|
23
|
+
'.codeyam/handoff-context.md',
|
|
22
24
|
'.codeyam/logs/',
|
|
23
25
|
'.codeyam/llm-calls/',
|
|
24
26
|
'.codeyam/captures/',
|
|
@@ -26,6 +28,7 @@ const CODEYAM_GITIGNORE_ENTRIES = [
|
|
|
26
28
|
'.codeyam/tmp/',
|
|
27
29
|
'.codeyam/rules/',
|
|
28
30
|
'.codeyam/bin/',
|
|
31
|
+
'.codeyam/docs/',
|
|
29
32
|
];
|
|
30
33
|
/**
|
|
31
34
|
* Extract the ensureGitignoreEntry function for testing.
|
|
@@ -63,6 +66,17 @@ async function ensureGitignoreEntry(projectRoot) {
|
|
|
63
66
|
block;
|
|
64
67
|
await fs.writeFile(gitignorePath, newContent, 'utf8');
|
|
65
68
|
}
|
|
69
|
+
else {
|
|
70
|
+
// Add any missing entries from the current list
|
|
71
|
+
const missingEntries = CODEYAM_GITIGNORE_ENTRIES.filter((entry) => !lines.some((line) => line.trim() === entry));
|
|
72
|
+
if (missingEntries.length > 0) {
|
|
73
|
+
const updatedContent = gitignoreContent +
|
|
74
|
+
(gitignoreContent && !gitignoreContent.endsWith('\n') ? '\n' : '') +
|
|
75
|
+
missingEntries.join('\n') +
|
|
76
|
+
'\n';
|
|
77
|
+
await fs.writeFile(gitignorePath, updatedContent, 'utf8');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
66
80
|
}
|
|
67
81
|
describe('init command - gitignore management', () => {
|
|
68
82
|
let testDir;
|
|
@@ -100,12 +114,15 @@ describe('init command - gitignore management', () => {
|
|
|
100
114
|
expect(content).toContain('.codeyam/db.sqlite3');
|
|
101
115
|
expect(content).toContain('.codeyam/secrets.json');
|
|
102
116
|
});
|
|
103
|
-
test('does not duplicate when granular patterns already exist', async () => {
|
|
117
|
+
test('does not duplicate when all granular patterns already exist', async () => {
|
|
104
118
|
const gitignorePath = path.join(testDir, '.gitignore');
|
|
105
|
-
await fs.writeFile(gitignorePath, 'node_modules\n
|
|
119
|
+
await fs.writeFile(gitignorePath, 'node_modules\n\n# CodeYam - local only (not shared)\n' +
|
|
120
|
+
CODEYAM_GITIGNORE_ENTRIES.join('\n') +
|
|
121
|
+
'\n', 'utf8');
|
|
106
122
|
await ensureGitignoreEntry(testDir);
|
|
107
123
|
const content = await fs.readFile(gitignorePath, 'utf8');
|
|
108
|
-
|
|
124
|
+
// Exact match on the line — no duplicates
|
|
125
|
+
const matches = content.match(/^\.codeyam\/db\.sqlite3$/gm);
|
|
109
126
|
expect(matches).toHaveLength(1);
|
|
110
127
|
});
|
|
111
128
|
test('replaces blanket .codeyam with granular patterns', async () => {
|
|
@@ -172,6 +189,25 @@ build
|
|
|
172
189
|
expect(content).toContain('dist');
|
|
173
190
|
expect(content).toContain('.codeyam/db.sqlite3');
|
|
174
191
|
});
|
|
192
|
+
test('adds missing entries to existing granular block', async () => {
|
|
193
|
+
const gitignorePath = path.join(testDir, '.gitignore');
|
|
194
|
+
// Simulate an older gitignore that has most entries but is missing claude-session-id.txt and docs/
|
|
195
|
+
const oldEntries = CODEYAM_GITIGNORE_ENTRIES.filter((e) => e !== '.codeyam/claude-session-id.txt' && e !== '.codeyam/docs/');
|
|
196
|
+
await fs.writeFile(gitignorePath, 'node_modules\n\n# CodeYam - local only (not shared)\n' +
|
|
197
|
+
oldEntries.join('\n') +
|
|
198
|
+
'\n', 'utf8');
|
|
199
|
+
await ensureGitignoreEntry(testDir);
|
|
200
|
+
const content = await fs.readFile(gitignorePath, 'utf8');
|
|
201
|
+
// New entries should be added
|
|
202
|
+
expect(content).toContain('.codeyam/claude-session-id.txt');
|
|
203
|
+
expect(content).toContain('.codeyam/docs/');
|
|
204
|
+
// Existing entries should still be there
|
|
205
|
+
expect(content).toContain('.codeyam/db.sqlite3');
|
|
206
|
+
expect(content).toContain('.codeyam/secrets.json');
|
|
207
|
+
// No duplicates
|
|
208
|
+
const dbMatches = content.match(/\.codeyam\/db\.sqlite3$/gm);
|
|
209
|
+
expect(dbMatches).toHaveLength(1);
|
|
210
|
+
});
|
|
175
211
|
test('config.json is NOT ignored (allows sharing via git)', async () => {
|
|
176
212
|
await ensureGitignoreEntry(testDir);
|
|
177
213
|
const gitignorePath = path.join(testDir, '.gitignore');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.gitignore.test.js","sourceRoot":"","sources":["../../../../../src/commands/__tests__/init.gitignore.test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;;GAIG;AACH,MAAM,yBAAyB,GAAG;IAChC,qBAAqB;IACrB,yBAAyB;IACzB,yBAAyB;IACzB,uBAAuB;IACvB,sBAAsB;IACtB,4BAA4B;IAC5B,qBAAqB;IACrB,+BAA+B;IAC/B,2BAA2B;IAC3B,iCAAiC;IACjC,iCAAiC;IACjC,8BAA8B;IAC9B,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,iBAAiB;IACjB,eAAe;
|
|
1
|
+
{"version":3,"file":"init.gitignore.test.js","sourceRoot":"","sources":["../../../../../src/commands/__tests__/init.gitignore.test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB;;;;GAIG;AACH,MAAM,yBAAyB,GAAG;IAChC,qBAAqB;IACrB,yBAAyB;IACzB,yBAAyB;IACzB,uBAAuB;IACvB,sBAAsB;IACtB,4BAA4B;IAC5B,qBAAqB;IACrB,+BAA+B;IAC/B,2BAA2B;IAC3B,iCAAiC;IACjC,gCAAgC;IAChC,iCAAiC;IACjC,8BAA8B;IAC9B,6BAA6B;IAC7B,gBAAgB;IAChB,qBAAqB;IACrB,oBAAoB;IACpB,mBAAmB;IACnB,eAAe;IACf,iBAAiB;IACjB,eAAe;IACf,gBAAgB;CACjB,CAAC;AAEF;;;GAGG;AACH,KAAK,UAAU,oBAAoB,CAAC,WAAmB;IACrD,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;IAC3D,IAAI,gBAAgB,GAAG,EAAE,CAAC;IAE1B,IAAI,CAAC;QACH,gBAAgB,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,qCAAqC;IACvC,CAAC;IA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C,CAAC,CAAC;QAEH,IAAI,CAAC,qDAAqD,EAAE,KAAK,IAAI,EAAE;YACrE,MAAM,oBAAoB,CAAC,OAAO,CAAC,CAAC;YAEpC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;YACvD,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YAEzD,6CAA6C;YAC7C,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;YAC7C,mDAAmD;YACnD,MAAM,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,mBAAmB,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -24,7 +24,9 @@ import { buildEditorApiRequest, callEditorApi, EDITOR_API_SUBCOMMANDS, } from ".
|
|
|
24
24
|
import { parseRegisterArg } from "../utils/parseRegisterArg.js";
|
|
25
25
|
import { classifyRegistrationResult } from "../utils/registerScenarioResult.js";
|
|
26
26
|
import { sanitizeGlossaryEntries } from "../utils/editorLoaderHelpers.js";
|
|
27
|
+
import { updateHandoffProgress } from "../utils/handoffContext.js";
|
|
27
28
|
import { readMigrationState, writeMigrationState, advanceToNextPage, completePage, getMigrationResumeInfo, } from "../utils/editorMigration.js";
|
|
29
|
+
import { getDisplayVersion } from "../utils/versionInfo.js";
|
|
28
30
|
const __filename = fileURLToPath(import.meta.url);
|
|
29
31
|
const __dirname = path.dirname(__filename);
|
|
30
32
|
const STEP_LABELS = {
|
|
@@ -387,11 +389,63 @@ function checkbox(text) {
|
|
|
387
389
|
const highlighted = text.replace(/`([^`]+)`/g, (_m, code) => chalk.cyan(code));
|
|
388
390
|
console.log(` ${chalk.dim('[ ]')} ${highlighted}`);
|
|
389
391
|
}
|
|
392
|
+
/**
|
|
393
|
+
* Print a checklist item for the handoff summary.
|
|
394
|
+
*/
|
|
395
|
+
function checkboxHandoff() {
|
|
396
|
+
checkbox('Update the handoff summary in `.codeyam/config.json` for the next session/AI: `codeyam editor handoff \'{"summary":"..."}\'`');
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Print the handoff context from a previous session or AI provider.
|
|
400
|
+
* Prefers the auto-generated handoff-context.md over the raw config summary.
|
|
401
|
+
*/
|
|
402
|
+
function printHandoffContext(root) {
|
|
403
|
+
try {
|
|
404
|
+
// Check for auto-generated handoff context (richer, includes progress timeline)
|
|
405
|
+
const handoffContextPath = path.join(root, '.codeyam', 'handoff-context.md');
|
|
406
|
+
if (fs.existsSync(handoffContextPath)) {
|
|
407
|
+
const content = fs.readFileSync(handoffContextPath, 'utf8');
|
|
408
|
+
console.log();
|
|
409
|
+
console.log(chalk.bold.magenta('━━━ PROVIDER HANDOFF CONTEXT ━━━'));
|
|
410
|
+
console.log(chalk.magenta(content));
|
|
411
|
+
console.log(chalk.bold.magenta('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
412
|
+
console.log();
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
// Fall back to config.json handoff summary
|
|
416
|
+
const configPath = path.join(root, '.codeyam', 'config.json');
|
|
417
|
+
if (!fs.existsSync(configPath))
|
|
418
|
+
return;
|
|
419
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
420
|
+
const handoff = config.handoff;
|
|
421
|
+
if (!handoff || !handoff.summary)
|
|
422
|
+
return;
|
|
423
|
+
console.log();
|
|
424
|
+
console.log(chalk.bold.magenta(`━━━ HANDOFF FROM ${String(handoff.lastProvider || 'unknown').toUpperCase()} (Step ${handoff.lastStep || 'unknown'}) ━━━`));
|
|
425
|
+
console.log(chalk.magenta(handoff.summary));
|
|
426
|
+
if (handoff.lastUpdated) {
|
|
427
|
+
console.log(chalk.dim(` Updated: ${handoff.lastUpdated}`));
|
|
428
|
+
}
|
|
429
|
+
console.log(chalk.bold.magenta('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'));
|
|
430
|
+
console.log();
|
|
431
|
+
}
|
|
432
|
+
catch {
|
|
433
|
+
// Non-fatal
|
|
434
|
+
}
|
|
435
|
+
}
|
|
390
436
|
/**
|
|
391
437
|
* Instructions for creating/updating .codeyam/data-structure.json.
|
|
392
438
|
* Only prints creation instructions if the file doesn't exist yet.
|
|
393
439
|
* If it exists, reminds Claude to update it if data models changed.
|
|
394
440
|
*/
|
|
441
|
+
function printServiceRecordingReminder(port) {
|
|
442
|
+
console.log(chalk.bold('Third-party services:'));
|
|
443
|
+
checkbox('When integrating any external service (auth, email, payments, storage, telemetry), update the tech stack');
|
|
444
|
+
console.log(chalk.dim(' Include the service name, URL, description, and envKeys (environment variable names it requires).'));
|
|
445
|
+
console.log(chalk.dim(` curl -s -X POST http://localhost:${port}/api/editor-project-info -H "Content-Type: application/json" \\`));
|
|
446
|
+
console.log(chalk.dim(` -d '{"techStack": {"services": [{"name":"Stripe","url":"https://stripe.com","description":"Payments","envKeys":["STRIPE_SECRET_KEY","STRIPE_PUBLISHABLE_KEY"]}]}}'`));
|
|
447
|
+
console.log(chalk.dim(' This ensures the deploy roadmap tracks all services that need production credentials.'));
|
|
448
|
+
}
|
|
395
449
|
function printDataStructureInstructions() {
|
|
396
450
|
const root = getProjectRoot();
|
|
397
451
|
const dsPath = path.join(root, '.codeyam', 'data-structure.json');
|
|
@@ -1188,6 +1242,8 @@ function printStep1(root, feature, options, userPrompt) {
|
|
|
1188
1242
|
console.log(chalk.yellow(' Option 2 label: "I\'d like some changes"') +
|
|
1189
1243
|
chalk.dim(' — user describes changes, you revise the plan, then re-present'));
|
|
1190
1244
|
console.log();
|
|
1245
|
+
checkboxHandoff();
|
|
1246
|
+
console.log();
|
|
1191
1247
|
console.log(chalk.dim('This step is for understanding user goals and getting buy-in. Code comes in Step 2.'));
|
|
1192
1248
|
console.log();
|
|
1193
1249
|
console.log(chalk.bold.red('━━━ STOP ━━━'));
|
|
@@ -1315,6 +1371,10 @@ function printStep2(root, feature) {
|
|
|
1315
1371
|
console.log();
|
|
1316
1372
|
printDataStructureInstructions();
|
|
1317
1373
|
}
|
|
1374
|
+
console.log();
|
|
1375
|
+
printServiceRecordingReminder(port);
|
|
1376
|
+
console.log();
|
|
1377
|
+
checkboxHandoff();
|
|
1318
1378
|
stopGate(2);
|
|
1319
1379
|
}
|
|
1320
1380
|
// ─── Step 3: Prototype ────────────────────────────────────────────────
|
|
@@ -1431,6 +1491,9 @@ function printStep3(root, feature) {
|
|
|
1431
1491
|
console.log(chalk.red.bold(' NEVER claim "you should see X" or "the preview shows X" unless you just ran a preview command.'));
|
|
1432
1492
|
console.log(chalk.red(' The preview only updates when you explicitly refresh it. Verify, then describe.'));
|
|
1433
1493
|
console.log();
|
|
1494
|
+
printServiceRecordingReminder(port);
|
|
1495
|
+
console.log();
|
|
1496
|
+
checkboxHandoff();
|
|
1434
1497
|
stopGate(3);
|
|
1435
1498
|
}
|
|
1436
1499
|
// ─── Step 4: Verify Prototype ─────────────────────────────────────────
|
|
@@ -1488,6 +1551,8 @@ function printStep4(root, feature) {
|
|
|
1488
1551
|
console.log(chalk.dim(' A new clone should work with just: git clone → npm run setup → npm run dev'));
|
|
1489
1552
|
console.log();
|
|
1490
1553
|
console.log(chalk.dim('Focus on building the prototype. Scenarios and refactoring happen in later steps.'));
|
|
1554
|
+
console.log();
|
|
1555
|
+
checkboxHandoff();
|
|
1491
1556
|
stopGate(4);
|
|
1492
1557
|
}
|
|
1493
1558
|
// ─── Step 5: Confirm ──────────────────────────────────────────────────
|
|
@@ -1551,6 +1616,8 @@ function printStep5(root, feature) {
|
|
|
1551
1616
|
chalk.dim(' — make changes, refresh preview, re-run `codeyam editor 5`'));
|
|
1552
1617
|
console.log();
|
|
1553
1618
|
console.log(chalk.dim('Wait for user approval before moving on. Refactoring and scenarios happen in later steps.'));
|
|
1619
|
+
console.log();
|
|
1620
|
+
checkboxHandoff();
|
|
1554
1621
|
stopGate(5, { confirm: true });
|
|
1555
1622
|
}
|
|
1556
1623
|
// ─── Step 6: Deconstruct ──────────────────────────────────────────────
|
|
@@ -1576,6 +1643,8 @@ function printStep6(root, feature) {
|
|
|
1576
1643
|
console.log(chalk.yellow('This step is read and plan only. Code extraction happens in step 7.'));
|
|
1577
1644
|
console.log();
|
|
1578
1645
|
printExtractionPlanInstructions();
|
|
1646
|
+
console.log();
|
|
1647
|
+
checkboxHandoff();
|
|
1579
1648
|
stopGate(6);
|
|
1580
1649
|
}
|
|
1581
1650
|
// ─── Step 7: Extract ──────────────────────────────────────────────────
|
|
@@ -1658,6 +1727,8 @@ function printStep7(root, feature) {
|
|
|
1658
1727
|
console.log(chalk.dim('Reuse glossary functions when they fit naturally. Extract a new function when the use case diverges.'));
|
|
1659
1728
|
console.log();
|
|
1660
1729
|
console.log(chalk.dim('Focus on TDD for functions and extraction for components. Scenarios come in later steps.'));
|
|
1730
|
+
console.log();
|
|
1731
|
+
checkboxHandoff();
|
|
1661
1732
|
stopGate(7);
|
|
1662
1733
|
}
|
|
1663
1734
|
// ─── Step 8: Glossary ─────────────────────────────────────────────────
|
|
@@ -1978,6 +2049,8 @@ function printStep14(root, feature) {
|
|
|
1978
2049
|
checkbox('Fix or remove any broken images before continuing');
|
|
1979
2050
|
checkbox('Recapture stale scenarios: `codeyam editor recapture-stale`');
|
|
1980
2051
|
checkbox('Run `codeyam editor audit` to verify completeness of scenarios and tests');
|
|
2052
|
+
checkbox('Verify tech stack is up to date: check for any new service imports (e.g. Stripe, Resend, Supabase) and ensure they appear in the tech stack with `envKeys`');
|
|
2053
|
+
console.log(chalk.dim(` Update via: curl -s -X POST http://localhost:${port}/api/editor-project-info -H "Content-Type: application/json" -d '{"techStack": {...}}'`));
|
|
1981
2054
|
checkbox('Do not proceed until all checks pass');
|
|
1982
2055
|
stopGate(14);
|
|
1983
2056
|
}
|
|
@@ -3346,6 +3419,50 @@ function formatApiSubcommandResult(subcommand, data) {
|
|
|
3346
3419
|
return null; // journal-list, show/hide-results: keep full JSON
|
|
3347
3420
|
}
|
|
3348
3421
|
}
|
|
3422
|
+
/**
|
|
3423
|
+
* `codeyam editor handoff '{"summary":"..."}'`
|
|
3424
|
+
*
|
|
3425
|
+
* Update the handoff summary in .codeyam/config.json for other AI providers.
|
|
3426
|
+
*/
|
|
3427
|
+
function handleHandoff(jsonArg) {
|
|
3428
|
+
if (!jsonArg) {
|
|
3429
|
+
console.error(chalk.red('Error: JSON argument required.'));
|
|
3430
|
+
console.error(chalk.dim(' Usage: codeyam editor handoff \'{"summary":"Built the X component..."}\''));
|
|
3431
|
+
process.exit(1);
|
|
3432
|
+
}
|
|
3433
|
+
let summary;
|
|
3434
|
+
try {
|
|
3435
|
+
const parsed = JSON.parse(jsonArg);
|
|
3436
|
+
summary = parsed.summary;
|
|
3437
|
+
}
|
|
3438
|
+
catch {
|
|
3439
|
+
console.error(chalk.red('Error: Invalid JSON.'));
|
|
3440
|
+
process.exit(1);
|
|
3441
|
+
}
|
|
3442
|
+
if (!summary) {
|
|
3443
|
+
console.error(chalk.red('Error: "summary" field is required.'));
|
|
3444
|
+
process.exit(1);
|
|
3445
|
+
}
|
|
3446
|
+
const root = getProjectRoot();
|
|
3447
|
+
const configPath = path.join(root, '.codeyam', 'config.json');
|
|
3448
|
+
try {
|
|
3449
|
+
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
3450
|
+
const state = readState(root);
|
|
3451
|
+
const provider = config.provider || 'claude';
|
|
3452
|
+
config.handoff = {
|
|
3453
|
+
summary,
|
|
3454
|
+
lastProvider: provider,
|
|
3455
|
+
lastStep: state?.step,
|
|
3456
|
+
lastUpdated: new Date().toISOString(),
|
|
3457
|
+
};
|
|
3458
|
+
fs.writeFileSync(configPath, JSON.stringify(config, null, 2), 'utf8');
|
|
3459
|
+
console.log(chalk.green('✓ Handoff summary updated in .codeyam/config.json'));
|
|
3460
|
+
}
|
|
3461
|
+
catch (err) {
|
|
3462
|
+
console.error(chalk.red(`Error: Could not update config.json: ${err.message}`));
|
|
3463
|
+
process.exit(1);
|
|
3464
|
+
}
|
|
3465
|
+
}
|
|
3349
3466
|
/**
|
|
3350
3467
|
* `codeyam editor register '{"name":"...","componentName":"...",...}'`
|
|
3351
3468
|
*
|
|
@@ -5504,6 +5621,11 @@ const editorCommand = {
|
|
|
5504
5621
|
}
|
|
5505
5622
|
return;
|
|
5506
5623
|
}
|
|
5624
|
+
// Subcommand: codeyam editor handoff '{"summary":"..."}'
|
|
5625
|
+
if (argv.step === 'handoff') {
|
|
5626
|
+
await handleHandoff(argv.json || '');
|
|
5627
|
+
return;
|
|
5628
|
+
}
|
|
5507
5629
|
// Subcommand: codeyam editor register '{"name":"..."}'
|
|
5508
5630
|
if (argv.step === 'register') {
|
|
5509
5631
|
await handleRegister(argv.json || '');
|
|
@@ -5686,10 +5808,18 @@ const editorCommand = {
|
|
|
5686
5808
|
try {
|
|
5687
5809
|
const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
|
|
5688
5810
|
const { projectSlug } = config;
|
|
5811
|
+
// Detect provider switch and inform the user
|
|
5812
|
+
const handoff = config.handoff;
|
|
5813
|
+
const currentProvider = config.provider || 'claude';
|
|
5814
|
+
if (handoff?.lastProvider && handoff.lastProvider !== currentProvider) {
|
|
5815
|
+
console.log(chalk.yellow(` Provider changed: ${handoff.lastProvider} → ${currentProvider}`));
|
|
5816
|
+
console.log(chalk.dim(' The editor will offer to continue with handoff context.'));
|
|
5817
|
+
}
|
|
5689
5818
|
if (!projectSlug) {
|
|
5690
5819
|
errorLog('Missing project slug. Try reinitializing with: `codeyam editor template`');
|
|
5691
5820
|
return;
|
|
5692
5821
|
}
|
|
5822
|
+
console.log(chalk.dim(` CodeYam Editor v${getDisplayVersion()}`));
|
|
5693
5823
|
const connectionOk = await withoutSpinner(() => testEnvironment());
|
|
5694
5824
|
if (!connectionOk) {
|
|
5695
5825
|
errorLog('Environment validation failed');
|
|
@@ -6101,6 +6231,9 @@ const editorCommand = {
|
|
|
6101
6231
|
process.exit(1);
|
|
6102
6232
|
}
|
|
6103
6233
|
}
|
|
6234
|
+
printHandoffContext(root);
|
|
6235
|
+
// Track step progress automatically for provider handoff
|
|
6236
|
+
updateHandoffProgress(root, step);
|
|
6104
6237
|
switch (step) {
|
|
6105
6238
|
case 1: {
|
|
6106
6239
|
const feature = argv.feature || undefined;
|