Add tiger-style CLI v1 with install/configure/doctor/bootstrap#3
Add tiger-style CLI v1 with install/configure/doctor/bootstrap#3robertguss merged 17 commits intomainfrom
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughAdds a new Rust "tiger-style" CLI v1 (install/configure/doctor/bootstrap), embedded assets and templates, language autodetection, conflict/diff reporting, integration tests, docs, CI and release workflows, and a Cargo workspace member to package and publish the CLI. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant CLI as "tiger-style CLI"
participant Install as "Install Module"
participant Configure as "Configure Module"
participant Doctor as "Doctor Module"
participant FS as "Filesystem / Shell"
User->>CLI: bootstrap --target /repo [--dry-run]
CLI->>Install: run(InstallArgs)
Install->>FS: ensure target exists
Install->>FS: retrieve embedded assets
Install->>FS: compare/write files (CREATE/OVERWRITE/SKIP) / collect conflicts
Install-->>CLI: Result (ok | conflicts)
CLI->>Configure: run(ConfigureArgs)
Configure->>FS: autodetect_languages / render ACTIVE_LANGUAGE_CONTRACTS.md
Configure->>FS: compare/write AGENTS.md (conflict handling)
Configure-->>CLI: Result (ok | conflicts)
alt not dry-run and previous ok
CLI->>Doctor: run(DoctorArgs)
Doctor->>FS: verify required paths
Doctor->>Doctor: parse manifest, check tools
Doctor->>FS: run validator scripts (via bash)
Doctor->>FS: emit report (text/json)
Doctor-->>CLI: DoctorReport (ok | failed)
end
CLI-->>User: exit (0 success, 2 validation failure, 3 conflicts, 1 unexpected)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 487b1a231f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@tooling/tiger-style-cli/src/configure.rs`:
- Around line 24-44: The dry-run message for AGENTS.md is ambiguous because it
prints "SKIP/OVERWRITE" whenever agents_path.exists() even though you already
compared file contents; compute and use a concrete flag (e.g., agents_exists and
agents_differs) from the earlier comparison (current != agents_template and
args.force) and then, in the args.dry_run branch, print "DRY-RUN SKIP:
AGENTS.md" when agents_exists && !agents_differs, "DRY-RUN OVERWRITE: AGENTS.md"
when agents_exists && agents_differs (and not forced differently), and keep
"DRY-RUN CREATE: AGENTS.md" when !agents_exists; reference agents_path,
agents_template, current, args.force, and args.dry_run to locate where to add
the boolean and change the println logic.
In `@tooling/tiger-style-cli/src/detect.rs`:
- Around line 28-55: autodetect_languages misses uppercase file extensions;
normalize the extension to lowercase before matching in autodetect_languages:
when you get ext from entry.path().extension().and_then(|v| v.to_str()), convert
it (e.g., ext = ext.to_ascii_lowercase() or ext.to_lowercase()) and then match
against "rs", "py", "ts", "tsx", "js", "jsx" to ensure case-insensitive
detection; update the match arm to use the lowercased variable and keep the rest
of the logic (status setting and is_complete check) unchanged.
🧹 Nitpick comments (4)
.evidence/CLI_V1_TEST_PLAN.md (1)
28-34: Consider varying repeated sentence starts for readability.
Optional editorial polish to avoid multiple consecutive lines starting with the same word.Also applies to: 60-68
.evidence/EVIDENCE_PACKET.md (1)
66-68: Optional: rephrase repeated sentence starts for smoother flow.
Purely editorial; consider varying the sentence openings..evidence/CLI_V1_TASK_PACKET.md (1)
46-52: Minor wording tweak: “CLI interface” → “CLI”.
“CLI interface” is redundant; “CLI” is sufficient.tooling/tiger-style-cli/src/detect.rs (1)
106-112: Consider deduplicatingstatus_labelwith configure.rs.
There’s anotherstatus_labelin tooling/tiger-style-cli/src/configure.rs; a shared helper would avoid drift.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/cli-ci.yml:
- Around line 13-16: The CI job "test" is disabled by the hard-coded condition
if: ${{ false }}, preventing the workflow from running; remove that line (the
if: ${{ false }}) from the "test" job so the job named test-${{ matrix.os }}
runs normally across OS matrix entries, ensuring the matrix-based tests execute
by default.
🧹 Nitpick comments (1)
.github/workflows/cli-ci.yml (1)
25-28: Both action versions are valid and will not cause CI failures.
actions/checkout@v5(v5.0.1) is current and supported. However,actions/checkout@v6(v6.0.2) is now the latest major version; consider updating if you want to stay on the newest version.
dtolnay/rust-toolchain@stableis the correct and recommended usage for installing the stable Rust toolchain.
Evidence Packet
Objective
tiger-styleCLI for repeatable install/configure/doctor/bootstrap workflow.Risk Tier
2Scope
Red
installbaseline):install_writes_required_treeconfigureautodetect):configure_autodetect_sets_manifest_statusesdoctor+bootstrap):bootstrap_installs_configures_and_passes_doctorcargo test --manifest-path tooling/tiger-style-cli/Cargo.toml --test cli -- install_writes_required_treecargo test --manifest-path tooling/tiger-style-cli/Cargo.toml --test cli -- configure_autodetect_sets_manifest_statusescargo test --manifest-path tooling/tiger-style-cli/Cargo.toml --test cli -- bootstrap_installs_configures_and_passes_doctorinstall command is not implemented yetand exit code2.configure command is not implemented yetand exit code2.doctor checks failedbecause doctor returned unimplemented status.Green
install): embedded install assets, implemented file copy/create/overwrite paths,dry-run behavior, unix script permission setting, and conflict detection with diff previews.
configure): implemented manifest mode handling (autodetect,all-active,all-inactive), language detection with directory exclusions, canonical manifest rendering, andAGENTS template creation/conflict handling.
doctor+bootstrap): implemented structural checks, manifest parsing, activelanguage tool checks, validator checks with strict/non-strict bash handling, machine-readable
JSON output, and bootstrap orchestration with dry-run doctor skip.
cargo test --manifest-path tooling/tiger-style-cli/Cargo.toml --test cli -- install_cargo test --manifest-path tooling/tiger-style-cli/Cargo.toml --test cli -- configure_cargo test --manifest-path tooling/tiger-style-cli/Cargo.toml --test cli -- doctor_cargo test --manifest-path tooling/tiger-style-cli/Cargo.toml --test cli -- bootstrap_4 passed; 0 failed).3 passed; 0 failed).4 passed; 0 failedacross targeted runs).Refactor
install): extracted shared action logging helper to remove duplicated output logic.configure): extracted shared status-label helper to remove duplicated mode renderinglogic.
doctor): replaced repeated per-tool checks with table-driven iteration.cargo test --manifest-path tooling/tiger-style-cli/Cargo.tomlInvariants
3).doctorenforces tool presence only for active languages.AGENTS.mdconflicts without--force.bootstrap --dry-runwrites nothing and skipsdoctor.doctor --strictfails when bash is unavailable.Security Impact
--force; documented behavior required.Performance Impact
tiger-style bootstrap) now performs install+configure+doctor in a single run.Assumptions
Open Questions
Rollback Plan
Validation Commands
cargo fmt --all -- --check cargo clippy --workspace --all-targets --all-features -- -D warnings -D clippy::unwrap_used -D clippy::expect_used -D clippy::undocumented_unsafe_blocks cargo test --workspace --all-features scripts/validate_tdd_cycle.sh --base HEAD~10 scripts/validate_evidence_packet.sh --file .evidence/EVIDENCE_PACKET.mdSummary by CodeRabbit
New Features
Documentation
Chores
Tests