ahead-pi 0.2.1 → 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.
- package/README.md +17 -7
- package/dist/ahead_wasm.wasm +0 -0
- package/generated/corrective-debugging/ai-audit.md +39 -0
- package/generated/corrective-debugging/ai-review.md +46 -0
- package/generated/corrective-debugging/characterize.md +53 -0
- package/generated/corrective-debugging/conclude.md +59 -0
- package/generated/corrective-debugging/correction.md +53 -0
- package/generated/corrective-debugging/deploy.md +38 -0
- package/generated/corrective-debugging/human-review.md +45 -0
- package/generated/corrective-debugging/implement.md +42 -0
- package/generated/corrective-debugging/investigate.md +59 -0
- package/generated/corrective-debugging/manifest.json +30 -0
- package/generated/corrective-debugging/model.md +53 -0
- package/generated/corrective-debugging/outcome.md +38 -0
- package/generated/corrective-debugging/plan.md +53 -0
- package/generated/corrective-debugging/verify.md +47 -0
- package/generated/decision/compare.md +45 -0
- package/generated/decision/criteria.md +45 -0
- package/generated/decision/decide.md +45 -0
- package/generated/decision/frame.md +45 -0
- package/generated/decision/manifest.json +21 -0
- package/generated/decision/options.md +47 -0
- package/generated/decision/publish.md +38 -0
- package/generated/decision/research.md +45 -0
- package/generated/internal-improvement/ai-audit.md +39 -0
- package/generated/internal-improvement/ai-review.md +46 -0
- package/generated/internal-improvement/baseline.md +46 -0
- package/generated/internal-improvement/decision.md +45 -0
- package/generated/internal-improvement/deploy.md +38 -0
- package/generated/internal-improvement/human-review.md +45 -0
- package/generated/internal-improvement/implement.md +42 -0
- package/generated/internal-improvement/invariants.md +38 -0
- package/generated/internal-improvement/manifest.json +29 -0
- package/generated/internal-improvement/options.md +47 -0
- package/generated/internal-improvement/outcome.md +38 -0
- package/generated/internal-improvement/plan.md +53 -0
- package/generated/internal-improvement/target.md +45 -0
- package/generated/internal-improvement/verify.md +45 -0
- package/generated/investigation/bound.md +45 -0
- package/generated/investigation/conclude.md +45 -0
- package/generated/investigation/explore.md +60 -0
- package/generated/investigation/frame.md +45 -0
- package/generated/investigation/gather.md +45 -0
- package/generated/investigation/manifest.json +21 -0
- package/generated/investigation/synthesize.md +51 -0
- package/generated/operational-stabilization/assess.md +46 -0
- package/generated/operational-stabilization/execute-observe.md +45 -0
- package/generated/operational-stabilization/manifest.json +19 -0
- package/generated/operational-stabilization/monitor.md +45 -0
- package/generated/operational-stabilization/outcome.md +38 -0
- package/generated/operational-stabilization/respond.md +40 -0
- package/generated/operational-stabilization/verify-recovery.md +45 -0
- package/generated/product-change/ai-audit.md +7 -4
- package/generated/product-change/ai-review.md +15 -5
- package/generated/product-change/decision.md +11 -2
- package/generated/product-change/define.md +4 -2
- package/generated/product-change/deploy.md +4 -2
- package/generated/product-change/human-review.md +11 -2
- package/generated/product-change/implement.md +4 -2
- package/generated/product-change/manifest.json +8 -3
- package/generated/product-change/options.md +11 -2
- package/generated/product-change/outcome.md +4 -2
- package/generated/product-change/plan.md +17 -2
- package/generated/product-change/questions.md +17 -2
- package/generated/product-change/research.md +11 -2
- package/generated/product-change/verify.md +4 -2
- package/generated/recommended-skills.json +24 -0
- package/generated/reference/docs/design/adapted-skill-guidance.md +27 -0
- package/generated/reference/docs/design/executable-workflows.md +20 -8
- package/generated/reference/docs/design/instruction-authoring.md +28 -0
- package/generated/reference/docs/design/review-workbench.md +37 -0
- package/generated/reference/docs/recommended-skills.md +19 -0
- package/generated/reference/docs/workflows/README.md +3 -3
- package/generated/reference/docs/workflows/corrective-debugging.md +37 -19
- package/generated/reference/docs/workflows/decision.md +2 -2
- package/generated/reference/docs/workflows/internal-improvement.md +35 -23
- package/generated/reference/docs/workflows/investigation.md +3 -1
- package/generated/reference/docs/workflows/operational-stabilization.md +14 -12
- package/generated/reference/docs/workflows/product-change.md +14 -3
- package/generated/reference/index.json +131 -13
- package/package.json +34 -25
- package/src/engine.ts +26 -7
- package/src/flow-guides.ts +168 -0
- package/src/guidance.ts +218 -72
- package/src/index.ts +603 -175
- package/src/reference-viewer.ts +20 -18
- package/src/reference.ts +65 -14
- package/src/review.ts +360 -0
- package/src/skills.ts +133 -0
- package/src/storage.ts +77 -13
- package/src/types.ts +1 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"workflow": "product-change",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"generated": [
|
|
5
5
|
"define.md",
|
|
6
6
|
"research.md",
|
|
@@ -17,8 +17,13 @@
|
|
|
17
17
|
"outcome.md"
|
|
18
18
|
],
|
|
19
19
|
"sources": [
|
|
20
|
-
"spec/workflows/product-change-v0.
|
|
20
|
+
"spec/workflows/product-change-v0.2.json",
|
|
21
21
|
"policy/common.md",
|
|
22
|
-
"policy/product-change/<phase>.md"
|
|
22
|
+
"policy/product-change/<phase>.md or policy/shared/<phase>.md",
|
|
23
|
+
"policy/methods/index.json",
|
|
24
|
+
"policy/methods/guided-questioning.md",
|
|
25
|
+
"policy/methods/research-evidence.md",
|
|
26
|
+
"policy/methods/planning-decomposition.md",
|
|
27
|
+
"policy/methods/changeset-review.md"
|
|
23
28
|
]
|
|
24
29
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED FILE. DO NOT EDIT. -->
|
|
2
|
-
<!-- workflow=product-change@0.
|
|
2
|
+
<!-- workflow=product-change@0.2.0 phase=options sha256=f0a9f8f3936ed59a89c809e1e31546ca5e9ac3c3ab76ac656676586a9b7c4645 -->
|
|
3
3
|
|
|
4
4
|
# AHEAD agent profile
|
|
5
5
|
|
|
@@ -21,9 +21,18 @@ You are assisting inside an active AHEAD workflow. Humans lead; AI assists.
|
|
|
21
21
|
|
|
22
22
|
Do not expand the option set until the human records `human-option`. Then challenge that option, identify additional approaches, compare tradeoffs and risks, and make assumptions visible. The human evaluates and owns the final option set.
|
|
23
23
|
|
|
24
|
+
## Applicable AHEAD methods
|
|
25
|
+
|
|
26
|
+
### Guided questioning
|
|
27
|
+
|
|
28
|
+
Work from the dependency frontier: ask only questions whose answers unblock the next material judgment. Gather discoverable facts with tools; do not make the human answer questions the repository, runtime, or source evidence can answer.
|
|
29
|
+
|
|
30
|
+
Keep value choices, risk acceptance, product intent, and irreversible tradeoffs with the human. Use small, risk-scaled rounds. State why a question matters, make assumptions visible, and challenge contradictions without manufacturing false choices. Record the human's decision rather than inferring approval from silence.
|
|
31
|
+
|
|
32
|
+
|
|
24
33
|
## Enforced phase contract
|
|
25
34
|
|
|
26
|
-
- Workflow: `product-change@0.
|
|
35
|
+
- Workflow: `product-change@0.2.0`
|
|
27
36
|
- Current phase: `options`
|
|
28
37
|
- Human gate: `options-understood` — Human confirms viable options and tradeoffs are understood
|
|
29
38
|
- Normal next phase: `decision`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED FILE. DO NOT EDIT. -->
|
|
2
|
-
<!-- workflow=product-change@0.
|
|
2
|
+
<!-- workflow=product-change@0.2.0 phase=outcome sha256=d6e1a73bbc2be8b5374464a6cb2f198bd1cb395b85db6ac84201d6dae95e2518 -->
|
|
3
3
|
|
|
4
4
|
# AHEAD agent profile
|
|
5
5
|
|
|
@@ -21,9 +21,11 @@ You are assisting inside an active AHEAD workflow. Humans lead; AI assists.
|
|
|
21
21
|
|
|
22
22
|
The human decides to accept, roll back, follow up, abandon, or reopen work and records uncertainty and learning. You may organize evidence or summarize learning, but cannot accept closure or choose the outcome.
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
|
|
24
26
|
## Enforced phase contract
|
|
25
27
|
|
|
26
|
-
- Workflow: `product-change@0.
|
|
28
|
+
- Workflow: `product-change@0.2.0`
|
|
27
29
|
- Current phase: `outcome`
|
|
28
30
|
- Human gate: `outcome-accepted` — Human accepts closure
|
|
29
31
|
- Normal next phase: `close run`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED FILE. DO NOT EDIT. -->
|
|
2
|
-
<!-- workflow=product-change@0.
|
|
2
|
+
<!-- workflow=product-change@0.2.0 phase=plan sha256=c15a791eaff9639ce71c1fb08b865a1c8472ee68a25ecd529e1c40f75dd040c0 -->
|
|
3
3
|
|
|
4
4
|
# AHEAD agent profile
|
|
5
5
|
|
|
@@ -21,9 +21,24 @@ You are assisting inside an active AHEAD workflow. Humans lead; AI assists.
|
|
|
21
21
|
|
|
22
22
|
Do not create the governing implementation plan before the human records `first-pass-plan`. Then challenge it for missing dependencies, tests, edge cases, rollout evidence, recovery, and deviations policy. The human authors and approves the final plan.
|
|
23
23
|
|
|
24
|
+
## Applicable AHEAD methods
|
|
25
|
+
|
|
26
|
+
### Guided questioning
|
|
27
|
+
|
|
28
|
+
Work from the dependency frontier: ask only questions whose answers unblock the next material judgment. Gather discoverable facts with tools; do not make the human answer questions the repository, runtime, or source evidence can answer.
|
|
29
|
+
|
|
30
|
+
Keep value choices, risk acceptance, product intent, and irreversible tradeoffs with the human. Use small, risk-scaled rounds. State why a question matters, make assumptions visible, and challenge contradictions without manufacturing false choices. Record the human's decision rather than inferring approval from silence.
|
|
31
|
+
|
|
32
|
+
### Planning and decomposition
|
|
33
|
+
|
|
34
|
+
Decompose the human's approved direction into the smallest coherent vertical slices that produce observable value or evidence. State dependencies, acceptance criteria, tests, rollout, recovery, and the condition that makes each slice complete.
|
|
35
|
+
|
|
36
|
+
For broad migrations, use expand, migrate, verify, and contract stages so intermediate states remain valid. AI may challenge sequencing and omissions after the human first pass; the human resolves the critique and approves the final plan.
|
|
37
|
+
|
|
38
|
+
|
|
24
39
|
## Enforced phase contract
|
|
25
40
|
|
|
26
|
-
- Workflow: `product-change@0.
|
|
41
|
+
- Workflow: `product-change@0.2.0`
|
|
27
42
|
- Current phase: `plan`
|
|
28
43
|
- Human gate: `plan-approved` — Human approves the final plan
|
|
29
44
|
- Normal next phase: `implement`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED FILE. DO NOT EDIT. -->
|
|
2
|
-
<!-- workflow=product-change@0.
|
|
2
|
+
<!-- workflow=product-change@0.2.0 phase=questions sha256=c666b41866f716539f89e5518193e1fb26328ba0ba9b5c3ac0b31b29d499a13e -->
|
|
3
3
|
|
|
4
4
|
# AHEAD agent profile
|
|
5
5
|
|
|
@@ -21,9 +21,24 @@ You are assisting inside an active AHEAD workflow. Humans lead; AI assists.
|
|
|
21
21
|
|
|
22
22
|
Help the human understand the research. Identify missed questions and investigate unanswered ones. An unknown is not disposed merely because it was listed or deferred; the human must record whether it was answered, accepted with consequences, blocked, or deliberately deferred.
|
|
23
23
|
|
|
24
|
+
## Applicable AHEAD methods
|
|
25
|
+
|
|
26
|
+
### Guided questioning
|
|
27
|
+
|
|
28
|
+
Work from the dependency frontier: ask only questions whose answers unblock the next material judgment. Gather discoverable facts with tools; do not make the human answer questions the repository, runtime, or source evidence can answer.
|
|
29
|
+
|
|
30
|
+
Keep value choices, risk acceptance, product intent, and irreversible tradeoffs with the human. Use small, risk-scaled rounds. State why a question matters, make assumptions visible, and challenge contradictions without manufacturing false choices. Record the human's decision rather than inferring approval from silence.
|
|
31
|
+
|
|
32
|
+
### Research and evidence
|
|
33
|
+
|
|
34
|
+
Prefer primary sources and direct observations. For each material claim, retain the source or observation, its date when relevant, the applicable context, and whether the claim is observed, inferred, or uncertain. Surface contradictions and missing evidence instead of averaging them away.
|
|
35
|
+
|
|
36
|
+
Research should change a decision, hypothesis, plan, or confidence level. Put provenance in the phase's existing artifact; do not create a parallel research bureaucracy.
|
|
37
|
+
|
|
38
|
+
|
|
24
39
|
## Enforced phase contract
|
|
25
40
|
|
|
26
|
-
- Workflow: `product-change@0.
|
|
41
|
+
- Workflow: `product-change@0.2.0`
|
|
27
42
|
- Current phase: `questions`
|
|
28
43
|
- Human gate: `unknowns-disposed` — Human confirms important unknowns are answered or explicitly accepted
|
|
29
44
|
- Normal next phase: `options`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED FILE. DO NOT EDIT. -->
|
|
2
|
-
<!-- workflow=product-change@0.
|
|
2
|
+
<!-- workflow=product-change@0.2.0 phase=research sha256=5d47cb0aa2a2e08600b0a8e3ed2efc062555cc525ec485b8e43f2b8657f0da48 -->
|
|
3
3
|
|
|
4
4
|
# AHEAD agent profile
|
|
5
5
|
|
|
@@ -21,9 +21,18 @@ You are assisting inside an active AHEAD workflow. Humans lead; AI assists.
|
|
|
21
21
|
|
|
22
22
|
Gather evidence from authorized sources. Cite sources, distinguish retrieved facts from synthesis, expose contradictions, and state important gaps. The human reads and evaluates the result. Use `ahead_record_artifact` to preserve the research record when ready.
|
|
23
23
|
|
|
24
|
+
## Applicable AHEAD methods
|
|
25
|
+
|
|
26
|
+
### Research and evidence
|
|
27
|
+
|
|
28
|
+
Prefer primary sources and direct observations. For each material claim, retain the source or observation, its date when relevant, the applicable context, and whether the claim is observed, inferred, or uncertain. Surface contradictions and missing evidence instead of averaging them away.
|
|
29
|
+
|
|
30
|
+
Research should change a decision, hypothesis, plan, or confidence level. Put provenance in the phase's existing artifact; do not create a parallel research bureaucracy.
|
|
31
|
+
|
|
32
|
+
|
|
24
33
|
## Enforced phase contract
|
|
25
34
|
|
|
26
|
-
- Workflow: `product-change@0.
|
|
35
|
+
- Workflow: `product-change@0.2.0`
|
|
27
36
|
- Current phase: `research`
|
|
28
37
|
- Human gate: `research-reviewed` — Human confirms material evidence is available
|
|
29
38
|
- Normal next phase: `questions`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- GENERATED FILE. DO NOT EDIT. -->
|
|
2
|
-
<!-- workflow=product-change@0.
|
|
2
|
+
<!-- workflow=product-change@0.2.0 phase=verify sha256=f16d886eef6a02cdfa0dc0fbf89b19c8dfcd67c584b2e37b2c0f6ba54097b273 -->
|
|
3
3
|
|
|
4
4
|
# AHEAD agent profile
|
|
5
5
|
|
|
@@ -21,9 +21,11 @@ You are assisting inside an active AHEAD workflow. Humans lead; AI assists.
|
|
|
21
21
|
|
|
22
22
|
Help suggest checks and analyze authorized observations against the recorded problem and success signals. Keep code landed, deployed version, and observed behavior separate. A human decides whether the intended outcome is demonstrated or failure is recorded.
|
|
23
23
|
|
|
24
|
+
|
|
25
|
+
|
|
24
26
|
## Enforced phase contract
|
|
25
27
|
|
|
26
|
-
- Workflow: `product-change@0.
|
|
28
|
+
- Workflow: `product-change@0.2.0`
|
|
27
29
|
- Current phase: `verify`
|
|
28
30
|
- Human gate: `outcome-demonstrated` — Human confirms the intended outcome is demonstrated or failure is recorded
|
|
29
31
|
- Normal next phase: `ai-audit`
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api_version": "ahead.recommended-skills/v0.1",
|
|
3
|
+
"reviewed_at": "2026-08-12",
|
|
4
|
+
"skills": [
|
|
5
|
+
{
|
|
6
|
+
"id": "ponytail",
|
|
7
|
+
"title": "Ponytail",
|
|
8
|
+
"summary": "A persistent problem-solving loop for difficult implementation, debugging, and investigation work.",
|
|
9
|
+
"source": "DietrichGebert/ponytail",
|
|
10
|
+
"skill": "skills/ponytail",
|
|
11
|
+
"reviewed_ref": "2ed6c52c9d7e5e56942508591085fd45dea277d3",
|
|
12
|
+
"reviewed_url": "https://github.com/DietrichGebert/ponytail/tree/2ed6c52c9d7e5e56942508591085fd45dea277d3/skills/ponytail",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"install": "npx skills add https://github.com/DietrichGebert/ponytail/tree/2ed6c52c9d7e5e56942508591085fd45dea277d3/skills/ponytail --agent pi",
|
|
15
|
+
"workflows": ["corrective-debugging", "investigation", "product-change", "internal-improvement"],
|
|
16
|
+
"phases": ["investigate", "explore", "implement"],
|
|
17
|
+
"compatibility": [
|
|
18
|
+
"AHEAD remains authoritative for human ownership, required artifacts, and gates.",
|
|
19
|
+
"Persistence never permits skipping human understanding, decisions, plans, tests, or review.",
|
|
20
|
+
"Treat suggestions to ship a quick or lazy version as experiments unless the active AHEAD flow has approved production implementation."
|
|
21
|
+
]
|
|
22
|
+
}
|
|
23
|
+
]
|
|
24
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Adapted Skill Guidance
|
|
2
|
+
|
|
3
|
+
Status: approved first adaptation set, 2026-08-12
|
|
4
|
+
|
|
5
|
+
AHEAD reviewed the [Matt Pocock skills collection](https://www.skills.sh/mattpocock/skills), including the specifically discussed [grill-me](https://www.skills.sh/mattpocock/skills/grill-me), [prototype](https://www.skills.sh/mattpocock/skills/prototype), and [ask-matt](https://www.skills.sh/mattpocock/skills/ask-matt) skills. It also reviewed [Ponytail](https://github.com/DietrichGebert/ponytail/tree/2ed6c52c9d7e5e56942508591085fd45dea277d3/skills/ponytail). The useful ideas were treated as design input, not installed wholesale or made authoritative.
|
|
6
|
+
|
|
7
|
+
## Adapted into AHEAD now
|
|
8
|
+
|
|
9
|
+
- Guided questioning became a dependency-frontier method: AI discovers facts, humans answer consequential judgment questions, and rounds scale with risk.
|
|
10
|
+
- Research became provenance inside existing workflow artifacts: primary sources, direct observations, contradictions, applicability, and uncertainty.
|
|
11
|
+
- Planning became human-first vertical decomposition with dependencies, acceptance criteria, rollout, recovery, and expand-migrate-verify-contract stages for broad changes.
|
|
12
|
+
- Debugging gained tighter safe feedback loops, minimized reproductions, ranked falsifiable hypotheses, one-variable probes, tagged instrumentation, regression evidence, and an explicit no-safe-reproduction path.
|
|
13
|
+
- Prototyping became an Investigation technique with an explicit learning question, deliberately disposable code, visible outcomes, and mandatory human disposition. Prototype code cannot be promoted directly.
|
|
14
|
+
- Review became an exact-changeset workbench with structured AI findings, a separate implementing-human disposition, and later independent human judgment.
|
|
15
|
+
- Instruction design became progressive disclosure: binding profile, applicable phase and method fragments, then on-demand framework references.
|
|
16
|
+
|
|
17
|
+
These adaptations live in AHEAD's own workflow specs, `policy/methods`, and host-neutral contracts. They require only artifacts already justified by an AHEAD phase; no source skill's private artifact system or issue format was imported.
|
|
18
|
+
|
|
19
|
+
## Deliberately not adopted
|
|
20
|
+
|
|
21
|
+
- Persona emulation such as “ask Matt” is not framework authority or a substitute for project evidence.
|
|
22
|
+
- No skill may skip the human's initial model, decision, plan, understanding, tests, or review.
|
|
23
|
+
- A quick, lazy, or persistent implementation is not production-ready merely because it runs.
|
|
24
|
+
- AHEAD does not silently install third-party skills, create extra artifacts, post GitHub comments, create issues, push code, or mark a pull request ready.
|
|
25
|
+
- Issue intake, domain or architecture specialization, formal understanding handoff, and wayfinding remain deferred until their AHEAD-native process is separately approved.
|
|
26
|
+
|
|
27
|
+
The recommendation catalog records external code AHEAD suggests installing. The method overlays record guidance AHEAD owns. Keeping those separate allows a project to use any editor or model without depending on a particular skill package.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Executable AHEAD Workflows
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: six-flow executable dogfood v0.1
|
|
4
4
|
|
|
5
5
|
## Purpose
|
|
6
6
|
|
|
7
7
|
The executable layer makes AHEAD workflow state durable and makes selected human/AI boundaries enforceable across integrations. It does not turn judgment into a checklist or make workflow artifacts proof of understanding.
|
|
8
8
|
|
|
9
|
-
The
|
|
9
|
+
The executable layer implements all six pilot workflows. They share a versioned event model and enforcement engine while retaining workflow-specific phases, artifacts, gates, returns, AI capabilities, and generated instructions.
|
|
10
10
|
|
|
11
11
|
## Architecture
|
|
12
12
|
|
|
@@ -40,15 +40,20 @@ The initial WebAssembly boundary is a small versioned JSON ABI. This avoids coup
|
|
|
40
40
|
|---|---|
|
|
41
41
|
| Durable principles | `CONSTITUTION.md` |
|
|
42
42
|
| AI authority | `docs/acceptable-ai-use.md` |
|
|
43
|
-
| Human-readable
|
|
44
|
-
|
|
|
43
|
+
| Human-readable flows | `docs/workflows/*.md` |
|
|
44
|
+
| Current executable phases, artifacts, gates, transitions, and capabilities | `spec/workflows/*.json` |
|
|
45
|
+
| Published historical workflow definitions retained for replay | `spec/workflows/legacy/*.json` |
|
|
45
46
|
| Compact binding agent profile and shared AI behavior | `policy/common.md` |
|
|
46
|
-
| Phase AI behavior | `policy/
|
|
47
|
+
| Phase AI behavior | `policy/<workflow>/*.md` with shared engineering-tail fragments in `policy/shared/*.md` |
|
|
48
|
+
| Reusable phase practices | `policy/methods/*.md`, selected by `policy/methods/index.json` |
|
|
49
|
+
| Reviewed optional skills | `recommendations/skills-v0.1.json` |
|
|
47
50
|
| State transition enforcement | `crates/ahead-core` |
|
|
48
51
|
| Host mapping, storage, and UI | `integrations/pi` |
|
|
49
52
|
|
|
50
53
|
Generated integration instructions are build artifacts. They include the compact agent profile, active phase policy, enforced contract, workflow version, and a source hash and must not be edited directly.
|
|
51
54
|
|
|
55
|
+
The engine retains published historical workflow definitions for replay while new runs use the current definition. Product Change `0.1.0` remains embedded for existing runs; the review and audit disposition contract is Product Change `0.2.0`. A run is always replayed against the version recorded when it started rather than silently reinterpreted under the newest workflow.
|
|
56
|
+
|
|
52
57
|
The Pi package also copies the canonical Constitution and `docs/**/*.md` into a generated reference catalog. These full documents are not injected into every prompt. The adapter recommends references applicable to the active phase, lets humans read them through `/ahead-guide`, and lets AI retrieve a specific source through `ahead_get_reference`. This keeps the binding prompt small while making the framework, rationale, evidence, and original page-level provenance available on demand.
|
|
53
58
|
|
|
54
59
|
## State and evidence
|
|
@@ -81,11 +86,15 @@ These are intended to be inspectable, diffable repository artifacts. A team can
|
|
|
81
86
|
|
|
82
87
|
- Only a human actor can start a run, accept a gate, transition a phase, return work, or close a run.
|
|
83
88
|
- Artifact definitions state whether a human, AI, or either may record them.
|
|
84
|
-
-
|
|
89
|
+
- Workflow-specific human-first artifacts unlock AI assistance only after the human's initial model, option, plan, baseline, or other required reasoning exists.
|
|
85
90
|
- Required current-visit artifacts must exist before gate acceptance.
|
|
86
91
|
- Advancement requires the current human gate.
|
|
87
92
|
- Independent human review must be recorded by an identity other than the latest changeset implementer, and that reviewer must accept the review gate.
|
|
88
|
-
-
|
|
93
|
+
- Lasting-change flows distinguish implementation, AI review, independent human review, deployment, observation, audit, and human outcome.
|
|
94
|
+
- AI review is bound to a fingerprint of the exact current engineering changeset. The implementing human records a separate disposition for every material AI finding before independent human review.
|
|
95
|
+
- AI-audit findings and their human disposition are separate required records, and the human disposer personally accepts the audit gate.
|
|
96
|
+
- Operational Stabilization permits investigation and recovery work to proceed without proven root cause, but never grants AI the `execute` capability for the intervention or its execution phase.
|
|
97
|
+
- Decision and Investigation close with human-owned records and do not silently authorize downstream implementation.
|
|
89
98
|
- Model-invoked host tools require an explicit adapter mapping to an allowed canonical capability.
|
|
90
99
|
|
|
91
100
|
Instructions explain these boundaries to the model. The Rust core enforces the transition, actor, artifact, identity, and capability decisions even if instructions are ignored.
|
|
@@ -102,9 +111,12 @@ The Pi adapter is an engineering workflow control, not a security sandbox.
|
|
|
102
111
|
- Artifact and run writes are atomic, but v0.1 has no multi-process lock. One writer should operate a run at a time.
|
|
103
112
|
- Workflow files can prove that a named action was recorded, not that a person genuinely understood it. Human review and organizational accountability remain necessary.
|
|
104
113
|
- No GitHub checks, PR gates, migration engine, signature scheme, or backwards-compatible workflow upgrade exists yet.
|
|
114
|
+
- Local review fingerprints detect changes but are not signatures. A future GitHub adapter must add remote identity and protected-branch evidence rather than treating the local record as cryptographic proof.
|
|
105
115
|
|
|
106
116
|
## Reuse path
|
|
107
117
|
|
|
108
118
|
The reusable boundary is the engine API, not a CLI. Pi is the first adapter. A VS Code extension, GitHub check, or future WASM-capable editor can reuse the same compiled core and canonical fragments while providing its own UI, storage transport, identity strength, and tool-capability map.
|
|
109
119
|
|
|
110
|
-
|
|
120
|
+
Review presentation follows the same rule. The core requires snapshot-bound findings, dispositions, and review gates; a host maps portable paths and locations to a terminal viewer, VS Code diff/comment UI, or GitHub review API. See `docs/design/review-workbench.md`.
|
|
121
|
+
|
|
122
|
+
Dogfooding should test whether the six encoded flows route real work correctly, whether their records and gates earn their cost, and whether phase visits, returns, capability vocabulary, and identity rules generalize across integrations.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Instruction Authoring
|
|
2
|
+
|
|
3
|
+
Status: initial authoring standard v0.1
|
|
4
|
+
|
|
5
|
+
AHEAD instructions are an executable interface to the framework. They should make the next valid behavior clear without duplicating the full Constitution, rationale, or workflow documentation into every model turn.
|
|
6
|
+
|
|
7
|
+
## Progressive disclosure
|
|
8
|
+
|
|
9
|
+
Use three layers:
|
|
10
|
+
|
|
11
|
+
1. The active profile supplies the binding human/AI authority boundary and live workflow state.
|
|
12
|
+
2. The generator adds the workflow phase fragment and only the method overlays mapped to that phase in `policy/methods/index.json`.
|
|
13
|
+
3. Humans and AI retrieve full framework Markdown on demand through the host integration.
|
|
14
|
+
|
|
15
|
+
The canonical workflow spec owns phases, artifacts, gates, transitions, and capabilities. Phase policies own local AI behavior. Method overlays own reusable practices such as evidence handling or debugging. Full documents explain why. Do not restate one rule in every layer.
|
|
16
|
+
|
|
17
|
+
## Authoring rules
|
|
18
|
+
|
|
19
|
+
- State the desired observable behavior in direct, positive language.
|
|
20
|
+
- Put human ownership and prohibited transfers of authority where a model cannot mistake them for suggestions.
|
|
21
|
+
- Give checkable completion criteria: an exact artifact, observation, identifier, or gate condition.
|
|
22
|
+
- Point to the canonical source instead of copying large passages.
|
|
23
|
+
- Keep host-specific UI out of core workflow semantics.
|
|
24
|
+
- Do not cache repository facts that tools can discover cheaply and reliably.
|
|
25
|
+
- Use examples to clarify a schema, not to narrow judgment to the example.
|
|
26
|
+
- Treat generated instructions as build artifacts and test the generated output for required boundaries.
|
|
27
|
+
|
|
28
|
+
The build fails when a method overlay names an unknown workflow or phase. Adding a method therefore requires its source fragment, an explicit mapping, generated-output coverage, and documentation when it changes user-visible expectations.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Review Workbench
|
|
2
|
+
|
|
3
|
+
Status: Pi host v0.1; editor-neutral contract v0.1
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
The review workbench makes the handoff from implementation to independent human review explicit and inspectable:
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
HUMAN IMPLEMENTS AND SELF-CHECKS
|
|
11
|
+
│
|
|
12
|
+
▼
|
|
13
|
+
CAPTURE EXACT CHANGESET FINGERPRINT
|
|
14
|
+
│
|
|
15
|
+
▼
|
|
16
|
+
AI REVIEWS WITHOUT MODIFYING
|
|
17
|
+
│
|
|
18
|
+
▼
|
|
19
|
+
HUMAN DISPOSITIONS EACH MATERIAL FINDING
|
|
20
|
+
│
|
|
21
|
+
▼
|
|
22
|
+
INDEPENDENT HUMAN REVIEWS CURRENT SNAPSHOT
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The adapter computes a fingerprint from the selected base and merge base, HEAD, engineering working-tree status, tracked diff, and hashes of untracked files. `.ahead/**` records are excluded so recording the review does not invalidate the engineering snapshot. AI and human review artifacts must carry `AHEAD-Review-Snapshot: <fingerprint>`. If the engineering changeset changes, the fingerprint changes and the review must be repeated.
|
|
26
|
+
|
|
27
|
+
## Portable contract
|
|
28
|
+
|
|
29
|
+
`integrations/pi/src/review.ts` defines host-neutral snapshot and source-location data plus a small `ReviewHost` boundary. Core workflow semantics require the AI findings, implementing-human disposition, and independent-human review; they do not require a terminal, VS Code, GitHub, or a particular comment API.
|
|
30
|
+
|
|
31
|
+
Pi is the first host. `/ahead-review` can show the snapshot and diff in the terminal, open a changed path in detected VS Code or `AHEAD_EDITOR=vscode`, request the AI review, and open the correct human record. A future VS Code adapter can map the same locations to native diffs and comments. A GitHub adapter can publish selected findings and verify protected-branch identities without changing the workflow contract.
|
|
32
|
+
|
|
33
|
+
## Finding and disposition shape
|
|
34
|
+
|
|
35
|
+
AI findings use stable `AR-001` identifiers and include severity, category, precise location, evidence, impact, and a falsifiable explanation. They are hypotheses. The implementing human separately marks every material finding `fixed`, `invalid`, `accepted-risk`, or `follow-up` and records rationale and evidence. An independent human then reviews the current snapshot and makes the final engineering judgment.
|
|
36
|
+
|
|
37
|
+
The workbench does not post comments, push branches, mark a pull request ready, or approve a pull request automatically. Those are explicit future host effects governed by human authorization and stronger remote identity.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Recommended Skills
|
|
2
|
+
|
|
3
|
+
Status: reviewed catalog v0.1
|
|
4
|
+
|
|
5
|
+
AHEAD may recommend independently maintained agent skills when they strengthen an active phase. Recommendations are references, not bundled code or silent dependencies. A human chooses whether to inspect and install one, and AHEAD's workflow, authority boundaries, and gates remain controlling.
|
|
6
|
+
|
|
7
|
+
The machine-readable catalog is `recommendations/skills-v0.1.json`. Every entry pins the exact revision AHEAD reviewed, supplies an inspectable source URL and install command, identifies applicable workflows and phases, and records compatibility constraints. Updating a recommendation requires reviewing the new revision before changing the pin.
|
|
8
|
+
|
|
9
|
+
## Ponytail
|
|
10
|
+
|
|
11
|
+
[Ponytail](https://github.com/DietrichGebert/ponytail/tree/2ed6c52c9d7e5e56942508591085fd45dea277d3/skills/ponytail) is recommended as an optional persistence and problem-solving aid for difficult implementation, corrective debugging, and investigation work. AHEAD does not adopt Ponytail's authority model: the human still leads, its suggestions remain subject to the active phase, and a quick version is not production-ready merely because it works.
|
|
12
|
+
|
|
13
|
+
Inspect the pinned source, then opt in with:
|
|
14
|
+
|
|
15
|
+
```sh
|
|
16
|
+
npx skills add https://github.com/DietrichGebert/ponytail/tree/2ed6c52c9d7e5e56942508591085fd45dea277d3/skills/ponytail --agent pi
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
The Pi integration exposes this catalog but never runs the command itself. Future editor adapters should render the same canonical catalog through their native UI.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# AHEAD Pilot Workflows
|
|
2
2
|
|
|
3
|
-
Status:
|
|
3
|
+
Status: executable dogfood v0.1
|
|
4
4
|
|
|
5
5
|
## Purpose
|
|
6
6
|
|
|
7
|
-
These six minimal workflow profiles are meant to be used on real engineering work
|
|
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
8
|
|
|
9
9
|
The profiles are:
|
|
10
10
|
|
|
@@ -83,7 +83,7 @@ Diagram language is normative for the pilot:
|
|
|
83
83
|
|
|
84
84
|
- `HUMAN` or `ENGINEER` means the person owns the reasoning, decision, action, or artifact.
|
|
85
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`
|
|
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
87
|
- Every decision, test selection, risk acceptance, consequential-action authorization, final review, and outcome gate is human.
|
|
88
88
|
- All diagram permissions remain bounded by the rule hierarchy above. Humans lead and remain accountable; AI assists.
|
|
89
89
|
|
|
@@ -36,7 +36,7 @@ Use operational stabilization instead when a live system is unhealthy and restor
|
|
|
36
36
|
│
|
|
37
37
|
▼
|
|
38
38
|
┌─────────────────┐
|
|
39
|
-
│
|
|
39
|
+
│ 3A. AI ASSISTS │
|
|
40
40
|
│ EVIDENCE REVIEW │
|
|
41
41
|
│ │
|
|
42
42
|
│ • Code │
|
|
@@ -48,7 +48,7 @@ Use operational stabilization instead when a live system is unhealthy and restor
|
|
|
48
48
|
│
|
|
49
49
|
▼
|
|
50
50
|
┌─────────────────┐
|
|
51
|
-
│
|
|
51
|
+
│ 3B. HYPOTHESES │
|
|
52
52
|
│ │
|
|
53
53
|
│ HUMAN LEADS │
|
|
54
54
|
│ AI ASSISTS │
|
|
@@ -60,8 +60,8 @@ Use operational stabilization instead when a live system is unhealthy and restor
|
|
|
60
60
|
│
|
|
61
61
|
▼
|
|
62
62
|
┌─────────────────┐
|
|
63
|
-
│
|
|
64
|
-
│
|
|
63
|
+
│ 3C. HUMAN │
|
|
64
|
+
│ SELECTS TEST │
|
|
65
65
|
│ │
|
|
66
66
|
│ • Prediction │
|
|
67
67
|
│ • Safety/scope │
|
|
@@ -69,7 +69,7 @@ Use operational stabilization instead when a live system is unhealthy and restor
|
|
|
69
69
|
│
|
|
70
70
|
▼
|
|
71
71
|
┌─────────────────┐
|
|
72
|
-
│
|
|
72
|
+
│ 3D. TEST │
|
|
73
73
|
│ HYPOTHESIS │
|
|
74
74
|
│ │
|
|
75
75
|
│ HUMAN/ENGINEER │
|
|
@@ -87,38 +87,44 @@ Use operational stabilization instead when a live system is unhealthy and restor
|
|
|
87
87
|
│ │
|
|
88
88
|
│ ▼
|
|
89
89
|
↺ HUMAN MODEL HUMAN ACCEPTS DIAGNOSIS
|
|
90
|
-
OR UNKNOWN CAUSE / RISK
|
|
90
|
+
OR UNKNOWN CAUSE / RISK (4)
|
|
91
91
|
│
|
|
92
92
|
▼
|
|
93
|
-
HUMAN FIX APPROACH
|
|
93
|
+
HUMAN FIX APPROACH (5)
|
|
94
94
|
│
|
|
95
95
|
▼
|
|
96
|
-
HUMAN FIRST-PASS PLAN
|
|
96
|
+
HUMAN FIRST-PASS PLAN (6)
|
|
97
97
|
│
|
|
98
98
|
▼
|
|
99
|
-
ENGINEER IMPLEMENTS
|
|
99
|
+
ENGINEER IMPLEMENTS (7)
|
|
100
100
|
│
|
|
101
101
|
▼
|
|
102
|
-
AI REVIEW
|
|
102
|
+
AI REVIEW (8)
|
|
103
103
|
│
|
|
104
104
|
▼
|
|
105
|
-
|
|
105
|
+
HUMAN DISPOSITIONS MATERIAL FINDINGS
|
|
106
106
|
│
|
|
107
107
|
▼
|
|
108
|
-
|
|
108
|
+
INDEPENDENT HUMAN REVIEW (9)
|
|
109
|
+
│
|
|
110
|
+
▼
|
|
111
|
+
HUMAN AUTHORIZES DEPLOY / RELEASE (10)
|
|
109
112
|
WHEN APPLICABLE
|
|
110
113
|
│
|
|
111
114
|
▼
|
|
112
|
-
HUMAN VERIFIES CORRECTION OF ORIGINAL FAILURE
|
|
115
|
+
HUMAN VERIFIES CORRECTION OF ORIGINAL FAILURE (11)
|
|
113
116
|
│
|
|
114
117
|
▼
|
|
115
118
|
HUMAN OBSERVES DEPLOYED OUTCOME
|
|
116
119
|
│
|
|
117
120
|
▼
|
|
118
|
-
AI AUDIT
|
|
121
|
+
AI AUDIT (12)
|
|
122
|
+
│
|
|
123
|
+
▼
|
|
124
|
+
HUMAN DISPOSITIONS AUDIT FINDINGS
|
|
119
125
|
│
|
|
120
126
|
▼
|
|
121
|
-
HUMAN OUTCOME GATE
|
|
127
|
+
HUMAN OUTCOME GATE (13)
|
|
122
128
|
|
|
123
129
|
Not corrected ───────────────────↺ HUMAN MODEL
|
|
124
130
|
```
|
|
@@ -127,21 +133,24 @@ Reproduction is useful but not a universal gate. Historical, intermittent, produ
|
|
|
127
133
|
|
|
128
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.
|
|
129
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
|
+
|
|
130
138
|
## Minimal phases
|
|
131
139
|
|
|
132
140
|
| Phase | Human owns | AI may | Minimum record | Advance when |
|
|
133
141
|
|---|---|---|---|---|
|
|
134
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 |
|
|
135
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 |
|
|
136
|
-
|
|
|
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 |
|
|
137
146
|
| Choose correction | Desired correction and tradeoffs | Compare fix approaches and recurrence risks | Selected correction and rationale | Human approves the correction |
|
|
138
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 |
|
|
139
148
|
| Implement | Code and engineering changes | Bounded implementation and debugging assistance | Linked changeset and regression evidence | Change is ready for review |
|
|
140
|
-
| AI 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 |
|
|
141
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 |
|
|
142
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 |
|
|
143
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 |
|
|
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 |
|
|
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 |
|
|
145
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 |
|
|
146
155
|
|
|
147
156
|
## Evidence chain
|
|
@@ -167,7 +176,16 @@ FACTS / EVIDENCE ──► HUMAN MENTAL MODEL
|
|
|
167
176
|
HUMAN CORRECTION DECISION / PLAN
|
|
168
177
|
│
|
|
169
178
|
▼
|
|
170
|
-
|
|
179
|
+
ENGINEER CHANGE
|
|
180
|
+
│
|
|
181
|
+
▼
|
|
182
|
+
SNAPSHOT-BOUND AI REVIEW
|
|
183
|
+
│
|
|
184
|
+
▼
|
|
185
|
+
IMPLEMENTING-HUMAN DISPOSITION
|
|
186
|
+
│
|
|
187
|
+
▼
|
|
188
|
+
INDEPENDENT HUMAN REVIEW
|
|
171
189
|
│
|
|
172
190
|
▼
|
|
173
191
|
HUMAN-AUTHORIZED DEPLOYMENT
|
|
@@ -100,11 +100,11 @@ Reframe or seek evidence ─────────↺ FRAME / RESEARCH
|
|
|
100
100
|
|---|---|---|---|---|
|
|
101
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
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
|
|
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
104
|
| Options | At least one human-originated option | Expand, combine, challenge, and propose alternatives | Options with provenance | Plausible option space is understood |
|
|
105
105
|
| Compare | Interpretation of tradeoffs | Structure comparison and sensitivity analysis | Benefits, costs, risks, consequences, reversibility | Decision is ready for accountable judgment |
|
|
106
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
|
-
|
|
|
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
108
|
|
|
109
109
|
## Decision evidence chain
|
|
110
110
|
|