@pmelab/gtd 55.0.0 → 56.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 (61) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +60 -61
  3. package/dist/chunks/{reserved-DHafcW7t.mjs → reserved-B8EC-WE8.mjs} +77 -203
  4. package/dist/chunks/{review-BJGKwlYv.mjs → review-HdrX0FJ7.mjs} +30 -125
  5. package/dist/chunks/{steering-CLhu8C7q.mjs → steering-CCNvngSH.mjs} +256 -65
  6. package/dist/chunks/{tail-B9Hw2AFB.mjs → tail-BSLah2mA.mjs} +144 -56
  7. package/dist/gtd.bundle.mjs +259 -22
  8. package/dist/steering.mjs +2 -2
  9. package/dist/testkit.mjs +6 -6
  10. package/dist/web/main.css +1 -1
  11. package/dist/web/main.js +551 -66
  12. package/dist/workflow-kit.mjs +1 -1
  13. package/dist/workflows/cleanup.mjs +2 -2
  14. package/dist/workflows/feature.mjs +14 -16
  15. package/dist/workflows/fix.mjs +3 -3
  16. package/dist/workflows/review.mjs +3 -3
  17. package/dist/workflows/rollout.mjs +1 -1
  18. package/dist/workflows.mjs +522 -453
  19. package/package.json +1 -1
  20. package/skills/authoring/SKILL.md +3 -3
  21. package/src/cli/Cli.ts +5 -5
  22. package/src/edge/Edge.test.ts +1 -1
  23. package/src/steering/FORMATS.md +5 -1
  24. package/src/steering/SteeringFormats.test.ts +2 -2
  25. package/src/steering/contract.test.ts +1 -0
  26. package/src/steering/findings.test.ts +47 -0
  27. package/src/steering/findings.ts +350 -0
  28. package/src/steering/fixtures/findings/gate.md +34 -0
  29. package/src/steering/fixtures/findings/gate.read.json +87 -0
  30. package/src/steering/index.test.ts +2 -2
  31. package/src/steering/index.ts +4 -3
  32. package/src/steering/review.test.ts +1 -75
  33. package/src/steering/review.ts +1 -74
  34. package/src/workflow/compile.test.ts +1 -0
  35. package/src/workflows/feature/criteria-coverage.feature +1 -6
  36. package/src/workflows/feature/feature.test.ts +1 -1
  37. package/src/workflows/feature/feature.ts +12 -20
  38. package/src/workflows/feature/lens-review.feature +323 -171
  39. package/src/workflows/feature/refactor-absorbs.feature +1 -7
  40. package/src/workflows/feature/refactor-first.feature +2 -10
  41. package/src/workflows/feature/refactor-rebuild.feature +4 -24
  42. package/src/workflows/feature/refactor-review.feature +33 -117
  43. package/src/workflows/feature/refactor.test.ts +0 -2
  44. package/src/workflows/feature/refactor.ts +0 -1
  45. package/src/workflows/feature/review-gate.feature +6 -22
  46. package/src/workflows/feature/reviewer-walkthrough.feature +16 -103
  47. package/src/workflows/feature/standards.feature +75 -34
  48. package/src/workflows/fix/fix-lens-origin.feature +20 -7
  49. package/src/workflows/fix/fix-quality.feature +102 -23
  50. package/src/workflows/review/review-door.feature +62 -59
  51. package/src/workflows/shared/learn.test.ts +0 -14
  52. package/src/workflows/shared/learn.ts +1 -6
  53. package/src/workflows/shared/lenses.ts +149 -43
  54. package/src/workflows/shared/review.test.ts +27 -26
  55. package/src/workflows/shared/review.ts +29 -196
  56. package/src/workflows/shared/tail.ts +18 -9
  57. package/src/workflows/shared/text.test.ts +103 -288
  58. package/src/workflows/shared/text.ts +131 -329
  59. package/src/workflows/feature/review-answers.feature +0 -324
  60. package/src/workflows/feature/severity-budget.feature +0 -116
  61. package/src/workflows/feature/severity-sorted-review.feature +0 -198
