@pmelab/gtd 58.1.0 → 59.0.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/.claude-plugin/plugin.json +1 -1
- package/README.md +115 -390
- package/dist/chunks/{Schema-B3o6eRNU.mjs → testkit-CMBAAyRK.mjs} +13409 -3351
- package/dist/gtd.bundle.mjs +76 -59
- package/dist/testkit/gherkin.mjs +30 -2
- package/dist/testkit.mjs +1 -1
- package/package.json +3 -42
- package/skills/authoring/SKILL.md +31 -25
- package/src/cli/Cli.test.ts +15 -19
- package/src/cli/Cli.ts +2 -4
- package/src/cli/Program.test.ts +60 -29
- package/src/cli/Program.ts +5 -7
- package/src/edge/Edge.ts +3 -3
- package/src/flags/index.test.ts +0 -13
- package/src/flags/index.ts +1 -3
- package/src/gherkin/git-control.feature +78 -0
- package/src/gherkin/index.ts +35 -1
- package/src/install/Install.test.ts +14 -11
- package/src/install/Install.ts +38 -15
- package/src/install/index.ts +1 -2
- package/src/replay/Replay.test.ts +1 -1
- package/src/replay/index.ts +1 -1
- package/src/step/planStart.ts +6 -1
- package/src/testkit/TestRepo.test.ts +118 -2
- package/src/testkit/TestRepo.ts +57 -6
- package/src/testkit/index.ts +1 -0
- package/src/twins/EmittedScriptRecognizer.ts +12 -14
- package/src/twins/FlowScripts.ts +10 -9
- package/src/twins/InMemRepo.ts +26 -1
- package/src/twins/Layers.ts +12 -1
- package/src/twins/index.ts +6 -1
- package/src/workflow/index.ts +1 -0
- package/src/workflow/load.test.ts +138 -113
- package/src/workflow/load.ts +1 -1
- package/src/workflow/vars.test.ts +30 -3
- package/src/workflow/vars.ts +34 -2
- package/src/workflow-kit/index.ts +1 -1
- package/dist/chunks/reserved-lMYCaapY.mjs +0 -1990
- package/dist/chunks/review-Bfaror38.mjs +0 -427
- package/dist/chunks/tail-Bd7L940p.mjs +0 -355
- package/dist/chunks/testkit-D1-auYau.mjs +0 -10362
- package/dist/workflows/cleanup.mjs +0 -36
- package/dist/workflows/feature.mjs +0 -1018
- package/dist/workflows/fix.mjs +0 -41
- package/dist/workflows/review.mjs +0 -45
- package/dist/workflows/rollout.mjs +0 -48
- package/dist/workflows.mjs +0 -40651
- package/src/install/ConfigScaffold.ts +0 -22
- package/src/workflows/cleanup/cleanup-path.feature +0 -94
- package/src/workflows/cleanup/cleanup.feature +0 -315
- package/src/workflows/cleanup/cleanup.test.ts +0 -276
- package/src/workflows/cleanup/cleanup.ts +0 -52
- package/src/workflows/cleanup/index.ts +0 -6
- package/src/workflows/feature/acceptance-criteria-tier.feature +0 -25
- package/src/workflows/feature/acceptance-criteria.feature +0 -389
- package/src/workflows/feature/criteria-coverage.feature +0 -102
- package/src/workflows/feature/criteria.test.ts +0 -147
- package/src/workflows/feature/criteria.ts +0 -267
- package/src/workflows/feature/fast-path.feature +0 -93
- package/src/workflows/feature/feature.test.ts +0 -338
- package/src/workflows/feature/feature.ts +0 -156
- package/src/workflows/feature/green.ts +0 -19
- package/src/workflows/feature/index.ts +0 -18
- package/src/workflows/feature/lens-models.feature +0 -69
- package/src/workflows/feature/lens-review.feature +0 -566
- package/src/workflows/feature/naive-acceptance.feature +0 -147
- package/src/workflows/feature/naive-test.feature +0 -263
- package/src/workflows/feature/one-step-land.feature +0 -93
- package/src/workflows/feature/planning.ts +0 -41
- package/src/workflows/feature/refactor-absorbs.feature +0 -131
- package/src/workflows/feature/refactor-first.feature +0 -158
- package/src/workflows/feature/refactor-lens-models.feature +0 -79
- package/src/workflows/feature/refactor-rebuild.feature +0 -273
- package/src/workflows/feature/refactor-review.feature +0 -1528
- package/src/workflows/feature/refactor.test.ts +0 -1220
- package/src/workflows/feature/refactor.ts +0 -368
- package/src/workflows/feature/release-flag.feature +0 -167
- package/src/workflows/feature/release-flag.test.ts +0 -49
- package/src/workflows/feature/release-flag.ts +0 -46
- package/src/workflows/feature/review-gate.feature +0 -241
- package/src/workflows/feature/reviewer-walkthrough.feature +0 -142
- package/src/workflows/feature/risk-tier.feature +0 -351
- package/src/workflows/feature/seam-rejection.feature +0 -146
- package/src/workflows/feature/seam.feature +0 -297
- package/src/workflows/feature/seam.test.ts +0 -527
- package/src/workflows/feature/seam.ts +0 -426
- package/src/workflows/feature/standards.feature +0 -354
- package/src/workflows/feature/steps.test.ts +0 -65
- package/src/workflows/feature/steps.ts +0 -45
- package/src/workflows/feature/tier-pin.feature +0 -66
- package/src/workflows/feature/tier.test.ts +0 -166
- package/src/workflows/feature/tier.ts +0 -56
- package/src/workflows/fix/fix-lens-origin.feature +0 -114
- package/src/workflows/fix/fix-quality.feature +0 -212
- package/src/workflows/fix/fix.feature +0 -79
- package/src/workflows/fix/fix.test.ts +0 -74
- package/src/workflows/fix/fix.ts +0 -52
- package/src/workflows/fix/index.ts +0 -6
- package/src/workflows/index.ts +0 -47
- package/src/workflows/review/index.ts +0 -6
- package/src/workflows/review/review-door.feature +0 -199
- package/src/workflows/review/review.test.ts +0 -27
- package/src/workflows/review/review.ts +0 -60
- package/src/workflows/rollout/index.ts +0 -6
- package/src/workflows/rollout/rollout.feature +0 -510
- package/src/workflows/rollout/rollout.test.ts +0 -263
- package/src/workflows/rollout/rollout.ts +0 -82
- package/src/workflows/shared/__fixtures__/feature-collecting-prompt.txt +0 -98
- package/src/workflows/shared/access.test.ts +0 -62
- package/src/workflows/shared/access.ts +0 -24
- package/src/workflows/shared/config.fixture.ts +0 -12
- package/src/workflows/shared/fences.ts +0 -24
- package/src/workflows/shared/health.test.ts +0 -148
- package/src/workflows/shared/health.ts +0 -191
- package/src/workflows/shared/learn.test.ts +0 -140
- package/src/workflows/shared/learn.ts +0 -201
- package/src/workflows/shared/lenses.test.ts +0 -39
- package/src/workflows/shared/lenses.ts +0 -294
- package/src/workflows/shared/options.test.ts +0 -157
- package/src/workflows/shared/options.ts +0 -92
- package/src/workflows/shared/progress.feature +0 -124
- package/src/workflows/shared/prose.ts +0 -263
- package/src/workflows/shared/recheck.feature +0 -60
- package/src/workflows/shared/registry.test.ts +0 -345
- package/src/workflows/shared/registry.ts +0 -183
- package/src/workflows/shared/reserved.ts +0 -11
- package/src/workflows/shared/review.test.ts +0 -1062
- package/src/workflows/shared/review.ts +0 -446
- package/src/workflows/shared/skills.test.ts +0 -121
- package/src/workflows/shared/skills.ts +0 -49
- package/src/workflows/shared/standards.test.ts +0 -90
- package/src/workflows/shared/standards.ts +0 -156
- package/src/workflows/shared/steps.test.ts +0 -219
- package/src/workflows/shared/steps.ts +0 -201
- package/src/workflows/shared/tail.test.ts +0 -454
- package/src/workflows/shared/tail.ts +0 -264
- package/src/workflows/shared/text.fixture.ts +0 -128
- package/src/workflows/shared/text.test.ts +0 -1430
- package/src/workflows/shared/text.ts +0 -1700
- package/src/workflows/shared/threads.test.ts +0 -129
- package/src/workflows/shared/vars.ts +0 -47
- package/src/workflows/shared/workflows.steps.ts +0 -54
package/dist/workflows/fix.mjs
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { read, refuse, removeScript, run, scope, start } from "../flows.mjs";
|
|
2
|
-
import { b as reviewNotes, x as reviewRisks } from "../chunks/steering-CCNvngSH.mjs";
|
|
3
|
-
import { G as fixReviewNotesPrompt, St as envDefaults, W as finisherSystem, c as baseline, i as skills, j as agentWithSkills, n as summary, r as access, s as shipped, t as steering, v as REVIEW, x as coder, xt as defaults } from "../chunks/reserved-lMYCaapY.mjs";
|
|
4
|
-
import { r as handOffTail, t as REVIEW_ORIG } from "../chunks/tail-Bd7L940p.mjs";
|
|
5
|
-
//#region src/workflows/fix/fix.ts
|
|
6
|
-
/**
|
|
7
|
-
* Fix every note a human left in a handed-off `.gtd/REVIEW.md` and every
|
|
8
|
-
* risk its reviewer marked, in one turn; the review files go once it is done.
|
|
9
|
-
*/
|
|
10
|
-
const fixReviewNotes = () => scope("notes", async () => {
|
|
11
|
-
const record = read(".gtd/REVIEW.md") ?? "";
|
|
12
|
-
const orig = read(REVIEW_ORIG);
|
|
13
|
-
if (orig === void 0) return refuse(`gtd: ${REVIEW} has no ${REVIEW_ORIG}, so it was not handed off by a review — remove it, or restore ${REVIEW_ORIG}.`);
|
|
14
|
-
await agentWithSkills("fixing", fixReviewNotesPrompt(reviewNotes(orig, record), reviewRisks(record)), {
|
|
15
|
-
label: "Fixing your review notes",
|
|
16
|
-
file: REVIEW,
|
|
17
|
-
model: coder(),
|
|
18
|
-
system: finisherSystem(),
|
|
19
|
-
allowEmpty: true
|
|
20
|
-
});
|
|
21
|
-
await run("closing", removeScript([REVIEW, REVIEW_ORIG]), { label: "Closing the review" });
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* Fix what a review handed on, else repair a red baseline — then the
|
|
25
|
-
* hand-off review of the result. A note there is handed to the next `fix`.
|
|
26
|
-
*/
|
|
27
|
-
const fixFlow = async () => {
|
|
28
|
-
if (read(".gtd/REVIEW.md") !== void 0) {
|
|
29
|
-
await fixReviewNotes();
|
|
30
|
-
return handOffTail(false, start());
|
|
31
|
-
}
|
|
32
|
-
if (read(".gtd/REVIEW.orig.md") !== void 0) return refuse(`gtd: ${REVIEW_ORIG} has no ${REVIEW} — remove it, or restore ${REVIEW}.`);
|
|
33
|
-
if (await baseline("fix-precheck")) return;
|
|
34
|
-
await handOffTail(true, start());
|
|
35
|
-
};
|
|
36
|
-
const fix = shipped(fixFlow, { fix: {} });
|
|
37
|
-
//#endregion
|
|
38
|
-
//#region src/workflows/fix/index.ts
|
|
39
|
-
var fix_default = fix;
|
|
40
|
-
//#endregion
|
|
41
|
-
export { access, fix_default as default, defaults, envDefaults, fix, fixFlow, fixReviewNotes, skills, steering, summary };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { read, refuse, removeScript, run, start } from "../flows.mjs";
|
|
2
|
-
import { St as envDefaults, W as finisherSystem, _ as REQUIREMENTS, dt as reviewGateBlockedMessage, i as skills, j as agentWithSkills, l as gate, n as summary, r as access, s as shipped, t as steering, ut as reviewFeedbackFixPrompt, x as coder, xt as defaults } from "../chunks/reserved-lMYCaapY.mjs";
|
|
3
|
-
import { a as refusePendingHandOff } from "../chunks/tail-Bd7L940p.mjs";
|
|
4
|
-
import { r as reUnwind, t as buildTail } from "../chunks/review-Bfaror38.mjs";
|
|
5
|
-
//#region src/workflows/review/review.ts
|
|
6
|
-
const fixFeedback = async () => {
|
|
7
|
-
await agentWithSkills("feedback.fixing", reviewFeedbackFixPrompt(), {
|
|
8
|
-
label: "Fixing your review feedback",
|
|
9
|
-
file: REQUIREMENTS,
|
|
10
|
-
model: coder(),
|
|
11
|
-
system: finisherSystem(),
|
|
12
|
-
allowEmpty: true
|
|
13
|
-
});
|
|
14
|
-
await run("feedback.closing", removeScript([REQUIREMENTS]), { label: "Closing the feedback" });
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* The feature's review of everything since `reviewBase` — a green gate, the
|
|
18
|
-
* triaged quality lap, then the human review — with no design phase: a
|
|
19
|
-
* review that asks for changes is fixed in place and reviewed again, until
|
|
20
|
-
* sign-off.
|
|
21
|
-
*/
|
|
22
|
-
const reviewFlow = async () => {
|
|
23
|
-
refusePendingHandOff();
|
|
24
|
-
if (read(".gtd/REQUIREMENTS.md") !== void 0) refuse(`gtd: ${REQUIREMENTS} is left over — finish or remove it before a review.`);
|
|
25
|
-
await gate("review-gate", reviewGateBlockedMessage());
|
|
26
|
-
const base = start();
|
|
27
|
-
let outcome = await buildTail(base, { green: true });
|
|
28
|
-
while (outcome.verdict === "feedback") {
|
|
29
|
-
await reUnwind(outcome);
|
|
30
|
-
await fixFeedback();
|
|
31
|
-
outcome = await buildTail(base, { lensBase: outcome.base });
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
const review = shipped(reviewFlow, { review: {
|
|
35
|
-
args: [{
|
|
36
|
-
name: "base",
|
|
37
|
-
optional: true
|
|
38
|
-
}],
|
|
39
|
-
vars: ({ base }) => base === void 0 ? {} : { reviewBase: base }
|
|
40
|
-
} }, (_workflow, vars) => vars.reviewBase || "");
|
|
41
|
-
//#endregion
|
|
42
|
-
//#region src/workflows/review/index.ts
|
|
43
|
-
var review_default = review;
|
|
44
|
-
//#endregion
|
|
45
|
-
export { access, review_default as default, defaults, envDefaults, review, reviewFlow, skills, steering, summary };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { agent, changesSince, glob, head, mark, read, refuse, removeScript, run, scope, vars } from "../flows.mjs";
|
|
2
|
-
import { Ft as flipProblems, Lt as requireFlag, Nt as flagMentions, St as envDefaults, a as flagShipped, f as FEEDBACK, i as skills, l as gate, n as summary, r as access, t as steering, x as coder, xt as defaults } from "../chunks/reserved-lMYCaapY.mjs";
|
|
3
|
-
//#region src/workflows/rollout/rollout.ts
|
|
4
|
-
const flippingPrompt = (name, registry) => `Roll out the release flag "${name}": in ${registry}, set \`defaultOn: true\` on its entry. Change nothing else — no other entry, no other field, no other file, no comments.`;
|
|
5
|
-
const suiteBlockedMessage = () => "The suite is red after the rollout. Fix it by hand — a rollout may only touch the flag's registry entry — then land.";
|
|
6
|
-
const MARKED_MENTIONS = 50;
|
|
7
|
-
const listMentions = async (registry, name, guard) => {
|
|
8
|
-
await run("mentions", removeScript([FEEDBACK]), { label: "Listing flag mentions" });
|
|
9
|
-
guard();
|
|
10
|
-
const mentions = flagMentions(glob("**").filter((path) => path !== registry && path !== ".gtd" && !path.startsWith(".gtd/")).sort().map((path) => ({
|
|
11
|
-
path,
|
|
12
|
-
text: read(path) ?? ""
|
|
13
|
-
})), name);
|
|
14
|
-
mark("flag-mentions", String(mentions.length));
|
|
15
|
-
for (const m of mentions.slice(0, MARKED_MENTIONS)) try {
|
|
16
|
-
mark("flag-mention", `${m.path}:${m.line}`);
|
|
17
|
-
} catch {
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
const rolloutFlow = async () => {
|
|
22
|
-
const registry = vars.flagRegistry ?? "";
|
|
23
|
-
const name = vars.flag ?? "";
|
|
24
|
-
requireFlag("rollout", registry, name, false);
|
|
25
|
-
const base = head();
|
|
26
|
-
const before = read(registry) ?? "";
|
|
27
|
-
const guard = () => {
|
|
28
|
-
const strays = changesSince(base).paths.filter((path) => path !== registry && path !== ".gtd/FEEDBACK.md");
|
|
29
|
-
if (strays.length > 0) refuse(`gtd land: rollout-only: ${strays.join(", ")} changed — rollout may only set defaultOn: true on "${name}" in ${registry}`);
|
|
30
|
-
const problems = flipProblems(before, read(registry) ?? "", name);
|
|
31
|
-
if (problems.length > 0) refuse(`gtd land: rollout-only: other edits in ${registry}: ${problems.join("; ")}`);
|
|
32
|
-
};
|
|
33
|
-
await scope("rollout", async () => {
|
|
34
|
-
await agent("flipping", flippingPrompt(name, registry), {
|
|
35
|
-
label: `Rolling out ${name}`,
|
|
36
|
-
model: coder()
|
|
37
|
-
});
|
|
38
|
-
guard();
|
|
39
|
-
await gate("suite", suiteBlockedMessage(), guard);
|
|
40
|
-
await listMentions(registry, name, guard);
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
const rollout = flagShipped(rolloutFlow, "rollout");
|
|
44
|
-
//#endregion
|
|
45
|
-
//#region src/workflows/rollout/index.ts
|
|
46
|
-
var rollout_default = rollout;
|
|
47
|
-
//#endregion
|
|
48
|
-
export { access, rollout_default as default, defaults, envDefaults, rollout, rolloutFlow, skills, steering, summary };
|