@seanmars/tospec 0.13.0 → 0.14.0
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 +233 -0
- package/README.md +20 -7
- package/assets/dashboard/app.js +6 -0
- package/assets/dashboard/style.css +34 -2
- package/dist/cli/index.js +1 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +21 -7
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +8 -4
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/validate.d.ts.map +1 -1
- package/dist/commands/validate.js +44 -3
- package/dist/commands/validate.js.map +1 -1
- package/dist/commands/workflow/instructions.d.ts.map +1 -1
- package/dist/commands/workflow/instructions.js +1 -1
- package/dist/commands/workflow/instructions.js.map +1 -1
- package/dist/core/archive.d.ts +3 -3
- package/dist/core/archive.d.ts.map +1 -1
- package/dist/core/archive.js +41 -14
- package/dist/core/archive.js.map +1 -1
- package/dist/core/artifact-graph/instruction-loader.d.ts.map +1 -1
- package/dist/core/artifact-graph/instruction-loader.js +7 -4
- package/dist/core/artifact-graph/instruction-loader.js.map +1 -1
- package/dist/core/artifact-graph/resolver.d.ts +21 -1
- package/dist/core/artifact-graph/resolver.d.ts.map +1 -1
- package/dist/core/artifact-graph/resolver.js +35 -3
- package/dist/core/artifact-graph/resolver.js.map +1 -1
- package/dist/core/artifact-graph/schema.d.ts.map +1 -1
- package/dist/core/artifact-graph/schema.js +22 -0
- package/dist/core/artifact-graph/schema.js.map +1 -1
- package/dist/core/change-metadata/schema.d.ts +1 -0
- package/dist/core/change-metadata/schema.d.ts.map +1 -1
- package/dist/core/change-metadata/schema.js +7 -0
- package/dist/core/change-metadata/schema.js.map +1 -1
- package/dist/core/change-presenter.js +1 -1
- package/dist/core/change-presenter.js.map +1 -1
- package/dist/core/dashboard-data.d.ts +15 -9
- package/dist/core/dashboard-data.d.ts.map +1 -1
- package/dist/core/dashboard-data.js +20 -12
- package/dist/core/dashboard-data.js.map +1 -1
- package/dist/core/global-config.d.ts +59 -16
- package/dist/core/global-config.d.ts.map +1 -1
- package/dist/core/global-config.js +99 -41
- package/dist/core/global-config.js.map +1 -1
- package/dist/core/init.d.ts.map +1 -1
- package/dist/core/init.js +5 -1
- package/dist/core/init.js.map +1 -1
- package/dist/core/project-config.d.ts +12 -7
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +13 -8
- package/dist/core/project-config.js.map +1 -1
- package/dist/core/shared/skill-generation.d.ts +4 -4
- package/dist/core/shared/skill-generation.d.ts.map +1 -1
- package/dist/core/shared/skill-generation.js +2 -2
- package/dist/core/shared/skill-generation.js.map +1 -1
- package/dist/core/shared/tool-detection.d.ts +9 -3
- package/dist/core/shared/tool-detection.d.ts.map +1 -1
- package/dist/core/shared/tool-detection.js +9 -3
- package/dist/core/shared/tool-detection.js.map +1 -1
- package/dist/core/templates/skill-templates.d.ts +1 -1
- package/dist/core/templates/skill-templates.d.ts.map +1 -1
- package/dist/core/templates/skill-templates.js +1 -1
- package/dist/core/templates/skill-templates.js.map +1 -1
- package/dist/core/templates/workflows/archive.d.ts.map +1 -1
- package/dist/core/templates/workflows/archive.js +36 -22
- package/dist/core/templates/workflows/archive.js.map +1 -1
- package/dist/core/templates/workflows/propose.js +2 -2
- package/dist/core/templates/workflows/sync.d.ts +15 -0
- package/dist/core/templates/workflows/sync.d.ts.map +1 -0
- package/dist/core/templates/workflows/sync.js +104 -0
- package/dist/core/templates/workflows/sync.js.map +1 -0
- package/dist/core/templates/workflows/update.js +1 -1
- package/dist/core/update.d.ts.map +1 -1
- package/dist/core/update.js +4 -0
- package/dist/core/update.js.map +1 -1
- package/dist/core/user-state-migration.d.ts +58 -0
- package/dist/core/user-state-migration.d.ts.map +1 -0
- package/dist/core/user-state-migration.js +107 -0
- package/dist/core/user-state-migration.js.map +1 -0
- package/dist/core/validation/validator.d.ts +0 -7
- package/dist/core/validation/validator.d.ts.map +1 -1
- package/dist/core/validation/validator.js +50 -41
- package/dist/core/validation/validator.js.map +1 -1
- package/dist/utils/change-metadata.d.ts +18 -0
- package/dist/utils/change-metadata.d.ts.map +1 -1
- package/dist/utils/change-metadata.js +39 -0
- package/dist/utils/change-metadata.js.map +1 -1
- package/dist/utils/spec-files.d.ts +19 -0
- package/dist/utils/spec-files.d.ts.map +1 -0
- package/dist/utils/spec-files.js +44 -0
- package/dist/utils/spec-files.js.map +1 -0
- package/package.json +11 -2
- package/schemas/issue/schema.yaml +6 -3
- package/schemas/sdd/schema.yaml +15 -2
- package/dist/core/templates/workflows/reconcile.d.ts +0 -14
- package/dist/core/templates/workflows/reconcile.d.ts.map +0 -1
- package/dist/core/templates/workflows/reconcile.js +0 -94
- package/dist/core/templates/workflows/reconcile.js.map +0 -1
|
@@ -160,22 +160,27 @@ function configPathForWarnings(projectRoot) {
|
|
|
160
160
|
return resolveConfigFilePath(projectRoot) ?? path.join(projectRoot, 'tospec', 'config.yaml');
|
|
161
161
|
}
|
|
162
162
|
/**
|
|
163
|
-
* Validate artifact IDs in rules against
|
|
164
|
-
*
|
|
165
|
-
*
|
|
163
|
+
* Validate artifact IDs in rules against the artifacts of every available
|
|
164
|
+
* schema, not just the one the current change happens to use.
|
|
165
|
+
*
|
|
166
|
+
* `rules:` is a single global map, but a change is always loaded under exactly
|
|
167
|
+
* one schema. Checking the global map against one schema's artifacts made any
|
|
168
|
+
* project that configures rules for two schemas (say `proposal` for sdd and
|
|
169
|
+
* `task` for issue) emit a false warning on every command run under the other —
|
|
170
|
+
* a warning that named a real, correctly-spelled artifact as unknown.
|
|
166
171
|
*
|
|
167
172
|
* @param rules - The rules object from config
|
|
168
|
-
* @param validArtifactIds -
|
|
169
|
-
*
|
|
170
|
-
* @returns Array of warning messages for
|
|
173
|
+
* @param validArtifactIds - Union of artifact IDs across all available schemas
|
|
174
|
+
* (see collectAllArtifactIds)
|
|
175
|
+
* @returns Array of warning messages for artifact IDs that match no schema
|
|
171
176
|
*/
|
|
172
|
-
export function validateConfigRules(rules, validArtifactIds
|
|
177
|
+
export function validateConfigRules(rules, validArtifactIds) {
|
|
173
178
|
const warnings = [];
|
|
174
179
|
for (const artifactId of Object.keys(rules)) {
|
|
175
180
|
if (!validArtifactIds.has(artifactId)) {
|
|
176
181
|
const validIds = Array.from(validArtifactIds).sort().join(', ');
|
|
177
182
|
warnings.push(`Unknown artifact ID in rules: "${artifactId}". ` +
|
|
178
|
-
`Valid IDs
|
|
183
|
+
`Valid IDs across all available schemas: ${validIds}`);
|
|
179
184
|
}
|
|
180
185
|
}
|
|
181
186
|
return warnings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-config.js","sourceRoot":"","sources":["../../src/core/project-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAC9C,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,4EAA4E;IAC5E,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,0CAA0C,CAAC;IAEvD,sEAAsE;IACtE,2CAA2C;IAC3C,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,yDAAyD,CAAC;IAEtE,wEAAwE;IACxE,KAAK,EAAE,CAAC;SACL,MAAM,CACL,CAAC,CAAC,MAAM,EAAE,EAAE,cAAc;IAC1B,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,gBAAgB;KACrC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IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared utilities for generating skill and command files.
|
|
5
5
|
*/
|
|
6
|
-
import { getExploreSkillTemplate, getGrillSkillTemplate, getTospecProposeSkillTemplate, getTospecIssueSkillTemplate, getTospecDecisionSkillTemplate, getTospecUpdateSkillTemplate, getTospecApplySkillTemplate, getTospecApplyWithTDDSkillTemplate,
|
|
6
|
+
import { getExploreSkillTemplate, getGrillSkillTemplate, getTospecProposeSkillTemplate, getTospecIssueSkillTemplate, getTospecDecisionSkillTemplate, getTospecUpdateSkillTemplate, getTospecApplySkillTemplate, getTospecApplyWithTDDSkillTemplate, getTospecSyncSkillTemplate, getTospecArchiveSkillTemplate, getTospecExploreCommandTemplate, getTospecGrillCommandTemplate, getTospecProposeCommandTemplate, getTospecIssueCommandTemplate, getTospecDecisionCommandTemplate, getTospecUpdateCommandTemplate, getTospecApplyCommandTemplate, getTospecApplyWithTDDCommandTemplate, getTospecSyncCommandTemplate, getTospecArchiveCommandTemplate, type SkillTemplate } from '../templates/skill-templates.js';
|
|
7
7
|
import { type CommandContent } from '../command-generation/index.js';
|
|
8
8
|
declare const WORKFLOW_DEFS: readonly [{
|
|
9
9
|
readonly id: "explore";
|
|
@@ -38,9 +38,9 @@ declare const WORKFLOW_DEFS: readonly [{
|
|
|
38
38
|
readonly skill: typeof getTospecApplyWithTDDSkillTemplate;
|
|
39
39
|
readonly command: typeof getTospecApplyWithTDDCommandTemplate;
|
|
40
40
|
}, {
|
|
41
|
-
readonly id: "
|
|
42
|
-
readonly skill: typeof
|
|
43
|
-
readonly command: typeof
|
|
41
|
+
readonly id: "sync";
|
|
42
|
+
readonly skill: typeof getTospecSyncSkillTemplate;
|
|
43
|
+
readonly command: typeof getTospecSyncCommandTemplate;
|
|
44
44
|
}, {
|
|
45
45
|
readonly id: "archive";
|
|
46
46
|
readonly skill: typeof getTospecArchiveSkillTemplate;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-generation.d.ts","sourceRoot":"","sources":["../../../src/core/shared/skill-generation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,EAC3B,kCAAkC,EAClC
|
|
1
|
+
{"version":3,"file":"skill-generation.d.ts","sourceRoot":"","sources":["../../../src/core/shared/skill-generation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B,4BAA4B,EAC5B,2BAA2B,EAC3B,kCAAkC,EAClC,0BAA0B,EAC1B,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,+BAA+B,EAC/B,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,6BAA6B,EAC7B,oCAAoC,EACpC,4BAA4B,EAC5B,+BAA+B,EAC/B,KAAK,aAAa,EACnB,MAAM,iCAAiC,CAAC;AAIzC,OAAO,EACL,KAAK,cAAc,EAGpB,MAAM,gCAAgC,CAAC;AASxC,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWT,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC;AAE9D,eAAO,MAAM,aAAa,EAAE,SAAS,UAAU,EAAmC,CAAC;AAEnF,4DAA4D;AAC5D,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAAC;IAC7D,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,kBAAkB,EAAE,CAO1F;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,oBAAoB,EAAE,CAM9F;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,cAAc,EAAE,CAUvF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,aAAa,EACvB,kBAAkB,EAAE,MAAM,EAC1B,qBAAqB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,MAAM,GACvD,MAAM,CAyBR;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,aAAa,EACvB,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,IAAI,CAAC,CASf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,GACjC,OAAO,CAAC,IAAI,CAAC,CAiBf"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared utilities for generating skill and command files.
|
|
5
5
|
*/
|
|
6
|
-
import { getExploreSkillTemplate, getGrillSkillTemplate, getTospecProposeSkillTemplate, getTospecIssueSkillTemplate, getTospecDecisionSkillTemplate, getTospecUpdateSkillTemplate, getTospecApplySkillTemplate, getTospecApplyWithTDDSkillTemplate,
|
|
6
|
+
import { getExploreSkillTemplate, getGrillSkillTemplate, getTospecProposeSkillTemplate, getTospecIssueSkillTemplate, getTospecDecisionSkillTemplate, getTospecUpdateSkillTemplate, getTospecApplySkillTemplate, getTospecApplyWithTDDSkillTemplate, getTospecSyncSkillTemplate, getTospecArchiveSkillTemplate, getTospecExploreCommandTemplate, getTospecGrillCommandTemplate, getTospecProposeCommandTemplate, getTospecIssueCommandTemplate, getTospecDecisionCommandTemplate, getTospecUpdateCommandTemplate, getTospecApplyCommandTemplate, getTospecApplyWithTDDCommandTemplate, getTospecSyncCommandTemplate, getTospecArchiveCommandTemplate, } from '../templates/skill-templates.js';
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { promises as fs } from 'fs';
|
|
9
9
|
import { FileSystemUtils } from '../../utils/file-system.js';
|
|
@@ -23,7 +23,7 @@ const WORKFLOW_DEFS = [
|
|
|
23
23
|
{ id: 'update', skill: getTospecUpdateSkillTemplate, command: getTospecUpdateCommandTemplate },
|
|
24
24
|
{ id: 'apply', skill: getTospecApplySkillTemplate, command: getTospecApplyCommandTemplate },
|
|
25
25
|
{ id: 'apply-with-tdd', skill: getTospecApplyWithTDDSkillTemplate, command: getTospecApplyWithTDDCommandTemplate },
|
|
26
|
-
{ id: '
|
|
26
|
+
{ id: 'sync', skill: getTospecSyncSkillTemplate, command: getTospecSyncCommandTemplate },
|
|
27
27
|
{ id: 'archive', skill: getTospecArchiveSkillTemplate, command: getTospecArchiveCommandTemplate },
|
|
28
28
|
];
|
|
29
29
|
export const ALL_WORKFLOWS = WORKFLOW_DEFS.map((w) => w.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-generation.js","sourceRoot":"","sources":["../../../src/core/shared/skill-generation.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,6BAA6B,EAC7B,2BAA2B,EAC3B,8BAA8B,EAC9B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;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CACrC,WAAmB,EACnB,SAAiB,EACjB,cAAkC;IAElC,wEAAwE;IACxE,MAAM,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO;QAAE,OAAO;IAErB,6EAA6E;IAC7E,0EAA0E;IAC1E,uCAAuC;IACvC,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnE,IAAI,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,KAAK,UAAU,EAAE,CAAC;QACjD,MAAM,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACxF,CAAC;IAED,MAAM,QAAQ,GAAG,gBAAgB,CAAC,kBAAkB,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC;IAC/E,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAC/B,MAAM,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IAC7F,CAAC;AACH,CAAC"}
|
|
@@ -12,10 +12,16 @@ export declare const SKILL_NAMES: readonly string[];
|
|
|
12
12
|
/**
|
|
13
13
|
* Canonical skill directory names tospec used to create but no longer does.
|
|
14
14
|
* Cleaned up on init/update so an upgrade leaves no orphan dirs behind in
|
|
15
|
-
* `.agents/skills/`. verify was folded into apply;
|
|
16
|
-
*
|
|
15
|
+
* `.agents/skills/`. verify was folded into apply; reconcile was renamed back
|
|
16
|
+
* to sync, so its dir must go rather than sit beside the new one.
|
|
17
|
+
*
|
|
18
|
+
* A name generated by WORKFLOW_DEFS must never appear here: removeLegacySkillDirs
|
|
19
|
+
* runs on every init/update, so an overlap would delete the skill the same run
|
|
20
|
+
* just wrote — silently, surfacing later as a missing skill rather than an error.
|
|
21
|
+
* That is why `tospec-sync` came out of this list when the reconcile rename was
|
|
22
|
+
* reverted, instead of `tospec-reconcile` simply being appended.
|
|
17
23
|
*/
|
|
18
|
-
export declare const LEGACY_SKILL_DIRS: readonly ["tospec-verify", "tospec-
|
|
24
|
+
export declare const LEGACY_SKILL_DIRS: readonly ["tospec-verify", "tospec-reconcile"];
|
|
19
25
|
/**
|
|
20
26
|
* Status of skill configuration for a tool.
|
|
21
27
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-detection.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA4C,CAAC;AAEtF
|
|
1
|
+
{"version":3,"file":"tool-detection.d.ts","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,SAAS,MAAM,EAA4C,CAAC;AAEtF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,iBAAiB,gDAAiD,CAAC;AAEhF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,wCAAwC;IACxC,eAAe,EAAE,OAAO,CAAC;IACzB,4CAA4C;IAC5C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,iDAAiD;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,6EAA6E;IAC7E,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,oEAAoE;IACpE,WAAW,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAc9E;AAED;;;;;;;;;GASG;AACH,wBAAsB,2BAA2B,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBtF;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAEhD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,eAAe,CAqBvF;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,CAS/E;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA2B9E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,GACrB,iBAAiB,CAkCnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAIhE"}
|
|
@@ -16,10 +16,16 @@ export const SKILL_NAMES = ALL_WORKFLOWS.map(workflowSkillDirName);
|
|
|
16
16
|
/**
|
|
17
17
|
* Canonical skill directory names tospec used to create but no longer does.
|
|
18
18
|
* Cleaned up on init/update so an upgrade leaves no orphan dirs behind in
|
|
19
|
-
* `.agents/skills/`. verify was folded into apply;
|
|
20
|
-
*
|
|
19
|
+
* `.agents/skills/`. verify was folded into apply; reconcile was renamed back
|
|
20
|
+
* to sync, so its dir must go rather than sit beside the new one.
|
|
21
|
+
*
|
|
22
|
+
* A name generated by WORKFLOW_DEFS must never appear here: removeLegacySkillDirs
|
|
23
|
+
* runs on every init/update, so an overlap would delete the skill the same run
|
|
24
|
+
* just wrote — silently, surfacing later as a missing skill rather than an error.
|
|
25
|
+
* That is why `tospec-sync` came out of this list when the reconcile rename was
|
|
26
|
+
* reverted, instead of `tospec-reconcile` simply being appended.
|
|
21
27
|
*/
|
|
22
|
-
export const LEGACY_SKILL_DIRS = ['tospec-verify', 'tospec-
|
|
28
|
+
export const LEGACY_SKILL_DIRS = ['tospec-verify', 'tospec-reconcile'];
|
|
23
29
|
/**
|
|
24
30
|
* Removes any legacy skill directories (see LEGACY_SKILL_DIRS) from the given
|
|
25
31
|
* skills directory. Idempotent — safe to call when they don't exist. Used by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-detection.js","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAsB,aAAa,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAEtF
|
|
1
|
+
{"version":3,"file":"tool-detection.js","sourceRoot":"","sources":["../../../src/core/shared/tool-detection.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,WAAW,GAAsB,aAAa,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;AAEtF;;;;;;;;;;;G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AAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACzB,CAAC"}
|
|
@@ -11,6 +11,6 @@ export { getTospecIssueSkillTemplate, getTospecIssueCommandTemplate } from './wo
|
|
|
11
11
|
export { getTospecDecisionSkillTemplate, getTospecDecisionCommandTemplate } from './workflows/decision.js';
|
|
12
12
|
export { getTospecUpdateSkillTemplate, getTospecUpdateCommandTemplate } from './workflows/update.js';
|
|
13
13
|
export { getTospecApplySkillTemplate, getTospecApplyCommandTemplate, getTospecApplyWithTDDSkillTemplate, getTospecApplyWithTDDCommandTemplate, } from './workflows/apply.js';
|
|
14
|
-
export {
|
|
14
|
+
export { getTospecSyncSkillTemplate, getTospecSyncCommandTemplate } from './workflows/sync.js';
|
|
15
15
|
export { getTospecArchiveSkillTemplate, getTospecArchiveCommandTemplate } from './workflows/archive.js';
|
|
16
16
|
//# sourceMappingURL=skill-templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/skill-templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"skill-templates.d.ts","sourceRoot":"","sources":["../../../src/core/templates/skill-templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEjE,OAAO,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -10,6 +10,6 @@ export { getTospecIssueSkillTemplate, getTospecIssueCommandTemplate } from './wo
|
|
|
10
10
|
export { getTospecDecisionSkillTemplate, getTospecDecisionCommandTemplate } from './workflows/decision.js';
|
|
11
11
|
export { getTospecUpdateSkillTemplate, getTospecUpdateCommandTemplate } from './workflows/update.js';
|
|
12
12
|
export { getTospecApplySkillTemplate, getTospecApplyCommandTemplate, getTospecApplyWithTDDSkillTemplate, getTospecApplyWithTDDCommandTemplate, } from './workflows/apply.js';
|
|
13
|
-
export {
|
|
13
|
+
export { getTospecSyncSkillTemplate, getTospecSyncCommandTemplate } from './workflows/sync.js';
|
|
14
14
|
export { getTospecArchiveSkillTemplate, getTospecArchiveCommandTemplate } from './workflows/archive.js';
|
|
15
15
|
//# sourceMappingURL=skill-templates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-templates.js","sourceRoot":"","sources":["../../../src/core/templates/skill-templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE
|
|
1
|
+
{"version":3,"file":"skill-templates.js","sourceRoot":"","sources":["../../../src/core/templates/skill-templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,uBAAuB,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAClG,OAAO,EAAE,8BAA8B,EAAE,gCAAgC,EAAE,MAAM,yBAAyB,CAAC;AAC3G,OAAO,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AACrG,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,kCAAkC,EAClC,oCAAoC,GACrC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AAC/F,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"archive.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA2DlE,wBAAgB,6BAA6B,IAAI,aAAa,CAc7D;AAED,wBAAgB,+BAA+B,IAAI,eAAe,CAYjE"}
|
|
@@ -1,50 +1,64 @@
|
|
|
1
|
-
const ARCHIVE_BODY = `**Finishing a change:
|
|
1
|
+
const ARCHIVE_BODY = `**Finishing a change: sync, then archive — in that order.** Do not run \`tospec archive\` speculatively "to see what happens"; each step below must actually hold first.
|
|
2
2
|
|
|
3
|
-
**Step 1 —
|
|
3
|
+
**Step 1 — run the sync, don't ask about it**
|
|
4
4
|
|
|
5
|
-
Archive merges the change's delta specs into \`tospec/specs
|
|
5
|
+
Archive merges the change's delta specs into \`tospec/specs/\` permanently, so if those specs have drifted from what the code actually does, archiving locks in a description that no longer matches reality. Decide **proactively** whether that risk applies here:
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- **Reconcile is not needed** when there are no delta specs at all (e.g. a purely cosmetic issue fix with no behavior change). In that case skip straight to Step 2 and archive directly — don't ask a pointless question.
|
|
7
|
+
Take these in order; the first that matches wins.
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
1. **The user explicitly asked to skip it** ("archive without syncing", "just archive") — honor that. Skip the sync and archive **without** \`--require-sync\` (Step 2, not-synced branch). This is checked first on purpose: an explicit instruction outranks the default, and what was removed is the unsolicited question, not the user's authority.
|
|
10
|
+
2. **No delta specs at all** (e.g. a purely cosmetic issue fix with no behavior change) — there is no spec-vs-code drift to find. Skip straight to Step 2 and archive directly. Under a schema that requires deltas (sdd), such a change also needs \`skip_specs: true\` in its \`.tospec.yaml\` or validation will refuse it — set that once, and only when the change truly has no externally observable effect. Never write a delta spec just to get past the gate.
|
|
11
|
+
3. **Otherwise the change produced delta specs** (a non-empty \`specs/<capability>/spec.md\` under the change dir), so behavior was added or changed and drift is possible. Run the \`tospec-sync\` workflow now, without asking. There is no question to put: declining would mean knowingly publishing a spec that may not describe the code, so a prompt here spends the user's attention without buying a decision.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
Running it unannounced is safe because of how \`tospec-sync\` is ordered: it judges every Requirement before writing anything, so a defect surfaces while the working tree is still untouched.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
**Step 1a — read the sync's verdict and branch**
|
|
16
|
+
|
|
17
|
+
- **Every Requirement MATCH, or SPEC-UPDATED** (the spec was stale, sync corrected it to match the code and re-validated) → continue to Step 2, synced branch. **Ask nothing** — a corrected spec is the workflow working as intended, not a decision point.
|
|
18
|
+
- **Any CODE-BUG** (the implementation doesn't do what a Requirement describes, or was never built) → \`sync-report.md\` says \`Conclusion: FAIL\` and **no spec file was written**. This is the one place archive stops. **Ask the user exactly once:**
|
|
19
|
+
|
|
20
|
+
> "Sync found <N> Requirement(s) the code doesn't satisfy: <names>. Fix them now, or leave it for later?"
|
|
21
|
+
|
|
22
|
+
- **Fix now** → hand off to \`tospec-apply\` for the fix. Archive does not edit source itself. On return, resume \`tospec-sync\` **at step 4** with the verdicts it already produced — do not re-run steps 1-3. Concretely: re-judge **only the Requirements that were reported as defects** (not the whole set, and not the ones already judged MATCH), and once none of them is still a CODE-BUG, run step 4's write phase over **every** SPEC-UPDATED verdict, including the ones sync held back when it stopped. Sync then rewrites \`sync-report.md\` with \`Conclusion: PASS\`. Only then continue to Step 2 — the gate reads that report, so an un-rewritten FAIL will (correctly) refuse.
|
|
23
|
+
- **Later** → stop. Do not archive; the change stays active with its spec files unmodified.
|
|
24
|
+
|
|
25
|
+
If the re-judge finds a Requirement is *still* a CODE-BUG, do **not** put the question again — it was already answered. Report which Requirement did not come clean and stop, as for "Later". The one-question rule is per archive run, not per attempt.
|
|
26
|
+
|
|
27
|
+
- **\`Conclusion: FAIL\` with no CODE-BUG** — validation failed somewhere sync could not resolve: either on a spec update it had just written (the report names that Requirement) or on the final artifact check, which can fail on an artifact no Requirement touched. Either way this is an artifact problem, not a code defect: fix whatever \`tospec validate --json\` points at — the report names it when a spec update caused it — then re-run validation and have sync complete any remaining writes and rewrite the report to PASS. Do not archive on a FAIL report, and do not reach for \`--require-sync\`'s absence to route around it.
|
|
16
28
|
|
|
17
29
|
**Step 2 — archive**
|
|
18
30
|
|
|
19
|
-
|
|
31
|
+
Synced branch (a sync ran and \`sync-report.md\` says \`Conclusion: PASS\`):
|
|
20
32
|
\`\`\`bash
|
|
21
|
-
tospec archive "<name>" --json --require-
|
|
33
|
+
tospec archive "<name>" --json --require-sync
|
|
22
34
|
\`\`\`
|
|
23
|
-
\`--require-
|
|
35
|
+
\`--require-sync\` is the CLI's own machine-checkable half of the sync gate: it refuses unless \`sync-report.md\` exists with a \`Conclusion: PASS\` line (\`SYNC_REPORT_MISSING\` / \`SYNC_REPORT_FAILED\`). Since the sync just ran and passed, this succeeds for free — a CLI-enforced backstop behind the instruction-level order above.
|
|
24
36
|
|
|
25
|
-
Not-
|
|
37
|
+
Not-synced branch (no delta specs, or the user asked to skip):
|
|
26
38
|
\`\`\`bash
|
|
27
39
|
tospec archive "<name>" --json
|
|
28
40
|
\`\`\`
|
|
41
|
+
Only omit \`--require-sync\` on this branch; passing it without a sync having run will (correctly) refuse.
|
|
29
42
|
|
|
30
|
-
Either way, the CLI then: re-validates the delta specs (blocking), checks tasks/task completion (with \`--json\`, incomplete tasks block unless you pass \`--yes\` after the user confirms), does a two-phase atomic merge into \`tospec/specs/\` (dry-run + re-validate every target first, writes only if all pass), and moves the change directory — including \`
|
|
43
|
+
Either way, the CLI then: re-validates the delta specs (blocking), checks tasks/task completion (with \`--json\`, incomplete tasks block unless you pass \`--yes\` after the user confirms), does a two-phase atomic merge into \`tospec/specs/\` (dry-run + re-validate every target first, writes only if all pass), and moves the change directory — including \`sync-report.md\` when present — into \`tospec/changes/archive/\` under a \`yyyyMMdd_HHmmss-<name>\` timestamp the CLI generates itself.
|
|
31
44
|
|
|
32
|
-
**Reading the result**: the \`--json\` output is \`{archive, status}\`. Success → \`archive\` holds \`{change, archivedAs, path, specsUpdated}\`. Failure → \`archive\` is \`null\` and \`status[0].code\` tells you which ending you got: \`archive_validation_failed\` (fix artifacts, re-validate), \`archive_tasks_incomplete\` / \`archive_tasks_missing\` (ask the user, then rerun with \`--yes\` to override), \`
|
|
45
|
+
**Reading the result**: the \`--json\` output is \`{archive, status}\`. Success → \`archive\` holds \`{change, archivedAs, path, specsUpdated}\`. Failure → \`archive\` is \`null\` and \`status[0].code\` tells you which ending you got: \`archive_validation_failed\` (fix artifacts, re-validate), \`archive_tasks_incomplete\` / \`archive_tasks_missing\` (ask the user, then rerun with \`--yes\` to override), \`SYNC_REPORT_MISSING\` / \`SYNC_REPORT_FAILED\` (the sync gate refused). Each status entry carries \`{code, message, fix}\` — follow \`fix\`.
|
|
33
46
|
|
|
34
47
|
**Guardrails — explicit and non-negotiable**
|
|
35
|
-
-
|
|
36
|
-
-
|
|
48
|
+
- Run the sync when the change has spec deltas; do not ask permission for it. Honor an explicit request to skip, and skip it outright when there are no delta specs
|
|
49
|
+
- A CODE-BUG is the only outcome that may interrupt — MATCH and SPEC-UPDATED continue silently. Never edit source from here; a fix goes through \`tospec-apply\`
|
|
50
|
+
- Only pass \`--require-sync\` when \`tospec-sync\` actually produced a passing \`sync-report.md\` this run
|
|
37
51
|
- **\`tospec archive\` owns the archive directory** — it generates the \`yyyyMMdd_HHmmss-<name>\` name and moves the change there. Let the command do it: the timestamp comes from internals you cannot reproduce, so a hand-built name risks a collision or a wrong sort order
|
|
38
52
|
- If \`tospec archive\` reports a validation failure or asks for confirmation on incomplete tasks, resolve the underlying issue (or explicitly confirm with the user) — do not route around it with manual file operations
|
|
39
53
|
|
|
40
54
|
**Output**
|
|
41
55
|
|
|
42
|
-
Report the archived name and path from \`tospec archive\`'s output, whether a
|
|
56
|
+
Report the archived name and path from \`tospec archive\`'s output, whether a sync ran and what it concluded, and **anything the sync found that no Requirement asked for** — that is reported here, never written into a spec, and never a reason to block. Confirm \`tospec/specs/\` now reflects the merged change.`;
|
|
43
57
|
export function getTospecArchiveSkillTemplate() {
|
|
44
58
|
return {
|
|
45
59
|
name: 'tospec-archive',
|
|
46
|
-
description: 'Finish and archive a completed tospec change via `tospec archive`,
|
|
47
|
-
instructions: `Finish a completed change:
|
|
60
|
+
description: 'Finish and archive a completed tospec change via `tospec archive`, running a spec/code sync first when the change has spec deltas. Use when the user wants to finalize an implemented change.',
|
|
61
|
+
instructions: `Finish a completed change: run \`tospec-sync\` when the change has spec deltas, then \`tospec archive\` — the only path to a merged, archived change.
|
|
48
62
|
|
|
49
63
|
**Input**: The user's request should name the change to archive.
|
|
50
64
|
|
|
@@ -58,10 +72,10 @@ ${ARCHIVE_BODY}`,
|
|
|
58
72
|
export function getTospecArchiveCommandTemplate() {
|
|
59
73
|
return {
|
|
60
74
|
name: 'TOSPEC: Archive',
|
|
61
|
-
description: '
|
|
75
|
+
description: 'Run a spec/code sync when warranted, then finalize and archive a completed change',
|
|
62
76
|
category: 'Workflow',
|
|
63
77
|
tags: ['workflow', 'archive'],
|
|
64
|
-
content: `Finish a completed change:
|
|
78
|
+
content: `Finish a completed change: run \`tospec-sync\` when the change has spec deltas, then \`tospec archive\` — the only path to a merged, archived change.
|
|
65
79
|
|
|
66
80
|
**Input**: The argument after \`tospec-archive\` is the change name to archive.
|
|
67
81
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG
|
|
1
|
+
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/archive.ts"],"names":[],"mappings":"AAQA,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uTAuDkS,CAAC;AAExT,MAAM,UAAU,6BAA6B;IAC3C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EAAE,+LAA+L;QAC5M,YAAY,EAAE;;;;EAIhB,YAAY,EAAE;QACZ,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,CAAC;KAC7F,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,+BAA+B;IAC7C,OAAO;QACL,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE,mFAAmF;QAChG,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;QAC7B,OAAO,EAAE;;;;EAIX,YAAY,EAAE;KACb,CAAC;AACJ,CAAC"}
|
|
@@ -22,7 +22,7 @@ const PROPOSE_BODY = `Do NOT re-interview the user — synthesize what's already
|
|
|
22
22
|
\`\`\`bash
|
|
23
23
|
tospec instructions <artifact-id> --change "<name>" --json
|
|
24
24
|
\`\`\`
|
|
25
|
-
Read \`template\` and \`instruction\` from the response, write \`resolvedOutputPath\`, then re-run \`status --json\` and continue until every \`applyRequires\` artifact is \`done\`.
|
|
25
|
+
Read \`template\` and \`instruction\` from the response, re-read every file listed under \`dependencies\` from disk (even ones you already saw — the user may have edited them since), write \`resolvedOutputPath\`, then re-run \`status --json\` and continue until every \`applyRequires\` artifact is \`done\`.
|
|
26
26
|
|
|
27
27
|
Artifact-specific rules on top of what \`instructions\` returns:
|
|
28
28
|
- **ticket** (already created): keep it thin — just refine the one-line \`## Summary\` so it names what this change does. All the detail (why, what, scope, decisions) lives in \`proposal.md\`, not here. Don't duplicate proposal content into the ticket, and don't add a timestamp or filename yourself.
|
|
@@ -44,7 +44,7 @@ Summarize the change name and location, the artifacts created, and prompt: "Run
|
|
|
44
44
|
- Create every artifact \`apply.requires\` needs — don't stop at \`proposal\`
|
|
45
45
|
- The ticket file and its timestamp are CLI-generated — never create, rename, or move ticket files; only edit the Summary in the existing stub
|
|
46
46
|
- Detailed why/what goes in \`proposal.md\`; the ticket stays a thin index
|
|
47
|
-
- Read dependency artifacts before writing the next one
|
|
47
|
+
- Read dependency artifacts from disk before writing the next one — don't rely on memory from earlier in the conversation, they may have been edited since
|
|
48
48
|
- \`context\`/\`rules\` from \`instructions\` are constraints for you, never content to copy into the file
|
|
49
49
|
- If a change with that name already exists, ask whether to continue it or pick a new name
|
|
50
50
|
- If context is critically unclear even after checking the conversation, ask — but prefer a reasonable default to keep momentum`;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Template Workflow Modules
|
|
3
|
+
*
|
|
4
|
+
* This file is generated by splitting the legacy monolithic
|
|
5
|
+
* templates file into workflow-focused modules.
|
|
6
|
+
*
|
|
7
|
+
* sync is a standalone skill, and also archive's automatic first step: archive
|
|
8
|
+
* decides whether a sync is warranted and, when it is, runs this procedure
|
|
9
|
+
* without asking. Step 4's judge-before-write gate is what makes running it
|
|
10
|
+
* unannounced safe.
|
|
11
|
+
*/
|
|
12
|
+
import type { SkillTemplate, CommandTemplate } from '../types.js';
|
|
13
|
+
export declare function getTospecSyncSkillTemplate(): SkillTemplate;
|
|
14
|
+
export declare function getTospecSyncCommandTemplate(): CommandTemplate;
|
|
15
|
+
//# sourceMappingURL=sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../../src/core/templates/workflows/sync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AA8ElE,wBAAgB,0BAA0B,IAAI,aAAa,CAc1D;AAED,wBAAgB,4BAA4B,IAAI,eAAe,CAY9D"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
const SYNC_BODY = `Whether a spec still matches the source code is a semantic judgment no CLI can make — that's why this is agent work, not a \`tospec\` subcommand. The CLI's job is the part that IS machine-checkable: the synced spec must still pass full validation, and \`tospec archive --require-sync\` refuses unless \`sync-report.md\` reports PASS.
|
|
2
|
+
|
|
3
|
+
**Steps**
|
|
4
|
+
|
|
5
|
+
1. **List the Requirements this change touches**
|
|
6
|
+
|
|
7
|
+
For sdd: every Requirement in \`specs/<capability>/spec.md\` under the change directory. For issue: the Requirement(s) referenced in the ticket/\`task.md\`, plus any delta specs the change produced.
|
|
8
|
+
|
|
9
|
+
**No-delta case**: an issue fix with no behavior change has no delta specs at all. Don't invent Requirements to check — instead confirm \`task.md\`'s described fix matches what the code actually does, and note this as the no-delta case in the report (see format below).
|
|
10
|
+
|
|
11
|
+
2. **Judge each Requirement against the actual implementation — writing nothing**
|
|
12
|
+
|
|
13
|
+
Steps 2 and 3 are the judge phase: they produce verdicts only. **Do not edit a spec file yet, however obviously stale it looks.** Record each verdict and move on; step 4 does all the writing, once every Requirement has a verdict.
|
|
14
|
+
|
|
15
|
+
For each Requirement, locate the corresponding code (the files apply touched are a good starting point) and judge: does the implemented behavior match what the Requirement's scenarios describe?
|
|
16
|
+
|
|
17
|
+
**Can't find any corresponding implementation at all**: that's a CODE-BUG, same severity as a behavioral mismatch — the Requirement was agreed to and never built. Don't wave it through as MATCH.
|
|
18
|
+
|
|
19
|
+
3. **Sweep the other direction — behavior nobody asked for**
|
|
20
|
+
|
|
21
|
+
Step 2 walks Requirements to code, so it can only find what is *missing*. It cannot see the opposite: behavior in the diff that **maps to no Requirement** at all. Walk the change's diff once and flag anything the specs never asked for.
|
|
22
|
+
|
|
23
|
+
**Report it, never spec it.** "Code wins" settles how a Requirement is *worded*, not whether behavior *belongs* — it is not a licence to make unrequested work look agreed after the fact. Never add a Requirement to cover scope creep: tell the user what you found and let them decide to keep it, drop it, or plan it properly.
|
|
24
|
+
|
|
25
|
+
4. **Write the resolutions — code wins**
|
|
26
|
+
|
|
27
|
+
Start this phase **only once steps 2 and 3 are complete and no Requirement is a CODE-BUG.** That gate is what makes it safe for \`tospec-archive\` to run this workflow without announcing it: because every defect surfaces while the judge phase is still writing nothing, walking away at this point leaves every spec file unmodified.
|
|
28
|
+
|
|
29
|
+
- **Any CODE-BUG** (the code doesn't do what was agreed in ticket/design, or was never built): **stop before writing anything.** Do not touch the spec to paper over a bug, and do not write the SPEC-UPDATED entries you already judged — they keep until the defect is resolved. Report the mismatch and go to step 5 with \`Conclusion: FAIL\`.
|
|
30
|
+
|
|
31
|
+
**Resuming after the defect is fixed** (this is how \`tospec-archive\` re-enters on its "fix now" branch): come back to *this step*, not to step 1. Re-judge only the Requirements that were CODE-BUG; every other verdict still stands. Once none of them is a defect any more, fall through to the bullet below and write **every** SPEC-UPDATED verdict — the ones held back here included, or their staleness ships into \`tospec/specs/\` on archive. Then rewrite \`sync-report.md\` (step 5) with the new conclusion; a report left at FAIL blocks the archive gate.
|
|
32
|
+
- **No CODE-BUG**: work the SPEC-UPDATED verdicts one at a time. For each, update the delta spec's Requirement with **MODIFIED**, pasting the complete, corrected Requirement block. Then:
|
|
33
|
+
\`\`\`bash
|
|
34
|
+
tospec validate "<name>" --json
|
|
35
|
+
\`\`\`
|
|
36
|
+
Must pass before writing the next one — one write, one validate, so a failure names the Requirement that caused it instead of leaving you to bisect a bulk edit. Record the validate result in that Requirement's report entry.
|
|
37
|
+
|
|
38
|
+
**If that validate fails**, the MODIFIED block you just wrote is malformed — an artifact problem, not a code defect. Fix that block and re-run \`tospec validate\` until it passes, then carry on with the remaining verdicts. Only if you cannot make it pass do you stop and report \`Conclusion: FAIL\`, naming the Requirement; that FAIL is not a CODE-BUG and archive handles it as an artifact fix, not a return to \`tospec-apply\`.
|
|
39
|
+
|
|
40
|
+
5. **Write the sync report**
|
|
41
|
+
|
|
42
|
+
Create \`sync-report.md\` in the change directory in exactly this format — \`tospec archive --require-sync\` parses the first \`Conclusion:\` line, so the heading and label text must match:
|
|
43
|
+
|
|
44
|
+
\`\`\`markdown
|
|
45
|
+
# Sync Report: <change-name>
|
|
46
|
+
## Summary
|
|
47
|
+
Conclusion: <PASS or FAIL>
|
|
48
|
+
## Requirements
|
|
49
|
+
### <Requirement name>
|
|
50
|
+
- Implementation: <module/function description, not a hard path>
|
|
51
|
+
- Verdict: MATCH | SPEC-UPDATED (updated to match code) | CODE-BUG (stops archiving)
|
|
52
|
+
- Notes: <the difference and how it was handled; SPEC-UPDATED must include the validate result>
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
55
|
+
Fill the \`Conclusion:\` line with exactly one literal — \`Conclusion: PASS\` or \`Conclusion: FAIL\` (FAIL may append a \`(reason)\` note); never leave both options in one line, or \`tospec archive --require-sync\` can't parse it. \`Conclusion:\` is **FAIL** if even one Requirement is CODE-BUG — a single unresolved defect blocks the whole change, not just that Requirement. It's **PASS** only when every Requirement resolved to MATCH or SPEC-UPDATED (with validate passing). For the no-delta case, still emit the Summary and a single Requirements entry describing the task.md-vs-code comparison (module described, not a Requirement name).
|
|
56
|
+
|
|
57
|
+
6. **Final artifact validation**
|
|
58
|
+
\`\`\`bash
|
|
59
|
+
tospec validate "<name>" --json
|
|
60
|
+
\`\`\`
|
|
61
|
+
Even when no spec needed updating, run the full change validation before finishing. If it reports an artifact problem, fix the affected artifact and re-run until it passes. Do not write \`Conclusion: PASS\` while validation is failing.
|
|
62
|
+
|
|
63
|
+
**Output**
|
|
64
|
+
|
|
65
|
+
Summarize how many Requirements matched, how many specs were updated, whether anything was flagged as a code defect, and anything found that no Requirement asked for.
|
|
66
|
+
|
|
67
|
+
Where that summary goes depends on who called you. **Run from \`tospec-archive\`** (the usual case): hand the summary straight back — archive continues on \`Conclusion: PASS\`, passing \`--require-sync\` for free, and on \`Conclusion: FAIL\` archive owns the single question about fixing the defect. Do not prompt for archiving yourself; you are already inside it. **Run standalone**: on \`Conclusion: PASS\` prompt "Run \`tospec-archive\` to finish up", and on \`Conclusion: FAIL\` prompt to return to \`tospec-apply\` first.
|
|
68
|
+
|
|
69
|
+
**Guardrails**
|
|
70
|
+
- Code is the source of truth for behavior — spec updates always follow code, never the other way around
|
|
71
|
+
- Scope creep is reported, never specced — "code wins" settles a Requirement's wording, never whether unrequested behavior belongs
|
|
72
|
+
- Never edit source code from this workflow — a code-side mismatch is diagnosis, not a license to patch here
|
|
73
|
+
- Judge every Requirement before writing any spec update; inside the write phase, every MODIFIED delta must re-pass \`tospec validate\` before writing the next one
|
|
74
|
+
- \`sync-report.md\` is required output, in the exact format above — \`tospec archive --require-sync\` depends on both its existence and its \`Conclusion:\` line
|
|
75
|
+
- One comparison pass per Requirement — check it against the code once and record the verdict. \`sync-report.md\` is the deliverable, not another review target: don't re-audit the report after writing it, and don't re-check a Requirement already judged MATCH`;
|
|
76
|
+
export function getTospecSyncSkillTemplate() {
|
|
77
|
+
return {
|
|
78
|
+
name: 'tospec-sync',
|
|
79
|
+
description: 'Sync a change\'s Requirements against the actual implementation — code wins on any mismatch — and write sync-report.md. Use before archiving a change whose specs may have drifted from the code.',
|
|
80
|
+
instructions: `Sync \`specs/\` against the implementation for every Requirement this change touched — code wins on any mismatch. Run this before \`tospec-archive\` when the change's specs may have drifted from the code.
|
|
81
|
+
|
|
82
|
+
**Input**: The user's request should name the change to sync.
|
|
83
|
+
|
|
84
|
+
${SYNC_BODY}`,
|
|
85
|
+
license: 'MIT',
|
|
86
|
+
compatibility: 'Requires tospec CLI.',
|
|
87
|
+
metadata: { author: 'tospec' },
|
|
88
|
+
allowedTools: ['Bash(tospec:*)', 'Read', 'Write', 'Edit', 'Grep', 'Glob'],
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export function getTospecSyncCommandTemplate() {
|
|
92
|
+
return {
|
|
93
|
+
name: 'TOSPEC: Sync',
|
|
94
|
+
description: 'Sync specs against the implementation, code as source of truth',
|
|
95
|
+
category: 'Workflow',
|
|
96
|
+
tags: ['workflow', 'sync', 'archive-gate'],
|
|
97
|
+
content: `Sync \`specs/\` against the implementation for every Requirement this change touched — code wins on any mismatch. Run this before \`tospec-archive\` when the change's specs may have drifted from the code.
|
|
98
|
+
|
|
99
|
+
**Input**: The argument after \`tospec-sync\` is the change name to sync.
|
|
100
|
+
|
|
101
|
+
${SYNC_BODY}`,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../../src/core/templates/workflows/sync.ts"],"names":[],"mappings":"AAaA,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mQA0EiP,CAAC;AAEpQ,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,mMAAmM;QAChN,YAAY,EAAE;;;;EAIhB,SAAS,EAAE;QACT,OAAO,EAAE,KAAK;QACd,aAAa,EAAE,sBAAsB;QACrC,QAAQ,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;QAC9B,YAAY,EAAE,CAAC,gBAAgB,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B;IAC1C,OAAO;QACL,IAAI,EAAE,cAAc;QACpB,WAAW,EAAE,gEAAgE;QAC7E,QAAQ,EAAE,UAAU;QACpB,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC;QAC1C,OAAO,EAAE;;;;EAIX,SAAS,EAAE;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -17,7 +17,7 @@ const UPDATE_BODY = `**Steps**
|
|
|
17
17
|
|
|
18
18
|
The artifact ids and paths come from the active schema — never assume them, and never branch on hardcoded artifact names. Custom schemas must work unchanged.
|
|
19
19
|
|
|
20
|
-
The files to edit are \`artifactPaths.<id>.existingOutputPaths\` — the concrete files that exist on disk, already glob-expanded for glob artifacts (e.g. \`specs
|
|
20
|
+
The files to edit are \`artifactPaths.<id>.existingOutputPaths\` — the concrete files that exist on disk, already glob-expanded for glob artifacts (e.g. \`specs/*/spec.md\`). Do NOT write to \`resolvedOutputPath\`: for a glob artifact it is still the glob pattern, not a real file.
|
|
21
21
|
|
|
22
22
|
3. **Understand the request**
|
|
23
23
|
- If the user asked for a specific revision ("the design now uses X"), that is the starting edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/core/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/core/update.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA8BH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,kDAAkD;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAU;gBAEpB,OAAO,GAAE,oBAAyB;IAIxC,OAAO,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoKjD;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoBzB;;OAEG;IACH,OAAO,CAAC,cAAc;IAkBtB;;;OAGG;IACH,OAAO,CAAC,+BAA+B;IAkBvC;;;;OAIG;YACW,yBAAyB;CA0BxC"}
|
package/dist/core/update.js
CHANGED
|
@@ -10,6 +10,7 @@ import { FileSystemUtils } from '../utils/file-system.js';
|
|
|
10
10
|
import { AI_TOOLS, TOSPEC_DIR_NAME } from './config.js';
|
|
11
11
|
import { getToolVersionStatus, getSkillTemplates, writeSkillDir, getConfiguredTools, removeLegacySkillDirs, removeLegacyToolSkillLayout, writeToolCommands, } from './shared/index.js';
|
|
12
12
|
import { getGlobalConfig } from './global-config.js';
|
|
13
|
+
import { runLegacyUserStateMigration } from './user-state-migration.js';
|
|
13
14
|
import { getProfileWorkflows, ALL_WORKFLOWS } from './profiles.js';
|
|
14
15
|
import { getAvailableTools } from './available-tools.js';
|
|
15
16
|
import { copyDir } from '../utils/link.js';
|
|
@@ -23,6 +24,9 @@ export class UpdateCommand {
|
|
|
23
24
|
this.force = options.force ?? false;
|
|
24
25
|
}
|
|
25
26
|
async execute(projectPath) {
|
|
27
|
+
// Above every getGlobalConfig() below, so this run reads the migrated file
|
|
28
|
+
// rather than the legacy fallback.
|
|
29
|
+
await runLegacyUserStateMigration();
|
|
26
30
|
const resolvedProjectPath = path.resolve(projectPath);
|
|
27
31
|
const tospecPath = path.join(resolvedProjectPath, TOSPEC_DIR_NAME);
|
|
28
32
|
// 1. Check tospec directory exists
|