ahead-pi 0.2.0 → 0.3.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 (102) hide show
  1. package/README.md +29 -9
  2. package/dist/ahead_wasm.wasm +0 -0
  3. package/generated/corrective-debugging/ai-audit.md +39 -0
  4. package/generated/corrective-debugging/ai-review.md +46 -0
  5. package/generated/corrective-debugging/characterize.md +53 -0
  6. package/generated/corrective-debugging/conclude.md +59 -0
  7. package/generated/corrective-debugging/correction.md +53 -0
  8. package/generated/corrective-debugging/deploy.md +38 -0
  9. package/generated/corrective-debugging/human-review.md +45 -0
  10. package/generated/corrective-debugging/implement.md +42 -0
  11. package/generated/corrective-debugging/investigate.md +59 -0
  12. package/generated/corrective-debugging/manifest.json +30 -0
  13. package/generated/corrective-debugging/model.md +53 -0
  14. package/generated/corrective-debugging/outcome.md +38 -0
  15. package/generated/corrective-debugging/plan.md +53 -0
  16. package/generated/corrective-debugging/verify.md +47 -0
  17. package/generated/decision/compare.md +45 -0
  18. package/generated/decision/criteria.md +45 -0
  19. package/generated/decision/decide.md +45 -0
  20. package/generated/decision/frame.md +45 -0
  21. package/generated/decision/manifest.json +21 -0
  22. package/generated/decision/options.md +47 -0
  23. package/generated/decision/publish.md +38 -0
  24. package/generated/decision/research.md +45 -0
  25. package/generated/internal-improvement/ai-audit.md +39 -0
  26. package/generated/internal-improvement/ai-review.md +46 -0
  27. package/generated/internal-improvement/baseline.md +46 -0
  28. package/generated/internal-improvement/decision.md +45 -0
  29. package/generated/internal-improvement/deploy.md +38 -0
  30. package/generated/internal-improvement/human-review.md +45 -0
  31. package/generated/internal-improvement/implement.md +42 -0
  32. package/generated/internal-improvement/invariants.md +38 -0
  33. package/generated/internal-improvement/manifest.json +29 -0
  34. package/generated/internal-improvement/options.md +47 -0
  35. package/generated/internal-improvement/outcome.md +38 -0
  36. package/generated/internal-improvement/plan.md +53 -0
  37. package/generated/internal-improvement/target.md +45 -0
  38. package/generated/internal-improvement/verify.md +45 -0
  39. package/generated/investigation/bound.md +45 -0
  40. package/generated/investigation/conclude.md +45 -0
  41. package/generated/investigation/explore.md +60 -0
  42. package/generated/investigation/frame.md +45 -0
  43. package/generated/investigation/gather.md +45 -0
  44. package/generated/investigation/manifest.json +21 -0
  45. package/generated/investigation/synthesize.md +51 -0
  46. package/generated/operational-stabilization/assess.md +46 -0
  47. package/generated/operational-stabilization/execute-observe.md +45 -0
  48. package/generated/operational-stabilization/manifest.json +19 -0
  49. package/generated/operational-stabilization/monitor.md +45 -0
  50. package/generated/operational-stabilization/outcome.md +38 -0
  51. package/generated/operational-stabilization/respond.md +40 -0
  52. package/generated/operational-stabilization/verify-recovery.md +45 -0
  53. package/generated/product-change/ai-audit.md +12 -6
  54. package/generated/product-change/ai-review.md +20 -7
  55. package/generated/product-change/decision.md +16 -4
  56. package/generated/product-change/define.md +9 -4
  57. package/generated/product-change/deploy.md +9 -4
  58. package/generated/product-change/human-review.md +16 -4
  59. package/generated/product-change/implement.md +14 -5
  60. package/generated/product-change/manifest.json +9 -4
  61. package/generated/product-change/options.md +16 -4
  62. package/generated/product-change/outcome.md +9 -4
  63. package/generated/product-change/plan.md +22 -4
  64. package/generated/product-change/questions.md +22 -4
  65. package/generated/product-change/research.md +16 -4
  66. package/generated/product-change/verify.md +9 -4
  67. package/generated/recommended-skills.json +24 -0
  68. package/generated/reference/CONSTITUTION.md +43 -0
  69. package/generated/reference/docs/acceptable-ai-use.md +217 -0
  70. package/generated/reference/docs/design/adapted-skill-guidance.md +27 -0
  71. package/generated/reference/docs/design/debugging-and-operations.md +119 -0
  72. package/generated/reference/docs/design/executable-workflows.md +122 -0
  73. package/generated/reference/docs/design/instruction-authoring.md +28 -0
  74. package/generated/reference/docs/design/process-taxonomy.md +144 -0
  75. package/generated/reference/docs/design/review-workbench.md +37 -0
  76. package/generated/reference/docs/engineering-practice.md +163 -0
  77. package/generated/reference/docs/evidence/evidence-standard.md +123 -0
  78. package/generated/reference/docs/evidence/research-map.md +98 -0
  79. package/generated/reference/docs/rationale.md +210 -0
  80. package/generated/reference/docs/recommended-skills.md +19 -0
  81. package/generated/reference/docs/references/pragmatic-programmer-page-index.md +113 -0
  82. package/generated/reference/docs/references/submitted-engineering-notes.md +306 -0
  83. package/generated/reference/docs/releasing-pi.md +89 -0
  84. package/generated/reference/docs/workflows/README.md +142 -0
  85. package/generated/reference/docs/workflows/corrective-debugging.md +221 -0
  86. package/generated/reference/docs/workflows/decision.md +149 -0
  87. package/generated/reference/docs/workflows/internal-improvement.md +219 -0
  88. package/generated/reference/docs/workflows/investigation.md +161 -0
  89. package/generated/reference/docs/workflows/operational-stabilization.md +187 -0
  90. package/generated/reference/docs/workflows/product-change.md +216 -0
  91. package/generated/reference/index.json +298 -0
  92. package/package.json +36 -25
  93. package/src/engine.ts +26 -7
  94. package/src/flow-guides.ts +168 -0
  95. package/src/guidance.ts +220 -72
  96. package/src/index.ts +696 -140
  97. package/src/reference-viewer.ts +73 -0
  98. package/src/reference.ts +107 -0
  99. package/src/review.ts +360 -0
  100. package/src/skills.ts +133 -0
  101. package/src/storage.ts +77 -13
  102. package/src/types.ts +1 -0
