haiku-method 3.4.1 → 3.5.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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +8 -0
- package/README.md +14 -0
- package/bin/haiku +677 -605
- package/package.json +5 -1
- package/schemas/intent.schema.json +147 -0
- package/schemas/stage.schema.json +95 -0
- package/skills/autopilot/SKILL.md +7 -7
- package/studios/software/stages/security/outputs/security-fix.md +39 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "haiku-method",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "H·AI·K·U methodology — universal lifecycle orchestration with hat-based workflows, completion criteria, and automatic context preservation.",
|
|
5
5
|
"homepage": "https://haikumethod.ai",
|
|
6
6
|
"repository": {
|
|
@@ -49,5 +49,9 @@
|
|
|
49
49
|
],
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"prepack": "npm run --prefix ../packages/haiku build",
|
|
55
|
+
"postpack": "git checkout -- ./bin/haiku"
|
|
52
56
|
}
|
|
53
57
|
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://haiku.dev/schemas/intent.schema.json",
|
|
4
|
+
"title": "H·AI·K·U Intent Frontmatter",
|
|
5
|
+
"description": "Schema for the YAML frontmatter on .haiku/intents/<slug>/intent.md. Distinguishes user-writable fields (settable via haiku_intent_set) from engine-managed fields (mutated only by the workflow engine).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"x-writable-by-user": [
|
|
9
|
+
"title",
|
|
10
|
+
"mode",
|
|
11
|
+
"skip_stages",
|
|
12
|
+
"intent_completion_review"
|
|
13
|
+
],
|
|
14
|
+
"x-engine-only": [
|
|
15
|
+
"studio",
|
|
16
|
+
"created_at",
|
|
17
|
+
"started_at",
|
|
18
|
+
"completed_at",
|
|
19
|
+
"status",
|
|
20
|
+
"active_stage",
|
|
21
|
+
"stages",
|
|
22
|
+
"composite",
|
|
23
|
+
"intent_reviewed",
|
|
24
|
+
"phase",
|
|
25
|
+
"completion_review_dispatched",
|
|
26
|
+
"completion_review_skipped",
|
|
27
|
+
"completion_review_entered_at",
|
|
28
|
+
"completion_review_dispatched_at",
|
|
29
|
+
"archived",
|
|
30
|
+
"archived_at",
|
|
31
|
+
"follows",
|
|
32
|
+
"autopilot"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"title": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"description": "Human-readable intent title"
|
|
39
|
+
},
|
|
40
|
+
"studio": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "Studio (lifecycle template) name. Immutable after creation."
|
|
43
|
+
},
|
|
44
|
+
"mode": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": ["continuous", "discrete", "autopilot", "discrete-hybrid"],
|
|
47
|
+
"description": "Execution mode."
|
|
48
|
+
},
|
|
49
|
+
"autopilot": {
|
|
50
|
+
"type": "boolean",
|
|
51
|
+
"description": "Legacy autopilot flag. Use `mode: autopilot` instead. Engine-managed during migration."
|
|
52
|
+
},
|
|
53
|
+
"status": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"enum": ["active", "completed", "archived"],
|
|
56
|
+
"description": "Lifecycle status. Engine-managed."
|
|
57
|
+
},
|
|
58
|
+
"active_stage": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"description": "Currently active stage. Engine-managed (state.json is the source of truth)."
|
|
61
|
+
},
|
|
62
|
+
"stages": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": { "type": "string" },
|
|
65
|
+
"description": "Stage list (allow-list for /haiku:quick scope). Set on creation."
|
|
66
|
+
},
|
|
67
|
+
"skip_stages": {
|
|
68
|
+
"type": "array",
|
|
69
|
+
"items": { "type": "string" },
|
|
70
|
+
"description": "Stages to skip in this intent."
|
|
71
|
+
},
|
|
72
|
+
"intent_reviewed": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"description": "Whether the elaborated intent passed initial review. Engine-managed."
|
|
75
|
+
},
|
|
76
|
+
"intent_completion_review": {
|
|
77
|
+
"type": "boolean",
|
|
78
|
+
"description": "Whether to run studio-level completion review at the end of the final stage. Defaults to true."
|
|
79
|
+
},
|
|
80
|
+
"phase": {
|
|
81
|
+
"type": "string",
|
|
82
|
+
"enum": ["", "active", "awaiting_completion_review", "intent_completion"],
|
|
83
|
+
"description": "Intent-level phase. Engine-managed."
|
|
84
|
+
},
|
|
85
|
+
"completion_review_dispatched": {
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "Whether studio-level review agents have been dispatched. Engine-managed."
|
|
88
|
+
},
|
|
89
|
+
"completion_review_skipped": {
|
|
90
|
+
"type": "boolean",
|
|
91
|
+
"description": "True when no studio-level review agents are configured. Engine-managed."
|
|
92
|
+
},
|
|
93
|
+
"completion_review_entered_at": {
|
|
94
|
+
"type": ["string", "null"],
|
|
95
|
+
"description": "ISO-8601 timestamp the intent entered completion review. Engine-managed."
|
|
96
|
+
},
|
|
97
|
+
"completion_review_dispatched_at": {
|
|
98
|
+
"type": ["string", "null"],
|
|
99
|
+
"description": "ISO-8601 timestamp review agents were dispatched. Engine-managed."
|
|
100
|
+
},
|
|
101
|
+
"started_at": {
|
|
102
|
+
"type": ["string", "null"],
|
|
103
|
+
"description": "ISO-8601 timestamp work began. Engine-managed."
|
|
104
|
+
},
|
|
105
|
+
"completed_at": {
|
|
106
|
+
"type": ["string", "null"],
|
|
107
|
+
"description": "ISO-8601 timestamp the intent sealed. Engine-managed."
|
|
108
|
+
},
|
|
109
|
+
"created_at": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "ISO-8601 timestamp the intent was created. Immutable."
|
|
112
|
+
},
|
|
113
|
+
"archived": {
|
|
114
|
+
"type": "boolean",
|
|
115
|
+
"description": "Whether the intent is archived. Toggle via haiku_intent_archive / haiku_intent_unarchive."
|
|
116
|
+
},
|
|
117
|
+
"archived_at": {
|
|
118
|
+
"type": ["string", "null"],
|
|
119
|
+
"description": "ISO-8601 timestamp the intent was archived. Engine-managed."
|
|
120
|
+
},
|
|
121
|
+
"follows": {
|
|
122
|
+
"type": "string",
|
|
123
|
+
"description": "Slug of the parent intent this one follows from. Set on creation."
|
|
124
|
+
},
|
|
125
|
+
"composite": {
|
|
126
|
+
"description": "Composite-intent topology. Either an array of {studio, stages} entries (creation-time spec) or true (already-elaborated marker).",
|
|
127
|
+
"oneOf": [
|
|
128
|
+
{ "type": "boolean" },
|
|
129
|
+
{
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": {
|
|
132
|
+
"type": "object",
|
|
133
|
+
"properties": {
|
|
134
|
+
"studio": { "type": "string" },
|
|
135
|
+
"stages": {
|
|
136
|
+
"type": "array",
|
|
137
|
+
"items": { "type": "string" }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"required": ["studio"],
|
|
141
|
+
"additionalProperties": true
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://haiku.dev/schemas/stage.schema.json",
|
|
4
|
+
"title": "H·AI·K·U Stage State",
|
|
5
|
+
"description": "Schema for .haiku/intents/<slug>/stages/<stage>/state.json. Every field is engine-managed — there are no user-writable fields. The schema exists so haiku_stage_set can validate engine-internal mutations and reject malformed transitions or unknown fields.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"x-writable-by-user": [],
|
|
9
|
+
"x-engine-only": [
|
|
10
|
+
"stage",
|
|
11
|
+
"status",
|
|
12
|
+
"phase",
|
|
13
|
+
"started_at",
|
|
14
|
+
"completed_at",
|
|
15
|
+
"gate_entered_at",
|
|
16
|
+
"gate_outcome",
|
|
17
|
+
"visits",
|
|
18
|
+
"iterations",
|
|
19
|
+
"elaboration_turns",
|
|
20
|
+
"decision_log",
|
|
21
|
+
"pre_review_dispatched",
|
|
22
|
+
"pre_review_dispatched_at",
|
|
23
|
+
"pre_review_reviewers_acknowledged",
|
|
24
|
+
"pre_review_reviewers_acknowledged_at",
|
|
25
|
+
"upstream_reconciliation_acknowledged",
|
|
26
|
+
"upstream_reconciliation_acknowledged_at",
|
|
27
|
+
"upstream_reconciliation_rationale"
|
|
28
|
+
],
|
|
29
|
+
"properties": {
|
|
30
|
+
"stage": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Stage name (matches the parent directory)."
|
|
33
|
+
},
|
|
34
|
+
"status": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["pending", "active", "completed", "blocked"],
|
|
37
|
+
"description": "Stage status."
|
|
38
|
+
},
|
|
39
|
+
"phase": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["", "elaborate", "execute", "review", "gate"],
|
|
42
|
+
"description": "Current phase within the stage."
|
|
43
|
+
},
|
|
44
|
+
"started_at": {
|
|
45
|
+
"type": ["string", "null"],
|
|
46
|
+
"description": "ISO-8601 timestamp the stage entered status=active."
|
|
47
|
+
},
|
|
48
|
+
"completed_at": {
|
|
49
|
+
"type": ["string", "null"],
|
|
50
|
+
"description": "ISO-8601 timestamp the stage entered status=completed."
|
|
51
|
+
},
|
|
52
|
+
"gate_entered_at": {
|
|
53
|
+
"type": ["string", "null"],
|
|
54
|
+
"description": "ISO-8601 timestamp the gate phase opened. Null when the stage auto-advanced through gate without entering it."
|
|
55
|
+
},
|
|
56
|
+
"gate_outcome": {
|
|
57
|
+
"type": ["string", "null"],
|
|
58
|
+
"enum": [null, "advanced", "blocked", "rejected"],
|
|
59
|
+
"description": "Gate outcome."
|
|
60
|
+
},
|
|
61
|
+
"visits": {
|
|
62
|
+
"type": "integer",
|
|
63
|
+
"minimum": 0,
|
|
64
|
+
"description": "Number of times the stage has been entered (initial + revisits)."
|
|
65
|
+
},
|
|
66
|
+
"iterations": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"description": "Per-bolt history entries.",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": true
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
"elaboration_turns": {
|
|
75
|
+
"type": "integer",
|
|
76
|
+
"minimum": 0,
|
|
77
|
+
"description": "Conversation turns spent in elaborate phase across all visits."
|
|
78
|
+
},
|
|
79
|
+
"decision_log": {
|
|
80
|
+
"type": "array",
|
|
81
|
+
"description": "Decisions recorded during elaboration.",
|
|
82
|
+
"items": {
|
|
83
|
+
"type": "object",
|
|
84
|
+
"additionalProperties": true
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"pre_review_dispatched": { "type": "boolean" },
|
|
88
|
+
"pre_review_dispatched_at": { "type": ["string", "null"] },
|
|
89
|
+
"pre_review_reviewers_acknowledged": { "type": "boolean" },
|
|
90
|
+
"pre_review_reviewers_acknowledged_at": { "type": ["string", "null"] },
|
|
91
|
+
"upstream_reconciliation_acknowledged": { "type": "boolean" },
|
|
92
|
+
"upstream_reconciliation_acknowledged_at": { "type": ["string", "null"] },
|
|
93
|
+
"upstream_reconciliation_rationale": { "type": "string" }
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -5,13 +5,13 @@ description: Full autonomous workflow — elaborate, plan, build, review, and de
|
|
|
5
5
|
|
|
6
6
|
# Autopilot
|
|
7
7
|
|
|
8
|
-
Run the full H·AI·K·U lifecycle autonomously from description to delivery. Autopilot is
|
|
8
|
+
Run the full H·AI·K·U lifecycle autonomously from description to delivery. Autopilot is one of the three intent modes (`discrete | continuous | autopilot`). It tells the workflow engine to promote `ask` review gates to `auto`, so the lifecycle advances without human intervention on stage gates. External gates and the intent-completion review still pause (structural signals the workflow engine can't synthesize).
|
|
9
9
|
|
|
10
10
|
## Process
|
|
11
11
|
|
|
12
|
-
1. **If no active intent exists**, create one with `/haiku:start`.
|
|
13
|
-
2. **
|
|
14
|
-
3. **Optional: skip the final intent review** by
|
|
12
|
+
1. **If no active intent exists**, create one with `/haiku:start`, passing `mode: autopilot` to `haiku_intent_create`.
|
|
13
|
+
2. **For an existing intent**, set the mode via `haiku_intent_set { intent: "<slug>", field: "mode", value: "autopilot" }`. The tool validates the mode enum against `INTENT_FRONTMATTER_SCHEMA` and produces a clean git audit entry. Do NOT use `haiku_human_write` for this — that mis-attributes the write as `human-via-mcp` and bypasses schema validation. Do NOT set a separate `autopilot: true` boolean — that is a deprecated pattern.
|
|
14
|
+
3. **Optional: skip the final intent review** by calling `haiku_intent_set { intent: "<slug>", field: "intent_completion_review", value: false }`. Do NOT set this unless the user explicitly wants truly headless completion; the completion review is the bookend that prevents silent intent-completion on stage-gate pass.
|
|
15
15
|
4. **Drive the loop** by calling `haiku_run_next { intent: "<slug>" }`. Repeat on every return. When a subagent returns, re-call `haiku_run_next` to advance.
|
|
16
16
|
|
|
17
17
|
## What still pauses autopilot
|
|
@@ -20,16 +20,16 @@ Run the full H·AI·K·U lifecycle autonomously from description to delivery. Au
|
|
|
20
20
|
- **`await` gates.** Waiting for a non-review external event (customer response, pipeline, etc.).
|
|
21
21
|
- **Elicitation-required decisions.** Design-direction picks, visual approvals.
|
|
22
22
|
- **Scope explosions** (see guardrails below).
|
|
23
|
-
- **Intent-completion review** (unless `
|
|
23
|
+
- **Intent-completion review** (unless `intent_completion_review: false` is set on the intent).
|
|
24
24
|
|
|
25
25
|
## Guardrails
|
|
26
26
|
|
|
27
27
|
- **Pause on blockers or ambiguity.** If the workflow engine returns an error or a decision that can't be inferred from the intent's goals, stop and surface it to the user. Never guess.
|
|
28
28
|
- **Pause on scope explosion.** If elaborate produces more than 5 units in a single stage, stop and ask the user to confirm scope — that's a signal the task is bigger than it looked and autopilot may not be appropriate.
|
|
29
|
-
- **Pause before PR creation.**
|
|
29
|
+
- **Pause before mid-workflow PR creation.** When `haiku_run_next` returns `external_review_requested` mid-lifecycle (e.g. per-unit MRs in discrete mode), surface the PR creation step to the user — don't open PRs autonomously. The final intent-completion delivery PR is the exception: after `intent_complete`, open the delivery PR (`haiku/<slug>/main` → `main`) directly. The intent-completion review gate is the human checkpoint; pausing again is redundant.
|
|
30
30
|
- **Stop on phase-level failures.** `error`, `max_bolts_exceeded`, `unit_scope_violation` not clearable after one retry, or any workflow engine rejection that persists across two calls → stop and report.
|
|
31
31
|
|
|
32
32
|
## Combined with other skills
|
|
33
33
|
|
|
34
|
-
- `/haiku:quick` + autopilot:
|
|
34
|
+
- `/haiku:quick` + autopilot: set `stages: [<one>]` AND `mode: autopilot`. Single-stage, no pauses except external/completion gates.
|
|
35
35
|
- `/haiku:revisit` while in autopilot: the revisit action itself pauses autopilot until the user confirms the revisit target.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-fix
|
|
3
|
+
location: (project source tree)
|
|
4
|
+
scope: repo
|
|
5
|
+
format: code
|
|
6
|
+
required: false
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Security Fix Code
|
|
10
|
+
|
|
11
|
+
Implementation output for security units that close vulnerability findings. Mirrors the development stage's `code` output template — security-engineer hats may write directly into the project source tree to land controls (input validation, authentication binding, frontmatter parsers, etc.) that defend the attack surface the unit names.
|
|
12
|
+
|
|
13
|
+
## When to use this template
|
|
14
|
+
|
|
15
|
+
Security stage units that REMEDIATE a finding produce code, not just an assessment. Without this template, the stage scope only permits intent-relative paths (`stages/security/...`, `knowledge/...`) and security-engineer commits that touch `packages/...` source files would fail scope validation at advance_hat.
|
|
16
|
+
|
|
17
|
+
Units that ONLY document threats / model risks (threat-modeler hat output, residual-risk register) need ASSESSMENTS (intent-scope) — not this template.
|
|
18
|
+
|
|
19
|
+
## Content Guide
|
|
20
|
+
|
|
21
|
+
- **Follow existing project patterns** for file organization, naming conventions, and module boundaries
|
|
22
|
+
- **Include appropriate tests** alongside implementation — unit tests for the new control's behavior, regression tests that fail pre-fix
|
|
23
|
+
- **Commit working increments** with clear messages naming the finding (V-NN) being closed and the control landed
|
|
24
|
+
- **Match the threat-model artifact** — the implementer hat MUST address the threats the threat-modeler enumerated for this unit's surface
|
|
25
|
+
|
|
26
|
+
## Completion
|
|
27
|
+
|
|
28
|
+
This output is "complete" when:
|
|
29
|
+
- All quality_gates declared on the unit frontmatter pass
|
|
30
|
+
- The full project test suite passes
|
|
31
|
+
- A behavioural / regression test exists for each finding being closed
|
|
32
|
+
- The matching `ASSESSMENTS.md` entry (intent-scope) records the finding as mitigated and cites the file paths and test names
|
|
33
|
+
|
|
34
|
+
## Quality Signals
|
|
35
|
+
|
|
36
|
+
- Tests fail pre-fix and pass post-fix (regression coverage proves the control works)
|
|
37
|
+
- Lint and typecheck pass without suppressions
|
|
38
|
+
- The code follows existing project conventions
|
|
39
|
+
- Commits cite the V-NN finding and the threat the control closes
|