@pmelab/gtd 35.0.0 → 36.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.
Files changed (36) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +31 -27
  3. package/dist/chunks/{reserved-C8Fm3s72.mjs → reserved-BAv71I4i.mjs} +10 -9
  4. package/dist/chunks/{tail-oaYewBN_.mjs → tail-kar1zhOb.mjs} +1 -1
  5. package/dist/flows.mjs +15 -10
  6. package/dist/gtd.bundle.mjs +14 -9
  7. package/dist/testkit.mjs +43 -23
  8. package/dist/workflows/cleanup.mjs +2 -2
  9. package/dist/workflows/feature.mjs +18 -11
  10. package/dist/workflows/fix.mjs +2 -2
  11. package/dist/workflows/review.mjs +2 -2
  12. package/dist/workflows/rollout.mjs +1 -1
  13. package/dist/workflows.mjs +37 -25
  14. package/package.json +1 -1
  15. package/skills/authoring/SKILL.md +3 -3
  16. package/src/flows/scripts.ts +31 -9
  17. package/src/testkit/FlowScripts.test.ts +58 -0
  18. package/src/testkit/FlowScripts.ts +61 -24
  19. package/src/workflows/feature/acceptance-criteria.feature +5 -1
  20. package/src/workflows/feature/coverage.feature +6 -3
  21. package/src/workflows/feature/fast-path.feature +11 -19
  22. package/src/workflows/feature/feature.test.ts +24 -4
  23. package/src/workflows/feature/feature.ts +8 -8
  24. package/src/workflows/feature/flag-mode.feature +17 -9
  25. package/src/workflows/feature/lens-models.feature +7 -1
  26. package/src/workflows/feature/naive-acceptance.feature +2 -2
  27. package/src/workflows/feature/one-step-land.feature +10 -12
  28. package/src/workflows/feature/quality-unresolved.feature +7 -1
  29. package/src/workflows/feature/risk-tier.feature +12 -4
  30. package/src/workflows/feature/seam-rejection.feature +4 -9
  31. package/src/workflows/feature/seam.feature +29 -26
  32. package/src/workflows/feature/seam.test.ts +9 -3
  33. package/src/workflows/feature/seam.ts +40 -22
  34. package/src/workflows/review/review-door.feature +12 -4
  35. package/src/workflows/shared/text.test.ts +8 -0
  36. package/src/workflows/shared/text.ts +11 -8
@@ -58,6 +58,9 @@ export const agentWithSkills = (
58
58
  export const unwindFailure = (commit: string): string =>
59
59
  `gtd could not unwind ${commit} out of your working tree.`
60
60
 
61
+ export const naiveApplyFailure = (commit: string): string =>
62
+ `gtd could not apply the naive pass ${commit} to the working tree; it is built fresh instead.`
63
+
61
64
  export const idleMessage = (): string =>
62
65
  `No active gtd process.
63
66
 
@@ -1197,8 +1200,8 @@ export const naivePassPrompt = (retry?: NaiveRetry): string =>
1197
1200
  - Read \`.gtd/REQUIREMENTS.md\`: the settled requirements for this change
1198
1201
  ${criteriaBinding(false)}
1199
1202
  - Implement them the quickest way that works — the naive version. Do not
1200
- restructure, abstract or refactor around the change; a later step judges
1201
- the shape of your diff and a reviewer makes it fit
1203
+ restructure, abstract or refactor around the change; it may land exactly as
1204
+ you leave it, and a reviewer makes it fit
1202
1205
  - Work breadth-first: rough out every part of the change before finishing any
1203
1206
  one, so a run cut off midway still shows the whole shape
1204
1207
  - Write behaviour-level acceptance tests, at least one per criterion, each
@@ -1282,14 +1285,15 @@ An edit together with an approval counts as steer. Only
1282
1285
  branch unjudged.
1283
1286
  `
1284
1287
 
1285
- export const seamSteerMessage = (retry: NaiveRetry): string =>
1288
+ /** `judged`: whether an overruled pass still meets the seam judge (`flagMode` on). */
1289
+ export const seamSteerMessage = (retry: NaiveRetry, judged = true): string =>
1286
1290
  isFault(retry)
1287
1291
  ? `The naive pass failed three times and the retries are spent. The last
1288
1292
  attempt's tests (\`git show ${retry.hash}\`) fall short:
1289
1293
  ${retry.fault}
1290
1294
 
1291
1295
  ${steerChoices(`land a clean tree to go on with the last attempt as it is:
1292
- \`seam.check\` runs its suite and the seam judge rules on its shape. Use it
1296
+ \`seam.check\` runs its suite and ${judged ? "the seam judge rules on its shape" : "it lands as the implementation"}. Use it
1293
1297
  when the rule cannot fit this change (tests the globs do not see, or no
1294
1298
  entry point that existed before). Risk: a criterion may have no test that
1295
1299
  survives a later refactor — the choice is recorded in history.`)}`
@@ -1302,7 +1306,7 @@ Two ways forward (then run \`gtd land\`):
1302
1306
  - **Steer** — edit \`.gtd/REQUIREMENTS.md\` to redirect the change; the naive
1303
1307
  pass runs again with a fresh retry budget
1304
1308
  - **Overrule** — land a clean tree to go on with the last attempt as it is:
1305
- the seam judge rules on its shape, and the implementation's health loop
1309
+ ${judged ? "the seam judge rules on its shape" : "it lands as the implementation"}, and the implementation's health loop
1306
1310
  must turn the suite green. Risk: the criteria's tests never passed on the
1307
1311
  naive pass — the choice is recorded in history.
1308
1312
 
@@ -1321,9 +1325,8 @@ Two ways forward (then run \`gtd land\`):
1321
1325
  - **Steer** — edit \`.gtd/REQUIREMENTS.md\` to redirect the change; the naive
1322
1326
  pass runs again with a fresh retry budget (the risk tier stays as the
1323
1327
  design gate settled it; a tier edit here is not applied)
1324
- - **Overrule** — land a clean tree to accept the last attempt's approach:
1325
- the implementation is built against it as reference, with no seam gate
1326
- and no refactor. Risk: this ships the seam the judge objected to,
1328
+ - **Overrule** — land a clean tree to accept the last attempt as it is: it
1329
+ lands as the implementation, with no seam gate and no refactor. Risk: this ships the seam the judge objected to,
1327
1330
  unaddressed — the choice is recorded in history.
1328
1331
 
1329
1332
  An edit together with an approval counts as steer. Only