@hassangameryt/freeflow 0.6.0 → 0.7.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 (122) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.codex-plugin/plugin.json +4 -5
  4. package/README.md +39 -55
  5. package/capabilities/cognitive-routing/SKILL.md +288 -130
  6. package/command-surface.json +0 -24
  7. package/hooks/freeflow-runtime-context.mjs +42 -477
  8. package/hooks/hooks.json +1 -26
  9. package/hooks/tests/check-runtime-context-hook.sh +108 -319
  10. package/package.json +4 -2
  11. package/pi-extension/dist/cognitive-routing/commands.js +3 -3
  12. package/pi-extension/dist/cognitive-routing/config.js +16 -20
  13. package/pi-extension/dist/cognitive-routing/controller.js +478 -48
  14. package/pi-extension/dist/cognitive-routing/history.js +12 -0
  15. package/pi-extension/dist/cognitive-routing/host.js +74 -12
  16. package/pi-extension/dist/cognitive-routing/pi-routing-session.js +414 -0
  17. package/pi-extension/dist/cognitive-routing/pi-session-control.js +320 -0
  18. package/pi-extension/dist/cognitive-routing/tool.js +1 -0
  19. package/pi-extension/dist/cognitive-routing/types.js +1 -1
  20. package/pi-extension/dist/index.js +236 -219
  21. package/pi-extension/dist/runtime/runtime-context.js +126 -286
  22. package/pi-extension/dist/settings/settings-ui.js +52 -336
  23. package/pi-extension/src/cognitive-routing/commands.ts +15 -5
  24. package/pi-extension/src/cognitive-routing/config.ts +16 -20
  25. package/pi-extension/src/cognitive-routing/controller.ts +561 -51
  26. package/pi-extension/src/cognitive-routing/history.ts +12 -0
  27. package/pi-extension/src/cognitive-routing/host.ts +110 -16
  28. package/pi-extension/src/cognitive-routing/pi-routing-session.ts +538 -0
  29. package/pi-extension/src/cognitive-routing/pi-session-control.ts +444 -0
  30. package/pi-extension/src/cognitive-routing/tool.ts +1 -0
  31. package/pi-extension/src/cognitive-routing/types.ts +1 -1
  32. package/pi-extension/src/index.ts +249 -239
  33. package/pi-extension/src/runtime/runtime-context.ts +129 -305
  34. package/pi-extension/src/settings/settings-ui.ts +53 -371
  35. package/pi-extension/tests/cognitive-routing/commands.test.js +1 -1
  36. package/pi-extension/tests/cognitive-routing/controller.test.js +69 -40
  37. package/pi-extension/tests/cognitive-routing/extension-lifecycle.test.js +128 -57
  38. package/pi-extension/tests/cognitive-routing/pi-normal-lifecycle.test.js +434 -0
  39. package/pi-extension/tests/cognitive-routing/pi-session-control.test.js +174 -0
  40. package/pi-extension/tests/cognitive-routing/pi-session-history.test.js +91 -0
  41. package/pi-extension/tests/cognitive-routing/profile-resolution.test.js +47 -4
  42. package/pi-extension/tests/integration/mode-free-core.test.js +218 -0
  43. package/pi-extension/tests/integration/pi-extension.test.js +430 -2478
  44. package/pi-extension/tests/integration/prompt-architecture.test.js +124 -79
  45. package/pi-extension/tests/integration/unaffected-regressions.test.js +411 -0
  46. package/runtime/prompts/cognitive-routing.md +5 -4
  47. package/runtime/prompts/conversation-history.md +1 -1
  48. package/runtime/prompts/core.md +77 -6
  49. package/runtime/prompts/interaction-contract.md +6 -2
  50. package/skills/action-selection/SKILL.md +93 -44
  51. package/skills/action-selection/references/trajectory-stalls.md +71 -0
  52. package/skills/bypass/SKILL.md +109 -39
  53. package/skills/commit-work/SKILL.md +94 -55
  54. package/skills/commit-work/references/git-state-edges.md +94 -0
  55. package/skills/commit-work/references/simple-push.md +92 -0
  56. package/skills/commit-work/references/staging-decisions.md +79 -46
  57. package/skills/decision-gate/SKILL.md +80 -22
  58. package/skills/design-for-depth/SKILL.md +208 -43
  59. package/skills/design-for-depth/references/design-pressure-signals.md +108 -240
  60. package/skills/design-for-depth/references/interface-design-loop.md +77 -97
  61. package/skills/design-for-depth/references/module-and-dependency-design.md +147 -0
  62. package/skills/design-for-depth/references/software-design-philosophy.md +127 -173
  63. package/skills/design-for-depth/references/state-and-failure-boundaries.md +136 -0
  64. package/skills/diagnose-failure/SKILL.md +198 -52
  65. package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +19 -5
  66. package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +13 -5
  67. package/skills/discuss/SKILL.md +118 -76
  68. package/skills/discuss/references/discussion-continuity.md +84 -32
  69. package/skills/evaluate-skill/SKILL.md +166 -52
  70. package/skills/evaluate-skill/references/evaluation-definition-schema.md +2 -2
  71. package/skills/evaluate-skill/references/evaluation-design.md +56 -30
  72. package/skills/evaluate-skill/references/execution-and-evidence.md +1 -1
  73. package/skills/evaluate-skill/references/review-and-revision.md +62 -21
  74. package/skills/execute-work/SKILL.md +98 -59
  75. package/skills/execute-work/references/code-practices.md +4 -4
  76. package/skills/execute-work/references/execute-work-edges.md +42 -22
  77. package/skills/review-artifact/SKILL.md +132 -71
  78. package/skills/review-artifact/references/adjudicate-artifact-review.md +101 -0
  79. package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +52 -41
  80. package/skills/review-work/SKILL.md +115 -72
  81. package/skills/review-work/references/adjudicate-work-review.md +97 -0
  82. package/skills/review-work/references/independent-work-reviewer-contract.md +40 -35
  83. package/skills/review-work/references/security-risk-lens.md +17 -15
  84. package/skills/setup-freeflow/SKILL.md +14 -17
  85. package/skills/setup-freeflow/references/activation-contract.md +24 -30
  86. package/skills/setup-freeflow/references/host-setup.md +6 -7
  87. package/skills/simplify-code/SKILL.md +97 -39
  88. package/skills/simplify-code/references/simplification-patterns.md +1 -1
  89. package/skills/tdd/SKILL.md +108 -41
  90. package/skills/tdd/references/test-design.md +1 -1
  91. package/skills/track-work/SKILL.md +133 -300
  92. package/skills/track-work/references/working-record-format.md +515 -0
  93. package/skills/track-work/scripts/lib/document.mjs +713 -0
  94. package/skills/track-work/scripts/lib/format.mjs +166 -0
  95. package/skills/track-work/scripts/lib/store.mjs +233 -0
  96. package/skills/track-work/scripts/lib/transitions.mjs +790 -0
  97. package/skills/track-work/scripts/lib/views.mjs +27 -430
  98. package/skills/track-work/scripts/working-record.mjs +292 -98
  99. package/skills/verify-work/SKILL.md +46 -20
  100. package/skills/verify-work/references/browser-runtime-evidence.md +1 -1
  101. package/skills/verify-work/references/integration-evidence.md +1 -7
  102. package/skills/verify-work/references/performance-evidence.md +1 -1
  103. package/skills/workflow/SKILL.md +110 -80
  104. package/skills/workflow/references/domain-skill-composition.md +24 -18
  105. package/skills/write-skill/SKILL.md +218 -62
  106. package/skills/write-skill/references/activation-boundaries.md +63 -21
  107. package/skills/write-skill/references/agent-first-instructions.md +61 -27
  108. package/skills/write-skill/references/progressive-disclosure.md +91 -41
  109. package/skills/write-skill/references/skill-dependency-graphs.md +190 -0
  110. package/runtime/prompts/skills.md +0 -65
  111. package/skills/mode-contract/SKILL.md +0 -104
  112. package/skills/track-work/scripts/lib/codec.mjs +0 -570
  113. package/skills/track-work/scripts/lib/commands.mjs +0 -568
  114. package/skills/track-work/scripts/lib/contract.mjs +0 -303
  115. package/skills/track-work/scripts/lib/model.mjs +0 -506
  116. package/skills/track-work/scripts/lib/operations.mjs +0 -965
  117. package/skills/track-work/scripts/lib/record-store.mjs +0 -264
  118. package/skills/track-work/scripts/lib/result.mjs +0 -37
  119. package/skills/track-work/scripts/lib/rewrites.mjs +0 -740
  120. package/skills/track-work/scripts/lib/schema.mjs +0 -277
  121. package/skills/track-work/scripts/lib/source-inventory.mjs +0 -162
  122. package/skills/track-work/scripts/lib/workspace.mjs +0 -134
@@ -1,128 +1,189 @@
1
1
  ---
2
2
  name: review-artifact
3
- description: Use when reviewing durable task memory, a spec, PRD, issue, API contract, technical design, migration contract, plan, decision record, ADR, handoff, or another durable artifact for fitness to guide its intended use.
3
+ description: Use when judging whether a durable artifact is aligned, sufficient, and fit to guide its intended use through self-review, independent review, or adjudication of a returned artifact review.
4
4
  ---
5
5
 
6
6
  # Review Artifact
7
7
 
8
- Judge whether an artifact is aligned, sufficient, and fit to guide its intended use.
8
+ Judge whether a durable artifact is aligned, sufficient, and fit to guide a named intended use.
9
9
 
10
- ## Choose The Review Role
10
+ Review provides judgment. [Verify Work](../../skills/verify-work/SKILL.md) establishes what direct evidence proves when factual claims require active verification. Review may find evidence insufficient, but it does not replace verification, settle owner decisions, or authorize revision.
11
11
 
12
- Choose the role before reviewing:
12
+ ## Select One Route
13
13
 
14
- - **Self-review:** you produced the artifact. Inspect it silently using the relevant boundary and lenses below. Correct clear local issues within existing authority. Create no formal review items, judgment, number, or cycle. Return unresolved material issues to [Workflow](../workflow/SKILL.md).
15
- - **Independent review:** you did not produce the reviewed state. Inspect and report without editing. Use the formal item, judgment, and report method below. The receiving active agent adjudicates and routes the result.
14
+ Choose the route before reviewing:
16
15
 
17
- Reading this skill does not create independence. If you produced the artifact, do not present your own judgment as independent review. Read the [Independent Artifact Reviewer Contract](references/independent-artifact-reviewer-contract.md) when preparing or performing a separately selected independent review.
16
+ - **Self-review:** you produced the reviewed artifact state.
17
+ - **Independent review:** you did not produce the reviewed state and are reviewing from a separate context.
18
+ - **Adjudication:** an independent reviewer returned a report and you are deciding what its findings establish and what follows.
19
+
20
+ Self-review and independent review use the same artifact review kernel below. Adjudication consumes a completed review; it is not another review.
21
+
22
+ Do not cross roles inside an independent reviewer context. The independent reviewer reports and stops. The receiving agent may then enter adjudication.
18
23
 
19
24
  ## Establish The Boundary
20
25
 
21
- Understand:
26
+ Identify only what the judgment needs:
22
27
 
23
- - artifact type, current state, and intended use;
24
- - accepted outcome, requirements, and non-goals;
25
- - owner decisions and unresolved questions;
28
+ - artifact path, type, exact reviewed state, and intended use;
29
+ - accepted outcome, requirements, non-goals, and owner decisions;
30
+ - unresolved questions and known evidence gaps;
31
+ - the artifact's job and any governing schema or format contract;
26
32
  - relevant code, tests, policies, ADRs, and established behavior;
27
- - upstream and downstream artifacts;
28
- - evidence gaps and prior review when applicable.
29
-
30
- Review the complete current artifact, not only its summary, change description, or author's reasoning. Review upstream authority before dependent artifacts. If an upstream issue invalidates downstream assumptions, mark affected material contingent instead of generating exhaustive findings against an unresolved basis.
33
+ - upstream and downstream artifacts in dependency order;
34
+ - risks capable of changing whether the artifact may guide its intended use.
31
35
 
32
- Review Artifact owns the intended-use boundary, lenses, and judgment. When source or dependency inspection branches among several plausible observers or is likely to be broad, use [Action Selection](../action-selection/SKILL.md) to choose and bound one environment interaction. It returns evidence to the same review role. Skip it for an obvious artifact, dependency, or source-truth read.
36
+ Review the complete current artifact and source truth directly. Do not judge only its summary, change description, or producer reasoning.
33
37
 
34
- When reviewing a Working Record, read [Track Work](../track-work/SKILL.md), which owns its format and lifecycle.
38
+ Review upstream authority before dependent artifacts. When an upstream problem invalidates downstream assumptions, mark affected material contingent instead of generating exhaustive downstream findings against an unsettled basis.
35
39
 
36
- ## Judge The Artifact By Its Job
40
+ When reviewing a Working Record, first read [Track Work](../../skills/track-work/SKILL.md), which owns its format and lifecycle.
37
41
 
38
- - **Working Record:** living task memory with accurate current state, recoverable slices and decisions, compact evidence pointers, and one next useful action.
39
- - **Spec or durable content artifact:** accepted content, behavior, boundaries, evidence, and uncertainty needed for its stated use.
40
- - **Plan:** an inspectable ordered strategy with scope, dependencies, assumptions, checks, and stop conditions.
41
- - **Decision record or ADR:** decision, owner, alternatives, rationale, consequences, and revisit or supersession conditions.
42
- - **Handoff:** a point-in-time continuation package that preserves what its recipient needs without replacing live task memory.
43
- - **Other artifact:** its stated purpose without taking over another artifact's job.
42
+ When inspection could branch broadly among several useful sources or dependencies, use [Action Selection](../../skills/action-selection/SKILL.md). Skip it for an obvious artifact, schema, dependency, or source-truth read.
44
43
 
45
- ## Review Proportionately
44
+ ## Apply The Shared Artifact Review Kernel
46
45
 
47
- Apply only lenses that can materially change fitness:
46
+ Use only lenses capable of changing fitness for the intended use:
48
47
 
49
48
  - **Source alignment:** agrees with accepted requirements, owner decisions, and live facts.
50
49
  - **Fitness and sufficiency:** contains enough for its intended use without pretending every future question is settled.
51
50
  - **Decision clarity:** required, tentative, open, deferred, and superseded information cannot be confused.
52
51
  - **Evidence and acceptance:** load-bearing claims and acceptance conditions have suitable supporting or falsifying mechanisms.
53
52
  - **Behavior and failure contract:** consequential states, forbidden outcomes, observers, and recovery are explicit where required.
54
- - **Dependency integrity:** upstream and downstream artifacts remain consistent; provisional work is identified honestly.
53
+ - **Dependency integrity:** upstream and downstream artifacts remain consistent; provisional or contingent work is identified honestly.
55
54
  - **Scope and minimality:** avoids speculative design, unnecessary process, and hypothetical completeness.
56
55
  - **Clarity and continuity:** a future reader can use it without transcript memory or volatile copied context.
57
56
 
58
- A pass is valid. Do not invent items, require exhaustive edge cases, report wording or filename preferences, reopen intentional deferrals, or demand evidence needed only for a later boundary.
57
+ Review the artifact's resulting state, not the producer's intention. Use a high evidence bar, not a high item count. Finding no material issue is valid.
59
58
 
60
- ## Classify Independent Review Items
59
+ ### Judge The Artifact By Its Job
61
60
 
62
- - **Blocking Issue:** a supported defect, inconsistency, omission, or risk that must be resolved before the artifact guides its intended use.
63
- - **Non-blocking Issue:** a real issue that can be deferred safely for this boundary.
64
- - **Question:** material intent, requirements, or an owner decision is unclear.
65
- - **Needs evidence:** a load-bearing claim or condition cannot be established.
66
- - **Improvement:** a materially useful enhancement not required by this boundary. It does not affect judgment or authorize revision.
61
+ - **Working Record:** accurate living task memory with recoverable slices and decisions, compact evidence pointers, and one next useful action.
62
+ - **Spec or durable content artifact:** accepted content, behavior, boundaries, evidence, and uncertainty needed for its stated use.
63
+ - **Plan:** an inspectable ordered strategy with scope, dependencies, assumptions, checks, and stop conditions.
64
+ - **Decision record or ADR:** the decision, owner, alternatives, rationale, consequences, and revisit or supersession conditions.
65
+ - **Handoff:** a point-in-time continuation package that preserves what its recipient needs without replacing live task memory.
66
+ - **Other artifact:** its stated purpose without taking over another artifact's job.
67
67
 
68
- A Blocking Issue must name the exact location, violated source truth or artifact responsibility, evidence, concrete consequence for intended use, and smallest safe revision or owning activity to re-enter.
68
+ Do not require one artifact to perform another artifact's job.
69
69
 
70
- 1. **Blocking:** one or more Blocking Issues exist.
71
- 2. **Inconclusive:** no Blocking Issue exists, but a material Question or Needs evidence item prevents judgment.
72
- 3. **Non-blocking:** only Non-blocking Issues remain.
73
- 4. **Pass:** no Issues or material Unresolved items remain. Improvements may still be reported.
70
+ ### Classify Before Calling Something An Issue
74
71
 
75
- Pass, Non-blocking, Inconclusive, and Blocking are all valid review exits. A review ends with its report; it does not remain active until the artifact passes.
72
+ Ask in order:
76
73
 
77
- ## Adjudicate Independent Review And Route
74
+ 1. **Does fitness for the intended use depend on content, source truth, or an owner decision that remains unsettled?**
75
+ - Yes: **Question**.
76
+ 2. **Does fitness depend on a load-bearing claim or condition that available evidence cannot establish?**
77
+ - Yes: **Needs evidence**.
78
+ 3. **Is there a supported artifact defect that requires revision for the intended use?**
79
+ - Yes, and the artifact cannot safely guide that use: **Blocking Issue**.
80
+ - Yes, but revision can be deferred safely: **Non-blocking Issue**.
81
+ 4. **Would the change merely make the artifact more useful beyond its intended use?**
82
+ - Omit it by default.
83
+ - Use **Improvement** only when materially relevant or explicitly requested.
78
84
 
79
- After independent review, the receiving active agent adjudicates each material item against the artifact, source truth, and evidence rather than forwarding the report:
85
+ A material **Needs evidence** observation must name the load-bearing claim or condition, required observing boundary, available evidence and its limit, why the gap affects intended-use fitness, and the smallest evidence that could disagree.
80
86
 
81
- - **Accepted:** supported and applicable. State the actual artifact problem, consequence for its intended use, and whether the revision basis is supported or uncertain.
82
- - **Rejected:** unsupported, stale, resolved, duplicate, preference-only, outside the artifact's job, or based on a source misread. State why.
83
- - **Open:** a question or evidence gap prevents acceptance or rejection. State the concern, potential consequence, and missing evidence or decision.
87
+ Do not turn wording preferences, exhaustive edge cases, intentional deferrals, polished presentation, or hypothetical completeness into Issues.
84
88
 
85
- A reviewer's suggested revision may bound an item, but it does not settle source intent or select the revision. Confirm whether each accepted Issue is Blocking or Non-blocking, derive the adjudicated judgment, and do not accept the reviewer's overall judgment separately.
89
+ An Issue must identify:
86
90
 
87
- - **Pass:** use the artifact for its intended purpose.
88
- - **Non-blocking:** use it with explicit deferrals.
89
- - **Inconclusive:** gather the missing evidence or decision.
90
- - **Blocking:** do not use the artifact across the blocked boundary; re-enter its narrowest owner, defer, or stop.
91
+ - the exact location or affected dependency;
92
+ - the violated source truth or artifact responsibility;
93
+ - supporting evidence;
94
+ - the concrete consequence for the intended use.
95
+
96
+ For a Blocking Issue, state why the artifact cannot safely guide its intended use. Describe revision constraints or the owning activity to re-enter. Recommend a specific revision only when source intent and dependency effects support it rather than one of several material alternatives.
97
+
98
+ ## Self-Review
99
+
100
+ Apply the complete shared kernel to an artifact you produced. Self-review uses the same substantive scrutiny as independent review but does not create independence.
101
+
102
+ When evidence supports a clear local artifact defect, the revision basis is settled, and existing authority covers the revision:
91
103
 
92
- ### Decide Whether Independent-Review Revision Is Ready
104
+ 1. return to the artifact's owning activity;
105
+ 2. revise the defect without changing accepted intent;
106
+ 3. reconcile affected dependencies;
107
+ 4. re-verify affected load-bearing factual claims at their required observing boundaries;
108
+ 5. re-check source alignment and the affected review lenses once.
93
109
 
94
- A revision is ready when the artifact's job, the problem and consequence, and enough source or decision basis support a bounded revision. When the issue and source are clear, the revision local, affected dependencies known, and no material alternative or user choice remains, include adjudication and revision in the same assistant response.
110
+ Do not create formal review items, a judgment, a review number, or a review cycle for self-review. Do not label it independent.
95
111
 
96
- Use the current response for a separate problem checkpoint when findings interact, source intent or dependency effects remain uncertain, accepted content or strategy is challenged, materially different revisions remain, the artifact relies on an unsupported failure cause, or user input could change the approach:
112
+ Do not settle an owner decision, revise upstream authority, or change accepted content merely to make the artifact internally consistent. Return unresolved material issues to [Workflow](../../skills/workflow/SKILL.md). Use [Discuss](../../skills/discuss/SKILL.md) when accepted content or strategy needs reconsideration, [Decision Gate](../../skills/decision-gate/SKILL.md) for a user-owned choice or source conflict, and [Diagnose Failure](../../skills/diagnose-failure/SKILL.md) when an artifact relies on an unsupported or repeated failure cause.
97
113
 
98
- 1. Report the adjudication, problem and consequence, revision-basis status, settled constraints, and controlling question or evidence.
99
- 2. Name [Discuss](../discuss/SKILL.md), [Diagnose Failure](../diagnose-failure/SKILL.md), [Decision Gate](../decision-gate/SKILL.md), evidence gathering, or the artifact's affected owner as the next route, then stop and wait.
114
+ ## Independent Review
115
+
116
+ Before preparing or performing a separately selected independent review, read the [Independent Artifact Reviewer Contract](references/independent-artifact-reviewer-contract.md).
117
+
118
+ Use supplied and already available evidence. Do not start a missing active check unless the review authority explicitly covers that exact check. Otherwise report **Needs evidence** with the load-bearing claim and required observing boundary. When an exact check is covered, apply Verify Work's check-result and claim-result semantics; the review still owns the intended-use fitness judgment.
119
+
120
+ Inspect and report without editing. Do not:
121
+
122
+ - adjudicate your own findings;
123
+ - settle owner decisions;
124
+ - select among materially different revisions;
125
+ - revise the artifact or dependencies;
126
+ - dispatch another review;
127
+ - continue merely to obtain Pass.
128
+
129
+ The independent review ends with its report.
130
+
131
+ Independent judgments are:
132
+
133
+ 1. **Blocking:** at least one Blocking Issue exists.
134
+ 2. **Inconclusive:** no Blocking Issue exists, but a material Question or Needs evidence item prevents judgment.
135
+ 3. **Non-blocking:** only Non-blocking Issues remain.
136
+ 4. **Pass:** no Issues or material unresolved items remain.
137
+
138
+ Improvements do not change the judgment or authorize revision.
139
+
140
+ ## Adjudicate A Returned Review
141
+
142
+ Before adjudicating an independent report, read [Adjudicate Artifact Review](references/adjudicate-artifact-review.md).
143
+
144
+ Assess every material item against the artifact, source truth, dependencies, and available evidence:
145
+
146
+ - **Accepted:** supported and applicable.
147
+ - **Rejected:** unsupported, stale, resolved, duplicate, preference-only, outside the artifact's job, or based on a source misread.
148
+ - **Open:** missing evidence or an owner decision prevents acceptance or rejection.
149
+
150
+ Do not separately accept the reviewer's overall judgment. Derive the adjudicated judgment from the dispositions.
151
+
152
+ Findings are evidence, not commands or revision authority.
153
+
154
+ - **Pass:** use the artifact for its intended purpose.
155
+ - **Non-blocking:** use it with explicit deferrals.
156
+ - **Inconclusive:** obtain the missing evidence or decision.
157
+ - **Blocking:** do not use the artifact across the blocked boundary; select the narrowest owning route.
100
158
 
101
- Continue revision selection only when a later user turn or new evidence supplies enough support. Do not request revision authority before selecting a direction or wait for the user to elicit the missing analysis. The checkpoint is not another review and creates no revision or dispatch authority.
159
+ When revision is ready, state the supported artifact problem, proposed revision, rationale, dependency impact, verification boundary, authority state, and whether focused follow-up review remains justified. Actual revision returns through [Workflow](../../skills/workflow/SKILL.md) to the artifact's owning skill.
102
160
 
103
- A revision-ready route states the proposed revision and rationale, dependency impact, verification boundary, whether focused follow-up is needed, and authority status. Findings are evidence, not commands, and do not authorize revision. Accepted revisions return to the artifact's owning skill and may remain in the same [Track Work](../track-work/SKILL.md) slice while its intended result stays coherent.
161
+ ## Limit Independent Review
104
162
 
105
- Use existing revision authority when it covers the result. Otherwise ask once for the revision and any warranted focused follow-up; omit follow-up when direct source evidence can settle the changed boundary. Then wait; do not revise or dispatch a follow-up from the request itself. Run follow-up only when the changed boundary or affected dependencies still need independent judgment and that dispatch is authorized. Do not revise source truth, accepted intent, or owner decisions merely to satisfy a reviewer or obtain Pass.
163
+ Treat review count as a budget, not a schedule.
106
164
 
107
- ## Limit The Review Cycle
165
+ - **Review 1:** the first selected independent review; broad by default.
166
+ - **Review 2:** a separately selected focused follow-up when accepted revisions, new evidence, affected dependencies, or remaining risk still require independent judgment.
167
+ - **Review 3:** exceptional, separately authorized, and final. Use it only after the revision basis and dependency boundary are understood.
108
168
 
109
- For one independently reviewed artifact state and intended-use boundary:
169
+ A review report always ends its review. Revision does not automatically authorize or require follow-up review.
110
170
 
111
- 1. Review 1 is the normal broad review.
112
- 2. Review 2, when needed and authorized, focuses on accepted revisions, affected dependencies, and remaining risk.
113
- 3. Review 3 is exceptional, separately authorized, and final.
171
+ If Review 2 remains Blocking:
114
172
 
115
- The budget is a cap, not dispatch authority. Do not request Review 4; return control to Workflow at the cap.
173
+ - diagnose when the blocker repeats, extends, invalidates, or exposes another consequence of prior revision, or when its basis remains uncertain;
174
+ - return an independent clear local artifact defect to its owner when diagnosis would add no useful understanding;
175
+ - do not automatically revise and dispatch Review 3.
116
176
 
117
- After Review 2 is adjudicated Blocking, stop before another revision or Review 3:
177
+ Do not request Review 4. A different reviewer, local revision, or renamed intended use does not reset the budget. Workflow may establish a new cycle only for a materially new artifact state and intended-use boundary.
118
178
 
119
- - If the blocker repeats, extends, invalidates, or exposes another consequence of the prior revision, or its cause remains unsupported, read [Diagnose Failure](../diagnose-failure/SKILL.md) and diagnose the shared cause first.
120
- - If it is an independent clear local defect with a supported cause, return to the artifact's owner and state why diagnosis is unnecessary.
179
+ Self-review does not consume this budget.
121
180
 
122
- Diagnosis follows adjudicated evidence, not reviewer judgment alone. Review 3 is final judgment after the cause and revision boundary are understood, not another attempt to discover them through revisions. Workflow may establish a new cycle only for a materially new reviewed state and intended-use boundary; local edits, a different reviewer, or renamed scope do not reset it.
181
+ ## Stop
123
182
 
124
- ## Report
183
+ Stop when the selected route has produced its bounded result:
125
184
 
126
- For self-review, report no formal result. Correct clear local issues and surface only unresolved material issues that change fitness or route.
185
+ - self-review: the supported artifact state is accepted or a material issue is routed;
186
+ - independent review: the report is complete;
187
+ - adjudication: material items are disposed and the next route is explicit.
127
188
 
128
- For independent review, use the [Independent Artifact Reviewer Contract](references/independent-artifact-reviewer-contract.md) and stop with its report. The receiving agent then reports the reviewer and adjudicated judgments, each material item's outcome and reason, and either the problem checkpoint or revision-ready route defined above. Omit empty groups and support the result with source or evidence rather than confidence.
189
+ Do not review until Pass, use review to authorize revision, or turn optional improvement into unfinished work.
@@ -0,0 +1,101 @@
1
+ # Adjudicate Artifact Review
2
+
3
+ Read this after an independent artifact review returns and before selecting what follows from its report.
4
+
5
+ Adjudication belongs to the receiving active agent. It tests the report against the artifact, source truth, dependencies, and evidence. It is not independent review and does not inherit the reviewer's authority or judgment.
6
+
7
+ ## Dispose Each Material Item
8
+
9
+ For every material item, choose one disposition.
10
+
11
+ ### Accepted
12
+
13
+ State:
14
+
15
+ - the supported artifact problem;
16
+ - its consequence for the intended use;
17
+ - whether it is Blocking or Non-blocking;
18
+ - whether the revision basis is supported or uncertain;
19
+ - which dependencies or contingent material it affects.
20
+
21
+ ### Rejected
22
+
23
+ State the concrete reason: unsupported, stale, resolved, duplicate, preference-only, outside the artifact's job, or based on a source or dependency misread.
24
+
25
+ ### Open
26
+
27
+ State:
28
+
29
+ - the unresolved content, claim, or dependency concern;
30
+ - its potential consequence for the intended use;
31
+ - the missing evidence or owner decision.
32
+
33
+ When factual evidence is missing, restate the item as a Verify Work input: load-bearing claim or condition, required observing boundary, available evidence and its limit, and the smallest evidence that could disagree.
34
+
35
+ A suggested revision may help explain a finding, but it does not settle source intent, select among material alternatives, or authorize revision.
36
+
37
+ After disposing the items, derive the adjudicated judgment. Do not separately accept the reviewer's overall judgment.
38
+
39
+ - **Pass:** no accepted Issues or material Open items remain.
40
+ - **Non-blocking:** only accepted Non-blocking Issues remain.
41
+ - **Inconclusive:** a material Open item prevents judgment.
42
+ - **Blocking:** at least one accepted Blocking Issue remains.
43
+
44
+ ## Use Verification Results
45
+
46
+ Route a known material evidence gap through [Workflow](../../../skills/workflow/SKILL.md) to [Verify Work](../../../skills/verify-work/SKILL.md). Verification produces factual evidence; it does not revise the reviewer's report or determine the review judgment.
47
+
48
+ - **Supported:** re-adjudicate the evidence gap. Do not infer Pass.
49
+ - **Contradicted:** re-adjudicate against source truth; the result may establish an Issue, invalidate one, or expose a source conflict.
50
+ - **Inconclusive:** keep the item Open. The adjudicated review remains Inconclusive when the gap is material.
51
+ - **Unavailable:** keep the item Open and state why the required boundary cannot currently be observed.
52
+
53
+ Select focused independent follow-up only when the new evidence still requires judgment from a separate context.
54
+
55
+ ## Decide Whether Revision Is Ready
56
+
57
+ Revision is ready when:
58
+
59
+ - the artifact's job and intended use are settled;
60
+ - the artifact problem and consequence are supported;
61
+ - sufficient source or decision basis exists to bound the revision;
62
+ - affected upstream and downstream dependencies are known sufficiently;
63
+ - the revision will not silently alter accepted content or an owner decision;
64
+ - no material alternative or user-owned choice remains.
65
+
66
+ When revision is ready, state:
67
+
68
+ - the proposed revision and rationale;
69
+ - affected locations and dependencies;
70
+ - required reconciliation or ordering;
71
+ - evidence or acceptance checks;
72
+ - whether focused independent follow-up remains justified;
73
+ - the authority state.
74
+
75
+ Use existing revision authority only when it covers that result and dependency impact. Otherwise propose the revision and any warranted follow-up once, then wait. A finding, adjudication, or selected review does not authorize mutation.
76
+
77
+ Actual revision returns through [Workflow](../../../skills/workflow/SKILL.md) to the artifact's owning skill. Use [Track Work](../../../skills/track-work/SKILL.md) for a Working Record, [Write Spec](../../../skills/write-spec/SKILL.md) for stable content or decision artifacts, [Write Plan](../../../skills/write-plan/SKILL.md) for a Plan, and [Handoff](../../../skills/handoff/SKILL.md) for a Handoff.
78
+
79
+ Do not revise upstream authority, accepted intent, or owner decisions merely to satisfy a reviewer or obtain Pass.
80
+
81
+ ## Route When Revision Is Not Ready
82
+
83
+ - unsettled content, strategy, or materially different revisions: [Discuss](../../../skills/discuss/SKILL.md);
84
+ - user-owned choice or source conflict: [Decision Gate](../../../skills/decision-gate/SKILL.md);
85
+ - unsupported or repeated failure cause: [Diagnose Failure](../../../skills/diagnose-failure/SKILL.md);
86
+ - missing factual support: route the named claim through [Workflow](../../../skills/workflow/SKILL.md) to [Verify Work](../../../skills/verify-work/SKILL.md);
87
+ - uncovered revision or dependency update: propose the bounded change and wait.
88
+
89
+ When findings interact, upstream authority is challenged, dependency effects remain uncertain, or user input could change the revision, report a problem checkpoint and stop before selecting or executing it.
90
+
91
+ ## After Authorized Revision
92
+
93
+ Re-verify affected load-bearing factual claims at their required observing boundaries. Then re-check source alignment, intended-use fitness, and every affected dependency before performing ordinary self-review with Review Artifact's shared kernel.
94
+
95
+ Select focused independent follow-up only when accepted revisions, affected dependencies, new evidence, or remaining risk still require judgment from a separate context. Do not dispatch follow-up merely because Review 1 found an Issue or because revision occurred.
96
+
97
+ If Review 2 remains Blocking, adjudicate it before acting again. Diagnose a repeated, extending, invalidating, or basis-uncertain blocker. Return an independent clear local artifact defect to its owner when diagnosis would add no useful understanding. Review 3 remains exceptional, separately authorized, and final.
98
+
99
+ ## Stop
100
+
101
+ Stop when every material item is Accepted, Rejected, or Open; the adjudicated judgment is supported; affected dependencies and contingent material are explicit; and the next route and authority state are clear.
@@ -1,38 +1,41 @@
1
1
  # Independent Artifact Reviewer Contract
2
2
 
3
- Use this when preparing an independent review of a durable artifact.
3
+ Read this before preparing or performing a separately selected independent review of a durable artifact.
4
4
 
5
- The reviewer did not produce the artifact. Give them the artifact, source truth, and evidence needed to judge it directly. The reviewer reports review items without editing.
5
+ The reviewer did not produce the reviewed artifact state. Give them the complete artifact, source truth, dependencies, and evidence needed to judge it directly. Do not provide only the producer's summary, reasoning, or change description.
6
6
 
7
7
  ## Required Context
8
8
 
9
9
  Provide:
10
10
 
11
- - artifact path, type, current state, and intended use;
12
- - accepted outcome, requirements, and non-goals;
13
- - owner decisions and unresolved questions;
14
- - relevant code, tests, policies, ADRs, and established behavior;
11
+ - artifact path, type, exact reviewed state, and intended use;
12
+ - accepted outcome, requirements, non-goals, and owner decisions;
13
+ - unresolved questions and known evidence gaps;
15
14
  - the artifact-specific schema or format contract when one exists;
15
+ - relevant code, tests, policies, ADRs, and established behavior;
16
16
  - upstream and downstream artifacts in dependency order;
17
- - known evidence gaps;
18
- - review number and, for a follow-up, prior items, adjudication, revisions, and new evidence.
17
+ - only the review lenses material to the intended use;
18
+ - active evidence authority: none, or each exact covered check with its expected evidence and stop condition;
19
+ - review number and, for follow-up, prior items, adjudication, revisions, and new evidence.
19
20
 
20
- For an artifact package, identify upstream authority and which work remains provisional or dependent.
21
+ For an artifact package, identify upstream authority and which material remains provisional or contingent.
21
22
 
22
23
  ## Reviewer Prompt
23
24
 
24
25
  ```md
25
26
  # Independent Artifact Review
26
27
 
27
- Review an artifact you did not produce. Inspect the complete artifact and source evidence directly. Report review items without editing. The review ends with this report; do not revise the artifact, dispatch a follow-up, or keep reviewing merely to obtain Pass.
28
+ Review an artifact state you did not produce. Inspect the complete artifact, source truth, dependencies, and evidence directly. Report without editing. The review ends with this report; do not adjudicate findings, settle owner decisions, revise anything, dispatch follow-up, or continue merely to obtain Pass.
28
29
 
29
- A pass is valid. Do not invent items, broaden the artifact's job, or treat possible improvement as unfinished work.
30
+ A pass is valid. Use a high evidence bar, not a high item count. Do not broaden the artifact's job or treat possible improvement as unfinished work.
31
+
32
+ Use supplied and already available evidence. Do not start a missing active check unless the review contract explicitly authorizes that exact check. Otherwise report **Needs evidence** with the load-bearing claim and required observing boundary. When an exact check is covered, apply Verify Work's check-result and claim-result semantics; active evidence does not authorize revision or broaden the review.
30
33
 
31
34
  ## Artifact And Intended Use
32
35
 
33
36
  - Artifact: [path]
34
37
  - Type: [working record | spec | PRD | issue | API contract | technical design | migration contract | plan | decision record | ADR | handoff | other]
35
- - Reviewed state: [revision, hash, or other identity]
38
+ - Reviewed state: [revision, hash, or other exact identity]
36
39
  - Intended use: [decision or future action this artifact must support]
37
40
  - Dependency order: [upstream -> downstream, or standalone]
38
41
 
@@ -57,8 +60,10 @@ A pass is valid. Do not invent items, broaden the artifact's job, or treat possi
57
60
 
58
61
  - Review number: [1 | 2 | 3]
59
62
  - Material lenses: [source alignment | fitness and sufficiency | decision clarity | evidence and acceptance | behavior and failure contract | dependency integrity | scope and minimality | clarity and continuity]
63
+ - Active evidence authority: [none | exact covered check, expected evidence, and stop condition]
60
64
 
61
65
  For Review 2 or 3:
66
+
62
67
  - Prior items and adjudication: [Accepted | Rejected | Open]
63
68
  - Revisions and new evidence: [bounded changes and evidence]
64
69
  - Affected dependencies: [dependencies or none]
@@ -68,49 +73,54 @@ For Review 2 or 3:
68
73
 
69
74
  - **Working Record:** accurate living task memory with recoverable slices and decisions, compact evidence pointers, and one next useful action.
70
75
  - **Spec or durable content artifact:** accepted content, behavior, boundaries, evidence, and uncertainty needed for its stated use.
71
- - **Plan:** inspectable ordered strategy with scope, dependencies, assumptions, checks, and stop conditions.
72
- - **Decision record or ADR:** decision, owner, alternatives, rationale, consequences, and revisit or supersession conditions.
73
- - **Handoff:** point-in-time continuation package that preserves what its recipient needs without replacing live task memory.
76
+ - **Plan:** an inspectable ordered strategy with scope, dependencies, assumptions, checks, and stop conditions.
77
+ - **Decision record or ADR:** the decision, owner, alternatives, rationale, consequences, and revisit or supersession conditions.
78
+ - **Handoff:** a point-in-time continuation package that preserves what its recipient needs without replacing live task memory.
74
79
  - **Other artifact:** its stated purpose without taking over another artifact's job.
75
80
 
81
+ Do not require one artifact to perform another artifact's job.
82
+
76
83
  ## Check
77
84
 
78
85
  Apply only the selected lenses:
79
86
 
80
- - The artifact agrees with accepted requirements, owner decisions, and live facts.
81
- - It contains enough for its intended use without pretending every future question is settled.
82
- - Required, tentative, open, deferred, and superseded information cannot be confused.
83
- - Load-bearing claims and acceptance conditions have suitable supporting or falsifying mechanisms.
84
- - Consequential behavior, failure states, forbidden outcomes, observers, and recovery are explicit where required.
85
- - Upstream and downstream artifacts remain consistent; provisional work is identified honestly.
86
- - It avoids speculative scope, unnecessary process, transcript history, and duplicated information owned elsewhere.
87
- - A future reader can use it without transcript memory or volatile copied context.
87
+ - the artifact agrees with accepted requirements, owner decisions, and live facts;
88
+ - it contains enough for its intended use without pretending every future question is settled;
89
+ - required, tentative, open, deferred, and superseded information cannot be confused;
90
+ - load-bearing claims and acceptance conditions have suitable supporting or falsifying mechanisms;
91
+ - consequential behavior, failure states, forbidden outcomes, observers, and recovery are explicit where required;
92
+ - upstream and downstream artifacts remain consistent and provisional material is identified honestly;
93
+ - it avoids speculative scope, unnecessary process, and duplicated information owned elsewhere;
94
+ - a future reader can use it without transcript memory or volatile copied context.
88
95
 
89
- Do not demand exhaustive edge cases. A possible condition is not an Issue unless the artifact's intended use requires it, evidence shows it matters, or omission creates material risk. Use Question when expected behavior is undefined, Needs evidence when support is missing, and Improvement for useful content not required by this boundary.
96
+ Review upstream authority before dependent artifacts. When an upstream problem invalidates downstream assumptions, mark affected material contingent rather than generating exhaustive downstream findings against an unsettled basis.
90
97
 
91
- If an upstream issue invalidates downstream assumptions, mark the affected material contingent instead of generating exhaustive downstream items.
98
+ Before calling something an Issue, ask:
92
99
 
93
- For Review 2 or 3, inspect only accepted revisions, affected dependencies, new evidence, and remaining risk. Do not reopen Rejected items without contradictory evidence. For every new Blocking Issue, state whether it repeats, extends, invalidates, or exposes another consequence of a prior revision; is independent; or cannot yet be related from the evidence. Report a related pattern rather than proposing another revision. Review 3 is final for this cycle; do not recommend Review 4.
100
+ 1. Does fitness for the intended use depend on content, source truth, or an owner decision that remains unsettled? If yes, use **Question**.
101
+ 2. Does fitness depend on a load-bearing claim or condition that available evidence cannot establish? If yes, use **Needs evidence**.
102
+ 3. Is there a supported artifact defect requiring revision for the intended use? Use **Blocking Issue** when the artifact cannot safely guide that use, otherwise **Non-blocking Issue** when revision can be deferred safely.
103
+ 4. Is the change merely useful beyond the intended use? Omit it by default; use **Improvement** only when materially relevant or requested.
94
104
 
95
- ## Classify Review Items
105
+ A **Needs evidence** item must identify the load-bearing claim or condition, required observing boundary, available evidence and its limit, why the gap affects intended-use fitness, and the smallest evidence that could disagree.
96
106
 
97
- - **Blocking Issue:** supported defect or risk that must be resolved before the artifact guides its intended use.
98
- - **Non-blocking Issue:** real issue that can be deferred safely for this boundary.
99
- - **Question:** material intent, requirement, or owner decision is unclear.
100
- - **Needs evidence:** a load-bearing claim or condition cannot be established.
101
- - **Improvement:** useful enhancement not required for this boundary. It does not affect judgment or authorize revision.
107
+ A Blocking Issue must identify the exact location or dependency, violated source truth or artifact responsibility, evidence, concrete consequence for intended use, and revision constraints or owning activity to re-enter. Recommend a specific revision only when source intent and dependency effects support it.
102
108
 
103
- A Blocking Issue must include its exact location, violated source truth or artifact responsibility, evidence, concrete consequence for intended use, and smallest safe revision or owning activity to re-enter.
109
+ For Review 2 or 3, inspect only accepted revisions, affected dependencies, new evidence, and remaining risk. Do not reopen Rejected items without contradictory evidence. For each new Blocking Issue, state whether it repeats, extends, invalidates, or exposes another consequence of a prior revision; is independent; or cannot yet be related from the evidence. Report a related pattern rather than proposing another revision. Review 3 is final; do not recommend Review 4.
104
110
 
105
111
  ## Determine The Judgment
106
112
 
107
- 1. **Blocking:** one or more Blocking Issues exist.
113
+ 1. **Blocking:** at least one Blocking Issue exists.
108
114
  2. **Inconclusive:** no Blocking Issue exists, but a material Question or Needs evidence item prevents judgment.
109
115
  3. **Non-blocking:** only Non-blocking Issues remain.
110
- 4. **Pass:** no Issues or material Unresolved items remain. Improvements may still be reported.
116
+ 4. **Pass:** no Issues or material unresolved items remain.
117
+
118
+ Improvements do not change the judgment.
111
119
 
112
120
  ## Output
113
121
 
122
+ Omit empty groups. Do not include Improvements unless they are materially relevant or explicitly requested.
123
+
114
124
  Review type: independent
115
125
  Review number: [1 | 2 | 3]
116
126
  Artifact: [reviewed artifact]
@@ -123,26 +133,27 @@ Relationship to prior items (Review 2 or 3 only): [related consequence | indepen
123
133
  ### Review Items
124
134
 
125
135
  #### Issues — Blocking
126
- - [location, issue, violated source or responsibility, evidence, consequence, smallest safe correction]
136
+ - [location or dependency, issue, violated source or responsibility, evidence, consequence, revision constraints or owning activity]
127
137
 
128
138
  #### Issues — Non-blocking
129
- - [location, issue, evidence, why it can be deferred]
139
+ - [location or dependency, issue, evidence, why it can be deferred]
130
140
 
131
141
  #### Unresolved — Questions
132
142
  - [question, effect on judgment, required answer]
133
143
 
134
144
  #### Unresolved — Needs evidence
135
- - [concern, missing evidence, evidence needed]
145
+ - [load-bearing claim or condition, required observing boundary, available evidence and limit, effect on intended-use fitness, smallest evidence that could disagree]
136
146
 
137
147
  #### Improvements
138
- - [improvement, benefit, supporting evidence]
148
+ - [only when materially relevant or requested: improvement, benefit, evidence]
139
149
 
140
150
  Dependencies affected: [dependencies or none]
151
+ Contingent material: [material and upstream condition, or none]
141
152
  Evidence gaps: [unproved claims or none]
142
153
  ```
143
154
 
144
155
  ## Calibration
145
156
 
146
- Use a high evidence bar, not a high item count. Lead with the few items that can change the artifact's fitness judgment. Prior review, artifact length, author confidence, or polished language does not establish fitness.
157
+ Lead with the few items that can change fitness for the intended use. Prior review, artifact length, polished language, or producer confidence does not establish fitness.
147
158
 
148
- The review is evidence for adjudication, not authority over source truth, owner decisions, revisions, or another independent dispatch. Pass, Non-blocking, Inconclusive, and Blocking are all valid exits.
159
+ The report is evidence for adjudication. It is not authority over source truth, owner decisions, revisions, dependencies, or another independent dispatch. Pass, Non-blocking, Inconclusive, and Blocking are all valid exits.