@@ -1,5 +1,5 @@
1
1
  import { changes, changesSince, hasThreadFor, head, mark, read, refuse, requireReplies, requireThreadsClosed, scope } from "./flows.mjs";
2
- import { S as unansweredNotes, _ as reviewNotes, c as stripCodeThreads, g as reviewDecisions, k as parseThreads, v as reviewRisks } from "./chunks/steering-CLhu8C7q.mjs";
2
+ import { A as parseThreads, C as unansweredNotes, b as reviewNotes, c as stripCodeThreads, x as reviewRisks, y as reviewDecisions } from "./chunks/steering-CCNvngSH.mjs";
3
3
  //#region src/workflow-kit/health.ts
4
4
  /** Hand a red suite that repeated attempts could not fix to a person, until `limit` rounds are spent. */
5
5
  const escalation = async (count, steps) => {
@@ -1,6 +1,6 @@
1
1
  import { agent, changes, glob, read, refuse, scope, start, vars } from "../flows.mjs";
2
- import { Kt as registryEntry, Mt as envDefaults, Wt as flagReferences, i as skills, jt as defaults, n as summary, o as flagShipped, qt as requireFlag, r as access, t as steering, x as coder } from "../chunks/reserved-DHafcW7t.mjs";
3
- import { a as refusePendingHandOff, r as handOffTail } from "../chunks/tail-B9Hw2AFB.mjs";
2
+ import { Bt as flagReferences, Dt as defaults, Ht as registryEntry, Ot as envDefaults, Ut as requireFlag, i as skills, n as summary, o as flagShipped, r as access, t as steering, x as coder } from "../chunks/reserved-B8EC-WE8.mjs";
3
+ import { a as refusePendingHandOff, r as handOffTail } from "../chunks/tail-BSLah2mA.mjs";
4
4
  //#region src/workflows/cleanup/cleanup.ts
5
5
  const removingPrompt = (name, registry) => `Clean up the release flag "${name}", which is default-on: delete its entry in ${registry}, and remove every \`GTD_FLAG_${name.toUpperCase()}\` check from the shipped sources. Keep the flag-on path; delete code only the off path reached, including tests that pin the off path.`;
6
6
  const cleanupFlow = async () => {
@@ -1,8 +1,8 @@
1
1
  import { agent, answered, applyScript, changes, changesSince, check, codeChanges, env, hasThreadFor, head, human, judge, judgeDiffShape, kept, mark, matches, quote, read, refuse, removeScript, requireAnswers, requireProgress, requireReplies, requireThreadsClosed, revertScript, run, scope, start, vars, wrote } from "../flows.mjs";
2
2
  import { lensEntriesOf } from "../workflow-kit.mjs";
3
- import { $ as observableMessage, B as designGateAnswerMessage, Ct as testerSystem, D as planner, Dt as unwindFailure, Et as unwindFailedMessage, H as designSystem, I as clearCriteriaMessage, J as implementBuildingPrompt, L as clearCriteriaQuestion, M as buildReviewCollectingPrompt, Mt as envDefaults, Nt as testFileGlobs, P as builderSystem, Q as normaliseCriteriaScript, S as collecting, St as startGateBlockedMessage, U as designTriagePrompt, V as designImpactPrompt, X as naiveApplyFailure, Y as implementFixPrompt, Z as naivePassPrompt, _ as REQUIREMENTS, a as flagModeOn, bt as seamByHandMessage, ct as refactorBuildingPrompt, d as healthy, dt as refactorNotePrompt, et as observableQuestion, f as FEEDBACK, ft as refactorRules, g as REFACTOR_NOTE, h as REFACTOR, i as skills, it as prototypeUnguidedMessage, j as agentWithSkills, jt as defaults, l as gate, lt as refactorDroppedRefusal, n as summary, nt as prototypeOpenMessage, p as PROTOTYPE, q as idleMessage, r as access, rt as prototypeTestingPrompt, s as shipped, t as steering, tt as prototypeFixingPrompt, ut as refactorFixPrompt, w as fixNits, x as coder, xt as seamSteerMessage, y as answerReviewQuestions, yt as reviewerSystem, z as criterionLine } from "../chunks/reserved-DHafcW7t.mjs";
4
- import { a as refusePendingHandOff, o as tail } from "../chunks/tail-B9Hw2AFB.mjs";
5
- import { i as reUnwind, n as humanReview, r as isCode$1, t as buildTail } from "../chunks/review-BJGKwlYv.mjs";
3
+ import { $ as normaliseCriteriaScript, B as designSystem, Ct as unwindFailedMessage, D as planner, Dt as defaults, F as clearCriteriaMessage, I as clearCriteriaQuestion, J as implementBuildingPrompt, L as criterionLine, M as buildReviewCollectingPrompt, Ot as envDefaults, P as builderSystem, R as designGateAnswerMessage, S as collecting, St as testerSystem, V as designTriagePrompt, X as naiveApplyFailure, Y as implementFixPrompt, Z as naivePassPrompt, _ as REQUIREMENTS, a as flagModeOn, at as prototypeUnguidedMessage, bt as seamSteerMessage, ct as refactorBuildingPrompt, d as healthy, dt as refactorNotePrompt, et as observableMessage, f as FEEDBACK, ft as refactorRules, g as REFACTOR_NOTE, h as REFACTOR, i as skills, it as prototypeTestingPrompt, j as agentWithSkills, kt as testFileGlobs, l as gate, lt as refactorDroppedRefusal, n as summary, nt as prototypeFixingPrompt, p as PROTOTYPE, q as idleMessage, r as access, rt as prototypeOpenMessage, s as shipped, t as steering, tt as observableQuestion, ut as refactorFixPrompt, vt as reviewerSystem, w as fixNits, wt as unwindFailure, x as coder, xt as startGateBlockedMessage, y as answerReviewQuestions, yt as seamByHandMessage, z as designImpactPrompt } from "../chunks/reserved-B8EC-WE8.mjs";
4
+ import { a as refusePendingHandOff } from "../chunks/tail-BSLah2mA.mjs";
5
+ import { n as isCode$1, r as reUnwind, t as buildTail } from "../chunks/review-HdrX0FJ7.mjs";
6
6
  import { posix } from "node:path";
7
7
  //#region src/workflows/shared/fences.ts
8
8
  const markFenced = (text) => {
@@ -696,7 +696,6 @@ const reviewedRefactor = async (shape, options = {}) => {
696
696
  fixAccess: strayAccess(p.strays),
697
697
  lensBase: entry,
698
698
  rules: refactorRules(p.strays, p.pattern),
699
- walkthrough: true,
700
699
  lap: "refactor"
701
700
  });
702
701
  if (outcome.verdict === "signoff") return true;
@@ -996,7 +995,11 @@ const buildFeature = async (firstBase) => {
996
995
  });
997
996
  const carried = seam.rebuild?.acceptance?.tests ?? [];
998
997
  const base = seam.refactored === true && !changesSince(seam.base).some((c) => isCode$1(c.path) && !carried.includes(c.path)) ? firstBase : seam.base;
999
- const outcome = await reviewedTail(base, base, requirements);
998
+ const outcome = await buildTail(base, {
999
+ green: true,
1000
+ lensBase: base,
1001
+ requirements
1002
+ });
1000
1003
  await featureFeedback(outcome, base, {
1001
1004
  closed,
1002
1005
  used
@@ -1007,16 +1010,6 @@ const gather = (handedOut) => {
1007
1010
  for (const id of listedIds()) handedOut.add(id);
1008
1011
  return [...handedOut];
1009
1012
  };
1010
- /** The quality lap, then a reviewer's walkthrough since `base` for the human. */
1011
- const reviewedTail = (base, lensBase, requirements, lap = "first") => tail((escalations, report) => humanReview(base, escalations, {
1012
- report,
1013
- walkthrough: true,
1014
- lap
1015
- }), {
1016
- green: true,
1017
- lensBase,
1018
- requirements
1019
- });
1020
1013
  const featureFeedback = async (first, lensBase, ids) => {
1021
1014
  let outcome = first;
1022
1015
  let closed = ids.closed;
@@ -1037,7 +1030,12 @@ const featureFeedback = async (first, lensBase, ids) => {
1037
1030
  tier,
1038
1031
  amend: true
1039
1032
  });
1040
- outcome = await reviewedTail(outcome.base, lensBase, requirements, "feedback");
1033
+ outcome = await buildTail(outcome.base, {
1034
+ green: true,
1035
+ lensBase,
1036
+ requirements,
1037
+ lap: "feedback"
1038
+ });
1041
1039
  }
1042
1040
  };
1043
1041
  /** Design — skipped when the sketch's own criteria are judged clear — then `buildFeature`. */
@@ -1,7 +1,7 @@
1
1
  import { read, refuse, removeScript, run, scope, start } from "../flows.mjs";
2
- import { _ as reviewNotes, v as reviewRisks } from "../chunks/steering-CLhu8C7q.mjs";
3
- import { G as fixReviewNotesPrompt, Mt as envDefaults, W as finisherSystem, c as baseline, i as skills, j as agentWithSkills, jt as defaults, n as summary, r as access, s as shipped, t as steering, v as REVIEW, x as coder } from "../chunks/reserved-DHafcW7t.mjs";
4
- import { r as handOffTail, t as REVIEW_ORIG } from "../chunks/tail-B9Hw2AFB.mjs";
2
+ import { b as reviewNotes, x as reviewRisks } from "../chunks/steering-CCNvngSH.mjs";
3
+ import { Dt as defaults, G as fixReviewNotesPrompt, Ot 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 } from "../chunks/reserved-B8EC-WE8.mjs";
4
+ import { r as handOffTail, t as REVIEW_ORIG } from "../chunks/tail-BSLah2mA.mjs";
5
5
  //#region src/workflows/fix/fix.ts
6
6
  /**
7
7
  * Fix every note a human left in a handed-off `.gtd/REVIEW.md` and every
@@ -1,7 +1,7 @@
1
1
  import { read, refuse, removeScript, run, start } from "../flows.mjs";
2
- import { Mt as envDefaults, W as finisherSystem, _ as REQUIREMENTS, gt as reviewGateBlockedMessage, ht as reviewFeedbackFixPrompt, i as skills, j as agentWithSkills, jt as defaults, l as gate, n as summary, r as access, s as shipped, t as steering, x as coder } from "../chunks/reserved-DHafcW7t.mjs";
3
- import { a as refusePendingHandOff } from "../chunks/tail-B9Hw2AFB.mjs";
4
- import { i as reUnwind, t as buildTail } from "../chunks/review-BJGKwlYv.mjs";
2
+ import { Dt as defaults, Ot as envDefaults, W as finisherSystem, _ as REQUIREMENTS, gt as reviewGateBlockedMessage, ht as reviewFeedbackFixPrompt, i as skills, j as agentWithSkills, l as gate, n as summary, r as access, s as shipped, t as steering, x as coder } from "../chunks/reserved-B8EC-WE8.mjs";
3
+ import { a as refusePendingHandOff } from "../chunks/tail-BSLah2mA.mjs";
4
+ import { r as reUnwind, t as buildTail } from "../chunks/review-HdrX0FJ7.mjs";
5
5
  //#region src/workflows/review/review.ts
6
6
  const fixFeedback = async () => {
7
7
  await agentWithSkills("feedback.fixing", reviewFeedbackFixPrompt(), {
@@ -1,5 +1,5 @@
1
1
  import { agent, changesSince, glob, head, mark, read, refuse, removeScript, run, scope, vars } from "../flows.mjs";
2
- import { Gt as flipProblems, Mt as envDefaults, Ut as flagMentions, f as FEEDBACK, i as skills, jt as defaults, l as gate, n as summary, o as flagShipped, qt as requireFlag, r as access, t as steering, x as coder } from "../chunks/reserved-DHafcW7t.mjs";
2
+ import { Dt as defaults, Ot as envDefaults, Ut as requireFlag, Vt as flipProblems, f as FEEDBACK, i as skills, l as gate, n as summary, o as flagShipped, r as access, t as steering, x as coder, zt as flagMentions } from "../chunks/reserved-B8EC-WE8.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.";