Step 1 — Setup
Initialize a Project

One command adds coding discipline, session management, and planning gates to any git repo.

devarch init
david@Davids-Mac-mini lantern % ../devarch-ai/docs/workflow/devarch init ____ _ _ | _ \ _____ __/ \ _ __ ___| |__ | | | |/ _ \ \ / / _ \ | '__/ __| '_ \ | |_| | __/\ V / ___ \| | | (__| | | | |____/ \___| \_/_/ \_\_| \___|_| |_| AI-Assisted Development, Disciplined. v1.3.3 [ok] Updated DevArch section in existing CLAUDE.md (v1.3.3) [info] .claude/settings.local.json already exists — skipping permissions [ok] Written .devarch marker [ok] Project initialized! Review CLAUDE.md and customize for your project. [info] Activate capabilities with: devarch activate ddd-discovery
Step 2 — Session Start
Recover Context from Last Session

Every session opens with a recap of what happened last time. No digging through git logs.

/recap
Searched for 1 pattern, read 1 file (ctrl+o to expand) Last session recap (2026-03-20): Massive architecture session — completed the Sharpee embedding spike (Rust drives the engine via Node subprocess), wrote ADR-135 (bridge protocol, accepted in Sharpee), decomposed Lantern into 368 implementation blocks with 124 IF design patterns, defined V1 scope (276 blocks, 75%), designed the 9-crate Rust core API, and restructured the repo (TypeScript archived to archive/typescript-prototype, main is now a clean Rust workspace). Status: COMPLETE. Next step is Phase 20 — define the pattern catalog schema and TOML format, starting with PUZ-001 as a working reference entry.
Step 3 — Audit
Surface Blockers Before You Start

The pre-session audit reads prior work, detects blockers, and forms an action plan — automatically.

pre-session-audit(Pre-session audit check)
Previous session recap (2026-03-21, ~1 hour ago): Audited DevArch agents and found a gap — no agent enforces test-writing or doc comments. Ran session-planner to decompose the pattern catalog into Phases 20–24. Phase 20 (scaffold lantern-patterns crate, TOML schema, PUZ-001 reference entry) is marked CURRENT but not yet started. Blocker: CLAUDE.md needs testing and documentation requirements codified before Phase 20 implementation begins. Good, I have the full picture. Two things to do: 1. Unblock: Update CLAUDE.md with Rust-specific documentation requirements 2. Implement: Phase 20 — lantern-patterns types, TOML schema, PUZ-001, tests Let me start with the CLAUDE.md update.
Step 4 — Planning
Decompose Work into Budgeted Phases

Non-trivial goals get a plan before any code is written. Each phase has a budget, entry state, deliverables, and exit criteria.

session-planner(Plan pattern catalog implementation)
Prompt: Plan the implementation of the Lantern pattern catalog — 124 IF design patterns as structured data that the inference prompt, pattern framework, codegen, and readiness assessment all consume. Context The Lantern repo has been restructured. The Rust workspace is at lantern-core/ with 9 crates (all empty scaffolds that compile). The architecture docs are at docs/architecture/. Key docs: docs/architecture/rust-core-api.md — defines PatternDefinition, PatternCatalog, DetectedPattern, AdhocPattern, CodegenRecipe, ReadinessCheck, etc. docs/architecture/implementation-blocks.md — D.P1–D.P12 (framework), D.PUZ-001 through D.CONV-006 (124 patterns)
docs/context/plan.md — the planner's output
## Phases ### Phase 1: Template Restructuring - Budget: 100 tool calls - Entry state: Three monolithic templates exist. - Deliverable: CLAUDE.md.base — new universal base template CLAUDE.md.addon-ddd-discovery — domain discovery CLAUDE.md.addon-domain-modeling — scaffolding - Exit state: Three new files. Old three deleted. - Status: DONE ### Phase 2: CLI Rewrite - Budget: 100 tool calls - Entry state: Phase 1 complete. CLI still has VALID_TIERS, --tier flags throughout. - Deliverable: devarch activate <capability> command Remove --tier from all commands Capability-based .devarch marker - Status: DONE ... 4 more phases

Each phase has an entry state (what must be true before starting), deliverables, and an exit state (what must be true when done).

Step 5 — Implementation
Build, Then Verify

After a phase completes, the audit confirms all deliverables are in place and the codebase is healthy.

Phase completion + pre-session audit
Phase 20 is complete. Here's what was done: CLAUDE.md blocker resolved: — Updated project status from "no implementation yet" to reflect Rust workspace exists — Added Rust /// doc comments to the documentation standards list — Added Rust-specific rule: #[deny(missing_docs)] in every lib.rs, doc comments on all public items, errors use /// comments Phase 20 — Catalog Schema and TOML File Format: — lib.rs — All types from rust-core-api.md section 3: PatternCatalog, PatternDefinition, PatternCategory, ReadinessCheck, DetectedPattern, AdhocPattern, CodegenRecipe, PatternNewlines, ... — catalog/catalog.toml — PUZ-001 "Lock and Key" & detection signals. 2 required entities (key + locked_barrier), 3 relationship unlocks, ... — tests.rs — 10 tests covering: catalog loads, PUZ-001 present with correct fields, detection signals entity_roles, relationships, codegen_recipe checklist, ... — Cargo.toml — toml = "0.8" added to workspace and crate deps. All 10 tests pass, full workspace compiles. Phase 20 exit criteria met — the TOML schema is proven end-to-end and ready for converted phases to follow the PUZ-001 pattern. Agent "Pre-session audit check" completed Pre-session audit confirmed the same results — both items are now resolved (CLAUDE.md updated, toml = "0.8" added, Phase 20 implemented and passing). Clean bill of health otherwise.
Step 6 — Check In
Sprint Standup in One Command

Quick status check — what got done, what's next, any blockers. Works mid-session or at the start of a new one.

/standup
Searched for 3 patterns, read 3 files (ctrl+o to expand) Standup ──────────────────────────── Done: — Patch 1.3.3: git-assess.sh, scripts-only commit agents, /fin removed — 58 renames/105 FQBI, 30 changes unified, 3HQTS audit run, and all permissions/hooks tested on macOS. — Redesign: HQTS audit, spec'd all permissions, 105 fully-qualified billing items. Next: — No active plan. Pick up next task. Blockers: — None Lifecycle ──────────────────────────── Gate: clear Session: session-20260323-2054-main.md Plan: no active plan Budget: no budget set
Step 7 — Ship It
Summarize, Commit, Push

One command writes a work summary, commits everything, and pushes. The next session picks up right where you left off.

/fin
work-summary-writer(Write session work summary) Done (8 tool uses · 36.6k tokens · 58s) (ctrl+o to expand) commit-remote(Commit and push session work) Done (8 tool uses · 14.4k tokens · 41s) (ctrl+o to expand) Committed and pushed as 78237f0.

All examples from real DevArch sessions. No staging, no mockups. See the generated code →