@@ -0,0 +1,89 @@
1
+ # Releasing the Pi Extension
2
+
3
+ Status: publishing path v0.1
4
+
5
+ ## Contract
6
+
7
+ - npm package: `ahead-pi`
8
+ - package source: `integrations/pi`
9
+ - release workflow: `.github/workflows/publish-pi.yml`
10
+ - release tag: `pi-v<package-version>`
11
+ - stable npm dist-tag: `latest`
12
+ - prerelease npm dist-tag: `next`
13
+ - registry: `https://registry.npmjs.org`
14
+
15
+ The package name was unclaimed when this path was created. Availability is not ownership until the first version is published.
16
+
17
+ ## Human release gate
18
+
19
+ Publishing is triggered only by publishing a GitHub Release whose tag starts with `pi-v`. The workflow rejects a tag that does not exactly match `integrations/pi/package.json`, rejects a release commit that is not contained in `main`, rebuilds from source, runs the complete test and packed-install smoke suite, and then publishes with npm provenance.
20
+
21
+ The job uses the GitHub `npm` environment. Configure that environment with a required reviewer if releases need an explicit second confirmation.
22
+
23
+ AHEAD is released under the MIT License. The repository license file and each published package must declare the same license.
24
+
25
+ ## Prepare a version
26
+
27
+ From `integrations/pi`:
28
+
29
+ ```sh
30
+ npm version --no-git-tag-version <version>
31
+ npm test
32
+ node ./scripts/check-release.mjs pi-v<version>
33
+ ```
34
+
35
+ Commit the version change, merge it to `main`, and confirm CI. Do not create the release from an unmerged commit.
36
+
37
+ ## Bootstrap the first npm release
38
+
39
+ This machine was not authenticated to npm when the workflow was created, and npm trusted publishing is configured from an existing package's settings. The first publication therefore needs a short-lived bootstrap credential:
40
+
41
+ 1. Create or select an npm account with 2FA enabled.
42
+ 2. Create a granular npm access token that can publish the new public package and is permitted to bypass 2FA for automation.
43
+ 3. Store it as `NPM_TOKEN` in the GitHub `npm` environment. Do not put it in repository files, shell history, workflow logs, or release notes.
44
+ 4. On GitHub, create and publish a release with tag `pi-v0.1.0` at the corresponding `main` commit.
45
+ 5. Verify the workflow, npm package page, provenance, and a clean `pi -e npm:ahead-pi@0.1.0` install.
46
+
47
+ The workflow has `id-token: write` and publishes with `--provenance`. Before trusted publishing exists, npm uses the bootstrap token and GitHub OIDC supplies the provenance attestation.
48
+
49
+ ## Move to tokenless trusted publishing
50
+
51
+ The `ahead-pi` package uses this trusted publisher:
52
+
53
+ | npm field | Value |
54
+ |---|---|
55
+ | Provider | GitHub Actions |
56
+ | Organization or user | `Kade-Powell` |
57
+ | Repository | `ahead` |
58
+ | Workflow filename | `publish-pi.yml` |
59
+ | Environment | `npm` |
60
+ | Allowed action | `npm publish` |
61
+
62
+ The GitHub `npm` environment must not contain an `NPM_TOKEN` secret. npm publishing access requires 2FA, disallows bypass-2FA tokens, and keeps the trusted publisher. Each release verifies tokenless OIDC authentication and automatic provenance.
63
+
64
+ ## Publish and verify
65
+
66
+ 1. Publish a GitHub Release with tag `pi-v<version>` at the version commit.
67
+ 2. Watch the `Publish Pi extension` workflow.
68
+ 3. Confirm `npm view ahead-pi@<version> version` returns the release.
69
+ 4. Confirm the package page links to this repository and shows provenance.
70
+ 5. Test the registry artifact:
71
+
72
+ ```sh
73
+ pi -e npm:ahead-pi@<version>
74
+ ```
75
+
76
+ 6. For stable releases, confirm `npm view ahead-pi dist-tags.latest`; for prereleases, confirm `dist-tags.next`.
77
+
78
+ ## Failure and rollback
79
+
80
+ An npm version is immutable. Do not reuse a version after any publish attempt.
81
+
82
+ - If validation fails before `npm publish`, fix the source, increment the version if a registry publish may have occurred, and publish a new GitHub Release.
83
+ - If publication succeeds but post-publish verification fails, do not rerun the same version blindly. Inspect the registry first.
84
+ - Correct a bad release with a new patch version. Use npm deprecation for a discoverable warning; reserve unpublishing for the narrow cases allowed by npm policy.
85
+ - Moving a dist-tag is a human release decision and does not alter the immutable tarball.
86
+
87
+ ## Why npm and OIDC
88
+
89
+ Pi natively installs `npm:ahead-pi`, pinned npm versions, Git sources, and local paths. npm provides the simplest cross-machine install path. GitHub-hosted OIDC avoids a long-lived release secret after bootstrap, and npm provenance links the public tarball to this repository and workflow. Neither provenance nor a passing workflow proves the package is safe; they make origin and build history auditable.
@@ -0,0 +1,142 @@
1
+ # AHEAD Pilot Workflows
2
+
3
+ Status: executable dogfood v0.1
4
+
5
+ ## Purpose
6
+
7
+ These six minimal workflow profiles are meant to be used on real engineering work through the Pi adapter or a manual record. Their canonical executable contracts live in `spec/workflows`, while these documents explain the same boundaries and show the human/AI rhythm. Dogfooding should reveal which phases, gates, and records improve reasoning and which create process burden.
8
+
9
+ The profiles are:
10
+
11
+ 1. [Product change](product-change.md)
12
+ 2. [Corrective debugging](corrective-debugging.md)
13
+ 3. [Operational stabilization](operational-stabilization.md)
14
+ 4. [Decision](decision.md)
15
+ 5. [Investigation](investigation.md)
16
+ 6. [Internal improvement](internal-improvement.md)
17
+
18
+ Choose the flow by its dominant outcome, not by the issue label. Incident, emergency, security, regulatory, and other concerns are overlays or modifiers.
19
+
20
+ ## Rule hierarchy
21
+
22
+ The pilot applies rules in this order:
23
+
24
+ 1. [AHEAD Constitution](../../CONSTITUTION.md)
25
+ 2. [Acceptable AI Use](../acceptable-ai-use.md)
26
+ 3. The selected workflow profile and applicable overlays
27
+ 4. Organization and repository guidance, which may narrow but not broaden AI authority
28
+
29
+ Phase permission is not a waiver of higher-level policy. When rules appear to conflict, apply the more protective rule and record the ambiguity for correction.
30
+
31
+ ## Shared pilot contract
32
+
33
+ Every pilot run has:
34
+
35
+ - one accountable human owner;
36
+ - a stated outcome or question;
37
+ - a selected workflow and relevant modifiers;
38
+ - a human-originated initial understanding before AI expansion;
39
+ - links to material evidence rather than unsupported summaries;
40
+ - visible facts, inferences, unknowns, decisions, and accepted risks;
41
+ - recorded AI contributions when they materially influence the work;
42
+ - human authorization for consequential actions;
43
+ - independent human review where a lasting change is produced;
44
+ - outcome evidence and a human closure decision.
45
+
46
+ Phases may loop or reopen. A workflow is not invalid merely because learning changes an earlier decision or plan. The record should make the change visible.
47
+
48
+ ## Common human gates
49
+
50
+ | Gate | Required when | Minimum evidence |
51
+ |---|---|---|
52
+ | Framing accepted | Every run | Human-owned outcome, question, failure, or invariant |
53
+ | Decision accepted | A course or intervention is selected | Chosen option, rationale, tradeoffs, unknowns, and accountable human |
54
+ | Plan accepted | Before a lasting implementation | Human first-pass plan plus accepted AI challenges or additions |
55
+ | Action authorized | Before a consequential, risky, destructive, or production action | Actor, purpose, scope, blast radius, rollback or containment, and authorization |
56
+ | Independent human review accepted | Before accepting a lasting engineering change | Review of the current changeset and material evidence by a person other than the implementer; both implementer and reviewer understand their responsibilities |
57
+ | Outcome accepted | Before closure | Verification against the original outcome plus remaining uncertainty and follow-ups |
58
+
59
+ Emergency policy may defer nonessential documentation and, where explicitly allowed, independent review needed to restore service. It does not remove authorization or accountability, and any deferred review gate remains open until a named human completes it after stabilization. Deferred reasoning is reconstructed after stabilization.
60
+
61
+ ## Minimal run record
62
+
63
+ For the pilot, keep one Markdown file per run. A team can place it in `.ahead/runs/<id>.md`, an issue, or another durable system as long as links and revision history remain available.
64
+
65
+ ```yaml
66
+ id: AHEAD-YYYY-NNNN
67
+ title: Short description
68
+ workflow: product-change | corrective-debugging | operational-stabilization | decision | investigation | internal-improvement
69
+ owner: human identity
70
+ status: active | blocked | complete | abandoned
71
+ modifiers:
72
+ urgency: normal | expedited | incident | emergency
73
+ assurance: standard | security | regulated | safety-critical
74
+ environment: local | test | staging | production | external
75
+ links: []
76
+ ```
77
+
78
+ The body records only the sections required by the selected flow. Evidence may remain in its native system and be linked rather than copied.
79
+
80
+ ## Shared human–AI rhythm
81
+
82
+ Diagram language is normative for the pilot:
83
+
84
+ - `HUMAN` or `ENGINEER` means the person owns the reasoning, decision, action, or artifact.
85
+ - `AI — ASSIST` means AI may research, organize, propose, explain, generate bounded material, or challenge; it does not own or approve the phase.
86
+ - `AI REVIEW` produces snapshot-bound hypotheses. The implementing human separately dispositions every material finding, and neither action satisfies the independent human-review gate.
87
+ - Every decision, test selection, risk acceptance, consequential-action authorization, final review, and outcome gate is human.
88
+ - All diagram permissions remain bounded by the rule hierarchy above. Humans lead and remain accountable; AI assists.
89
+
90
+ ```text
91
+ ┌──────────────────────────────────────────────┐
92
+ │ HUMAN FRAMES THE WORK │
93
+ │ • Outcome, question, failure, or invariant │
94
+ │ • Initial understanding │
95
+ └──────────────────────┬───────────────────────┘
96
+
97
+ ┌──────────────────────────────────────────────┐
98
+ │ AI — ASSISTS, AMPLIFIES, AND CHALLENGES │
99
+ │ • Research • alternatives • hypotheses │
100
+ │ • Gaps • contradictions • risks │
101
+ └──────────────────────┬───────────────────────┘
102
+
103
+ ┌──────────────────────────────────────────────┐
104
+ │ HUMAN UNDERSTANDS AND DECIDES │
105
+ │ • Evaluate evidence • accept tradeoffs │
106
+ │ • Resolve or accept important unknowns │
107
+ └──────────────────────┬───────────────────────┘
108
+
109
+ ┌──────────────────────────────────────────────┐
110
+ │ HUMAN PLANS OR AUTHORIZES ACTION │
111
+ └──────────────────────┬───────────────────────┘
112
+
113
+ ┌──────────────────────────────────────────────┐
114
+ │ ENGINEER ACTS WITH BOUNDED AI ASSISTANCE │
115
+ └──────────────────────┬───────────────────────┘
116
+
117
+ ┌──────────────────────────────────────────────┐
118
+ │ AI REVIEW / ANALYSIS │
119
+ └──────────────────────┬───────────────────────┘
120
+
121
+ ┌──────────────────────────────────────────────┐
122
+ │ HUMAN REVIEWS AND ACCEPTS THE OUTCOME │
123
+ └──────────────────────┬───────────────────────┘
124
+
125
+ RECORD EVIDENCE AND LEARNING
126
+
127
+ Questions remain ───────────────↺ AI assistance
128
+ Outcome not accepted ───────────↺ Work / investigation
129
+ ```
130
+
131
+ ## Pilot feedback
132
+
133
+ For each completed run, record:
134
+
135
+ - which phase or gate prevented a mistake or improved understanding;
136
+ - which required record was unused or burdensome;
137
+ - where the team could not agree on routing or completion;
138
+ - where AI helped, anchored, distracted, or weakened learning;
139
+ - what was reconstructed after the fact;
140
+ - what the eventual engine should enforce, warn about, or leave to judgment.
141
+
142
+ These profiles are AHEAD design hypotheses. Using them is how AHEAD will learn whether the six-flow taxonomy and its gates deserve stronger enforcement.
@@ -0,0 +1,221 @@
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
+ │ 3A. AI ASSISTS │
40
+ │ EVIDENCE REVIEW │
41
+ │ │
42
+ │ • Code │
43
+ │ • Logs/history │
44
+ │ • Dependencies │
45
+ │ • Runtime data │
46
+ │ • Contradictions│
47
+ └───────┬─────────┘
48
+
49
+
50
+ ┌─────────────────┐
51
+ │ 3B. HYPOTHESES │
52
+ │ │
53
+ │ HUMAN LEADS │
54
+ │ AI ASSISTS │
55
+ │ • H1 / H2 / H3 │
56
+ │ • Evidence FOR │
57
+ │ • Evidence │
58
+ │ AGAINST │
59
+ └───────┬─────────┘
60
+
61
+
62
+ ┌─────────────────┐
63
+ │ 3C. HUMAN │
64
+ │ SELECTS TEST │
65
+ │ │
66
+ │ • Prediction │
67
+ │ • Safety/scope │
68
+ └───────┬─────────┘
69
+
70
+
71
+ ┌─────────────────┐
72
+ │ 3D. 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 (4)
91
+
92
+
93
+ HUMAN FIX APPROACH (5)
94
+
95
+
96
+ HUMAN FIRST-PASS PLAN (6)
97
+
98
+
99
+ ENGINEER IMPLEMENTS (7)
100
+
101
+
102
+ AI REVIEW (8)
103
+
104
+
105
+ HUMAN DISPOSITIONS MATERIAL FINDINGS
106
+
107
+
108
+ INDEPENDENT HUMAN REVIEW (9)
109
+
110
+
111
+ HUMAN AUTHORIZES DEPLOY / RELEASE (10)
112
+ WHEN APPLICABLE
113
+
114
+
115
+ HUMAN VERIFIES CORRECTION OF ORIGINAL FAILURE (11)
116
+
117
+
118
+ HUMAN OBSERVES DEPLOYED OUTCOME
119
+
120
+
121
+ AI AUDIT (12)
122
+
123
+
124
+ HUMAN DISPOSITIONS AUDIT FINDINGS
125
+
126
+
127
+ HUMAN OUTCOME GATE (13)
128
+
129
+ Not corrected ───────────────────↺ HUMAN MODEL
130
+ ```
131
+
132
+ Reproduction is useful but not a universal gate. Historical, intermittent, production-only, or already mitigated failures may proceed when the limitation is recorded.
133
+
134
+ “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.
135
+
136
+ Executable phase 3, `investigate`, contains the evidence review, hypothesis, human test-selection, and test loop shown as 3A–3D. The human conclusion is a separate gate so a plausible hypothesis cannot silently become a diagnosis.
137
+
138
+ ## Minimal phases
139
+
140
+ | Phase | Human owns | AI may | Minimum record | Advance when |
141
+ |---|---|---|---|---|
142
+ | 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 |
143
+ | 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 |
144
+ | Investigate and test | Hypothesis selection, test authorization, prediction, and interpretation | Generate alternatives, evidence for/against, and discriminating tests | Facts, inferences, hypotheses, predictions, tests, results, confidence | Evidence is ready for a human conclusion |
145
+ | Conclude diagnosis | Supported diagnosis or explicit acceptance of unknown cause, confidence, and risk | Challenge the conclusion against evidence and counterevidence | Diagnosis or accepted uncertainty | Human accepts the diagnosis or remaining uncertainty |
146
+ | Choose correction | Desired correction and tradeoffs | Compare fix approaches and recurrence risks | Selected correction and rationale | Human approves the correction |
147
+ | 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 |
148
+ | Implement | Code and engineering changes | Bounded implementation and debugging assistance | Linked changeset and regression evidence | Change is ready for review |
149
+ | AI review | Validate and disposition every material AI finding | Review the exact snapshot for correction, tests, risks, and plan alignment without modifying it | Snapshot-bound AI findings; separate human disposition | Every material finding is fixed, invalid, accepted risk, or follow-up with rationale |
150
+ | 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 |
151
+ | 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 |
152
+ | 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 |
153
+ | AI audit | Disposition of findings and required response | Compare the result with the failure, diagnosis or accepted uncertainty, correction, plan, reviews, and observed behavior | AI audit findings; separate human disposition | The human disposer accepts the audit gate or reopens work |
154
+ | 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 |
155
+
156
+ ## Evidence chain
157
+
158
+ ```text
159
+ OBSERVED FAILURE
160
+
161
+
162
+ FACTS / EVIDENCE ──► HUMAN MENTAL MODEL
163
+
164
+
165
+ HUMAN-LED / AI-EXPANDED HYPOTHESES
166
+
167
+
168
+ PREDICTION / TEST / RESULT
169
+
170
+ └────────────↺ MODEL
171
+
172
+
173
+ HUMAN CONCLUSION / CONFIDENCE
174
+
175
+
176
+ HUMAN CORRECTION DECISION / PLAN
177
+
178
+
179
+ ENGINEER CHANGE
180
+
181
+
182
+ SNAPSHOT-BOUND AI REVIEW
183
+
184
+
185
+ IMPLEMENTING-HUMAN DISPOSITION
186
+
187
+
188
+ INDEPENDENT HUMAN REVIEW
189
+
190
+
191
+ HUMAN-AUTHORIZED DEPLOYMENT
192
+
193
+
194
+ CORRECTION VERIFICATION EVIDENCE
195
+
196
+
197
+ DEPLOYED OUTCOME EVIDENCE
198
+
199
+
200
+ AI AUDIT / HUMAN DISPOSITION
201
+
202
+
203
+ HUMAN OUTCOME
204
+ ```
205
+
206
+ ## Non-waivable pilot rules
207
+
208
+ - Facts, inferences, and hypotheses remain distinguishable.
209
+ - AI hypotheses are candidates, not diagnoses.
210
+ - The human chooses or authorizes tests and interprets their results.
211
+ - A plausible cause is not treated as proven.
212
+ - Fix validation and post-deployment outcome verification are distinct when deployment applies.
213
+ - AI review and implementer self-review do not satisfy independent human review.
214
+ - Implementation completion is not deployment, recovery, or outcome verification.
215
+
216
+ ## Pilot questions
217
+
218
+ - What was the minimum useful investigation record?
219
+ - Did recording predictions before tests reduce hindsight interpretation?
220
+ - When was correction justified without a conclusive cause?
221
+ - 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 | Evaluation of evidence and disposition of uncertainty | Gather cited evidence and find contradictions or missing questions; do not introduce solution alternatives yet | Sources, findings, assumptions, 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
+ | Publish and revisit | Consequence check, communication, review trigger, revisit date, and linked work | Improve clarity, traceability, and proposed validation checks | Consequences, reversibility, review trigger, revisit date, and 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?