@pmelab/gtd 42.0.0 → 44.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 (62) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +96 -48
  3. package/claude/hooks/sketch.ts +1 -1
  4. package/dist/chunks/{reserved-D7MNY9QJ.mjs → reserved-DJk_6-ju.mjs} +75 -46
  5. package/dist/chunks/review-X7Jfz0dY.mjs +249 -0
  6. package/dist/chunks/{steering-oCDdQlpP.mjs → steering-D4LUQ-av.mjs} +95 -12
  7. package/dist/chunks/{tail-D2o2h5cc.mjs → tail-5w5mxGTq.mjs} +3 -3
  8. package/dist/gtd.bundle.mjs +488 -30
  9. package/dist/steering.mjs +2 -2
  10. package/dist/testkit.mjs +447 -27
  11. package/dist/web/main.js +42 -13
  12. package/dist/workflow-kit.mjs +61 -25
  13. package/dist/workflows/cleanup.mjs +2 -2
  14. package/dist/workflows/feature.mjs +7 -290
  15. package/dist/workflows/fix.mjs +3 -3
  16. package/dist/workflows/review.mjs +27 -7
  17. package/dist/workflows/rollout.mjs +1 -1
  18. package/dist/workflows.mjs +287 -161
  19. package/package.json +1 -1
  20. package/src/cli/Cli.test.ts +33 -1
  21. package/src/cli/Cli.ts +70 -6
  22. package/src/cli/History.ts +15 -0
  23. package/src/cli/Judges.test.ts +373 -0
  24. package/src/cli/Judges.ts +624 -0
  25. package/src/cli/Metrics.ts +3 -16
  26. package/src/cli/Program.test.ts +3 -1
  27. package/src/cli/Program.ts +9 -0
  28. package/src/steering/FORMATS.md +4 -4
  29. package/src/steering/index.ts +12 -1
  30. package/src/steering/review.test.ts +107 -0
  31. package/src/steering/review.ts +159 -9
  32. package/src/testkit/EmittedScriptRecognizer.ts +0 -14
  33. package/src/testkit/steps.ts +4 -0
  34. package/src/workflow-kit/review.test.ts +170 -26
  35. package/src/workflow-kit/review.ts +95 -19
  36. package/src/workflows/feature/coverage.ts +1 -1
  37. package/src/workflows/feature/feature.test.ts +8 -0
  38. package/src/workflows/feature/feature.ts +2 -2
  39. package/src/workflows/feature/index.ts +1 -1
  40. package/src/workflows/feature/lens-review.feature +16 -4
  41. package/src/workflows/feature/refactor.ts +1 -1
  42. package/src/workflows/feature/review-answers.feature +179 -0
  43. package/src/workflows/feature/seam.ts +1 -1
  44. package/src/workflows/feature/steps.test.ts +2 -76
  45. package/src/workflows/feature/steps.ts +5 -48
  46. package/src/workflows/fix/fix.feature +20 -21
  47. package/src/workflows/index.ts +1 -1
  48. package/src/workflows/review/review-door.feature +149 -0
  49. package/src/workflows/review/review.test.ts +1 -73
  50. package/src/workflows/review/review.ts +34 -6
  51. package/src/workflows/shared/__fixtures__/feature-collecting-prompt.txt +6 -5
  52. package/src/workflows/shared/access.test.ts +2 -11
  53. package/src/workflows/shared/access.ts +0 -2
  54. package/src/workflows/{feature → shared}/review.test.ts +9 -61
  55. package/src/workflows/{feature → shared}/review.ts +40 -48
  56. package/src/workflows/shared/skills.test.ts +2 -0
  57. package/src/workflows/shared/skills.ts +2 -0
  58. package/src/workflows/shared/steps.test.ts +64 -2
  59. package/src/workflows/shared/steps.ts +40 -1
  60. package/src/workflows/shared/tail.ts +2 -2
  61. package/src/workflows/shared/text.test.ts +40 -89
  62. package/src/workflows/shared/text.ts +63 -54
