Skip to content

Commit 97c3241

Browse files
committed
feat: update tests and docs
1 parent af72c96 commit 97c3241

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
66

77
`cardano-init` is a Rust CLI tool that scaffolds Cardano protocol projects. Users select tools for each functional role (on-chain, off-chain, infrastructure, devnet, formal-methods) and the CLI generates a working monorepo. The authoritative docs live in `docs/`: read `docs/PRD.md` (product), `docs/ARCHITECTURE.md` (system design), and `docs/TECH_SPEC.md` (contracts, schemas, edge cases) before making any significant changes; `docs/ADDING_A_TOOL.md` is the contributor guide and `docs/ROADMAP.md` is the milestone plan.
88

9-
It's an early prototype: several capabilities (the dependency `doctor`, `list` / `--format json`, a hosted web builder) are **planned, not yet implemented**. `docs/ROADMAP.md` tracks what's real vs. upcoming.
9+
It's an early prototype: the dependency `doctor`, `list`, and `--format json` are implemented, while a few capabilities (a *hosted* web builder, WASM live preview, min-version checks) remain **planned, not yet implemented**. `docs/ROADMAP.md` tracks what's real vs. upcoming.
1010

1111
## Commands
1212

@@ -36,7 +36,7 @@ The codebase is a single Rust crate. The module structure is as follows (see `do
3636
- `src/registry/`: deserializes embedded TOML tool definitions into typed structs. The `Role` enum (5 roles) is the sole source of truth for the role vocabulary; the registry only *references* roles.
3737
- `src/scaffold/`: four-phase pipeline: context building → planning → rendering → writing.
3838
- `src/web/`: impure edge: hand-rolled local web builder server.
39-
- `src/doctor/`: **(planned)** dependency detection + install advice.
39+
- `src/doctor/`: dependency detection + install advice.
4040
- `src/contract.rs`: constants for the interface contract (canonical paths, env var names, role dirs).
4141

4242
**Key invariant:** `registry/`, `scaffold/`, `contract`, and the pure part of `doctor/` have zero dependency on `cli/` or `web/` (the impure edges). They are pure logic over data.
@@ -50,7 +50,7 @@ The codebase is a single Rust crate. The module structure is as follows (see `do
5050

5151
### Registry and templates
5252

53-
Tool definitions live in `registry/tools/<tool>.toml`. Templates live in `templates/<tool>/<role>/` with a `manifest.toml` listing files. Both are embedded into the binary at compile time via **rust-embed** (`#[folder = "…"]`). There is **no `build.rs`**. (Dependency install recipes will live in `registry/deps.toml`, consumed by the planned `doctor`, see `docs/TECH_SPEC.md` §9.)
53+
Tool definitions live in `registry/tools/<tool>.toml`. Templates live in `templates/<tool>/<role>/` with a `manifest.toml` listing files. Both are embedded into the binary at compile time via **rust-embed** (`#[folder = "…"]`). There is **no `build.rs`**. (Dependency install recipes live in `registry/deps.toml`, consumed by `doctor`, see `docs/TECH_SPEC.md` §9.)
5454

5555
The **interface contract** (`contract.rs`) is what enables any on-chain tool to compose with any off-chain tool without per-pair logic:
5656
- On-chain templates must produce `blueprint/plutus.json` during `build`.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Early prototype. Tools currently in the registry (✅ available · ⬜ planned).
9595
| **`cardano-up`** | Provisions & runs Cardano infrastructure (node, indexers, devnets) | Ongoing, per environment |
9696

9797

98-
These sit at different layers: `cardano-init` decides *what tools your project uses and how they compose*, while `aikup` / `cardano-up` install and manage *the toolchains and infrastructure those tools need*. The two meet at the (planned) dependency [`doctor`](docs/ROADMAP.md): when toolchains are missing, `cardano-init` advises the right installer (`aikup` for Aiken, `cardano-up` for the infrastructure role) rather than reinventing them.
98+
These sit at different layers: `cardano-init` decides *what tools your project uses and how they compose*, while `aikup` / `cardano-up` install and manage *the toolchains and infrastructure those tools need*. The two meet at the dependency [`doctor`](docs/ROADMAP.md): when toolchains are missing, `cardano-init` advises the right installer (`aikup` for Aiken, `cardano-up` for the infrastructure role) rather than reinventing them.
9999

100100
By design, `cardano-init` is **not** a package or version manager: it does not pin or upgrade tool versions, manage dependencies after generation, or migrate existing projects. There is no `cardano-init update`.
101101

docs/ROADMAP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Deliverables below are tracked as checklists (`[ ]` = not yet done).
3939

4040
**Feature surface:**
4141
- [ ] Interactive CLI and one-shot CLI (polish; deterministic output).
42-
- [ ] `list` subcommand + global `--format human|json` presenter + machine-readable error codes (agent surface, PRD FR-13/14/15).
43-
- [ ] **`cardano-init doctor`** standalone command + check-and-advise during scaffolding (deps/installer graph, `registry/deps.toml`). *(Pulled earlier than the docs' original deferral.)*
42+
- [x] `list` subcommand + global `--format human|json` presenter + machine-readable error codes (agent surface, PRD FR-13/14/15).
43+
- [x] **`cardano-init doctor`** standalone command + check-and-advise during scaffolding (deps/installer graph, `registry/deps.toml`). *(Pulled earlier than the docs' original deferral.)*
4444
- [ ] Local web builder (`cardano-init web`), `--dry-run`, optional Nix flake.
4545
- [ ] Determinism canonicalization (planner) + snapshot tests + contract-compliance tests per template.
4646

src/cli/oneshot.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,14 +250,12 @@ mod tests {
250250
}
251251

252252
#[test]
253-
#[ignore = "no infrastructure tool in the registry to exercise infra dedup; \
254-
re-enable (and swap the tool id) once one is added"]
255253
fn duplicate_infra_is_deduplicated() {
256254
let sel = build_selection(
257255
"test",
258256
None,
259257
None,
260-
&["yaci".to_string(), "yaci".to_string()],
258+
&["kupo".to_string(), "kupo".to_string()],
261259
None,
262260
None,
263261
"preview",

0 commit comments

Comments
 (0)