strikethroo 3.22.0 → 3.23.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/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-jHeACNxJ.js} +1 -1
- package/dist-web/assets/{architectureDiagram-3BPJPVTR-D65RMVqJ.js → architectureDiagram-3BPJPVTR-YEfoVq2C.js} +1 -1
- package/dist-web/assets/{blockDiagram-GPEHLZMM-CNIwP_yH.js → blockDiagram-GPEHLZMM-CKNhUrSl.js} +1 -1
- package/dist-web/assets/{c4Diagram-AAUBKEIU-CuZ4SoKV.js → c4Diagram-AAUBKEIU-BUnZM9hy.js} +1 -1
- package/dist-web/assets/channel-DzwEqBOx.js +1 -0
- package/dist-web/assets/{chunk-2J33WTMH-DM4ZcjVq.js → chunk-2J33WTMH-BL9I8QVe.js} +1 -1
- package/dist-web/assets/{chunk-4BX2VUAB-DI3-zGiF.js → chunk-4BX2VUAB-Ewtad7Xh.js} +1 -1
- package/dist-web/assets/{chunk-55IACEB6-DBdh-eer.js → chunk-55IACEB6-D1gf7ffS.js} +1 -1
- package/dist-web/assets/{chunk-727SXJPM-B0HDPh0I.js → chunk-727SXJPM-DhgLxKNY.js} +1 -1
- package/dist-web/assets/{chunk-AQP2D5EJ-C0MnLmRm.js → chunk-AQP2D5EJ-DxBudRkA.js} +1 -1
- package/dist-web/assets/{chunk-FMBD7UC4-CmggDcp1.js → chunk-FMBD7UC4-DeC2JqzU.js} +1 -1
- package/dist-web/assets/{chunk-ND2GUHAM-BSIdB1y0.js → chunk-ND2GUHAM-CYhgD82Y.js} +1 -1
- package/dist-web/assets/{chunk-QZHKN3VN-BTHsXhgb.js → chunk-QZHKN3VN-DFdnQMTu.js} +1 -1
- package/dist-web/assets/classDiagram-4FO5ZUOK-BRC02_Us.js +1 -0
- package/dist-web/assets/classDiagram-v2-Q7XG4LA2-BRC02_Us.js +1 -0
- package/dist-web/assets/{cose-bilkent-S5V4N54A-IXUMXU5h.js → cose-bilkent-S5V4N54A-BI1dHZMX.js} +1 -1
- package/dist-web/assets/{dagre-BM42HDAG-CtwBET_X.js → dagre-BM42HDAG-fXKuux4v.js} +1 -1
- package/dist-web/assets/{diagram-2AECGRRQ-DRe1AFa_.js → diagram-2AECGRRQ-DKq4zrlK.js} +1 -1
- package/dist-web/assets/{diagram-5GNKFQAL-D9IRdgWX.js → diagram-5GNKFQAL-Bvi8mdY0.js} +1 -1
- package/dist-web/assets/{diagram-KO2AKTUF-CQi7gmRS.js → diagram-KO2AKTUF-DrDyiyEj.js} +1 -1
- package/dist-web/assets/{diagram-LMA3HP47-B0fp5jh8.js → diagram-LMA3HP47-DSvuIKAW.js} +1 -1
- package/dist-web/assets/{diagram-OG6HWLK6-B2ujFhv2.js → diagram-OG6HWLK6-DV2asWwM.js} +1 -1
- package/dist-web/assets/{erDiagram-TEJ5UH35-DcxHh3A8.js → erDiagram-TEJ5UH35-MZ6fibBd.js} +1 -1
- package/dist-web/assets/{flowDiagram-I6XJVG4X-Btsglt1O.js → flowDiagram-I6XJVG4X-2143pUWk.js} +1 -1
- package/dist-web/assets/{ganttDiagram-6RSMTGT7-BRaGl6R4.js → ganttDiagram-6RSMTGT7-e9LtoZtU.js} +1 -1
- package/dist-web/assets/{gitGraphDiagram-PVQCEYII-Cl1DR87j.js → gitGraphDiagram-PVQCEYII-ips275ho.js} +1 -1
- package/dist-web/assets/{index-DXt7jz3h.js → index-B3YCBK7w.js} +4 -4
- package/dist-web/assets/{index-CxXoZ0_J.js → index-CMaPlX7A.js} +1 -1
- package/dist-web/assets/{index-DZ4QtqqW.js → index-Jwc4l-VH.js} +1 -1
- package/dist-web/assets/{infoDiagram-5YYISTIA-GMZDkbDI.js → infoDiagram-5YYISTIA-B7oKsKsv.js} +1 -1
- package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-DC8HBMwN.js → ishikawaDiagram-YF4QCWOH-CrNPa793.js} +1 -1
- package/dist-web/assets/{journeyDiagram-JHISSGLW-4KT1uAXJ.js → journeyDiagram-JHISSGLW-CGO-LEhD.js} +1 -1
- package/dist-web/assets/{kanban-definition-UN3LZRKU-bBpM_7W0.js → kanban-definition-UN3LZRKU-rIsEdMxP.js} +1 -1
- package/dist-web/assets/{linear-BzW5Mi4V.js → linear-BU1quxyu.js} +1 -1
- package/dist-web/assets/{mermaid.core-BZXehlCp.js → mermaid.core-aQod1w7a.js} +4 -4
- package/dist-web/assets/{mindmap-definition-RKZ34NQL-B8RhYsaN.js → mindmap-definition-RKZ34NQL-Dc02zN4t.js} +1 -1
- package/dist-web/assets/{pieDiagram-4H26LBE5-DV749i9Y.js → pieDiagram-4H26LBE5-BORMGZ-m.js} +1 -1
- package/dist-web/assets/{quadrantDiagram-W4KKPZXB-Cduffe8j.js → quadrantDiagram-W4KKPZXB-CQBpP22R.js} +1 -1
- package/dist-web/assets/{requirementDiagram-4Y6WPE33-C7KngwZn.js → requirementDiagram-4Y6WPE33-C28ZNEm_.js} +1 -1
- package/dist-web/assets/{sankeyDiagram-5OEKKPKP-CJjwUGG3.js → sankeyDiagram-5OEKKPKP-D9eAWGSu.js} +1 -1
- package/dist-web/assets/{sequenceDiagram-3UESZ5HK-BARiZOtJ.js → sequenceDiagram-3UESZ5HK-C9NEd5vS.js} +1 -1
- package/dist-web/assets/{stateDiagram-AJRCARHV-DA1dHBGx.js → stateDiagram-AJRCARHV-CxoIWLu1.js} +1 -1
- package/dist-web/assets/stateDiagram-v2-BHNVJYJU-DJSd8HxM.js +1 -0
- package/dist-web/assets/{timeline-definition-PNZ67QCA-ClE6cvJF.js → timeline-definition-PNZ67QCA-C673cnL6.js} +1 -1
- package/dist-web/assets/{vennDiagram-CIIHVFJN-BLR57Itf.js → vennDiagram-CIIHVFJN-B_IXDjN9.js} +1 -1
- package/dist-web/assets/{wardley-L42UT6IY-EA8x1UUF.js → wardley-L42UT6IY-B0LbSKrG.js} +1 -1
- package/dist-web/assets/{wardleyDiagram-YWT4CUSO-DHktlei-.js → wardleyDiagram-YWT4CUSO-UhStZBiO.js} +1 -1
- package/dist-web/assets/{xychartDiagram-2RQKCTM6-DOxQD_Ha.js → xychartDiagram-2RQKCTM6-L0eQO7Eo.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,429 +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/validate-plan-blueprint.ts
|
|
31
|
-
var validate_plan_blueprint_exports = {};
|
|
32
|
-
__export(validate_plan_blueprint_exports, {
|
|
33
|
-
main: () => main
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(validate_plan_blueprint_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
|
-
|
|
168
|
-
// src/skill-scripts/shared/plan-resolve.ts
|
|
169
|
-
var fs3 = __toESM(require("fs"));
|
|
170
|
-
var path3 = __toESM(require("path"));
|
|
171
|
-
var isValidRootDir = (strikethrooPath) => {
|
|
172
|
-
try {
|
|
173
|
-
if (!fs3.existsSync(strikethrooPath)) return false;
|
|
174
|
-
if (!fs3.lstatSync(strikethrooPath).isDirectory()) return false;
|
|
175
|
-
const metadataPath = path3.join(strikethrooPath, ".init-metadata.json");
|
|
176
|
-
if (!fs3.existsSync(metadataPath)) return false;
|
|
177
|
-
const metadata = JSON.parse(fs3.readFileSync(metadataPath, "utf8"));
|
|
178
|
-
return metadata && typeof metadata === "object" && "version" in metadata;
|
|
179
|
-
} catch (_err) {
|
|
180
|
-
return false;
|
|
181
|
-
}
|
|
182
|
-
};
|
|
183
|
-
var checkStandardRootShortcut = (filePath) => {
|
|
184
|
-
const planDir = path3.dirname(filePath);
|
|
185
|
-
const parentDir = path3.dirname(planDir);
|
|
186
|
-
const possibleRoot = path3.dirname(parentDir);
|
|
187
|
-
const parentBase = path3.basename(parentDir);
|
|
188
|
-
if (parentBase !== "plans" && parentBase !== "archive") return null;
|
|
189
|
-
if (path3.basename(possibleRoot) !== "strikethroo") return null;
|
|
190
|
-
const dotAiDir = path3.dirname(possibleRoot);
|
|
191
|
-
if (path3.basename(dotAiDir) !== ".ai") return null;
|
|
192
|
-
return isValidRootDir(possibleRoot) ? possibleRoot : null;
|
|
193
|
-
};
|
|
194
|
-
var resolveByPath = (absolutePath) => {
|
|
195
|
-
let content;
|
|
196
|
-
try {
|
|
197
|
-
content = fs3.readFileSync(absolutePath, "utf8");
|
|
198
|
-
} catch (_err) {
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
const planId = extractPlanId(content, absolutePath);
|
|
202
|
-
if (planId === null) return null;
|
|
203
|
-
const tmRoot = checkStandardRootShortcut(absolutePath) || findStrikethrooRoot(path3.dirname(absolutePath));
|
|
204
|
-
if (!tmRoot) return null;
|
|
205
|
-
return {
|
|
206
|
-
planFile: absolutePath,
|
|
207
|
-
planDir: path3.dirname(absolutePath),
|
|
208
|
-
strikethrooRoot: tmRoot,
|
|
209
|
-
planId
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
var resolveByIdInAncestry = (planId, startPath, searched = /* @__PURE__ */ new Set()) => {
|
|
213
|
-
const tmRoot = findStrikethrooRoot(startPath);
|
|
214
|
-
if (!tmRoot) return null;
|
|
215
|
-
const normalized = path3.normalize(tmRoot);
|
|
216
|
-
if (searched.has(normalized)) return null;
|
|
217
|
-
searched.add(normalized);
|
|
218
|
-
const plans = getAllPlans(tmRoot);
|
|
219
|
-
const match = plans.find((p) => p.id === planId);
|
|
220
|
-
if (match) {
|
|
221
|
-
return {
|
|
222
|
-
planFile: match.file,
|
|
223
|
-
planDir: match.dir,
|
|
224
|
-
strikethrooRoot: tmRoot,
|
|
225
|
-
planId
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
const parentOfRoot = path3.dirname(path3.dirname(tmRoot));
|
|
229
|
-
if (parentOfRoot === tmRoot) return null;
|
|
230
|
-
return resolveByIdInAncestry(planId, parentOfRoot, searched);
|
|
231
|
-
};
|
|
232
|
-
var resolvePlan = (input, startPath = process.cwd()) => {
|
|
233
|
-
if (input === null || input === void 0 || input === "") return null;
|
|
234
|
-
const inputStr = String(input);
|
|
235
|
-
if (inputStr.startsWith("/")) {
|
|
236
|
-
return resolveByPath(inputStr);
|
|
237
|
-
}
|
|
238
|
-
const planId = parseInt(inputStr, 10);
|
|
239
|
-
if (Number.isNaN(planId)) return null;
|
|
240
|
-
return resolveByIdInAncestry(planId, startPath);
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
// src/skill-scripts/shared/blueprint-detection.ts
|
|
244
|
-
var fs4 = __toESM(require("fs"));
|
|
245
|
-
var hasExecutionBlueprint = (planFile) => {
|
|
246
|
-
try {
|
|
247
|
-
const content = fs4.readFileSync(planFile, "utf8");
|
|
248
|
-
return /^## Execution Blueprint/m.test(content);
|
|
249
|
-
} catch (_err) {
|
|
250
|
-
return false;
|
|
251
|
-
}
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
// src/skill-scripts/shared/task-count.ts
|
|
255
|
-
var fs5 = __toESM(require("fs"));
|
|
256
|
-
var path4 = __toESM(require("path"));
|
|
257
|
-
var countTaskFiles = (planDir) => {
|
|
258
|
-
const tasksDir = path4.join(planDir, "tasks");
|
|
259
|
-
if (!fs5.existsSync(tasksDir)) return 0;
|
|
260
|
-
try {
|
|
261
|
-
const stat = fs5.lstatSync(tasksDir);
|
|
262
|
-
if (!stat.isDirectory()) return 0;
|
|
263
|
-
return fs5.readdirSync(tasksDir).filter((f) => f.endsWith(".md")).length;
|
|
264
|
-
} catch (_err) {
|
|
265
|
-
return 0;
|
|
266
|
-
}
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
// src/skill-scripts/shared/task-complexity.ts
|
|
270
|
-
var fs6 = __toESM(require("fs"));
|
|
271
|
-
var path5 = __toESM(require("path"));
|
|
272
|
-
|
|
273
|
-
// src/skill-scripts/shared/complexity-score.ts
|
|
274
|
-
var validateComplexityScore = (value) => {
|
|
275
|
-
const trimmed = value.trim();
|
|
276
|
-
if (!/^\d+$/.test(trimmed)) {
|
|
277
|
-
return { valid: false, reason: "non-integer" };
|
|
278
|
-
}
|
|
279
|
-
const parsed = Number.parseInt(trimmed, 10);
|
|
280
|
-
if (parsed < 1 || parsed > 10) {
|
|
281
|
-
return { valid: false, reason: "out-of-range", value: parsed };
|
|
282
|
-
}
|
|
283
|
-
return { valid: true, value: parsed };
|
|
284
|
-
};
|
|
285
|
-
|
|
286
|
-
// src/skill-scripts/shared/task-file.ts
|
|
287
|
-
var extractFrontmatter = (content) => {
|
|
288
|
-
const match = content.match(/^---\s*\r?\n([\s\S]*?)\r?\n---/);
|
|
289
|
-
return match && match[1] ? match[1] : null;
|
|
290
|
-
};
|
|
291
|
-
|
|
292
|
-
// src/skill-scripts/shared/task-complexity.ts
|
|
293
|
-
var validateTaskComplexityScores = (planDir) => {
|
|
294
|
-
const tasksDir = path5.join(planDir, "tasks");
|
|
295
|
-
if (!fs6.existsSync(tasksDir)) return [];
|
|
296
|
-
let files;
|
|
297
|
-
try {
|
|
298
|
-
if (!fs6.lstatSync(tasksDir).isDirectory()) return [];
|
|
299
|
-
files = fs6.readdirSync(tasksDir).filter((f) => f.endsWith(".md")).sort();
|
|
300
|
-
} catch (_err) {
|
|
301
|
-
return [];
|
|
302
|
-
}
|
|
303
|
-
const invalid = [];
|
|
304
|
-
for (const file of files) {
|
|
305
|
-
let content;
|
|
306
|
-
try {
|
|
307
|
-
content = fs6.readFileSync(path5.join(tasksDir, file), "utf8");
|
|
308
|
-
} catch (_err) {
|
|
309
|
-
invalid.push(`${file}: unreadable`);
|
|
310
|
-
continue;
|
|
311
|
-
}
|
|
312
|
-
const frontmatter = extractFrontmatter(content);
|
|
313
|
-
const match = frontmatter ? frontmatter.match(/^\s*complexity_score\s*:\s*(.*?)\s*(?:#.*)?$/im) : null;
|
|
314
|
-
if (!match || match[1] === void 0) {
|
|
315
|
-
invalid.push(`${file}: missing complexity_score`);
|
|
316
|
-
continue;
|
|
317
|
-
}
|
|
318
|
-
const raw = match[1].trim();
|
|
319
|
-
const result = validateComplexityScore(raw);
|
|
320
|
-
if (result.valid) continue;
|
|
321
|
-
if (result.reason === "non-integer") {
|
|
322
|
-
invalid.push(`${file}: non-integer complexity_score "${raw}"`);
|
|
323
|
-
continue;
|
|
324
|
-
}
|
|
325
|
-
invalid.push(`${file}: complexity_score ${result.value} out of range 1-10`);
|
|
326
|
-
}
|
|
327
|
-
return invalid;
|
|
328
|
-
};
|
|
329
|
-
|
|
330
|
-
// src/skill-scripts/validate-plan-blueprint.ts
|
|
331
|
-
var VALID_FIELDS = [
|
|
332
|
-
"planFile",
|
|
333
|
-
"planDir",
|
|
334
|
-
"taskCount",
|
|
335
|
-
"blueprintExists",
|
|
336
|
-
"strikethrooRoot",
|
|
337
|
-
"planId",
|
|
338
|
-
"complexityScoresValid",
|
|
339
|
-
"invalidComplexityTasks"
|
|
340
|
-
];
|
|
341
|
-
var usage = () => {
|
|
342
|
-
const lines = [
|
|
343
|
-
"Plan ID or absolute path is required",
|
|
344
|
-
"",
|
|
345
|
-
"Usage: node validate-plan-blueprint.cjs <plan-id-or-path> [field-name]",
|
|
346
|
-
"",
|
|
347
|
-
"Examples:",
|
|
348
|
-
" node validate-plan-blueprint.cjs 47",
|
|
349
|
-
" node validate-plan-blueprint.cjs /path/to/plan.md",
|
|
350
|
-
" node validate-plan-blueprint.cjs 47 planFile",
|
|
351
|
-
" node validate-plan-blueprint.cjs 47 blueprintExists"
|
|
352
|
-
];
|
|
353
|
-
lines.forEach((l) => process.stderr.write(`[ERROR] ${l}
|
|
354
|
-
`));
|
|
355
|
-
};
|
|
356
|
-
var listAvailablePlans = (startPath) => {
|
|
357
|
-
const tmRoot = findStrikethrooRoot(startPath);
|
|
358
|
-
if (!tmRoot) return [];
|
|
359
|
-
const plans = getAllPlans(tmRoot);
|
|
360
|
-
return plans.map((p) => p.name).sort((a, b) => {
|
|
361
|
-
const aMatch = a.match(/^(\d+)--/);
|
|
362
|
-
const bMatch = b.match(/^(\d+)--/);
|
|
363
|
-
if (!aMatch || !bMatch || !aMatch[1] || !bMatch[1]) return 0;
|
|
364
|
-
return parseInt(aMatch[1], 10) - parseInt(bMatch[1], 10);
|
|
365
|
-
});
|
|
366
|
-
};
|
|
367
|
-
var main = () => {
|
|
368
|
-
const inputId = process.argv[2];
|
|
369
|
-
const fieldName = process.argv[3];
|
|
370
|
-
if (!inputId) {
|
|
371
|
-
usage();
|
|
372
|
-
process.exit(1);
|
|
373
|
-
}
|
|
374
|
-
const numericInput = parseInt(inputId, 10);
|
|
375
|
-
const isNumeric = !Number.isNaN(numericInput);
|
|
376
|
-
const isAbsolutePath = inputId.startsWith("/");
|
|
377
|
-
if (!isNumeric && !isAbsolutePath) {
|
|
378
|
-
process.stderr.write(`[ERROR] Invalid plan ID: "${inputId}" is not a valid number
|
|
379
|
-
`);
|
|
380
|
-
process.exit(1);
|
|
381
|
-
}
|
|
382
|
-
const resolved = resolvePlan(inputId);
|
|
383
|
-
if (!resolved) {
|
|
384
|
-
process.stderr.write(`[ERROR] Plan ID ${inputId} not found or invalid
|
|
385
|
-
`);
|
|
386
|
-
process.stderr.write("[ERROR] \n");
|
|
387
|
-
const available = listAvailablePlans(process.cwd());
|
|
388
|
-
if (available.length > 0) {
|
|
389
|
-
process.stderr.write("[ERROR] Available plans:\n");
|
|
390
|
-
available.forEach((name) => process.stderr.write(`[ERROR] ${name}
|
|
391
|
-
`));
|
|
392
|
-
}
|
|
393
|
-
process.exit(1);
|
|
394
|
-
}
|
|
395
|
-
const invalidComplexity = validateTaskComplexityScores(resolved.planDir);
|
|
396
|
-
const result = {
|
|
397
|
-
planFile: resolved.planFile,
|
|
398
|
-
planDir: resolved.planDir,
|
|
399
|
-
strikethrooRoot: resolved.strikethrooRoot,
|
|
400
|
-
planId: resolved.planId,
|
|
401
|
-
taskCount: countTaskFiles(resolved.planDir),
|
|
402
|
-
blueprintExists: hasExecutionBlueprint(resolved.planFile) ? "yes" : "no",
|
|
403
|
-
complexityScoresValid: invalidComplexity.length === 0 ? "yes" : "no",
|
|
404
|
-
invalidComplexityTasks: invalidComplexity.join("; ")
|
|
405
|
-
};
|
|
406
|
-
if (fieldName) {
|
|
407
|
-
if (!VALID_FIELDS.includes(fieldName)) {
|
|
408
|
-
process.stderr.write(`[ERROR] Invalid field name: ${fieldName}
|
|
409
|
-
`);
|
|
410
|
-
process.stderr.write(`[ERROR] Valid fields: ${VALID_FIELDS.join(", ")}
|
|
411
|
-
`);
|
|
412
|
-
process.exit(1);
|
|
413
|
-
}
|
|
414
|
-
const value = result[fieldName];
|
|
415
|
-
process.stdout.write(`${String(value)}
|
|
416
|
-
`);
|
|
417
|
-
} else {
|
|
418
|
-
process.stdout.write(`${JSON.stringify(result, null, 2)}
|
|
419
|
-
`);
|
|
420
|
-
}
|
|
421
|
-
process.exit(0);
|
|
422
|
-
};
|
|
423
|
-
if (require.main === module) {
|
|
424
|
-
main();
|
|
425
|
-
}
|
|
426
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
427
|
-
0 && (module.exports = {
|
|
428
|
-
main
|
|
429
|
-
});
|
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: st-generate-tasks
|
|
3
|
-
description: Use when the user asks to decompose, break down, or generate tasks for an existing Strikethroo plan ID in this repository — triggers include generate tasks, break down the plan, decompose plan, create the task blueprint. Do not use to create a new plan, to execute tasks, or for generic project planning outside Strikethroo.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# st-generate-tasks
|
|
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
|
-
### 3. Load project context
|
|
37
|
-
|
|
38
|
-
Read these files, in order:
|
|
39
|
-
|
|
40
|
-
- `<root>/config/STRIKETHROO.md` — project and directory conventions.
|
|
41
|
-
- The plan body at the path returned by step 2 — the contract for
|
|
42
|
-
what tasks must exist.
|
|
43
|
-
- `<root>/config/templates/TASK_TEMPLATE.md` — the schema every task file
|
|
44
|
-
must match.
|
|
45
|
-
- `<root>/config/shared/anti-rationalization.md` — apply in step 4.
|
|
46
|
-
|
|
47
|
-
### 4. Analyze and decompose the plan
|
|
48
|
-
|
|
49
|
-
Read the entire plan. Identify all concrete deliverables **explicitly stated**.
|
|
50
|
-
Decompose each deliverable into atomic tasks only when genuinely needed.
|
|
51
|
-
|
|
52
|
-
**Task minimization (mandatory):**
|
|
53
|
-
|
|
54
|
-
- Create only the minimum number of tasks necessary. Target a 20–30%
|
|
55
|
-
reduction from comprehensive lists by questioning the necessity of each
|
|
56
|
-
candidate.
|
|
57
|
-
- Every task corresponds to an explicit requirement, never a nice-to-have, a
|
|
58
|
-
"best practice", or future extensibility the plan does not mention.
|
|
59
|
-
- Each task has a unique, non-overlapping purpose.
|
|
60
|
-
- Keep error handling inside the task that owns the behavior it guards.
|
|
61
|
-
|
|
62
|
-
Apply `<root>/config/shared/anti-rationalization.md` to this rationalization table:
|
|
63
|
-
|
|
64
|
-
| You catch yourself thinking… | The binding rule |
|
|
65
|
-
| --- | --- |
|
|
66
|
-
| "One extra task won't hurt." | It violates the 20–30% minimization target. Every task traces to an **explicitly stated** deliverable or it does not exist. |
|
|
67
|
-
| "This edge case deserves its own task." | Fold it into the task that owns the behavior. Do not split trivially small operations into separate units. |
|
|
68
|
-
| "I'll add a test suite to be safe." | Comprehensive tests for trivial functionality are gold-plating. Follow the test philosophy — meaningful tests only. |
|
|
69
|
-
| "Future extensibility justifies this task." | YAGNI. The plan does not mention it, so it is not a task. |
|
|
70
|
-
|
|
71
|
-
### 5. Apply granularity and skill rules
|
|
72
|
-
|
|
73
|
-
Each task must be:
|
|
74
|
-
|
|
75
|
-
- **Single-purpose** — one clear deliverable.
|
|
76
|
-
- **Atomic** — cannot be meaningfully split further.
|
|
77
|
-
- **Skill-specific** — executable by an agent with 1–2 technical skills.
|
|
78
|
-
- **Verifiable** — has explicit acceptance criteria that include at least one
|
|
79
|
-
concrete, runnable verification step (a command plus its expected output, or
|
|
80
|
-
another observable signal). Never settle for a vague "works correctly".
|
|
81
|
-
|
|
82
|
-
Infer skills in kebab-case from the task's technical requirements. Use one
|
|
83
|
-
skill for a single-domain task and two for complementary domains, such as
|
|
84
|
-
`["api-endpoints", "database"]`. Three or more means the task must be broken
|
|
85
|
-
down further.
|
|
86
|
-
|
|
87
|
-
### 6. Test philosophy: "write a few tests, mostly integration"
|
|
88
|
-
|
|
89
|
-
**Write tests for:**
|
|
90
|
-
|
|
91
|
-
- Custom business logic and algorithms.
|
|
92
|
-
- Critical user workflows and data transformations.
|
|
93
|
-
- Edge cases and error conditions in core functionality.
|
|
94
|
-
- Integration points between components.
|
|
95
|
-
- Complex validation or calculation logic.
|
|
96
|
-
|
|
97
|
-
**Do not write tests for:**
|
|
98
|
-
|
|
99
|
-
- Third-party library and framework functionality.
|
|
100
|
-
- Simple CRUD without custom logic.
|
|
101
|
-
- Trivial getters/setters and static configuration.
|
|
102
|
-
- Obvious functionality that would break immediately if incorrect.
|
|
103
|
-
|
|
104
|
-
Combine related test scenarios into one task ("Test user authentication flow",
|
|
105
|
-
not separate tasks for login, logout, and validation). Favor integration and
|
|
106
|
-
critical-path coverage over per-method unit tests. Never create one test task
|
|
107
|
-
per CRUD operation.
|
|
108
|
-
|
|
109
|
-
Copy these rules into the "Implementation Notes" of every test task you
|
|
110
|
-
generate.
|
|
111
|
-
|
|
112
|
-
### 7. Dependency analysis
|
|
113
|
-
|
|
114
|
-
Task B depends on task A when B requires A's output or artifacts, modifies
|
|
115
|
-
code created by A, or tests functionality implemented by A. Record it as a
|
|
116
|
-
**hard dependency** when B cannot start before A completes and as a **soft
|
|
117
|
-
dependency** when B merely runs better after A. Validate that the final
|
|
118
|
-
dependency graph is acyclic.
|
|
119
|
-
|
|
120
|
-
### 8. Complexity analysis
|
|
121
|
-
|
|
122
|
-
For every candidate task, assign a `complexity_score` (integer 1–10) before
|
|
123
|
-
writing any file. Read `references/complexity-rubric.md` before scoring; it
|
|
124
|
-
defines the four dimensions each band is judged on. Then apply these rules:
|
|
125
|
-
|
|
126
|
-
- Score ≥ 8 → decompose further; do not emit as-is.
|
|
127
|
-
- Score 6–7 → sharpen or split; do not emit without an explicit reason.
|
|
128
|
-
- Vague acceptance criteria → sharpen them into a concrete, runnable
|
|
129
|
-
verification step.
|
|
130
|
-
- Trivially small adjacent tasks → merge them.
|
|
131
|
-
|
|
132
|
-
**Loop-back rule:** after applying split, sharpen, or merge, re-run dependency
|
|
133
|
-
analysis and re-score the adjusted tasks. Repeat no more than three times. If
|
|
134
|
-
complexity is still unresolved after three passes, stop and surface the
|
|
135
|
-
blocker to the user.
|
|
136
|
-
|
|
137
|
-
### 9. Allocate task IDs
|
|
138
|
-
|
|
139
|
-
Run `scripts/get-next-task-id.cjs <plan-id>` once for the first available task
|
|
140
|
-
ID, then allocate the rest by incrementing in-process. Use the unpadded
|
|
141
|
-
integer in the task frontmatter `id` field and the zero-padded form in the
|
|
142
|
-
filename. The slug derives from a short task title: lowercase, alphanumeric
|
|
143
|
-
and hyphens only, collapsed, trimmed.
|
|
144
|
-
|
|
145
|
-
### 10. Emit the task files
|
|
146
|
-
|
|
147
|
-
Write each task to:
|
|
148
|
-
|
|
149
|
-
```
|
|
150
|
-
<root>/plans/<plan-dir-name>/tasks/{padded-id}--{slug}.md
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Each file must conform to `<root>/config/templates/TASK_TEMPLATE.md`. Add
|
|
154
|
-
`complexity_notes` only when the score needs justification. Never write
|
|
155
|
-
`execution_profile`; the routing helper writes it.
|
|
156
|
-
|
|
157
|
-
Fill every body section with task-specific content. Place detailed
|
|
158
|
-
implementation guidance inside a `<details>` block under "Implementation
|
|
159
|
-
Notes", written so a non-thinking LLM could execute the task from that
|
|
160
|
-
section alone.
|
|
161
|
-
|
|
162
|
-
### 11. Validation checklist
|
|
163
|
-
|
|
164
|
-
Before declaring task generation complete, verify:
|
|
165
|
-
|
|
166
|
-
- Every **explicitly stated** deliverable in the plan is covered by a task.
|
|
167
|
-
- No two tasks overlap in purpose.
|
|
168
|
-
- Dependencies form an acyclic graph, with no orphan or circular references.
|
|
169
|
-
- Groups are consistent across the plan.
|
|
170
|
-
- After writing the task files, run
|
|
171
|
-
`scripts/validate-plan-blueprint.cjs <plan-id> complexityScoresValid`. Stop
|
|
172
|
-
unless it prints `yes`; if it prints `no`, run
|
|
173
|
-
`scripts/validate-plan-blueprint.cjs <plan-id> invalidComplexityTasks` to see
|
|
174
|
-
which files are missing, non-integer, or out-of-range, fix them, and re-run.
|
|
175
|
-
|
|
176
|
-
### 12. Route task execution
|
|
177
|
-
|
|
178
|
-
Read `<root>/config/hooks/TASK_EXECUTION_ROUTING.md` and follow its
|
|
179
|
-
instructions together with this procedure:
|
|
180
|
-
|
|
181
|
-
1. Run `scripts/route-task-execution.cjs profiles <plan-id>`. On `no-config`
|
|
182
|
-
or `disabled`, routing is off; skip the remaining routing steps and
|
|
183
|
-
continue. On `invalid-config`, stop and surface the errors to the user; do
|
|
184
|
-
not generate the blueprint.
|
|
185
|
-
2. Assign every task in the plan's `tasks/` directory exactly one configured
|
|
186
|
-
profile name. Classify the tasks generated in this run from the content
|
|
187
|
-
already in your context. If the plan carried task files from an earlier
|
|
188
|
-
generation run, read those files to classify them.
|
|
189
|
-
3. Write the complete task-ID-to-profile mapping as a JSON object to a
|
|
190
|
-
temporary file, for example `{"1": "routine", "2": "demanding"}`.
|
|
191
|
-
4. Run `scripts/route-task-execution.cjs apply <plan-id> <mapping-file>`.
|
|
192
|
-
Target selection happens later at task dispatch, never during generation.
|
|
193
|
-
5. On `routed`, delete the temporary mapping file and continue. On any failure
|
|
194
|
-
result (`invalid-assignments`, `invalid-tasks`, `routing-failure`,
|
|
195
|
-
`infrastructure-failure`), stop and surface the JSON errors to the user.
|
|
196
|
-
Never continue to blueprint generation with partially routed tasks.
|
|
197
|
-
|
|
198
|
-
Never hand-write a concrete execution target into task frontmatter or task
|
|
199
|
-
bodies.
|
|
200
|
-
|
|
201
|
-
### 13. Run the POST_TASK_GENERATION_ALL hook
|
|
202
|
-
|
|
203
|
-
Read `<root>/config/hooks/POST_TASK_GENERATION_ALL.md` and follow its
|
|
204
|
-
instructions, using `<root>/config/templates/BLUEPRINT_TEMPLATE.md` for the
|
|
205
|
-
Execution Blueprint structure. Run the hook only after routing succeeded or
|
|
206
|
-
reported routing off.
|
|
207
|
-
|
|
208
|
-
When the retained update `notice` is present, append that exact sentence after
|
|
209
|
-
the structured summary block, or after your final response when this skill emits
|
|
210
|
-
no summary block. Nothing may follow the notice.
|
|
211
|
-
|
|
212
|
-
## Failure Modes
|
|
213
|
-
|
|
214
|
-
- **User declines to clarify a blocking ambiguity.** Mark the affected tasks
|
|
215
|
-
with `status: "needs-clarification"` and document the open question in the
|
|
216
|
-
task's "Implementation Notes". Do not invent answers.
|
|
217
|
-
- **A helper script fails unexpectedly.** Surface stderr to the user and
|
|
218
|
-
stop — do not fall back to manual ID allocation or path discovery.
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
# Complexity rubric
|
|
2
|
-
|
|
3
|
-
| Score | Skill breadth | Acceptance-criteria clarity | Integration surface | Decomposition depth |
|
|
4
|
-
| --- | --- | --- | --- | --- |
|
|
5
|
-
| 1–3 | One well-known skill | Criteria are concrete and observable | None or a single file/module | No further split possible |
|
|
6
|
-
| 4–5 | One primary skill plus a familiar adjacent skill | Criteria are clear with few edge cases | One component or API boundary | Already atomic |
|
|
7
|
-
| 6–7 | Two distinct skills, or one skill with ambiguous requirements | Criteria need clarification or have multiple edge cases | Multiple components or contracts | Could still be split |
|
|
8
|
-
| 8–10 | Three or more skills, or cross-cutting design decisions | Criteria are vague, unknown, or depend on unresolved choices | Wide integration surface or external systems | Must be decomposed further |
|