strikethroo 3.22.0 → 3.22.1
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/dist/__tests__/built-skills.d.ts +15 -0
- package/dist/__tests__/built-skills.d.ts.map +1 -0
- package/dist/__tests__/built-skills.js +53 -0
- package/dist/__tests__/built-skills.js.map +1 -0
- package/dist-web/assets/{arc-CguPlWfb.js → arc-Hwddr2kO.js} +1 -1
- package/dist-web/assets/{architectureDiagram-3BPJPVTR-D65RMVqJ.js → architectureDiagram-3BPJPVTR-i11AtK7_.js} +1 -1
- package/dist-web/assets/{blockDiagram-GPEHLZMM-CNIwP_yH.js → blockDiagram-GPEHLZMM-BBT6cVNX.js} +1 -1
- package/dist-web/assets/{c4Diagram-AAUBKEIU-CuZ4SoKV.js → c4Diagram-AAUBKEIU-C3vqlA6y.js} +1 -1
- package/dist-web/assets/channel-Cur0s-J7.js +1 -0
- package/dist-web/assets/{chunk-2J33WTMH-DM4ZcjVq.js → chunk-2J33WTMH-B2qLeglu.js} +1 -1
- package/dist-web/assets/{chunk-4BX2VUAB-DI3-zGiF.js → chunk-4BX2VUAB-BOoURq0p.js} +1 -1
- package/dist-web/assets/{chunk-55IACEB6-DBdh-eer.js → chunk-55IACEB6-DucbZmPO.js} +1 -1
- package/dist-web/assets/{chunk-727SXJPM-B0HDPh0I.js → chunk-727SXJPM-D1jwNHG5.js} +1 -1
- package/dist-web/assets/{chunk-AQP2D5EJ-C0MnLmRm.js → chunk-AQP2D5EJ-DEqgF-yl.js} +1 -1
- package/dist-web/assets/{chunk-FMBD7UC4-CmggDcp1.js → chunk-FMBD7UC4-DyqowetS.js} +1 -1
- package/dist-web/assets/{chunk-ND2GUHAM-BSIdB1y0.js → chunk-ND2GUHAM-B5m1NGQ0.js} +1 -1
- package/dist-web/assets/{chunk-QZHKN3VN-BTHsXhgb.js → chunk-QZHKN3VN-DuDvOVer.js} +1 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-CjiILMRI.js +1 -0
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-CjiILMRI.js +1 -0
- package/dist-web/assets/{cose-bilkent-S5V4N54A-IXUMXU5h.js → cose-bilkent-S5V4N54A-C9HUgr5R.js} +1 -1
- package/dist-web/assets/{dagre-BM42HDAG-CtwBET_X.js → dagre-BM42HDAG-DT3KjQHY.js} +1 -1
- package/dist-web/assets/{diagram-2AECGRRQ-DRe1AFa_.js → diagram-2AECGRRQ-DrCpXRj9.js} +1 -1
- package/dist-web/assets/{diagram-5GNKFQAL-D9IRdgWX.js → diagram-5GNKFQAL-QcCYThB2.js} +1 -1
- package/dist-web/assets/{diagram-KO2AKTUF-CQi7gmRS.js → diagram-KO2AKTUF-BsaZwGbo.js} +1 -1
- package/dist-web/assets/{diagram-LMA3HP47-B0fp5jh8.js → diagram-LMA3HP47-B6ZqNLaZ.js} +1 -1
- package/dist-web/assets/{diagram-OG6HWLK6-B2ujFhv2.js → diagram-OG6HWLK6-ZfJLCrYD.js} +1 -1
- package/dist-web/assets/{erDiagram-TEJ5UH35-DcxHh3A8.js → erDiagram-TEJ5UH35-BlnJ9PIz.js} +1 -1
- package/dist-web/assets/{flowDiagram-I6XJVG4X-Btsglt1O.js → flowDiagram-I6XJVG4X-CIfl3CnE.js} +1 -1
- package/dist-web/assets/{ganttDiagram-6RSMTGT7-BRaGl6R4.js → ganttDiagram-6RSMTGT7-CPrwdiin.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-PVQCEYII-Cl1DR87j.js → gitGraphDiagram-PVQCEYII-DcY9oRGk.js} +1 -1
- package/dist-web/assets/{index-DXt7jz3h.js → index-COfame-T.js} +4 -4
- package/dist-web/assets/{index-CxXoZ0_J.js → index-DGtMmSy6.js} +1 -1
- package/dist-web/assets/{index-DZ4QtqqW.js → index-j2lPssdc.js} +1 -1
- package/dist-web/assets/{infoDiagram-5YYISTIA-GMZDkbDI.js → infoDiagram-5YYISTIA-DVU5i5FV.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-DC8HBMwN.js → ishikawaDiagram-YF4QCWOH-B8Ga6Rav.js} +1 -1
- package/dist-web/assets/{journeyDiagram-JHISSGLW-4KT1uAXJ.js → journeyDiagram-JHISSGLW-DOzvgBoA.js} +1 -1
- package/dist-web/assets/{kanban-definition-UN3LZRKU-bBpM_7W0.js → kanban-definition-UN3LZRKU-BGc6pe_I.js} +1 -1
- package/dist-web/assets/{linear-BzW5Mi4V.js → linear-BpZOijWC.js} +1 -1
- package/dist-web/assets/{mermaid.core-BZXehlCp.js → mermaid.core-C_2qQ8rS.js} +4 -4
- package/dist-web/assets/{mindmap-definition-RKZ34NQL-B8RhYsaN.js → mindmap-definition-RKZ34NQL-DkMM_7Yr.js} +1 -1
- package/dist-web/assets/{pieDiagram-4H26LBE5-DV749i9Y.js → pieDiagram-4H26LBE5-1TkSQl-I.js} +1 -1
- package/dist-web/assets/{quadrantDiagram-W4KKPZXB-Cduffe8j.js → quadrantDiagram-W4KKPZXB-cmPoFli_.js} +1 -1
- package/dist-web/assets/{requirementDiagram-4Y6WPE33-C7KngwZn.js → requirementDiagram-4Y6WPE33-BRm2ySws.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-5OEKKPKP-CJjwUGG3.js → sankeyDiagram-5OEKKPKP-Bm7c5KA3.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-3UESZ5HK-BARiZOtJ.js → sequenceDiagram-3UESZ5HK-TsJi1UnU.js} +1 -1
- package/dist-web/assets/{stateDiagram-AJRCARHV-DA1dHBGx.js → stateDiagram-AJRCARHV-C96-LO_W.js} +1 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-DyP066tY.js +1 -0
- package/dist-web/assets/{timeline-definition-PNZ67QCA-ClE6cvJF.js → timeline-definition-PNZ67QCA-CXS_QOle.js} +1 -1
- package/dist-web/assets/{vennDiagram-CIIHVFJN-BLR57Itf.js → vennDiagram-CIIHVFJN-C2GyjnKb.js} +1 -1
- package/dist-web/assets/{wardley-L42UT6IY-EA8x1UUF.js → wardley-L42UT6IY-B4Z1vQiy.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-YWT4CUSO-DHktlei-.js → wardleyDiagram-YWT4CUSO-C4rdUwqJ.js} +1 -1
- package/dist-web/assets/{xychartDiagram-2RQKCTM6-DOxQD_Ha.js → xychartDiagram-2RQKCTM6-ldEuZMCT.js} +1 -1
- package/dist-web/index.html +1 -1
- package/package.json +2 -1
- package/dist-web/assets/channel-BL14r_5w.js +0 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-DBkbEi_3.js +0 -1
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-DBkbEi_3.js +0 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-D4ioaqC3.js +0 -1
- package/templates/harness/skills/st-code-review/SKILL.md +0 -52
- package/templates/harness/skills/st-code-review/references/review-example.xml.md +0 -18
- package/templates/harness/skills/st-code-review/scripts/code-review.cjs +0 -3887
- package/templates/harness/skills/st-code-review/scripts/find-strikethroo-root.cjs +0 -116
- package/templates/harness/skills/st-code-review/scripts/validate-plan-blueprint.cjs +0 -429
- package/templates/harness/skills/st-create-plan/SKILL.md +0 -111
- package/templates/harness/skills/st-create-plan/scripts/check-for-updates.cjs +0 -2502
- package/templates/harness/skills/st-create-plan/scripts/find-strikethroo-root.cjs +0 -116
- package/templates/harness/skills/st-create-plan/scripts/get-next-plan-id.cjs +0 -197
- package/templates/harness/skills/st-execute-blueprint/SKILL.md +0 -195
- package/templates/harness/skills/st-execute-blueprint/scripts/capture-base-commit.cjs +0 -330
- package/templates/harness/skills/st-execute-blueprint/scripts/check-for-updates.cjs +0 -2502
- package/templates/harness/skills/st-execute-blueprint/scripts/check-phase-readiness.cjs +0 -471
- package/templates/harness/skills/st-execute-blueprint/scripts/create-feature-branch.cjs +0 -374
- package/templates/harness/skills/st-execute-blueprint/scripts/dispatch-task-execution.cjs +0 -6816
- package/templates/harness/skills/st-execute-blueprint/scripts/find-strikethroo-root.cjs +0 -116
- package/templates/harness/skills/st-execute-blueprint/scripts/validate-plan-blueprint.cjs +0 -429
- package/templates/harness/skills/st-execute-task/SKILL.md +0 -154
- package/templates/harness/skills/st-execute-task/scripts/check-for-updates.cjs +0 -2502
- package/templates/harness/skills/st-execute-task/scripts/check-task-dependencies.cjs +0 -462
- package/templates/harness/skills/st-execute-task/scripts/dispatch-task-execution.cjs +0 -6816
- package/templates/harness/skills/st-execute-task/scripts/find-strikethroo-root.cjs +0 -116
- package/templates/harness/skills/st-execute-task/scripts/validate-plan-blueprint.cjs +0 -429
- package/templates/harness/skills/st-full-workflow/SKILL.md +0 -470
- package/templates/harness/skills/st-full-workflow/references/complexity-rubric.md +0 -8
- package/templates/harness/skills/st-full-workflow/scripts/capture-base-commit.cjs +0 -330
- package/templates/harness/skills/st-full-workflow/scripts/check-for-updates.cjs +0 -2502
- package/templates/harness/skills/st-full-workflow/scripts/check-phase-readiness.cjs +0 -471
- package/templates/harness/skills/st-full-workflow/scripts/create-feature-branch.cjs +0 -374
- package/templates/harness/skills/st-full-workflow/scripts/dispatch-task-execution.cjs +0 -6816
- package/templates/harness/skills/st-full-workflow/scripts/find-strikethroo-root.cjs +0 -116
- package/templates/harness/skills/st-full-workflow/scripts/get-next-plan-id.cjs +0 -197
- package/templates/harness/skills/st-full-workflow/scripts/get-next-task-id.cjs +0 -295
- package/templates/harness/skills/st-full-workflow/scripts/route-task-execution.cjs +0 -2874
- package/templates/harness/skills/st-full-workflow/scripts/validate-plan-blueprint.cjs +0 -429
- package/templates/harness/skills/st-generate-tasks/SKILL.md +0 -218
- package/templates/harness/skills/st-generate-tasks/references/complexity-rubric.md +0 -8
- package/templates/harness/skills/st-generate-tasks/scripts/check-for-updates.cjs +0 -2502
- package/templates/harness/skills/st-generate-tasks/scripts/find-strikethroo-root.cjs +0 -116
- package/templates/harness/skills/st-generate-tasks/scripts/get-next-task-id.cjs +0 -295
- package/templates/harness/skills/st-generate-tasks/scripts/route-task-execution.cjs +0 -2874
- package/templates/harness/skills/st-generate-tasks/scripts/validate-plan-blueprint.cjs +0 -429
- package/templates/harness/skills/st-refine-plan/SKILL.md +0 -132
- package/templates/harness/skills/st-refine-plan/scripts/check-for-updates.cjs +0 -2502
- package/templates/harness/skills/st-refine-plan/scripts/find-strikethroo-root.cjs +0 -116
- package/templates/harness/skills/st-refine-plan/scripts/validate-plan-blueprint.cjs +0 -429
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/skill-scripts/find-strikethroo-root.ts
|
|
31
|
-
var find_strikethroo_root_exports = {};
|
|
32
|
-
__export(find_strikethroo_root_exports, {
|
|
33
|
-
main: () => main
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(find_strikethroo_root_exports);
|
|
36
|
-
|
|
37
|
-
// src/skill-scripts/shared/root.ts
|
|
38
|
-
var fs = __toESM(require("fs"));
|
|
39
|
-
var path = __toESM(require("path"));
|
|
40
|
-
var EXPECTED_SCHEMA = true ? 4 : 4;
|
|
41
|
-
var isValidStrikethrooRoot = (strikethrooPath) => {
|
|
42
|
-
try {
|
|
43
|
-
if (!fs.existsSync(strikethrooPath)) return false;
|
|
44
|
-
if (!fs.lstatSync(strikethrooPath).isDirectory()) return false;
|
|
45
|
-
const metadataPath = path.join(strikethrooPath, ".init-metadata.json");
|
|
46
|
-
if (!fs.existsSync(metadataPath)) return false;
|
|
47
|
-
const metadata = JSON.parse(fs.readFileSync(metadataPath, "utf8"));
|
|
48
|
-
return metadata && typeof metadata === "object" && "version" in metadata;
|
|
49
|
-
} catch (_err) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var getStrikethrooAt = (directory) => {
|
|
54
|
-
const strikethrooPath = path.join(directory, ".ai", "strikethroo");
|
|
55
|
-
return isValidStrikethrooRoot(strikethrooPath) ? strikethrooPath : null;
|
|
56
|
-
};
|
|
57
|
-
var getParentPaths = (currentPath, acc = []) => {
|
|
58
|
-
const absolutePath = path.resolve(currentPath);
|
|
59
|
-
const nextAcc = [...acc, absolutePath];
|
|
60
|
-
const parentPath = path.dirname(absolutePath);
|
|
61
|
-
if (parentPath === absolutePath) return nextAcc;
|
|
62
|
-
return getParentPaths(parentPath, nextAcc);
|
|
63
|
-
};
|
|
64
|
-
var checkWorkspaceSchema = (metadataPath) => {
|
|
65
|
-
let metadata;
|
|
66
|
-
try {
|
|
67
|
-
metadata = JSON.parse(fs.readFileSync(metadataPath, "utf8"));
|
|
68
|
-
} catch {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const actual = typeof metadata.workspaceSchemaVersion === "number" ? metadata.workspaceSchemaVersion : 1;
|
|
72
|
-
if (actual === EXPECTED_SCHEMA) return;
|
|
73
|
-
if (actual < EXPECTED_SCHEMA) {
|
|
74
|
-
process.stderr.write(
|
|
75
|
-
`Workspace schema v${actual} is older than this skill requires (v${EXPECTED_SCHEMA}). Re-run \`npx strikethroo init\` with the latest CLI to update.
|
|
76
|
-
`
|
|
77
|
-
);
|
|
78
|
-
} else {
|
|
79
|
-
process.stderr.write(
|
|
80
|
-
`This skill (built for workspace schema v${EXPECTED_SCHEMA}) is older than the workspace (v${actual}). Re-run \`npx skills add e0ipso/strikethroo\` to update skills.
|
|
81
|
-
`
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
process.exit(1);
|
|
85
|
-
};
|
|
86
|
-
var findStrikethrooRoot = (startPath = process.cwd()) => {
|
|
87
|
-
const paths = getParentPaths(startPath);
|
|
88
|
-
const found = paths.find((p) => getStrikethrooAt(p));
|
|
89
|
-
if (!found) return null;
|
|
90
|
-
const root = getStrikethrooAt(found);
|
|
91
|
-
if (root) checkWorkspaceSchema(path.join(root, ".init-metadata.json"));
|
|
92
|
-
return root;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// src/skill-scripts/find-strikethroo-root.ts
|
|
96
|
-
var main = () => {
|
|
97
|
-
const startPath = process.argv[2] || process.cwd();
|
|
98
|
-
const root = findStrikethrooRoot(startPath);
|
|
99
|
-
if (!root) {
|
|
100
|
-
process.stderr.write(
|
|
101
|
-
`Could not find .ai/strikethroo root from ${startPath} or any parent directory.
|
|
102
|
-
`
|
|
103
|
-
);
|
|
104
|
-
process.exit(1);
|
|
105
|
-
}
|
|
106
|
-
process.stdout.write(`${root}
|
|
107
|
-
`);
|
|
108
|
-
process.exit(0);
|
|
109
|
-
};
|
|
110
|
-
if (require.main === module) {
|
|
111
|
-
main();
|
|
112
|
-
}
|
|
113
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
114
|
-
0 && (module.exports = {
|
|
115
|
-
main
|
|
116
|
-
});
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/skill-scripts/get-next-plan-id.ts
|
|
31
|
-
var get_next_plan_id_exports = {};
|
|
32
|
-
__export(get_next_plan_id_exports, {
|
|
33
|
-
main: () => main
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(get_next_plan_id_exports);
|
|
36
|
-
|
|
37
|
-
// src/skill-scripts/shared/root.ts
|
|
38
|
-
var fs = __toESM(require("fs"));
|
|
39
|
-
var path = __toESM(require("path"));
|
|
40
|
-
var EXPECTED_SCHEMA = true ? 4 : 4;
|
|
41
|
-
var isValidStrikethrooRoot = (strikethrooPath) => {
|
|
42
|
-
try {
|
|
43
|
-
if (!fs.existsSync(strikethrooPath)) return false;
|
|
44
|
-
if (!fs.lstatSync(strikethrooPath).isDirectory()) return false;
|
|
45
|
-
const metadataPath = path.join(strikethrooPath, ".init-metadata.json");
|
|
46
|
-
if (!fs.existsSync(metadataPath)) return false;
|
|
47
|
-
const metadata = JSON.parse(fs.readFileSync(metadataPath, "utf8"));
|
|
48
|
-
return metadata && typeof metadata === "object" && "version" in metadata;
|
|
49
|
-
} catch (_err) {
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
var getStrikethrooAt = (directory) => {
|
|
54
|
-
const strikethrooPath = path.join(directory, ".ai", "strikethroo");
|
|
55
|
-
return isValidStrikethrooRoot(strikethrooPath) ? strikethrooPath : null;
|
|
56
|
-
};
|
|
57
|
-
var getParentPaths = (currentPath, acc = []) => {
|
|
58
|
-
const absolutePath = path.resolve(currentPath);
|
|
59
|
-
const nextAcc = [...acc, absolutePath];
|
|
60
|
-
const parentPath = path.dirname(absolutePath);
|
|
61
|
-
if (parentPath === absolutePath) return nextAcc;
|
|
62
|
-
return getParentPaths(parentPath, nextAcc);
|
|
63
|
-
};
|
|
64
|
-
var checkWorkspaceSchema = (metadataPath) => {
|
|
65
|
-
let metadata;
|
|
66
|
-
try {
|
|
67
|
-
metadata = JSON.parse(fs.readFileSync(metadataPath, "utf8"));
|
|
68
|
-
} catch {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
const actual = typeof metadata.workspaceSchemaVersion === "number" ? metadata.workspaceSchemaVersion : 1;
|
|
72
|
-
if (actual === EXPECTED_SCHEMA) return;
|
|
73
|
-
if (actual < EXPECTED_SCHEMA) {
|
|
74
|
-
process.stderr.write(
|
|
75
|
-
`Workspace schema v${actual} is older than this skill requires (v${EXPECTED_SCHEMA}). Re-run \`npx strikethroo init\` with the latest CLI to update.
|
|
76
|
-
`
|
|
77
|
-
);
|
|
78
|
-
} else {
|
|
79
|
-
process.stderr.write(
|
|
80
|
-
`This skill (built for workspace schema v${EXPECTED_SCHEMA}) is older than the workspace (v${actual}). Re-run \`npx skills add e0ipso/strikethroo\` to update skills.
|
|
81
|
-
`
|
|
82
|
-
);
|
|
83
|
-
}
|
|
84
|
-
process.exit(1);
|
|
85
|
-
};
|
|
86
|
-
var findStrikethrooRoot = (startPath = process.cwd()) => {
|
|
87
|
-
const paths = getParentPaths(startPath);
|
|
88
|
-
const found = paths.find((p) => getStrikethrooAt(p));
|
|
89
|
-
if (!found) return null;
|
|
90
|
-
const root = getStrikethrooAt(found);
|
|
91
|
-
if (root) checkWorkspaceSchema(path.join(root, ".init-metadata.json"));
|
|
92
|
-
return root;
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
// src/skill-scripts/shared/plan-scan.ts
|
|
96
|
-
var fs2 = __toESM(require("fs"));
|
|
97
|
-
var path2 = __toESM(require("path"));
|
|
98
|
-
|
|
99
|
-
// src/skill-scripts/shared/frontmatter.ts
|
|
100
|
-
var ID_PATTERNS = [
|
|
101
|
-
/^\s*["']?id["']?\s*:\s*["']?([+-]?\d+)["']?\s*(?:#.*)?$/im,
|
|
102
|
-
/^\s*id\s*:\s*([+-]?\d+)\s*(?:#.*)?$/im,
|
|
103
|
-
/^\s*["']?id["']?\s*:\s*"([+-]?\d+)"\s*(?:#.*)?$/im,
|
|
104
|
-
/^\s*["']?id["']?\s*:\s*'([+-]?\d+)'\s*(?:#.*)?$/im,
|
|
105
|
-
/^\s*["']id["']\s*:\s*([+-]?\d+)\s*(?:#.*)?$/im,
|
|
106
|
-
/^\s*id\s*:\s*[|>]\s*([+-]?\d+)\s*$/im
|
|
107
|
-
];
|
|
108
|
-
var validateId = (rawId) => {
|
|
109
|
-
const id = parseInt(rawId, 10);
|
|
110
|
-
if (Number.isNaN(id) || id < 0 || id > Number.MAX_SAFE_INTEGER) return null;
|
|
111
|
-
return id;
|
|
112
|
-
};
|
|
113
|
-
var extractIdFromMarkdown = (content) => {
|
|
114
|
-
const frontmatterMatch = content.match(/^---\s*\r?\n([\s\S]*?)\r?\n---/);
|
|
115
|
-
if (!frontmatterMatch || !frontmatterMatch[1]) return null;
|
|
116
|
-
const block = frontmatterMatch[1];
|
|
117
|
-
for (const pattern of ID_PATTERNS) {
|
|
118
|
-
const match = block.match(pattern);
|
|
119
|
-
if (match && match[1]) {
|
|
120
|
-
const id = validateId(match[1]);
|
|
121
|
-
if (id !== null) return id;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
return null;
|
|
125
|
-
};
|
|
126
|
-
var extractPlanId = (content, _filePath) => {
|
|
127
|
-
return extractIdFromMarkdown(content);
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
// src/skill-scripts/shared/plan-scan.ts
|
|
131
|
-
var PLAN_EXTENSIONS = [".md"];
|
|
132
|
-
var scanPlanDir = (planDirPath, dirName, isArchive) => {
|
|
133
|
-
let entries;
|
|
134
|
-
try {
|
|
135
|
-
entries = fs2.readdirSync(planDirPath, { withFileTypes: true });
|
|
136
|
-
} catch (_err) {
|
|
137
|
-
return [];
|
|
138
|
-
}
|
|
139
|
-
return entries.filter((e) => e.isFile() && PLAN_EXTENSIONS.some((ext) => e.name.endsWith(ext))).flatMap((e) => {
|
|
140
|
-
const filePath = path2.join(planDirPath, e.name);
|
|
141
|
-
try {
|
|
142
|
-
const content = fs2.readFileSync(filePath, "utf8");
|
|
143
|
-
const id = extractPlanId(content, filePath);
|
|
144
|
-
if (id === null) return [];
|
|
145
|
-
return [{ id, file: filePath, dir: planDirPath, isArchive, name: dirName }];
|
|
146
|
-
} catch (_err) {
|
|
147
|
-
return [];
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
var getAllPlans = (taskManagerRoot) => {
|
|
152
|
-
const sources = [
|
|
153
|
-
{ dir: path2.join(taskManagerRoot, "plans"), isArchive: false },
|
|
154
|
-
{ dir: path2.join(taskManagerRoot, "archive"), isArchive: true }
|
|
155
|
-
];
|
|
156
|
-
return sources.flatMap(({ dir, isArchive }) => {
|
|
157
|
-
if (!fs2.existsSync(dir)) return [];
|
|
158
|
-
let entries;
|
|
159
|
-
try {
|
|
160
|
-
entries = fs2.readdirSync(dir, { withFileTypes: true });
|
|
161
|
-
} catch (_err) {
|
|
162
|
-
return [];
|
|
163
|
-
}
|
|
164
|
-
return entries.filter((e) => e.isDirectory()).flatMap((e) => scanPlanDir(path2.join(dir, e.name), e.name, isArchive));
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
var computeNextPlanId = (taskManagerRoot) => {
|
|
168
|
-
const plans = getAllPlans(taskManagerRoot);
|
|
169
|
-
return plans.reduce((max, p) => Math.max(max, p.id), 0) + 1;
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
// src/skill-scripts/get-next-plan-id.ts
|
|
173
|
-
var main = () => {
|
|
174
|
-
const rootArg = process.argv[2];
|
|
175
|
-
let root;
|
|
176
|
-
if (rootArg) {
|
|
177
|
-
root = rootArg;
|
|
178
|
-
} else {
|
|
179
|
-
root = findStrikethrooRoot(process.cwd());
|
|
180
|
-
}
|
|
181
|
-
if (!root) {
|
|
182
|
-
process.stderr.write(
|
|
183
|
-
"No .ai/strikethroo root found. Run this from inside an initialized strikethroo workspace.\n"
|
|
184
|
-
);
|
|
185
|
-
process.exit(1);
|
|
186
|
-
}
|
|
187
|
-
process.stdout.write(`${computeNextPlanId(root)}
|
|
188
|
-
`);
|
|
189
|
-
process.exit(0);
|
|
190
|
-
};
|
|
191
|
-
if (require.main === module) {
|
|
192
|
-
main();
|
|
193
|
-
}
|
|
194
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
195
|
-
0 && (module.exports = {
|
|
196
|
-
main
|
|
197
|
-
});
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: st-execute-blueprint
|
|
3
|
-
description: Use when the user asks to run, execute, implement, or carry out a Strikethroo plan or its blueprint by plan ID in this repository — triggers include execute blueprint, run the plan, implement plan, build the plan. Do not use to create a plan, to only generate tasks, to run a single task, or for generic development outside Strikethroo.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# st-execute-blueprint
|
|
7
|
-
|
|
8
|
-
## Inputs
|
|
9
|
-
|
|
10
|
-
The user supplies the numeric plan ID conversationally.
|
|
11
|
-
|
|
12
|
-
## Operating Procedure
|
|
13
|
-
|
|
14
|
-
### 1. Locate the strikethroo root
|
|
15
|
-
|
|
16
|
-
Run `scripts/find-strikethroo-root.cjs` from the user's working directory. If
|
|
17
|
-
it exits non-zero, stop and ask the user to run `npx strikethroo init`.
|
|
18
|
-
|
|
19
|
-
Treat the path it prints as `<root>` for every subsequent step.
|
|
20
|
-
|
|
21
|
-
Delegated execution workers skip this step and do not emit update notices.
|
|
22
|
-
|
|
23
|
-
Run `scripts/check-for-updates.cjs "<root>"` as a separate command using this
|
|
24
|
-
skill's script path. Keep the user's working directory. Read the one JSON line
|
|
25
|
-
on stdout. When `notice` is present, retain its exact text for the final
|
|
26
|
-
user-facing response. Never pause for permission and never run an update.
|
|
27
|
-
|
|
28
|
-
### 2. Resolve the plan
|
|
29
|
-
|
|
30
|
-
Run `scripts/validate-plan-blueprint.cjs <plan-id> planFile` for the plan
|
|
31
|
-
file's absolute path. Another field name prints that field instead.
|
|
32
|
-
|
|
33
|
-
If the script exits non-zero, stop and ask the user to confirm the plan ID.
|
|
34
|
-
Do not guess a different ID.
|
|
35
|
-
|
|
36
|
-
Run `scripts/validate-plan-blueprint.cjs <plan-id> planDir` and treat the
|
|
37
|
-
printed path as `<plan-dir>`.
|
|
38
|
-
|
|
39
|
-
### 3. Validate tasks and blueprint existence
|
|
40
|
-
|
|
41
|
-
Run `scripts/validate-plan-blueprint.cjs <plan-id> taskCount` and
|
|
42
|
-
`scripts/validate-plan-blueprint.cjs <plan-id> blueprintExists`.
|
|
43
|
-
|
|
44
|
-
### 4. Auto-generate tasks and blueprint if missing
|
|
45
|
-
|
|
46
|
-
If `taskCount` is 0 or `blueprintExists` is `no`:
|
|
47
|
-
|
|
48
|
-
Notify the user: "Tasks or execution blueprint not found. Generating tasks automatically..."
|
|
49
|
-
|
|
50
|
-
- Follow the `st-generate-tasks` skill for this plan ID. Execute its operating procedure in full, including running `POST_TASK_GENERATION_ALL.md` to write the Execution Blueprint.
|
|
51
|
-
- Re-run the `planFile`, `planDir`, `taskCount`, and `blueprintExists` queries to refresh the resolved paths and counts.
|
|
52
|
-
|
|
53
|
-
If the plan still has no tasks or no blueprint, stop and report failure.
|
|
54
|
-
|
|
55
|
-
### 5. Optionally create a feature branch
|
|
56
|
-
|
|
57
|
-
Run `scripts/create-feature-branch.cjs <plan-id>` once before phase execution. A skip is not a failure. Continue on the current branch, and never create the branch by hand. Uncommitted or untracked changes are permitted only inside the repository-root `.ai/strikethroo` subtree. An error result halts execution; report it.
|
|
58
|
-
|
|
59
|
-
Then run `scripts/capture-base-commit.cjs <plan-id>` once to record the commit the review gate diffs against. A `skipped` result continues execution and means the review gate will skip. Only an `error` result halts.
|
|
60
|
-
|
|
61
|
-
### 6. Load project context and execution blueprint
|
|
62
|
-
|
|
63
|
-
Read these files, in order:
|
|
64
|
-
|
|
65
|
-
- `<root>/config/STRIKETHROO.md`
|
|
66
|
-
- The plan document at the path from step 2, including its Execution Blueprint section, which defines the phase groupings and task dispatch order.
|
|
67
|
-
- `<root>/config/shared/verification-gate.md` and `<root>/config/shared/anti-rationalization.md`, both applied in the phase loop below.
|
|
68
|
-
|
|
69
|
-
### 7. Execute phases in order
|
|
70
|
-
|
|
71
|
-
Use an internal task or todo tracker to monitor progress. For each phase defined in the Execution Blueprint:
|
|
72
|
-
|
|
73
|
-
#### 7a. Phase pre-execution
|
|
74
|
-
Run `scripts/check-phase-readiness.cjs <plan-id> <phase-number>`. If the script exits non-zero, halt the phase and report the blocking issues before continuing.
|
|
75
|
-
|
|
76
|
-
Read `<root>/config/hooks/PRE_PHASE.md` and execute its instructions before starting the phase.
|
|
77
|
-
|
|
78
|
-
#### 7b. Task dispatch
|
|
79
|
-
Identify all tasks scheduled for this phase whose dependencies are fully satisfied. Read `<root>/config/hooks/PRE_TASK_ASSIGNMENT.md` and follow its instructions for agent selection before dispatching tasks.
|
|
80
|
-
|
|
81
|
-
Resolve every selected task's execution route first. Invoke one resolver per selected
|
|
82
|
-
task simultaneously in a single parallel tool operation:
|
|
83
|
-
|
|
84
|
-
```text
|
|
85
|
-
scripts/dispatch-task-execution.cjs resolve <task-file> <current-harness> <workspace> <plan-id> <task-id>
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Resolvers never launch external processes. After interpreting all route results, issue
|
|
89
|
-
every external execution and every sub-agent **together in one parallel
|
|
90
|
-
tool operation**. External execution uses:
|
|
91
|
-
|
|
92
|
-
```text
|
|
93
|
-
scripts/dispatch-task-execution.cjs execute <handoff> <task-file> <current-harness> <workspace> <plan-id> <task-id>
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
`<current-harness>` is the exact supported harness identifier running this
|
|
97
|
-
skill; `<workspace>` is the project working directory.
|
|
98
|
-
|
|
99
|
-
Interpret the one-line JSON result and act on its `kind` exactly once:
|
|
100
|
-
|
|
101
|
-
| `kind` | Required action |
|
|
102
|
-
| --- | --- |
|
|
103
|
-
| `native-default` | Dispatch natively with no execution-setting prose. |
|
|
104
|
-
| `native-override` | Dispatch natively, explicitly requiring the exact returned `model`. Require the returned `reasoningEffort` only when that property is present. |
|
|
105
|
-
| `external-override` | Run the `execute` command with the returned `handoff`, then read its result against this same table. |
|
|
106
|
-
| `fallback` | Nothing launched. Record the returned `reason` and `detail` visibly, then dispatch natively with no execution-setting prose. |
|
|
107
|
-
| `launched-success` | The external process exited zero. Do not dispatch natively; review status and evidence as you would for a native agent. |
|
|
108
|
-
| `launched-failure` | A failed task. Set its status to `failed` and run `<root>/config/hooks/POST_ERROR_DETECTION.md`. Never retry it natively. |
|
|
109
|
-
| `infrastructure-failure` | Handle exactly as the preceding row. |
|
|
110
|
-
|
|
111
|
-
Handoff rules:
|
|
112
|
-
|
|
113
|
-
- Pass the exact opaque `handoff` string the resolver returned for that task. Never reconstruct one.
|
|
114
|
-
- Never reuse a handoff for another task, and never rerun resolution after launches begin.
|
|
115
|
-
|
|
116
|
-
Deploy all remaining native sub-agents simultaneously. Each sub-agent must read and execute `<root>/config/hooks/PRE_TASK_EXECUTION.md` before any implementation work, then execute the task and update its status. Do not run `scripts/check-for-updates.cjs`; delegated workers do not consume update notices.
|
|
117
|
-
|
|
118
|
-
#### 7c. Phase completion verification
|
|
119
|
-
Ensure every task in the phase has status `completed` and collect its outputs. Do not accept a subagent's report of success as proof. Apply the evidence gate in `<root>/config/shared/verification-gate.md` before marking the phase complete.
|
|
120
|
-
|
|
121
|
-
#### 7d. Phase post-execution
|
|
122
|
-
Read `<root>/config/hooks/POST_PHASE.md` and execute its instructions. Do not proceed to the next phase until this hook succeeds.
|
|
123
|
-
|
|
124
|
-
Update the phase status to `completed` in the plan's Execution Blueprint section.
|
|
125
|
-
|
|
126
|
-
Repeat for the next phase until all phases are complete.
|
|
127
|
-
|
|
128
|
-
Apply `<root>/config/shared/anti-rationalization.md` to this rationalization table:
|
|
129
|
-
|
|
130
|
-
| You catch yourself thinking… | The binding rule |
|
|
131
|
-
| --- | --- |
|
|
132
|
-
| "The subagent reported success, so the task is done." | A report is a claim, not evidence. Apply the verification gate before marking the phase complete. |
|
|
133
|
-
| "The tests probably pass." | "Probably" is a red flag. Run the proving command, read its output and exit code, then state the result. |
|
|
134
|
-
| "I'll verify later, after the next phase." | A phase is not complete until `POST_PHASE.md` succeeds against verified evidence. Verify now; do not advance on an unverified phase. |
|
|
135
|
-
|
|
136
|
-
### 8. Post-execution validation
|
|
137
|
-
|
|
138
|
-
Read `<root>/config/hooks/POST_EXECUTION.md` and execute its instructions. If validation fails, halt execution. The plan remains in `plans/` for debugging.
|
|
139
|
-
|
|
140
|
-
Before declaring execution complete, apply the evidence gate in `<root>/config/shared/verification-gate.md` to the plan's Success Criteria and Self Validation steps.
|
|
141
|
-
|
|
142
|
-
#### Run the code review gate
|
|
143
|
-
|
|
144
|
-
After `POST_EXECUTION.md` reports green, follow the `st-code-review` skill and run its bundled mechanism:
|
|
145
|
-
|
|
146
|
-
```text
|
|
147
|
-
code-review.cjs <plan-id> <current-harness>
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
Resolve `code-review.cjs` from the `st-code-review` skill's sibling `scripts` directory and pass the exact supported harness identifier running this skill. If the `st-code-review` skill is not installed, record that outcome in the execution summary and continue to summary and archival.
|
|
151
|
-
|
|
152
|
-
Handle the one JSON line it prints on stdout, in this order:
|
|
153
|
-
|
|
154
|
-
1. Copy it verbatim into the execution summary's review outcome. Do not reformat it or omit fields.
|
|
155
|
-
2. Follow its top-level `action`. If it is `halt`, stop and report the top-level `detail`. If it is `continue`, proceed to the execution summary and archival.
|
|
156
|
-
3. Only when `verdict.kind` is `review-recorded`, read `<plan-dir>/review/review.xml` and `<plan-dir>/review/findings.json`, then decide which findings to act on. `severity` and `confidence` are advisory labels, not instructions.
|
|
157
|
-
|
|
158
|
-
Never report an uncertified review as clean.
|
|
159
|
-
|
|
160
|
-
Hard rules:
|
|
161
|
-
|
|
162
|
-
- The review runs once. Do not re-run the gate to check a fix.
|
|
163
|
-
- Detection uses the reviewer route. Dispatch each fix on the implementer route; the reviewer does not fix its findings.
|
|
164
|
-
- After any fix, re-run `POST_EXECUTION.md` in full before declaring execution complete. The earlier green result no longer applies.
|
|
165
|
-
|
|
166
|
-
### 9. Append execution summary
|
|
167
|
-
|
|
168
|
-
Append an execution summary section to the plan document, filling every field of `<root>/config/templates/EXECUTION_SUMMARY_TEMPLATE.md`. Under Noteworthy Events, always record the review gate's JSON line verbatim, then which findings you acted on versus ignored and why.
|
|
169
|
-
|
|
170
|
-
### 10. Archive the plan
|
|
171
|
-
|
|
172
|
-
Move the completed plan directory from `<root>/plans/<plan-folder>` to `<root>/archive/<plan-folder>`, preserving the entire folder structure. If the move fails, log the error but do not fail the overall execution.
|
|
173
|
-
|
|
174
|
-
## Failure Modes
|
|
175
|
-
|
|
176
|
-
- **Execution errors.** If a task fails, read `<root>/config/hooks/POST_ERROR_DETECTION.md`, document the error in Noteworthy Events, halt the phase, and request user direction before continuing.
|
|
177
|
-
|
|
178
|
-
## Execution Summary
|
|
179
|
-
|
|
180
|
-
Conclude with exactly this block (a retained update notice, when present, follows separately):
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
---
|
|
184
|
-
Execution Summary:
|
|
185
|
-
- Plan ID: [numeric-id]
|
|
186
|
-
- Status: Archived
|
|
187
|
-
- Location: [absolute path to archive directory]
|
|
188
|
-
---
|
|
189
|
-
```
|
|
190
|
-
|
|
191
|
-
The summary is consumed by downstream automation; keep the format exact.
|
|
192
|
-
|
|
193
|
-
When the retained update `notice` is present, append that exact sentence after
|
|
194
|
-
the structured summary block, or after your final response when this skill emits
|
|
195
|
-
no summary block. Nothing may follow the notice.
|