feat: updade workspace

This commit is contained in:
thanhnv
2026-07-11 15:56:31 +09:00
parent 4fc72332f5
commit 193a449829
120 changed files with 868 additions and 350 deletions
+9 -9
View File
@@ -387,11 +387,11 @@ let finalIssues = [];
const CHECKPOINT_SIDECAR = `docs/output/specs/${featureId}/plan.checkpoint.txid`;
const backendFiles = [
'backend/src/auth/auth.service.ts',
'backend/src/objectives/objectives.service.ts',
'backend/src/key-results/key-results.service.ts',
'backend/test/e2e.test.ts',
'backend/test/services.test.ts',
'apps/okr/backend/src/auth/auth.service.ts',
'apps/okr/backend/src/objectives/objectives.service.ts',
'apps/okr/backend/src/key-results/key-results.service.ts',
'apps/okr/backend/test/e2e.test.ts',
'apps/okr/backend/test/services.test.ts',
];
switch (step) {
@@ -464,7 +464,7 @@ switch (step) {
try { writeFileSync(CHECKPOINT_SIDECAR, txId, 'utf8'); } catch {}
}
}
const templateContent = `# Implementation Plan: OKR Web App\n\n## Stack\nNestJS, Prisma Client, SQLite, React, Vite, Tailwind, Zod, TanStack Query.\n\n## Backend Modules\n- auth: JWT login and cookie issuance.\n- users: admin/manager user list.\n- objectives: role-filtered list, detail, create.\n- key-results: detail, create, progress update.\n\n## Tests\n- Backend service tests.\n- Backend HTTP e2e tests.\n${incomplete ? '- TODO: define golden regression and rollback strategy.\n' : '- Golden regression test compares seeded manager objectives with backend/test/golden/objectives.manager.json.\n- Rollback strategy restores changed artifacts from backups through rollback-manager.sh.\n'}\n## Build\nRun npm test and npm run build for backend and frontend.\n`;
const templateContent = `# Implementation Plan: OKR Web App\n\n## Stack\nNestJS, Prisma Client, SQLite, React, Vite, Tailwind, Zod, TanStack Query.\n\n## Backend Modules\n- auth: JWT login and cookie issuance.\n- users: admin/manager user list.\n- objectives: role-filtered list, detail, create.\n- key-results: detail, create, progress update.\n\n## Tests\n- Backend service tests.\n- Backend HTTP e2e tests.\n${incomplete ? '- TODO: define golden regression and rollback strategy.\n' : '- Golden regression test compares seeded manager objectives with apps/okr/backend/test/golden/objectives.manager.json.\n- Rollback strategy restores changed artifacts from backups through rollback-manager.sh.\n'}\n## Build\nRun npm test and npm run build for backend and frontend.\n`;
const generated = generateArtifact({
stepId: '05-plan',
title: 'Implementation Plan',
@@ -566,7 +566,7 @@ switch (step) {
break;
}
case '10-implement': {
const templateContent = `# Implementation Draft: OKR Web App\n\n## Scope\nThe OKR implementation is represented by the existing backend and frontend source files. This step records the implementation candidate that must be accepted only after STEP12 run-tests passes.\n\n## Backend Source\n- backend/src/auth/auth.service.ts\n- backend/src/objectives/objectives.service.ts\n- backend/src/key-results/key-results.service.ts\n- backend/test/services.test.ts\n- backend/test/e2e.test.ts\n\n## Frontend Source\n- frontend/src/lib/api.ts\n- frontend/src/pages/DashboardPage.tsx\n- frontend/src/pages/ObjectiveDetailPage.tsx\n\n## Acceptance Gate\nThis draft is not accepted until STEP12 writes ${implementationAcceptancePath} after the real test command exits 0.\n`;
const templateContent = `# Implementation Draft: OKR Web App\n\n## Scope\nThe OKR implementation is represented by the existing backend and frontend source files. This step records the implementation candidate that must be accepted only after STEP12 run-tests passes.\n\n## Backend Source\n- apps/okr/backend/src/auth/auth.service.ts\n- apps/okr/backend/src/objectives/objectives.service.ts\n- apps/okr/backend/src/key-results/key-results.service.ts\n- apps/okr/backend/test/services.test.ts\n- apps/okr/backend/test/e2e.test.ts\n\n## Frontend Source\n- apps/okr/frontend/src/lib/api.ts\n- apps/okr/frontend/src/pages/DashboardPage.tsx\n- apps/okr/frontend/src/pages/ObjectiveDetailPage.tsx\n\n## Acceptance Gate\nThis draft is not accepted until STEP12 writes ${implementationAcceptancePath} after the real test command exits 0.\n`;
const generated = generateArtifact({
stepId: '10-implement',
title: 'Implementation Draft',
@@ -612,9 +612,9 @@ switch (step) {
report(
codeReviewPath,
'# STEP 10: Code Review Report',
`Reviewed ${backendFiles.length} backend/test files. DB data usage verification: Prisma Client used, frontend API client used, seed data exists, no static endpoint data found. ${judgeNote}.`,
`Reviewed ${backendFiles.length} apps/okr/backend/test files. DB data usage verification: Prisma Client used, frontend API client used, seed data exists, no static endpoint data found. ${judgeNote}.`,
verdict,
[...backendFiles, 'frontend/src/lib/api.ts', 'backend/prisma/seed.ts'],
[...backendFiles, 'apps/okr/frontend/src/lib/api.ts', 'apps/okr/backend/prisma/seed.ts'],
issues,
);
break;