Rust coding agent TUI. Phase: spec/planning. No production code until specs
are final; disposable spec-validation prototypes live under prototypes/
(SPEC §18).
CLAUDE.md is a navigation index. Do not mirror individual source-of-truth file
lists here; use the canonical directories and docs tree instead.
Two specifications sit at the top, one for each half of the project:
What to build — docs/SPEC.md. The canonical specification for every
smith artifact: the app, the site, the book, the documentation. It answers
what.
How to build — docs/plans/AGENTIC-DEVELOPMENT.md. The specification for
how smith is developed — the agentic workflow encoded in .github/ and
.claude/. It answers how.
Bound by the invariants, and supported by the rest:
Invariants — docs/PROJECT-INVARIANTS.md. Non-negotiable rules every
contributor, tool, and agent follows: build system, directory structure,
coding standards, version control. Overriding one needs explicit approval.
Research: docs/research/ — ecosystem research and tool analysis
(evidence, non-normative).
Prototypes: prototypes/ — spec-validation prototypes and their plan.
Former docs/design/ subsystem docs and the P1–P20 prototype report are fully
absorbed into docs/SPEC.md and deleted (see git history).
Rules
Spec before code. No production .rs until docs/SPEC.md covers the
work; prototype .rs under prototypes/ is sanctioned by SPEC §18.
CLAUDE.md is the navigation index. docs/SPEC.md is the canonical project spec.
Every spec section answers: interfaces, data, errors, tests — as named
shapes and behavior, not code. Exact only at boundaries others program
against (files, wire formats, CLI, config, Lua SDK); code blocks are
illustrative unless the section says otherwise.
Open questions: stop and ask. No guessing.
Invoke spec work: /smith <topic>. Commands are defined once,
harness-agnostically, in .claude/skills/<name>/SKILL.md
(smith, pioneer, handmade, sabotnik); .pi/prompts/ holds thin pi
adapters that defer to them.
Cargo is the sole build system. See docs/PROJECT-INVARIANTS.md §1.
Agents must not modify docs/SPEC.md or docs/PROJECT-INVARIANTS.md without approval.
Writing commits and PRs
Commits and PRs argue the why, not the what. The diff already lists
what changed — never retype it. A message earns its place by recording the
motivation, the reasoning, and what was deliberately not done and why.
No AI attribution, ever. No Co-Authored-By, no "Generated with", no
session links, no tool bylines. These commits are the author's.
Subject: one imperative line naming the decision or its effect, not the
mechanic — "Drop the Lua bytecode cache", not "remove BytecodeCache struct".
No ALL-CAPS verdicts, no emoji. (Prefix policy: PROJECT-INVARIANTS §7.)
Body: one to three short paragraphs. The motivation, the alternative
dropped and the single cost that killed it, and the one number or fact that
settled it. If it wants more than that, the overflow belongs elsewhere.
One grep-able anchor. Exactly one sentence naming the concrete surface
touched — SPEC §N, a file, a config key, a prototypes/pNN dir — as a
range or count, never a per-item roster. This is what keeps git bisect and
blame meaningful. "Don't enumerate" is not "don't be specific."
Where detail lives instead: per-file change lists → the diff; benchmark
tables and raw measurements → the prototype dir and its PLAN.md result
block; the decision plus its driving number → the commit body, in prose.
One commit, one decision. If the anchor won't fit one sentence, split.
Banned: superlatives, "successfully / robustly / cleanly", caps-lock
findings, emoji, and every attribution trailer.
PRs follow .github/pull_request_template.md: motivation-first, one line per
section, the surface as an anchor range — the diff is the roster.
Agent output discipline
Every ADW agent is terse — essentials only. What lands on GitHub (a review,
a triage note, a comment) is:
Findings/actions as one-line bullets, most severe first. No preamble, no
praise, no "what holds up well" tour, no restating the diff or issue back.
A clean result is one line — "No blocking findings." — not an essay. Say
the fewest words that carry the decision and the one reason for it.
No meta-narration of what you're about to do or just did. Post the verdict
and the findings that change it; drop everything else.
Thoroughness is in the reasoning, not the word count. A wall of text is a
defect, not diligence.
# smithRust coding agent TUI. Phase: spec/planning. No production code until specs
are final; disposable spec-validation prototypes live under `prototypes/`
(SPEC §18).
## Architecture```
smith/ (types, StreamFn, AgentTool, Lua, config)
→ smith-ai/ | smith-core/ | smith-tui/ (parallel)
→ smith-harness/ (wiring, plugins, SDK)
→ smith-cli/ (binary)
```
## Locked Decisions| Decision | Rationale |
|----------|-----------|
| Latest stable Rust, ed. 2024 | Rolling MSRV follows stable compiler |
| mlua + LuaJIT | Performance, coroutines |
| CBOR sessions | Compact, binary-safe |
| Secret proxy (no keychain) | Cross-platform |
| XDG dirs | Linux standards |
| jj VCS | Modern DVCS |
| StreamFn abstraction | Decouples agent from providers |
| Lua plugins with sandbox | Safe extensibility |
| Rust widgets, Lua layout | Performance + flexibility |
| Cargo-only build system | Single entry point, no make/just/scripts |
## Source of TruthCLAUDE.md is a navigation index. Do not mirror individual source-of-truth file
lists here; use the canonical directories and docs tree instead.
Two specifications sit at the top, one for each half of the project:
- **What to build — `docs/SPEC.md`.** The canonical specification for every
smith artifact: the app, the site, the book, the documentation. It answers
*what*.
- **How to build — `docs/plans/AGENTIC-DEVELOPMENT.md`.** The specification for
how smith is developed — the agentic workflow encoded in `.github/` and
`.claude/`. It answers *how*.
Bound by the invariants, and supported by the rest:
- **Invariants — `docs/PROJECT-INVARIANTS.md`.** Non-negotiable rules every
contributor, tool, and agent follows: build system, directory structure,
coding standards, version control. Overriding one needs explicit approval.
- Research: `docs/research/` — ecosystem research and tool analysis
(evidence, non-normative).
- Plans: `docs/plans/` — execution plans (non-normative); `README.md` indexes them.
- Prototypes: `prototypes/` — spec-validation prototypes and their plan.
Former `docs/design/` subsystem docs and the P1–P20 prototype report are fully
absorbed into `docs/SPEC.md` and deleted (see git history).
## Rules1. Spec before code. No production `.rs` until `docs/SPEC.md` covers the
work; prototype `.rs` under `prototypes/` is sanctioned by SPEC §18.
2. CLAUDE.md is the navigation index. `docs/SPEC.md` is the canonical project spec.
3. Every spec section answers: interfaces, data, errors, tests — as named
shapes and behavior, not code. Exact only at boundaries others program
against (files, wire formats, CLI, config, Lua SDK); code blocks are
illustrative unless the section says otherwise.
4. Open questions: stop and ask. No guessing.
5. Invoke spec work: `/smith <topic>`. Commands are defined once,
harness-agnostically, in `.claude/skills/<name>/SKILL.md`
(smith, pioneer, handmade, sabotnik); `.pi/prompts/` holds thin pi
adapters that defer to them.
6. Cargo is the sole build system. See `docs/PROJECT-INVARIANTS.md` §1.
7. Agents must not modify `docs/SPEC.md` or `docs/PROJECT-INVARIANTS.md` without approval.
## Writing commits and PRsCommits and PRs argue the **why**, not the **what**. The diff already lists
what changed — never retype it. A message earns its place by recording the
motivation, the reasoning, and what was deliberately *not* done and why.
- **No AI attribution, ever.** No `Co-Authored-By`, no "Generated with", no
session links, no tool bylines. These commits are the author's.
- **Subject:** one imperative line naming the decision or its effect, not the
mechanic — "Drop the Lua bytecode cache", not "remove BytecodeCache struct".
No ALL-CAPS verdicts, no emoji. (Prefix policy: PROJECT-INVARIANTS §7.)
- **Body:** one to three short paragraphs. The motivation, the alternative
dropped and the single cost that killed it, and the one number or fact that
settled it. If it wants more than that, the overflow belongs elsewhere.
- **One grep-able anchor.** Exactly one sentence naming the concrete surface
touched — `SPEC §N`, a file, a config key, a `prototypes/pNN` dir — as a
range or count, never a per-item roster. This is what keeps `git bisect` and
`blame` meaningful. "Don't enumerate" is not "don't be specific."
- **Where detail lives instead:** per-file change lists → the diff; benchmark
tables and raw measurements → the prototype dir and its `PLAN.md` result
block; the decision plus its driving number → the commit body, in prose.
- **One commit, one decision.** If the anchor won't fit one sentence, split.
- **Banned:** superlatives, "successfully / robustly / cleanly", caps-lock
findings, emoji, and every attribution trailer.
PRs follow `.github/pull_request_template.md`: motivation-first, one line per
section, the surface as an anchor range — the diff is the roster.
## Agent output disciplineEvery ADW agent is **terse — essentials only**. What lands on GitHub (a review,
a triage note, a comment) is:
- **Findings/actions as one-line bullets, most severe first.** No preamble, no
praise, no "what holds up well" tour, no restating the diff or issue back.
- **A clean result is one line** — "No blocking findings." — not an essay. Say
the fewest words that carry the decision and the one reason for it.
- **No meta-narration** of what you're about to do or just did. Post the verdict
and the findings that change it; drop everything else.
Thoroughness is in the *reasoning*, not the word count. A wall of text is a
defect, not diligence.