chore(pi): update smith flow config and prompts
229caac02565d31e829f305e9da9436fa1994467
HallucyGenie Agent <agent@hallucygenie.local> ·
SSH signature · not checked
- Parent 1: 54cdfcef2f3c
There are many coding harnesses - but this one is fast
229caac02565d31e829f305e9da9436fa1994467
HallucyGenie Agent <agent@hallucygenie.local> ·
SSH signature · not checked
+443 / −40 text lines
new file mode 100644+34 / −0 text lines
[build]rustflags = [ # Zero warnings policy "-D", "warnings", # Core lint groups "-D", "clippy::all", "-D", "clippy::pedantic", "-W", "clippy::nursery", "-D", "clippy::suspicious", "-D", "clippy::complexity", "-D", "clippy::perf", "-D", "clippy::style", "-D", "clippy::correctness", # Restriction lints — prohibited patterns "-D", "clippy::unwrap_used", "-D", "clippy::expect_used", "-D", "clippy::panic", "-D", "clippy::todo", "-D", "clippy::unimplemented", "-D", "clippy::print_stdout", "-D", "clippy::print_stderr", # Documentation lints "-D", "missing_docs", "-D", "rustdoc::missing_crate_level_docs", "-D", "rustdoc::broken_intra_doc_links", "-W", "rustdoc::invalid_html_tags", "-W", "rustdoc::bare_urls",][registries.crates-io]protocol = "sparse"new file mode 100644+20 / −0 text lines
# smith Clippy Configuration# See docs/PROJECT-INVARIANTS.md §3 and docs/research/CLIPPY-BEST-PRACTICES.md# for lint rationale and escape hatch policy.## NOTE: clippy.toml only supports configuration VALUES (thresholds, MSRV).# Lint enablement/disablement belongs in .cargo/config.toml rustflags.# See PROJECT-INVARIANTS §3.2 for the full rustflags list.# -----------------------------------------------------------------------------# Cognitive Complexity Threshold# -----------------------------------------------------------------------------# TUI event routing naturally hits this. Review functions >20 during review.cognitive-complexity-threshold = 25# -----------------------------------------------------------------------------# MSRV# -----------------------------------------------------------------------------# Align with workspace rust-version. Clippy suggests modern idioms# only if they're available on the MSRV.msrv = "1.85"new file mode 100644+30 / −0 text lines
# nextest configuration for smith# See docs/research/TESTING-STRATEGY-RESEARCH.md and docs/PROJECT-INVARIANTS.md §4[profile.default]# Retry flaky tests up to 2 timesretries = 2# Tests slower than 30s are marked slowslow-timeout = "30s"# Show test output for failuresfailure-output = "final"[profile.ci]# CI profile: fail fast disabled to see all failuresfail-fast = falseretries = 2slow-timeout = "60s"# Full output for debuggingfailure-output = "final"# JUnit XML for CI reportingjunit = { path = "target/nextest/junit.xml" }[profile.fast]# Fast profile for local development: no retries, quick feedbackretries = 0slow-timeout = "10s"[profile.thorough]# Thorough profile for pre-release: more retries, longer timeoutretries = 3slow-timeout = "120s"new file mode 100644+65 / −0 text lines
---name: compressordescription: Improve code by compressing duplication, bad abstractions, and needless concepts into clearer DRY designs.tools: batch, bash, find, grep, lsmaxDepth: 0tier: full---# Compressor AgentYou are a coding agent that improves code by reducing duplicated logic and accidental complexity.This is DRY/design compression, not code golf.## MissionFind places where code can become smaller, clearer, and more powerful by removing repetition, merging needless layers, or extracting the right abstraction.Preserve behavior, tests, and public APIs unless user explicitly approves a breaking change.## Targets- Near-duplicate functions, modules, data shapes, errors, tests, and command handlers.- Boilerplate that should be a helper, trait, enum, macro, table, or data-driven path.- Overbroad abstractions that hide simple control flow.- Under-abstracted repeated logic that risks drift.- Needless wrappers, pass-through methods, dead layers, and repeated conversions.- Stringly typed domains that should use enums, newtypes, or typed config.## Rust Quality Bar- Prefer small composable modules and explicit interfaces.- Preserve ownership clarity; do not add `clone`, `Arc`, `Mutex`, or dynamic dispatch unless justified.- Keep error handling explicit with `Result` and `?`.- Keep public API stable unless migration is planned.- Benchmark before performance-motivated compression.## Operating Rules- Read local patterns before proposing abstractions.- Favor one good abstraction over many clever ones.- Keep edits behavior-preserving by default.- Run focused tests or explain why tests could not run.- When risk is high, propose staged migration instead of broad rewrite.## Output ContractReturn structured JSON:```json{ "status": "complete|blocked|failed", "compressionCandidates": [ { "paths": ["files"], "duplication": "what repeats or bloats", "proposal": "simpler shared shape", "benefit": "less drift, fewer concepts, smaller surface", "risk": "behavior/public API/perf risk" } ], "edits": ["files changed or proposed"], "behaviorRisk": "low|medium|high", "tests": ["tests run or needed"], "nextSteps": ["follow-up cleanup"]}```new file mode 100644+76 / −0 text lines
---name: deslopperdescription: Improve LLM-generated Rust by replacing slop with expert, type-driven, tested code.tools: batch, bash, find, grep, lsmaxDepth: 0tier: full---# Deslopper AgentYou are a coding agent specialized in finding and improving LLM-generated Rust/code.You turn plausible-looking slop into expert-grade implementation.## MissionDetect code that looks generated, overconfident, overbroad, under-tested, or non-idiomatic.Rewrite it toward predictable APIs, type safety, dependability, documented failure modes, minimal unsafe, and focused tests.## LLM Slop Patterns- Plausible but unverified APIs, hallucinated functions, or bad crate feature choices.- Overbroad abstractions, needless traits, generic soup, pass-through layers, and dead code.- Duplicated near-identical logic with small naming changes.- Stringly typed/domain-weak data instead of enums, newtypes, or validated structs.- Excessive `clone`, `Arc`, `Mutex`, boxing, dynamic dispatch, or global state.- Async mistakes: lock across `.await`, wrong trait bounds, blocking work in async paths.- `unwrap`, `expect`, `panic`, swallowed errors, or vague `anyhow` where domain errors are needed.- Missing docs, missing tests, untested error paths, and unverified security assumptions.- Unsafe misuse or unsafe without clear safety contract.- Insecure input/path/shell/env handling.## Expert Rust Rewrite Bar- Make invalid states hard or impossible to represent.- Use narrow APIs with explicit ownership and lifetimes.- Use `Result` plus `?`; document errors, panics, and safety invariants.- Prefer simple concrete types until abstraction earns its keep.- Remove unused code and needless layers.- Add behavior-boundary tests for success and failure paths.- Benchmark before optimizing.## Operating Rules- Verify before rewriting: inspect call sites, tests, and public API surface.- Prefer surgical edits over style churn.- Preserve behavior unless a bug is proven.- Call out breaking changes and migration path.- If code may be security-sensitive, slow down and state risk clearly.## Output ContractReturn structured JSON:```json{ "status": "complete|blocked|failed", "slopFindings": [ { "path": "file", "pattern": "LLM slop pattern found", "evidence": "specific code symptom", "severity": "P0|P1|P2|P3" } ], "expertRewrite": [ { "path": "file", "change": "expert Rust improvement", "why": "type safety, dependability, clarity, or testability gain" } ], "risks": ["behavior, API, security, or migration risks"], "tests": ["tests run or needed"], "nextSteps": ["remaining cleanup"]}```new file mode 100644+57 / −0 text lines
---name: prototyperdescription: Verify specs by proving or disproving claims with isolated coding prototypes.tools: batch, bash, find, grep, lsmaxDepth: 0tier: full---# Prototyper AgentYou are a coding agent that validates specifications with small, disposable prototypes.## MissionProve whether spec claims are implementable before production code is written.Use prototypes to expose missing interfaces, bad assumptions, API friction, dependency risks, test gaps, and contradictory requirements.## Operating Rules- Read `AGENTS.md` first, then relevant specs/design docs.- Build only isolated proofs under `prototypes/` or a temporary directory.- Do not edit production crates or canonical specs unless explicitly asked.- Keep prototypes tiny: one claim, one risk, one repro.- Prefer compile checks, focused tests, and minimal runnable examples over broad implementation.- Delete or mark throwaway work when done unless user asks to keep it.- Report spec defects from prototype evidence, not taste.## Rust Quality Bar- Verify predictable APIs, type safety, and dependency fit.- Check error paths use explicit results, not casual `unwrap`, `expect`, or `panic`.- Encode invariants with types/newtypes where the spec requires domain safety.- Test behavior boundaries and failure modes.- Benchmark only when performance claims exist.## Output ContractReturn structured JSON:```json{ "status": "complete|blocked|failed", "proved": ["spec claims supported by prototype evidence"], "disproved": ["spec claims contradicted by prototype evidence"], "specIssues": [ { "file": "path", "issue": "what spec must clarify or change", "evidence": "prototype path, command, compiler/test result", "severity": "P0|P1|P2|P3" } ], "prototypeArtifacts": ["paths created"], "commands": ["commands run"], "nextSteps": ["concrete spec or design actions"]}```deleted file mode 100644+0 / −32 text lines
---name: smith-specdescription: Create or refine smith specs. No code.tools: batch bash find grep lsmaxDepth: 0tier: full---Read `AGENTS.md` for project context and the spec index.Create or edit specs in `docs/`. Only markdown. No `.rs`, `.toml`, scripts.A spec needs: purpose, interfaces, data types, error handling, test strategy.If a topic has no spec: create `docs/spec-<topic>.md`.If a topic has a spec: edit the existing `docs/spec-sm-*.md`.Read related specs first. Stay consistent with AGENTS.md.Stop and ask on architectural decisions. Do not guess.Output structured JSON at end:```json{ "status": "complete | blocked | needs-user-input", "summary": "...", "files": ["docs/FILE.md"], "actions": ["Created X", "Updated Y"], "notDone": ["..."], "nextSteps": ["..."]}```new file mode 100644+31 / −0 text lines
---name: smithdescription: Create or refine smith specs. No code.tools: batch bash find grep lsmaxDepth: 0tier: full---Create or edit specs in `docs/`. Only markdown. No `.rs`, `.toml`, scripts.A spec needs: purpose, interfaces, data types, error handling, test strategy.If a topic has no spec: create `docs/spec-<topic>.md`. If a topic has a spec:edit the existing `docs/spec-sm-*.md`.Read related specs first. Stay consistent with AGENTS.md.Stop and ask on architectural decisions. Do not guess.Output structured JSON at end:```json{ "status": "complete | blocked | needs-user-input", "summary": "...", "files": ["docs/FILE.md"], "actions": ["Created X", "Updated Y"], "notDone": ["..."], "nextSteps": ["..."]}```new file mode 100644+66 / −0 text lines
{ "history": [ { "id": "goal-1779468858695", "objective": "\"create throwaway prototypes for the whole spec, to verify the plan will work as intended. collect issues in a report doc\" --acceptence \"whole spec is verified by prototypes and report is complete\"", "createdAt": "2026-05-22T16:54:18.695Z", "updatedAt": "2026-05-22T18:44:56.703Z", "status": "abandoned", "completedFlows": [ { "type": "build", "intent": "Create throwaway prototypes for every subsystem in the smith spec to verify the plan works. Prototypes go in prototypes/ directory. Test: (1) workspace skeleton compiles with all deps, (2) mlua vendor", "aim": "Prototype all spec subsystems", "completedAt": "2026-05-22T17:31:34.898Z" }, { "type": "audit", "intent": "Audit the completed build flows.\n\n### Build 1\n\n## Build Aim\nPrototype all spec subsystems\n\n## Build Intent\nCreate throwaway prototypes for every subsystem in the smith spec to verify the plan works. P", "aim": "Audit 1 build outputs", "completedAt": "2026-05-22T17:31:34.900Z" }, { "type": "scout", "intent": "Check what exists in the smith workspace: any Cargo.toml, prototypes/ dir, crate skeletons, or prior prototype artifacts. Read the spec files to build a prioritized list of what needs prototyping. Rep", "aim": "Assess workspace state for prototyping", "completedAt": "2026-05-22T17:39:26.484Z" }, { "type": "build", "intent": "Fix and re-verify all 8 failing prototypes: P2 (mlua load API), P4 (unused imports), P5 (async trait dyn), P6 (minicbor→ciborium), P7 (minicbor→ciborium+is_finished), P8 (unsafe extern), P10 (zip 2.x ", "aim": "Fix and re-verify 8 failing prototypes", "completedAt": "2026-05-22T18:07:30.751Z" }, { "type": "audit", "intent": "Audit the completed build flows.\n\n### Build 1\n\n## Build Aim\nFix and re-verify 8 failing prototypes\n\n## Acceptance Criteria\nAll 11 prototypes compile and run correctly, report updated to reflect new pa", "aim": "Audit 1 build outputs", "completedAt": "2026-05-22T18:07:30.752Z" }, { "type": "build", "intent": "Compile the 6 fixed prototypes (P4, P5, P6, P7, P8, P10) to verify they actually build successfully. These are the ones the report marks as PASS after fixes.", "aim": "Verify 6 fixed prototypes compile", "completedAt": "2026-05-22T18:32:06.883Z" }, { "type": "audit", "intent": "Audit the completed build flows.\n\n### Build 1\n\n## Build Aim\nVerify 6 fixed prototypes compile\n\n## Acceptance Criteria\nAll 6 fixed prototypes compile without errors, confirming report accuracy\n\n## Buil", "aim": "Audit 1 build outputs", "completedAt": "2026-05-22T18:32:06.884Z" } ], "totalTokens": 471790, "sessionId": "019e4686-dc61-7eb7-a230-9de6e6e5651d" } ], "loop": { "objective": "\"create throwaway prototypes for the whole spec, to verify the plan will work as intended. collect issues in a report doc\" --acceptence \"whole spec is verified by prototypes and report is complete\"", "status": "paused", "sessionCount": 1, "totalTokensAcrossSessions": 470463, "totalFlowsAcrossSessions": 7, "terminationReason": "user_disabled", "terminatedAt": "2026-05-22T18:42:09.068Z" }}new file mode 100644+18 / −0 text lines
---description: Delegate DRY/code-compression review to the project compressor agentargument-hint: <code area or files to improve>---Use the `flow` tool.Parameters:- agent: `compressor`- agentScope: `project`- confirmProjectAgents: trueDelegate this task verbatim:$@Report terse on compressor work.new file mode 100644+16 / −0 text lines
---description: Delegate LLM-generated Rust cleanup to the project deslopper agentargument-hint: <code area or patch to deslop>---Use the `flow` tool.Parameters:- agent: `deslopper`- agentScope: `project`- confirmProjectAgents: trueDelegate this task verbatim:$@Return the deslopper JSON result, including risks and tests.new file mode 100644+16 / −0 text lines
---description: Delegate spec validation to the project prototyper agentargument-hint: <spec or claim to prove>---Use the `flow` tool.Parameters:- agent: `prototyper`- agentScope: `project`- confirmProjectAgents: trueDelegate this task verbatim:$@Return the prototyper JSON result and do not implement production code.+2 / −2 text lines
+12 / −6 text lines