Skip to content

docs: core runtime specification and code quality fixes#2

Merged
jbold merged 2 commits into
mainfrom
001-core-runtime
Feb 8, 2026
Merged

docs: core runtime specification and code quality fixes#2
jbold merged 2 commits into
mainfrom
001-core-runtime

Conversation

@jbold
Copy link
Copy Markdown
Owner

@jbold jbold commented Feb 8, 2026

Summary

  • Fix all non-dead-code clippy warnings and apply canonical rustfmt formatting across all source files
  • Add complete spec-kit specification artifacts for the 001-core-runtime feature: 5 user stories, 23 functional requirements, 8 success criteria, 55 implementation tasks
  • Establish project constitution (v1.0.0) with 5 core principles: Secure by Default, Cost-Aware by Architecture, Simple Configuration, WASM-First Plugin Model, Performance Without Compromise
  • Rewrite CLAUDE.md with module relationships, build commands, and spec artifact references

Test plan

  • cargo check passes with no errors (dead-code warnings expected)
  • cargo clippy shows only dead-code warnings (all real warnings fixed)
  • cargo fmt --check passes (no formatting drift)
  • All spec artifacts present in specs/001-core-runtime/ (spec.md, plan.md, research.md, data-model.md, contracts/jsonrpc-spec.md, quickstart.md, tasks.md)
  • Constitution at .specify/memory/constitution.md has no unresolved placeholders

🤖 Generated with Claude Code

jbold and others added 2 commits February 8, 2026 01:41
- Remove unused `warn` import in agent/mod.rs
- Remove empty lines after doc comments in bus/mod.rs and store/mod.rs
- Remove needless Some/? wrapper in protocol.rs error return
- Apply canonical rustfmt formatting across all source files
- Add .claude/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete specification-driven design for the 001-core-runtime feature:

- spec.md: 5 user stories (P1-P5), 23 functional requirements, 8 success criteria
- plan.md: architecture, project structure, implementation phases
- research.md: 12 technology decisions with rationale
- data-model.md: 9 entity schemas with validation rules and relationships
- contracts/jsonrpc-spec.md: WebSocket JSON-RPC protocol specification
- quickstart.md: getting started guide
- tasks.md: 55 implementation tasks ordered by user story priority
- checklists/requirements.md: spec quality checklist (all passing)
- .specify/: spec-kit framework (templates, scripts, constitution v1.0.0)
- CLAUDE.md: rewritten with module relationships and spec artifact references

Constitution establishes 5 core principles: Secure by Default,
Cost-Aware by Architecture, Simple Configuration, WASM-First Plugin
Model, Performance Without Compromise.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude Bot commented Feb 8, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@jbold jbold merged commit ac4fb7c into main Feb 8, 2026
1 check passed
jbold added a commit that referenced this pull request Feb 8, 2026
Implement two user stories for the 002-onboard-chat-ui feature:

US1 - Onboarding: `exoclaw onboard` guides first-time setup with secure
API key storage (~/.exoclaw/credentials/{provider}.key, mode 0600).
Config file never contains the key — resolved at runtime from env var
or credential file. Re-onboard preserves unrelated config sections.

US2 - Chat UI: Leptos 0.7 CSR web interface served at / via rust-embed.
WebSocket client connects to /ws with JSON-RPC protocol. Markdown
rendering (pulldown-cmark), streaming token display, auto-scroll,
auth prompt for non-loopback, connection status indicator. Dark theme.

Infrastructure:
- Convert to Cargo workspace (root server + ui/ Leptos crate)
- trunk builds WASM bundle, rust-embed serves it from the binary
- 14 new onboard tests (permissions, resolution, preservation)
- 134 total tests passing, 0 clippy warnings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jbold added a commit that referenced this pull request Feb 8, 2026
* feat: add onboarding CLI and Leptos chat UI (#2)

Implement two user stories for the 002-onboard-chat-ui feature:

US1 - Onboarding: `exoclaw onboard` guides first-time setup with secure
API key storage (~/.exoclaw/credentials/{provider}.key, mode 0600).
Config file never contains the key — resolved at runtime from env var
or credential file. Re-onboard preserves unrelated config sections.

US2 - Chat UI: Leptos 0.7 CSR web interface served at / via rust-embed.
WebSocket client connects to /ws with JSON-RPC protocol. Markdown
rendering (pulldown-cmark), streaming token display, auto-scroll,
auth prompt for non-loopback, connection status indicator. Dark theme.

Infrastructure:
- Convert to Cargo workspace (root server + ui/ Leptos crate)
- trunk builds WASM bundle, rust-embed serves it from the binary
- 14 new onboard tests (permissions, resolution, preservation)
- 134 total tests passing, 0 clippy warnings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: sanitize markdown HTML output, remove unused dep, fix CLAUDE.md

- Prevent XSS by converting raw HTML events to escaped text in
  pulldown-cmark renderer (ui/src/markdown.rs)
- Remove unused tower-http "fs" feature from Cargo.toml
- Fix CLAUDE.md: correct Leptos version (0.7, not 0.8), remove
  nonexistent leptos_axum reference, add secrets.rs and update
  main.rs/AppState module descriptions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: keep is_connected in sync with actual WebSocket state

Update is_connected signal in message handler: set true on successful
connect, set false on connect failure or stream error. The initial
probe in app.rs sets the starting state; message sends keep it current.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: extract shared fs_util, fix HOME fallback, update research.md

- Extract set_secure_dir_permissions() and set_secure_file_permissions()
  into shared src/fs_util.rs module to eliminate duplication between
  config.rs and secrets.rs
- Add home_dir() helper that returns Result instead of silently falling
  back to "." when HOME is unset
- Update specs/002-onboard-chat-ui/research.md to reflect actual
  implementation: Leptos 0.7 CSR + trunk + rust-embed (not 0.8 SSR
  with leptos_axum)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant