ahead-pi 0.2.0 → 0.2.1

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 (40) hide show
  1. package/README.md +13 -3
  2. package/generated/product-change/ai-audit.md +6 -3
  3. package/generated/product-change/ai-review.md +6 -3
  4. package/generated/product-change/decision.md +6 -3
  5. package/generated/product-change/define.md +6 -3
  6. package/generated/product-change/deploy.md +6 -3
  7. package/generated/product-change/human-review.md +6 -3
  8. package/generated/product-change/implement.md +11 -4
  9. package/generated/product-change/manifest.json +2 -2
  10. package/generated/product-change/options.md +6 -3
  11. package/generated/product-change/outcome.md +6 -3
  12. package/generated/product-change/plan.md +6 -3
  13. package/generated/product-change/questions.md +6 -3
  14. package/generated/product-change/research.md +6 -3
  15. package/generated/product-change/verify.md +6 -3
  16. package/generated/reference/CONSTITUTION.md +43 -0
  17. package/generated/reference/docs/acceptable-ai-use.md +217 -0
  18. package/generated/reference/docs/design/debugging-and-operations.md +119 -0
  19. package/generated/reference/docs/design/executable-workflows.md +110 -0
  20. package/generated/reference/docs/design/process-taxonomy.md +144 -0
  21. package/generated/reference/docs/engineering-practice.md +163 -0
  22. package/generated/reference/docs/evidence/evidence-standard.md +123 -0
  23. package/generated/reference/docs/evidence/research-map.md +98 -0
  24. package/generated/reference/docs/rationale.md +210 -0
  25. package/generated/reference/docs/references/pragmatic-programmer-page-index.md +113 -0
  26. package/generated/reference/docs/references/submitted-engineering-notes.md +306 -0
  27. package/generated/reference/docs/releasing-pi.md +89 -0
  28. package/generated/reference/docs/workflows/README.md +142 -0
  29. package/generated/reference/docs/workflows/corrective-debugging.md +203 -0
  30. package/generated/reference/docs/workflows/decision.md +149 -0
  31. package/generated/reference/docs/workflows/internal-improvement.md +207 -0
  32. package/generated/reference/docs/workflows/investigation.md +159 -0
  33. package/generated/reference/docs/workflows/operational-stabilization.md +185 -0
  34. package/generated/reference/docs/workflows/product-change.md +205 -0
  35. package/generated/reference/index.json +180 -0
  36. package/package.json +4 -2
  37. package/src/guidance.ts +6 -4
  38. package/src/index.ts +128 -0
  39. package/src/reference-viewer.ts +71 -0
  40. package/src/reference.ts +56 -0
@@ -0,0 +1,203 @@
1
+ # Corrective Debugging Workflow
2
+
3
+ Status: pilot v0.1
4
+
5
+ ## Outcome
6
+
7
+ Use this flow when observed behavior conflicts with intended behavior and the dominant work is causal diagnosis plus correction. It ends with a verified correction or an explicit human acceptance of remaining uncertainty.
8
+
9
+ Use operational stabilization instead when a live system is unhealthy and restoration or convergence is the immediate objective.
10
+
11
+ ## Lifecycle
12
+
13
+ ```text
14
+ BUG REPORTED
15
+
16
+
17
+ ┌─────────────────┐
18
+ │ 1. CHARACTERIZE │
19
+ │ │
20
+ │ HUMAN │
21
+ │ • What happens? │
22
+ │ • Expected? │
23
+ │ • When / where? │
24
+ │ • Impact/scope? │
25
+ │ • Reproducible? │
26
+ └───────┬─────────┘
27
+
28
+
29
+ ┌─────────────────┐
30
+ │ 2. HUMAN MODEL │
31
+ │ │
32
+ │ What do we │
33
+ │ currently think │
34
+ │ is happening? │
35
+ └───────┬─────────┘
36
+
37
+
38
+ ┌─────────────────┐
39
+ │ 3. AI ASSISTS │
40
+ │ EVIDENCE REVIEW │
41
+ │ │
42
+ │ • Code │
43
+ │ • Logs/history │
44
+ │ • Dependencies │
45
+ │ • Runtime data │
46
+ │ • Contradictions│
47
+ └───────┬─────────┘
48
+
49
+
50
+ ┌─────────────────┐
51
+ │ 4. HYPOTHESES │
52
+ │ │
53
+ │ HUMAN LEADS │
54
+ │ AI ASSISTS │
55
+ │ • H1 / H2 / H3 │
56
+ │ • Evidence FOR │
57
+ │ • Evidence │
58
+ │ AGAINST │
59
+ └───────┬─────────┘
60
+
61
+
62
+ ┌─────────────────┐
63
+ │ 5. HUMAN SELECTS│
64
+ │ WHAT TO TEST │
65
+ │ │
66
+ │ • Prediction │
67
+ │ • Safety/scope │
68
+ └───────┬─────────┘
69
+
70
+
71
+ ┌─────────────────┐
72
+ │ 6. TEST │
73
+ │ HYPOTHESIS │
74
+ │ │
75
+ │ HUMAN/ENGINEER │
76
+ │ Run / inspect / │
77
+ │ instrument │
78
+ │ AI — ASSIST │
79
+ └───────┬─────────┘
80
+
81
+
82
+ ┌──────────────┐
83
+ │ HUMAN READY │
84
+ │ TO CHOOSE? │
85
+ └──────┬───────┘
86
+ NO ↙ ↘ YES
87
+ │ │
88
+ │ ▼
89
+ ↺ HUMAN MODEL HUMAN ACCEPTS DIAGNOSIS
90
+ OR UNKNOWN CAUSE / RISK
91
+
92
+
93
+ HUMAN FIX APPROACH
94
+
95
+
96
+ HUMAN FIRST-PASS PLAN
97
+
98
+
99
+ ENGINEER IMPLEMENTS
100
+
101
+
102
+ AI REVIEW
103
+
104
+
105
+ INDEPENDENT HUMAN REVIEW
106
+
107
+
108
+ HUMAN AUTHORIZES DEPLOY / RELEASE
109
+ WHEN APPLICABLE
110
+
111
+
112
+ HUMAN VERIFIES CORRECTION OF ORIGINAL FAILURE
113
+
114
+
115
+ HUMAN OBSERVES DEPLOYED OUTCOME
116
+
117
+
118
+ AI AUDIT
119
+
120
+
121
+ HUMAN OUTCOME GATE
122
+
123
+ Not corrected ───────────────────↺ HUMAN MODEL
124
+ ```
125
+
126
+ Reproduction is useful but not a universal gate. Historical, intermittent, production-only, or already mitigated failures may proceed when the limitation is recorded.
127
+
128
+ “Ready to choose” means either the evidence sufficiently supports a human-accepted diagnosis or the accountable human explicitly accepts that the cause remains unknown and records the risk of proceeding. Unsupported hypotheses alone do not satisfy the gate.
129
+
130
+ ## Minimal phases
131
+
132
+ | Phase | Human owns | AI may | Minimum record | Advance when |
133
+ |---|---|---|---|---|
134
+ | Report and characterize | Intended behavior, observed behavior, impact, scope, and evidence quality | Organize evidence and identify missing characterization | Failure statement and evidence links | The failure is bounded enough to investigate |
135
+ | Mental model | Current explanation of relevant components, state, and interactions | Explain unfamiliar mechanisms and challenge omissions | Model, assumptions, and unknowns | The model can generate testable hypotheses |
136
+ | Hypothesize and test | Hypothesis selection, test authorization, prediction, and interpretation | Generate alternatives, evidence for/against, and discriminating tests | Facts, inferences, hypotheses, predictions, tests, results, confidence | Human accepts a diagnosis or explicitly accepts uncertainty |
137
+ | Choose correction | Desired correction and tradeoffs | Compare fix approaches and recurrence risks | Selected correction and rationale | Human approves the correction |
138
+ | Plan | First-pass correction and verification plan | Find missing cases, risks, regression tests, and rollout concerns | Plan and rollback or containment needs | Human approves the plan |
139
+ | Implement | Code and engineering changes | Bounded implementation and debugging assistance | Linked changeset and regression evidence | Change is ready for review |
140
+ | AI review | Disposition of valid findings | Review correction, tests, risks, and plan alignment | AI findings and dispositions | Blocking findings are resolved or rejected with rationale |
141
+ | Human review | Independent final engineering judgment by someone other than the implementer | Answer targeted questions and retrieve evidence | Current independent human review | Independent human reviewer accepts the current change |
142
+ | Deploy or release | Authorization and rollout decision | Analyze readiness evidence within policy | Version, environment, actor, time, and result | The intended correction reaches the target environment or deployment is explicitly not applicable |
143
+ | Verify and observe | Original failure, regression protection, and deployed behavior when applicable | Suggest checks and analyze authorized evidence | Pre-change comparison, fix validation, deployment evidence, and observed outcome | The original failure and user-visible outcome are evaluated |
144
+ | AI audit | Disposition of findings and required response | Compare the result with the failure, diagnosis or accepted uncertainty, correction, plan, reviews, and observed behavior | Audit findings and dispositions | Human has reviewed material findings |
145
+ | Outcome | Acceptance, rollback, continued investigation, follow-up, or abandonment | Summarize learning | Result, causal confidence, uncertainty, and follow-ups | Human accepts closure or reopens/routes work |
146
+
147
+ ## Evidence chain
148
+
149
+ ```text
150
+ OBSERVED FAILURE
151
+
152
+
153
+ FACTS / EVIDENCE ──► HUMAN MENTAL MODEL
154
+
155
+
156
+ HUMAN-LED / AI-EXPANDED HYPOTHESES
157
+
158
+
159
+ PREDICTION / TEST / RESULT
160
+
161
+ └────────────↺ MODEL
162
+
163
+
164
+ HUMAN CONCLUSION / CONFIDENCE
165
+
166
+
167
+ HUMAN CORRECTION DECISION / PLAN
168
+
169
+
170
+ ENGINEER CHANGE / AI REVIEW / INDEPENDENT REVIEW
171
+
172
+
173
+ HUMAN-AUTHORIZED DEPLOYMENT
174
+
175
+
176
+ CORRECTION VERIFICATION EVIDENCE
177
+
178
+
179
+ DEPLOYED OUTCOME EVIDENCE
180
+
181
+
182
+ AI AUDIT / HUMAN DISPOSITION
183
+
184
+
185
+ HUMAN OUTCOME
186
+ ```
187
+
188
+ ## Non-waivable pilot rules
189
+
190
+ - Facts, inferences, and hypotheses remain distinguishable.
191
+ - AI hypotheses are candidates, not diagnoses.
192
+ - The human chooses or authorizes tests and interprets their results.
193
+ - A plausible cause is not treated as proven.
194
+ - Fix validation and post-deployment outcome verification are distinct when deployment applies.
195
+ - AI review and implementer self-review do not satisfy independent human review.
196
+ - Implementation completion is not deployment, recovery, or outcome verification.
197
+
198
+ ## Pilot questions
199
+
200
+ - What was the minimum useful investigation record?
201
+ - Did recording predictions before tests reduce hindsight interpretation?
202
+ - When was correction justified without a conclusive cause?
203
+ - Did AI broaden hypotheses or anchor the investigator?
@@ -0,0 +1,149 @@
1
+ # Decision Workflow
2
+
3
+ Status: pilot v0.1
4
+
5
+ ## Outcome
6
+
7
+ Use this flow when the deliverable is an accountable human choice among alternatives: architecture, buy versus build, technology selection, platform direction, policy, or another consequential course.
8
+
9
+ Implementation is optional and normally belongs in a linked product-change or internal-improvement run.
10
+
11
+ ## Lifecycle
12
+
13
+ ```text
14
+ ┌──────────────────────────────────────────────┐
15
+ │ 1. FRAME DECISION │
16
+ │ │
17
+ │ HUMAN │
18
+ │ • State the choice to be made │
19
+ │ • Name accountable decider/stakeholders │
20
+ │ • Define scope and deadline │
21
+ └──────────────────────┬───────────────────────┘
22
+
23
+ ┌──────────────────────────────────────────────┐
24
+ │ 2. DEFINE CRITERIA │
25
+ │ │
26
+ │ HUMAN │
27
+ │ • Goals • constraints • criteria │
28
+ │ │
29
+ │ AI — ASSIST │
30
+ │ • Expose hidden criteria and tensions │
31
+ └──────────────────────┬───────────────────────┘
32
+
33
+ ┌──────────────────────────────────────────────┐
34
+ │ 3. RESEARCH AND QUESTIONS │
35
+ │ │
36
+ │ AI — ASSIST │
37
+ │ • Gather cited evidence │
38
+ │ • Find contradictions and missing questions │
39
+ │ │
40
+ │ HUMAN │
41
+ │ • Read, evaluate, and accept unknowns │
42
+ └──────────────────────┬───────────────────────┘
43
+
44
+ ┌───────────────┐
45
+ │ EVIDENCE │
46
+ │ REVIEWED AND │
47
+ │ UNCERTAINTY │
48
+ │ DISPOSED? │
49
+ └───────┬───────┘
50
+ NO ↙ ↘ YES
51
+ ↺ RESEARCH │
52
+
53
+ ┌──────────────────────────────────────────────┐
54
+ │ 4. HUMAN INITIAL OPTION │
55
+ │ • Propose at least one viable course │
56
+ │ • Explain the initial reasoning │
57
+ └──────────────────────┬───────────────────────┘
58
+
59
+ ┌──────────────────────────────────────────────┐
60
+ │ 5. EXPAND AND CHALLENGE OPTIONS │
61
+ │ │
62
+ │ AI — ASSIST │
63
+ │ • Add alternatives • compare • challenge │
64
+ │ • Surface consequences and risks │
65
+ │ • Analyze reversibility │
66
+ │ │
67
+ │ HUMAN │
68
+ │ • Evaluate and refine the option set │
69
+ └──────────────────────┬───────────────────────┘
70
+
71
+ ┌──────────────────────────────────────────────┐
72
+ │ 6. HUMAN DECISION GATE │
73
+ │ • Select the course │
74
+ │ • Accept tradeoffs and uncertainty │
75
+ │ • Record rationale and dissent │
76
+ └──────────────────────┬───────────────────────┘
77
+
78
+ ┌──────────────────────────────────────────────┐
79
+ │ 7. VALIDATE AND PUBLISH │
80
+ │ │
81
+ │ HUMAN │
82
+ │ • Validate consequences │
83
+ │ • Set reversibility and review trigger │
84
+ │ • Link resulting work │
85
+ │ │
86
+ │ AI — ASSIST │
87
+ │ • Challenge consistency and missing effects │
88
+ └──────────────────────┬───────────────────────┘
89
+
90
+ HUMAN OUTCOME
91
+
92
+ Reframe or seek evidence ─────────↺ FRAME / RESEARCH
93
+ ```
94
+
95
+ “Disposed” means the uncertainty is answered or the accountable human explicitly accepts it. AI does not introduce solution alternatives during research; option expansion begins only after the human initial option is recorded.
96
+
97
+ ## Minimal phases
98
+
99
+ | Phase | Human owns | AI may | Minimum record | Advance when |
100
+ |---|---|---|---|---|
101
+ | Frame | Decision to be made, accountable decider, scope, deadline, and stakeholders | Clarify ambiguity and identify missing stakeholders | Decision statement and owner | Human accepts the frame |
102
+ | Criteria | Goals, constraints, evaluation criteria, and relative importance | Challenge hidden criteria and identify tensions | Criteria and non-negotiable constraints | Criteria are sufficient for comparison |
103
+ | Research and questions | Evaluation of evidence and disposition of uncertainty | Gather cited evidence and find contradictions or missing questions; do not introduce solution alternatives yet | Sources, findings, unknowns, and limits | Material evidence is reviewed and uncertainty is answered or explicitly accepted |
104
+ | Options | At least one human-originated option | Expand, combine, challenge, and propose alternatives | Options with provenance | Plausible option space is understood |
105
+ | Compare | Interpretation of tradeoffs | Structure comparison and sensitivity analysis | Benefits, costs, risks, consequences, reversibility | Decision is ready for accountable judgment |
106
+ | Decide | Selection, rationale, accepted tradeoffs, and dissent | Test rationale for inconsistency or missing consequence | Decision and rejected alternatives | Accountable human approves a specific revision |
107
+ | Validate and publish | Consequence check, communication, review trigger, and linked work | Summarize and propose validation checks | Consequences, reversibility, review trigger, links | Decision is published and accepted as current |
108
+
109
+ ## Decision evidence chain
110
+
111
+ ```text
112
+ HUMAN DECISION FRAME / CRITERIA
113
+
114
+
115
+ AI-ASSISTED EVIDENCE / HUMAN-ACCEPTED UNKNOWNS
116
+
117
+
118
+ HUMAN INITIAL OPTION
119
+
120
+
121
+ AI-EXPANDED / HUMAN-EVALUATED OPTION SET
122
+
123
+
124
+ TRADEOFFS / CONSEQUENCES
125
+
126
+
127
+ HUMAN DECISION / RATIONALE / DISSENT
128
+
129
+
130
+ HUMAN-OWNED REVERSIBILITY / REVIEW TRIGGER
131
+
132
+
133
+ LINKED IMPLEMENTATION OR INVESTIGATION
134
+ ```
135
+
136
+ ## Non-waivable pilot rules
137
+
138
+ - The accountable human defines the decision and evaluation criteria.
139
+ - A human contributes an initial option before AI expands the option set.
140
+ - AI does not select, approve, or manufacture consensus.
141
+ - Unknowns and dissent are not erased by polished rationale.
142
+ - The decision records when and why it should be revisited.
143
+
144
+ ## Pilot questions
145
+
146
+ - Did human-first option generation preserve useful diversity?
147
+ - Were the criteria defined before a preferred answer emerged?
148
+ - Which evidence actually changed the decision?
149
+ - Did the review trigger cause a stale decision to be revisited?
@@ -0,0 +1,207 @@
1
+ # Internal Improvement Workflow
2
+
3
+ Status: pilot v0.1
4
+
5
+ ## Outcome
6
+
7
+ Use this flow when externally required behavior should remain invariant while an internal quality improves: maintainability, comprehensibility, performance, reliability margin, operability, testability, cost, or preventive risk reduction.
8
+
9
+ Use product change when externally meaningful behavior is intentionally changing, or corrective debugging when an observed defect is the reason for the work.
10
+
11
+ ## Lifecycle
12
+
13
+ ```text
14
+ ┌──────────────────────────────────────────────┐
15
+ │ 1. DEFINE INVARIANTS │
16
+ │ │
17
+ │ HUMAN │
18
+ │ • Define behavior that must not change │
19
+ │ • Define scope and non-goals │
20
+ │ │
21
+ │ AI — ASSIST │
22
+ │ • Identify overlooked contracts/consumers │
23
+ └──────────────────────┬───────────────────────┘
24
+
25
+ ┌──────────────────────────────────────────────┐
26
+ │ 2. BASELINE AND TARGET │
27
+ │ │
28
+ │ HUMAN │
29
+ │ • Accept current evidence and measurement │
30
+ │ • Define target quality │
31
+ │ • Define success threshold │
32
+ │ │
33
+ │ AI — ASSIST │
34
+ │ • Gather metrics • find measurement gaps │
35
+ │ • Suggest unintended effects to watch │
36
+ └──────────────────────┬───────────────────────┘
37
+
38
+ ┌──────────────────────────────────────────────┐
39
+ │ 3. OPTIONS │
40
+ │ │
41
+ │ HUMAN — FIRST PASS │
42
+ │ • Propose at least one improvement approach │
43
+ │ │
44
+ │ AI — ASSIST │
45
+ │ • Expand alternatives • expose coupling │
46
+ │ • Challenge complexity and assumptions │
47
+ │ │
48
+ │ HUMAN │
49
+ │ • Evaluate and refine options │
50
+ └──────────────────────┬───────────────────────┘
51
+
52
+ ┌──────────────────────────────────────────────┐
53
+ │ 4. HUMAN DECISION GATE │
54
+ │ • Select approach and accept tradeoffs │
55
+ │ • Record rationale │
56
+ └──────────────────────┬───────────────────────┘
57
+
58
+ ┌──────────────────────────────────────────────┐
59
+ │ 5. PLAN │
60
+ │ │
61
+ │ HUMAN — FIRST PASS │
62
+ │ • Sequence change, checks, and rollback │
63
+ │ │
64
+ │ AI — ASSIST │
65
+ │ • Find affected boundaries and missing tests │
66
+ │ │
67
+ │ HUMAN finalizes and approves │
68
+ └──────────────────────┬───────────────────────┘
69
+
70
+ ┌──────────────────────────────────────────────┐
71
+ │ 6. IMPLEMENT │
72
+ │ ENGINEER owns and understands the change │
73
+ │ AI — ASSIST with bounded contributions │
74
+ └──────────────────────┬───────────────────────┘
75
+
76
+ ┌──────────────────────────────────────────────┐
77
+ │ 7. AI REVIEW │
78
+ │ • Hidden behavior changes • complexity │
79
+ │ • Tests • coupling • plan compliance │
80
+ └──────────────────────┬───────────────────────┘
81
+
82
+ ┌──────────────────────────────────────────────┐
83
+ │ 8. INDEPENDENT HUMAN REVIEW │
84
+ │ • Reviewer is not the implementer │
85
+ │ • Final judgment on preservation/improvement │
86
+ └──────────────────────┬───────────────────────┘
87
+
88
+ 9. HUMAN AUTHORIZES DEPLOY / RELEASE
89
+ WHEN APPLICABLE
90
+
91
+ ┌──────────────────────────────────────────────┐
92
+ │ 10. VERIFY │
93
+ │ │
94
+ │ HUMAN │
95
+ │ • Verify invariants │
96
+ │ • Compare before/after target evidence │
97
+ │ │
98
+ │ AI — ASSIST │
99
+ │ • Analyze measurements / suggest checks │
100
+ └──────────────────────┬───────────────────────┘
101
+
102
+ ┌──────────────────────────────────────────────┐
103
+ │ 11. AI AUDIT │
104
+ │ • Compare invariants, target, plan, reviews, │
105
+ │ deployment, and observed evidence │
106
+ │ HUMAN disposes material findings │
107
+ └──────────────────────┬───────────────────────┘
108
+
109
+ ┌───────────────┐
110
+ │ INVARIANTS │
111
+ │ PRESERVED? │
112
+ └───────┬───────┘
113
+ NO ↙ ↘ YES
114
+ │ │
115
+ │ ▼
116
+ │ ┌────────────────┐
117
+ │ │ TARGET QUALITY │
118
+ │ │ IMPROVED? │
119
+ │ └───────┬────────┘
120
+ │ NO ↙ ↘ YES
121
+ │ │ └────► HUMAN OUTCOME GATE
122
+ │ ▼
123
+ │ HUMAN CHOOSES
124
+ │ ├─ Rework ─────────────↺ IMPLEMENT
125
+ │ ├─ Roll back ─────────► HUMAN OUTCOME
126
+ │ └─ Accept partial/no improvement
127
+ │ with rationale ─────► HUMAN OUTCOME
128
+
129
+ HUMAN CHOOSES
130
+ ├─ Rework ──────────────────────↺ IMPLEMENT
131
+ ├─ Roll back ──────────────────► HUMAN OUTCOME
132
+ └─ Reclassify ─────────────────► NEW PRODUCT CHANGE RUN
133
+ + HUMAN OUTCOME
134
+
135
+ Review changes requested ─────────────↺ IMPLEMENT
136
+ ```
137
+
138
+ Preservation and improvement are separate judgments. A failed invariant cannot be accepted as an internal improvement: the team must roll back, rework, or deliberately reclassify the work as a product change. If invariants hold but the target quality does not improve, a human may stop and record a partial or unsuccessful result rather than manufacture success.
139
+
140
+ ## Minimal phases
141
+
142
+ | Phase | Human owns | AI may | Minimum record | Advance when |
143
+ |---|---|---|---|---|
144
+ | Invariants | Behavior that must remain unchanged, scope, and non-goals | Identify overlooked contracts and consumers | Explicit invariants and exclusions | Human accepts the preservation contract |
145
+ | Baseline | Current quality evidence and measurement validity | Gather metrics and identify measurement gaps | Tests, measurements, structural evidence, or observations | Baseline is credible enough for comparison |
146
+ | Target | Quality to improve, success threshold, and tradeoffs | Suggest measures and unintended effects | Target quality and acceptance signal | Improvement can be evaluated |
147
+ | Options and decision | Initial approach, selection, and risk | Expand alternatives, expose coupling, and challenge abstraction | Options, decision, and rationale | Human approves the approach |
148
+ | Plan | First-pass sequence, verification, and rollback | Find affected boundaries, migration needs, and missing tests | Plan and invariant checks | Human approves the final plan |
149
+ | Implement | Engineering change and scope control | Bounded refactoring, explanation, tests, and mechanical assistance | Linked changeset and deviations | Change is ready for review |
150
+ | AI review | Disposition of valid findings | Review for hidden behavior changes, incidental complexity, tests, and plan alignment | AI findings and dispositions | Blocking findings are resolved or rejected with rationale |
151
+ | Human review | Independent final judgment by someone other than the implementer about simplicity, coupling, risk, and preservation | Answer targeted questions and retrieve evidence | Current independent human review | Independent human reviewer accepts the current change |
152
+ | Deploy or release | Authorization and rollout decision | Analyze readiness evidence within policy | Version, environment, actor, time, and result | The intended version reaches the target environment or deployment is explicitly not applicable |
153
+ | Verify | Invariant preservation and target-quality comparison | Analyze measurements and suggest negative checks | Before/after and deployed-outcome evidence when applicable, plus invariant results | Invariants are evaluated and target-quality results are measured; an invariant failure routes to rollback, rework, or product-change reclassification |
154
+ | AI audit | Disposition of findings and required response | Compare invariants, target, plan, reviews, deployment, and observed evidence; identify divergence or weak proof | Audit findings and dispositions | Human has reviewed material findings |
155
+ | Outcome | Acceptance, rollback, partial result, or new work | Summarize learning | Outcome, remaining debt, and follow-ups | Human accepts closure |
156
+
157
+ ## Preservation and improvement chain
158
+
159
+ ```text
160
+ HUMAN-OWNED INVARIANTS / NON-GOALS
161
+
162
+
163
+ HUMAN-ACCEPTED BASELINE / TARGET
164
+
165
+
166
+ HUMAN OPTION + AI-EXPANDED ALTERNATIVES
167
+
168
+
169
+ HUMAN DECISION / FIRST-PASS PLAN
170
+
171
+
172
+ ENGINEER-OWNED CHANGESET
173
+
174
+
175
+ AI REVIEW + INDEPENDENT HUMAN REVIEW
176
+
177
+
178
+ HUMAN-AUTHORIZED DEPLOYMENT WHEN APPLICABLE
179
+
180
+
181
+ HUMAN-ACCEPTED INVARIANT VERIFICATION
182
+ AND BEFORE / AFTER COMPARISON
183
+
184
+
185
+ AI AUDIT / HUMAN DISPOSITION
186
+
187
+
188
+ HUMAN OUTCOME / REMAINING DEBT
189
+ ```
190
+
191
+ ## Non-waivable pilot rules
192
+
193
+ - Invariants are stated before the change.
194
+ - Passing existing tests alone does not prove preservation when those tests do not cover the contract.
195
+ - AI may propose a refactor; humans decide whether it reduces conceptual complexity.
196
+ - File movement or abstraction count is not itself an improvement.
197
+ - The outcome compares before and after evidence against the declared target.
198
+ - An invariant failure cannot close as a successful internal improvement.
199
+ - AI review and implementer self-review do not satisfy independent human review.
200
+ - Implementation completion is not deployment or outcome verification.
201
+
202
+ ## Pilot questions
203
+
204
+ - Were the invariants specific enough to catch unintended behavior changes?
205
+ - Did the selected measure reflect the quality people actually wanted?
206
+ - Did the work reduce conceptual complexity or merely rearrange it?
207
+ - When did an internal improvement reveal that a product change or bug flow was needed?