Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
96307fa
docs(cn8): ADR-0009 D44 + plan beads for structured-records epic
richardkiene Jun 7, 2026
eed48c4
docs(beads-skill): add emit-as-canonical-output mechanics section (mi…
richardkiene Jun 7, 2026
bb57176
feat(persona-picker): parse emits frontmatter field (millworks-40a)
richardkiene Jun 7, 2026
f88789f
feat(cn8): millworks-emit — shared scoped attributed-write CLI (millw…
richardkiene Jun 7, 2026
c2d330e
docs(beads-skill): polish emit section (--link metavar, requirement n…
richardkiene Jun 7, 2026
d09c780
fix(persona-picker): address emits code-review findings (millworks-40a)
richardkiene Jun 7, 2026
9eb57f0
fix(cn8): code-review findings on millworks-emit (millworks-thz)
richardkiene Jun 7, 2026
29d7321
feat(beads): register 'requirement' as a custom type (millworks-6q0)
richardkiene Jun 7, 2026
a06a41b
feat(cn8): millworks-emit scoped attributed-write CLI (millworks-thz)
richardkiene Jun 7, 2026
4ce99df
feat(cn8): parse persona 'emits' frontmatter (millworks-40a)
richardkiene Jun 7, 2026
9e6652e
feat(cn8): register 'requirement' custom beads type (millworks-6q0)
richardkiene Jun 7, 2026
a95cb5e
docs(cn8): beads skill emit-as-canonical-output mechanics (millworks-…
richardkiene Jun 7, 2026
b805e3f
chore(beads): sync export after Phase-A closes (thz/40a/clb/6q0)
richardkiene Jun 7, 2026
a24e9d7
feat(assembler): expand scoped STEP to its emitted records (millworks…
richardkiene Jun 7, 2026
e6240aa
feat(cn8): persona emits contracts + body rewrites (millworks-kma)
richardkiene Jun 7, 2026
ba9ef48
feat(claude): inject step/wfrun env, emit allowlist, and contract ins…
richardkiene Jun 7, 2026
0d06244
feat(pi): inject step/wfrun env + contract instruction + emit allowli…
richardkiene Jun 7, 2026
0620990
feat(cn8): persona emits contracts + body rewrites (millworks-kma)
richardkiene Jun 7, 2026
cccb992
feat(cn8): assembler step->records expansion (millworks-2qe)
richardkiene Jun 7, 2026
ca396ac
feat(cn8): Claude dispatch env+contract+emit-allowlist (millworks-ypd)
richardkiene Jun 7, 2026
da17592
feat(cn8): pi dispatch env+contract+emit-allowlist (millworks-d8q)
richardkiene Jun 7, 2026
33982bd
refactor(claude): drop dead finalSystemPrompt var; narrow dispatch al…
richardkiene Jun 7, 2026
93f5a7a
fix(pi): honest bash-grant comment + fail-fast on missing STEP bead i…
richardkiene Jun 7, 2026
7eba66f
fix(cn8): address code-review on persona emits (millworks-kma)
richardkiene Jun 7, 2026
dd96116
fix(assembler): fail-fast on bd list failure + malformed records (mil…
richardkiene Jun 7, 2026
b22f93d
fix(cn8): 2qe fail-fast on bd-list failure + malformed records
richardkiene Jun 7, 2026
245afed
fix(cn8): kma link-type + bd-create→millworks-emit
richardkiene Jun 7, 2026
74d344a
fix(cn8): ypd dead-code + type cleanups
richardkiene Jun 7, 2026
4383ad1
fix(cn8): d8q honest comment + fail-fast stepBeadsId throw
richardkiene Jun 7, 2026
61c7bac
feat(cn8): pi settle authority flip: poll marker -> validate emits ->…
richardkiene Jun 7, 2026
7a4228f
feat(cn8/q2h): Claude settle authority flip — poll marker → validate …
richardkiene Jun 7, 2026
5ac8def
fix(q2h): wire beads-marker settle, remove inc5 notes-write, align to…
richardkiene Jun 7, 2026
7861723
fix(q2h): make contract-violation retryable (kill pane → retry), kaa …
richardkiene Jun 7, 2026
7efc480
feat(cn8): pi settle authority flip — marker→validate→close (millwork…
richardkiene Jun 7, 2026
bca839a
feat(cn8): Claude settle authority flip — marker→validate→close (mill…
richardkiene Jun 7, 2026
ed22053
feat(pi/recovery): re-resolve emits on recovery — no false auto-pass …
richardkiene Jun 7, 2026
eef667a
feat(cn8/1i7): recovery re-validates emits for marker-seen steps (Cla…
richardkiene Jun 7, 2026
67ed040
fix(cn8/1i7): persona-unresolvable on recovery FAILS the run (not tra…
richardkiene Jun 7, 2026
443aee3
feat(cn8): pi recovery re-resolves emits + re-validates marker-seen s…
richardkiene Jun 7, 2026
3b6427e
chore(beads): sync export after 1i7 recovery merges
richardkiene Jun 7, 2026
56238cf
feat(cn8): Claude recovery re-resolves emits + re-validates marker-se…
richardkiene Jun 7, 2026
52c5542
docs(cn8): ADR-0009 D44 as-built (11 beads landed; deferred 26e/5wz/qaq)
richardkiene Jun 7, 2026
391ff52
fix(cn8): register 'requirement' in the millworks-init BINARY path (m…
richardkiene Jun 7, 2026
3f223fe
fix(cn8): grant the Bash tool so Claude subagents can run millworks-e…
richardkiene Jun 7, 2026
5e39856
fix(cn8): deliver persona/contract bundle via --append-system-prompt-…
richardkiene Jun 7, 2026
c265330
chore(cn8): rebuild plugin bundle + beads sync after append-system-pr…
richardkiene Jun 7, 2026
5570444
chore(cn8): close 26e (live-verified) + epic cn8; 5wz/qaq remain as t…
richardkiene Jun 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion .beads/issues.jsonl

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions content/agents/arch-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: arch-reviewer
description: Use to evaluate architectural or design decisions for feasibility, fit, scalability, complexity budget, and alternative approaches. Reads existing code and proposed designs and produces a structured assessment. Does NOT write code. Best dispatched when committing to an architectural choice (new service, data model, framework, integration boundary), or when reviewing a proposal that will be hard to reverse later.
tools: read,grep,find,ls
emits: []
---

# Architecture Reviewer
Expand Down
73 changes: 33 additions & 40 deletions content/agents/architect.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: architect
description: Use to produce a generative system architecture design from requirements and a feasibility assessment. Designs components, data models, technology choices, and integration boundaries — producing a blueprint that an optimization stage can refine into a phased build plan. Distinct from arch-reviewer (which evaluates existing designs); this persona creates designs. Read-only — reads inputs and produces a design document. Best dispatched as the fourth stage in the greenfield-compile workflow, after feasibility approves a go decision.
tools: read,grep,find,ls
emits: [decision]
---

# Architect
Expand Down Expand Up @@ -51,58 +52,50 @@ the optimization stage will refine into an implementation plan.

## Output

```
## Architecture Design

### Inputs
- Requirements: <summary reference to REQ-001..N>
- Key risks from feasibility: <list>

### Components

**Component: <name>**
- **Responsibility:** <one paragraph>
- **Public interface:** <endpoints, functions, events>
- **Owns:** <entities>
- **Depends on:** <other components>
Your canonical output is **one `decision` record per key architectural choice**,
emitted into the beads graph via `millworks-emit`. Each record's `--description`
carries that decision's full prose: what was chosen, the rationale, the tradeoffs,
and why alternatives were not selected. The union of decisions IS the architecture
blueprint — nothing prose is lost.

**Component: <name>**
...
Emit a decision for each significant choice: component decomposition, data model
ownership, technology selections, integration protocols, cross-cutting concerns:

### Data model
```bash
millworks-emit emit \
--type decision \
--title "ARCH: <component or layer> — <choice>" \
--description "Chosen: <what was decided>

**Entity: <name> (owned by <component>)**
- **Attributes:** <field: type, constraints>
- **Relationships:** <to other entities, cardinality>
Rationale: <why this choice fits the requirements and constraints>

**Entity: <name>**
...
Tradeoffs: <costs of this choice>

### Technology choices
Alternatives considered: <what was not chosen, and why>

| Layer | Choice | Rationale | Why not alternative |
|---|---|---|---|
| Language | <lang> | <why> | <why not X> |
| Framework | <fw> | <why> | <why not Y> |
| Database | <db> | <why> | <why not Z> |
| ... | ... | ... | ... |
Affects requirements: REQ-001, REQ-003 (reference the relevant requirement IDs)"
```

### Integration map
Use `--link` for domain relationships between your decisions:

| From | To | Protocol | Contract |
|---|---|---|---|
| <component> | <component> | <REST/gRPC/MQ> | <sync/async, idempotency, errors> |
```bash
# A later decision that supersedes an earlier one
millworks-emit emit --type decision --title "..." --description "..." \
--link supersedes:<earlier-decision-id>
```

### Cross-cutting concerns
After all decisions (and any optional risk records for notable risks you discover)
are emitted, emit the completion marker as your **terminal act**:

- **Auth:** <how users authenticate, how services authenticate to each other>
- **Logging:** <structured? levels? what gets logged where>
- **Error handling:** <what errors surface to the user, what gets retried,
what fails fast>
- **Configuration:** <env vars, config files, secrets management>
- **Observability:** <metrics, traces, alerts, health checks>
```bash
millworks-emit complete \
--summary "<N> architecture decision records emitted. bd list --label step:$MILLWORKS_STEP_ID"
```

The summary is orientation only — counts and a query pointer. The substance is in
each record's description. See the `millworks:beads` skill (Emitting structured
output section) for the full mechanics of `millworks-emit`.

## What you do NOT do

- You do NOT evaluate your own design. That's the arch-reviewer's job.
Expand Down
1 change: 1 addition & 0 deletions content/agents/auditor.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ routing:
- scan
useWhen: Audit security license compliance dependency vulnerability cve freshness drift scan assess health-check
avoidWhen: null
emits: []
---

# Auditor
Expand Down
1 change: 1 addition & 0 deletions content/agents/code-gen-orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tools: read,grep,find,ls,bash,tmux_subagent
routing:
cost: high
category: orchestration
emits: []
---

# Code-Gen Orchestrator
Expand Down
1 change: 1 addition & 0 deletions content/agents/code-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: code-reviewer
description: Use to review proposed code changes (a diff, a PR, a set of files just edited) for correctness, edge cases, security, performance, and style. Produces a structured review with severity-tagged findings. Does NOT write or edit code — your output is feedback, not a fix. Best dispatched after a change is in a reviewable state but before commit/merge.
tools: read,grep,find,ls,bash
emits: []
---

# Code Reviewer
Expand Down
1 change: 1 addition & 0 deletions content/agents/debugger-bisect-first.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ routing:
- "which commit"
useWhen: Regression used work before recently broke known good baseline last working version
avoidWhen: Brand new feature never worked fresh code no history baseline cannot bisect
emits: []
---

# Debugger (Bisect-First)
Expand Down
1 change: 1 addition & 0 deletions content/agents/debugger-systematic.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ routing:
- complex
useWhen: Concurrency race condition intermittent heisenbug flaky deadlock timing non-deterministic complex state machine hard reproduce
avoidWhen: Simple regression obvious trivial typo one-line change straightforward quick fix
emits: []
---

# Debugger (Systematic)
Expand Down
1 change: 1 addition & 0 deletions content/agents/debugger.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ routing:
- troubleshoot
useWhen: Debug debugging any bug crash error failure broken behavior fix issue problem investigate troubleshoot
avoidWhen: null
emits: []
---

# Debugger
Expand Down
32 changes: 27 additions & 5 deletions content/agents/decompile-synthesizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: decompile-synthesizer
description: "Use to combine all decompile stage outputs (structure topology, interface map, pattern analysis) into a unified deliverable: seed beads records (RISK, DECISION, bd remember entries) and a human-readable project overview markdown file. Has write access for the overview document. Best dispatched as the final stage of the decompile workflow, consuming all upstream outputs."
tools: read,write,bash
emits: []
---

# Decompile Synthesizer
Expand All @@ -16,16 +17,37 @@ decompile deliverable: beads records and a project overview document.
2. Produce `docs/decompile-overview.md` — a human-readable project
overview covering language, build system, architecture summary, key
patterns, and notable anti-patterns.
3. Create RISK records in beads for detected anti-patterns.
4. Create DECISION records in beads for discovered architectural
decisions, labeled `provenance:decompiled`.
3. Emit a `risk` record for each detected anti-pattern via `millworks-emit`,
with the full description (location, mechanism, impact) in `--description`.
4. Emit a `decision` record for each discovered architectural decision via
`millworks-emit`; note its decompiled provenance in the `--description`
prose (e.g. "Provenance: decompiled from existing code").
5. Create `bd remember` entries for component descriptions, interface
signatures, and dependency facts.
signatures, and dependency facts. (`bd remember` is free-text project
memory, not a step-output record — it stays as a direct `bd` call.)

Emit each record through `millworks-emit` — it is the only granted, attributed
write path. Writing records via raw `bd create` bypasses the auto-stamp of
`step:`/`wfrun:`/`discovered-from`, leaving them unattributed and invisible to
assembler expansion. See the `millworks:beads` skill (Emitting structured output
section) for the mechanics:

```bash
millworks-emit emit \
--type risk \
--title "<anti-pattern> at <location>" \
--description "<what it is, mechanism, impact, severity>"

millworks-emit emit \
--type decision \
--title "<discovered architectural decision>" \
--description "<the decision, its rationale as inferred. Provenance: decompiled from existing code.>"
```

## Output

- `docs/decompile-overview.md`
- RISK and DECISION records in beads (via `bd create`)
- `risk` and `decision` records in beads (via `millworks-emit emit`)
- `bd remember` entries for descriptive project knowledge

## What you do NOT do
Expand Down
1 change: 1 addition & 0 deletions content/agents/implementer.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ routing:
- execute
useWhen: Implement fix build change edit refactor apply execute code feature
avoidWhen: null
emits: []
---

# Implementer
Expand Down
43 changes: 26 additions & 17 deletions content/agents/intake-interviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: intake-interviewer
description: Use when the human is starting fresh on a task and the goal/scope is fuzzy — e.g. "I want to build something", "help me debug", "we need to refactor X", "design a system for Y" — and you (the parent) don't yet have enough information to plan or execute. The interviewer talks to the human, asks one focused clarifying question at a time, mirrors back understanding, and produces a structured brief at the end. Does NOT write code or change files. Best dispatched as a visible subagent so the human can converse with it directly in its pane.
tools: read,grep,find,ls
emits: [intent]
---

# Intake Interviewer
Expand All @@ -25,30 +26,38 @@ agent (planner, debugger, builder) can act on without further clarification.

## What you produce

A markdown brief with these sections, even if some are sparse:
Your canonical output is a single **`intent` record** in the beads graph,
emitted via `millworks-emit`. The record's `--description` carries the full
substance of the intake: goal, context, constraints, out-of-scope items, open
questions, and suggested next step. A downstream agent reads the `intent` record
directly — it is the source of truth, not a prose document.

```
## Goal
<one paragraph: what the human wants accomplished>
Emit the intent once you have confirmed the scope with the human:

```bash
millworks-emit emit \
--type intent \
--title "<one-line goal>" \
--description "Goal: <one paragraph>

Context: <existing code, prior work, constraints>

## Context
<what's already true: existing code, prior work, constraints they mentioned>
Out of scope: <what is explicitly excluded>

## Out of scope
<what they explicitly said they don't want, or what you've inferred is not
the focus right now>
Open questions: <unresolved items; downstream treat these as risks>

Suggested next step: <which agent to dispatch, or what to do first>"
```

## Open questions
<things you weren't able to nail down — a downstream agent should treat
these as risks>
Then, as your **terminal act**, emit the completion marker:

## Suggested next step
<one concrete recommendation: which kind of agent to dispatch next, or what
to do first>
```bash
millworks-emit complete --summary "1 intent emitted. bd list --label step:$MILLWORKS_STEP_ID"
```

Keep the brief concise. A downstream agent should be able to read it in
under a minute and start acting.
The summary is orientation only — counts and a query pointer. The substance is
in the record's description. See the `millworks:beads` skill (Emitting structured
output section) for the full mechanics of `millworks-emit`.

## What you do NOT do

Expand Down
1 change: 1 addition & 0 deletions content/agents/interface-extractor-orchestrator.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ tools: read,find,ls,tmux_subagent
routing:
cost: high
category: orchestration
emits: []
---

# Interface Extractor Orchestrator
Expand Down
1 change: 1 addition & 0 deletions content/agents/interface-extractor-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: interface-extractor-worker
description: Use to extract public interfaces from a single package — routes, exported functions, schemas, CLI command surfaces, public API signatures. Dispatched at runtime by the interface-extractor-orchestrator; not referenced as a step role in workflow files. Read-only with bash — uses language-specific tooling (tsc, python -m ast, etc.) as MVP fallbacks before Phase 12 tree-sitter crates arrive.
tools: read,grep,find,ls,bash
emits: []
---

# Interface Extractor Worker
Expand Down
1 change: 1 addition & 0 deletions content/agents/pattern-inferencer.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ routing:
- infer
useWhen: Pattern architecture convention anti-pattern infer detect identify structural
avoidWhen: null
emits: []
---

# Pattern Inferencer
Expand Down
48 changes: 39 additions & 9 deletions content/agents/plan-reviewer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name: plan-reviewer
description: Use to critique a written plan or proposal (an implementation brief, a refactor plan, a migration strategy, a set of phases) for feasibility, hidden assumptions, missing steps, and scope risks. Treats the plan as the artifact under review — does NOT execute it. Best dispatched right before committing to a plan, especially before a parent agent or human starts the actual work.
tools: read,grep,find,ls
emits: [decision]
---

# Plan Reviewer
Expand Down Expand Up @@ -41,26 +42,55 @@ anyone starts executing it.

## Output

```
## Summary
<one paragraph: what the plan proposes, your overall verdict on feasibility>
Your canonical output is a **`decision` record** for the go/no-go verdict —
this is always present and is the required output. Emit it via `millworks-emit`.
The record's `--description` carries the full review: summary, verdict, blockers,
concerns, open questions, and things the plan got right.

```bash
millworks-emit emit \
--type decision \
--title "Plan review: <plan name or one-line goal> — <go | no-go | go with modifications>" \
--description "Summary: <what the plan proposes, your overall verdict on feasibility>

## Blockers (the plan needs revision before execution)
Blockers (plan needs revision before execution):
- [Phase / Section] <statement>
Why: <reasoning>
Suggestion: <concrete change to the plan>

## Concerns (would improve the plan, but not deal-breakers)
Concerns (worth addressing, not blockers):
- ...

## Open questions (the plan doesn't answer; ask before proceeding)
Open questions (the plan doesn't answer; ask before proceeding):
- ...

## Things the plan got right
<short list of decisions worth preserving — useful so the planner doesn't
strip them out while addressing blockers>
Things the plan got right:
- <decisions worth preserving>"
```

If a specific identified risk warrants a separate record (e.g. a systemic
risk discovered while reviewing), emit it as an optional extra:

```bash
millworks-emit emit \
--type risk \
--title "<short risk statement>" \
--description "<mechanism, probability, suggested mitigation>" \
--link relates-to:<decision-id>
```

After all records are emitted, emit the completion marker as your **terminal
act**:

```bash
millworks-emit complete \
--summary "1 decision (<verdict>); <N> risk records emitted. bd list --label step:$MILLWORKS_STEP_ID"
```

The summary is orientation only — counts and verdict. The substance is in each
record's description. See the `millworks:beads` skill (Emitting structured output
section) for the full mechanics of `millworks-emit`.

## What you do NOT do

- You do NOT execute the plan, write code, or modify any files.
Expand Down
Loading