diff --git a/project/TICKETS.md b/project/TICKETS.md index 23a289b..1b8d008 100644 --- a/project/TICKETS.md +++ b/project/TICKETS.md @@ -84,4 +84,5 @@ of `project/README.md`, which remains a generated technical-analysis artifact. | **ticket-104** | [`README.md`](./ticket-104/README.md) | - | - | - | - | - | | **ticket-105** | [`README.md`](./ticket-105/README.md) | - | - | - | - | - | | **ticket-106** | [`README.md`](./ticket-106/README.md) | - | - | - | - | - | +| **ticket-108** | [`README.md`](./ticket-108/README.md) | - | - | - | - | - | diff --git a/project/ticket-110/README.md b/project/ticket-110/README.md new file mode 100644 index 0000000..9c3ced1 --- /dev/null +++ b/project/ticket-110/README.md @@ -0,0 +1,29 @@ +# Ticket 110: Persist and expose base/workspace diagnostics in compare-workspace artifacts (#137) + +- **ID**: ticket-110 +- **Owner**: agent:claude +- **Status**: IN_PROGRESS +- **Workflow state**: EDIT +- **Created**: 2026-10-19 + +## Goal and scope + +Closes autogrammar/todo2code#137. `compare-workspace` already reads both runs' +diagnostics; it now writes them as `base.diagnostics.json` and +`workspace.diagnostics.json` next to the graphs and lists them as +`artifacts.baseDiagnostics` / `artifacts.workspaceDiagnostics` (additive). +Consumers such as the subactor/platform intent gate can stop re-compacting and +re-diagnosing two 207 MB graphs (subactor/platform#655). + +Implementation drafted by Willman (koru.develop_ticket, glm-5.3) and corrected in +review: the paths go through `artifactPaths` so separators stay normalized. + +## Acceptance criteria + +- [x] AC-01: Both diagnostics files exist after a comparison and are listed in `artifacts` + (`node --test dist/test/workspace.test.js dist/test/cli-compare-workspace.test.js`: 6 pass). + +## Tracking boundary + +This directory contains the minimal reviewed intent. Optional participant prose +and raw command logs are not required delivery output. diff --git a/project/ticket-110/intent.json b/project/ticket-110/intent.json new file mode 100644 index 0000000..9572ed6 --- /dev/null +++ b/project/ticket-110/intent.json @@ -0,0 +1,78 @@ +{ + "schema": "new-project.intent/v3", + "ticket": "ticket-110", + "summary": "Persist and expose base/workspace diagnostics in compare-workspace artifacts (#137)", + "workstream": "core-dsl", + "classification": { + "kind": "SERVICE", + "priority": "P2", + "origin": "health" + }, + "allowedPaths": [ + "project/ticket-110/**", + "TODO.md", + "project/TICKETS.md", + "src/comparison/workspace.ts", + "test/workspace.test.ts", + "src/comparison/workspace-trend.ts" + ], + "forbiddenPaths": [ + "project/ticket-*/user-*.md" + ], + "stacks": [], + "dependsOn": [], + "conflictsWith": [], + "integrationTicket": null, + "delivery": { + "acceptedBaseSha": "a85da84e72c6c3fc7d2ea1c8b6eaf790f972a63f", + "targetBranch": "main", + "outcome": "compare-workspace persists and exposes base/workspace diagnostics artifacts.", + "nonGoals": [ + "No change to diagnostics content, graphs or existing artifact keys." + ], + "complexity": "S", + "estimatedMinutes": 30, + "budgets": { + "maxImplementationFiles": 3, + "maxAffectedComponents": 1, + "maxPublicInterfaceChanges": 1, + "maxRuntimeDependencies": 0 + }, + "architecture": { + "status": "accepted", + "decision": "Write the already-loaded diagnostics next to the graphs and add two additive artifact keys via artifactPaths.", + "components": [ + { + "name": "comparison", + "paths": [ + "src/comparison/workspace.ts", + "src/comparison/workspace-trend.ts", + "test/workspace.test.ts" + ] + } + ], + "responsibilityChanges": false, + "interfaceChanges": [ + "t2c.workspace-comparison/v1 artifacts: + baseDiagnostics, + workspaceDiagnostics (additive)" + ], + "dataChanges": [], + "ui": { + "impact": "none", + "states": [], + "evidence": [] + }, + "rollback": "Revert the commit; consumers fall back to recomputing diagnostics." + }, + "runtimeDependencies": [], + "validation": [ + { + "criterion": "AC-01", + "commands": [ + "npm run build", + "T2C_USE_SUBLLM=false node --test dist/test/workspace.test.js dist/test/cli-compare-workspace.test.js" + ], + "evidence": "project/ticket-110/README.md" + } + ] + } +} diff --git a/src/comparison/workspace-trend.ts b/src/comparison/workspace-trend.ts index e527956..d369556 100644 --- a/src/comparison/workspace-trend.ts +++ b/src/comparison/workspace-trend.ts @@ -27,6 +27,8 @@ export function artifactPaths(root: string, directory: string): Record(path.join(root, comparison.artifacts.baseDiagnostics ?? '')); + const workspaceDiagnosticsFile = await readJson<{ schemaVersion: string; diagnostics: unknown[] }>(path.join(root, comparison.artifacts.workspaceDiagnostics ?? '')); + assert.ok(Array.isArray(baseDiagnosticsFile.diagnostics)); + assert.ok(Array.isArray(workspaceDiagnosticsFile.diagnostics)); const trendMarkdown = await fs.readFile(path.join(root, comparison.artifacts.trendMarkdown ?? ''), 'utf8'); assert.match(trendMarkdown, /Code with documentation: not measured/); const baseManifest = await readJson(path.join(root, comparison.artifacts.baseManifest ?? ''));