@@ -1,16 +1,36 @@
1
- import { start } from "../flows.mjs";
2
- import { Tt as envDefaults, i as skills, mt as reviewGateBlockedMessage, n as summary, r as access, s as shipped, t as steering, u as gate, wt as defaults } from "../chunks/reserved-D7MNY9QJ.mjs";
3
- import { a as refusePendingHandOff, r as handOffTail } from "../chunks/tail-D2o2h5cc.mjs";
1
+ import { read, refuse, removeScript, run, start } from "../flows.mjs";
2
+ import { C as coder, N as agentWithSkills, Tt as envDefaults, i as skills, mt as reviewGateBlockedMessage, n as summary, pt as reviewFeedbackFixPrompt, q as finisherSystem, r as access, s as shipped, t as steering, u as gate, v as REQUIREMENTS, wt as defaults } from "../chunks/reserved-DJk_6-ju.mjs";
3
+ import { a as refusePendingHandOff } from "../chunks/tail-5w5mxGTq.mjs";
4
+ import { i as reUnwind, t as buildTail } from "../chunks/review-X7Jfz0dY.mjs";
4
5
  //#region src/workflows/review/review.ts
6
+ /** Build the concerns a review round collected into `.gtd/REQUIREMENTS.md`, then remove it. */
7
+ const fixFeedback = async () => {
8
+ await agentWithSkills("feedback.fixing", reviewFeedbackFixPrompt(), {
9
+ label: "Fixing your review feedback",
10
+ file: REQUIREMENTS,
11
+ model: coder(),
12
+ system: finisherSystem(),
13
+ allowEmpty: true
14
+ });
15
+ await run("feedback.closing", removeScript([REQUIREMENTS]), { label: "Closing the feedback" });
16
+ };
5
17
  /**
6
- * Pure review of everything since `reviewBase`: a green gate, the quality
7
- * lap, then the human review. A note ends the process with `.gtd/REVIEW.md`
8
- * left for `fix`; it never re-plans.
18
+ * The feature's review of everything since `reviewBase` — a green gate, the
19
+ * triaged quality lap, then the human review — with no design phase: a
20
+ * review that asks for changes is fixed in place and reviewed again, until
21
+ * sign-off.
9
22
  */
10
23
  const reviewFlow = async () => {
11
24
  refusePendingHandOff();
25
+ if (read(".gtd/REQUIREMENTS.md") !== void 0) refuse(`gtd: ${REQUIREMENTS} is left over — finish or remove it before a review.`);
12
26
  await gate("review-gate", reviewGateBlockedMessage());
13
- await handOffTail(false, start());
27
+ const base = start();
28
+ let outcome = await buildTail(base, { green: true });
29
+ while (outcome.verdict === "feedback") {
30
+ await reUnwind(outcome);
31
+ await fixFeedback();
32
+ outcome = await buildTail(base, { lensBase: outcome.base });
33
+ }
14
34
  };
15
35
  const review = shipped(reviewFlow, { review: {
16
36
  args: [{
@@ -1,5 +1,5 @@
1
1
  import { agent, changesSince, glob, head, mark, read, refuse, removeScript, run, scope, vars } from "../flows.mjs";
2
- import { Dt as flagMentions, S as coder, Tt as envDefaults, i as skills, jt as requireFlag, kt as flipProblems, n as summary, o as flagShipped, p as FEEDBACK, r as access, t as steering, u as gate, wt as defaults } from "../chunks/reserved-D7MNY9QJ.mjs";
2
+ import { C as coder, Dt as flagMentions, Tt as envDefaults, i as skills, jt as requireFlag, kt as flipProblems, n as summary, o as flagShipped, p as FEEDBACK, r as access, t as steering, u as gate, wt as defaults } from "../chunks/reserved-DJk_6-ju.mjs";
3
3
  //#region src/workflows/rollout/rollout.ts
4
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
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.";