Skip to content

Commit 4550439

Browse files
authored
Merge pull request #67 from JRS1986/feature/cli-ux-pass
CLI UX pass: doctor + pilot + grouped help (v0.5.0)
2 parents 7ba3835 + fa2ec3d commit 4550439

9 files changed

Lines changed: 775 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,43 @@ All notable changes to CodingScaffold are documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project
66
aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.5.0] — 2026-05-18
9+
10+
### Added
11+
12+
- **Top-level help groups commands by user journey.** `coding-scaffold --help` now opens
13+
with four labelled sections — **Start here**, **10-minute pilot**, **Daily workflow**,
14+
and **Advanced / governance** — so a new user can see the smallest useful path before
15+
the full alphabetical command list. The full reference is still printed below as usual;
16+
no commands were removed or renamed and every hidden compatibility alias (`init`,
17+
`wizard`, `setup-tool`, `setup-addon`, `setup-knowledge`, `knowledge-status`,
18+
`context-budget`, `compress-context`, `orchestrate`, `adapt`, `route`, `select-model`)
19+
still parses.
20+
- **`coding-scaffold doctor` becomes the accessibility hub.** New module
21+
`src/coding_scaffold/doctor.py`. The command now accepts `--target` and `--json`,
22+
surveys 14 scaffold-artifact paths (AGENTS.md, CLAUDE.md, PR template,
23+
`.coding-scaffold/` and its sub-directories, eval-config, etc.), recommends 1-3
24+
context-aware next commands (e.g. an empty repo gets `pilot` + `setup run`; a partially
25+
set-up repo gets `pr-template init` or `session init`), and explicitly names the
26+
advanced surfaces (`policy`, `mcp`, `skills`, `memory`, `team`, `permissions write`,
27+
`tools route` / `workflow` / `orchestrate`) under "Ignore for now (advanced)". The
28+
original hardware/provider snapshot still prints below the new structured output for
29+
continuity.
30+
- **`coding-scaffold pilot --target . --tool opencode`.** New module
31+
`src/coding_scaffold/pilot.py`. A safe guided wrapper that runs only read-only local
32+
checks (Python version, `git` on PATH, the chosen tool's binary on PATH, credentials
33+
in env, local-runtime CLIs) and then prints the exact three-step recipe tailored to
34+
your environment. Never installs anything. Never writes files. The printed recipe may
35+
include `--install` flags, but the user makes that call. Supports all six tools
36+
(`opencode`, `claude-code`, `codex`, `openclaude`, `hermes`, `pi`) and `--json` output.
37+
38+
### Documentation
39+
40+
- README adds a "30-Second Start" block at the top with the three commands a new user
41+
needs today (`doctor`, `pilot`, then follow the recipe).
42+
- `docs/wiki/Getting-Started.md` adds a "Smallest Useful Path" section that names the
43+
same three commands and explicitly tells readers what to ignore for now.
44+
845
## [0.4.2] — 2026-05-18
946

1047
### Added
@@ -270,6 +307,7 @@ for the supported entry points.
270307
supported. Windows native (outside WSL) works for documentation generation but not for tool
271308
installation — use WSL for the full flow.
272309

310+
[0.5.0]: https://github.com/JRS1986/CodingScaffold/releases/tag/v0.5.0
273311
[0.4.2]: https://github.com/JRS1986/CodingScaffold/releases/tag/v0.4.2
274312
[0.4.1]: https://github.com/JRS1986/CodingScaffold/releases/tag/v0.4.1
275313
[0.4.0]: https://github.com/JRS1986/CodingScaffold/releases/tag/v0.4.0

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,27 @@
66
Local-first onboarding, configuration, and governance scaffolding for AI-assisted software
77
development teams.
88

9+
## 30-Second Start
10+
11+
You need three commands today. The rest can wait.
12+
13+
```bash
14+
# 1. See what's set up and what's next.
15+
coding-scaffold doctor --target .
16+
17+
# 2. Print the safe 10-minute happy path for this repo.
18+
coding-scaffold pilot --target . --tool opencode
19+
20+
# 3. Follow the printed steps. When done, run `doctor` again.
21+
```
22+
23+
`doctor` is the accessibility hub: it surveys scaffold artifacts, recommends 1-3 commands
24+
tailored to what's already present, and explicitly names the advanced features you can
25+
ignore for now. `pilot` is a safe guided wrapper — it runs only read-only local checks
26+
(Python version, git availability, tool presence on PATH, credentials in env) and prints
27+
the exact commands to run next. Neither command installs anything or writes files; the
28+
recipe they print may include `--install` flags, but you make that call.
29+
930
> Looking for a specific entry point? See the [persona paths](docs/wiki/Team-Rollout.md#persona-paths)
1031
> (beginner / control-and-reproducibility / security review / team lead). For the threat model
1132
> and what the scaffold deliberately does not enforce, read [Security](docs/wiki/Security.md#threat-model).

docs/wiki/Getting-Started.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,40 @@
33
This page walks through the first useful session. The goal is not to configure every advanced
44
backend immediately; the goal is to make one small, inspected, verified change.
55

6+
## Smallest Useful Path
7+
8+
After installing CodingScaffold in your environment, your first three commands are:
9+
10+
```bash
11+
coding-scaffold doctor --target .
12+
coding-scaffold pilot --target . --tool opencode
13+
# follow the printed steps
14+
```
15+
16+
That's it for day one. Everything else on this page is reference material you can come back
17+
to when you actually need it. The other commands (`policy`, `mcp`, `skills`, `memory`,
18+
`team`, `permissions`, `tools route`) are deliberately out of the first-run mental model —
19+
`doctor` lists them under "Ignore for now (advanced)" so you don't have to track them
20+
yourself.
21+
22+
### What `doctor` does
23+
24+
Surveys the scaffold artifacts already present in your project (AGENTS.md, PR template,
25+
`.coding-scaffold/`, etc.), prints which ones exist, and recommends 1-3 next commands
26+
tailored to the state. Read-only — never installs or writes files. Use `--json` for
27+
machine-readable output.
28+
29+
### What `pilot` does
30+
31+
Safe guided wrapper. Runs only read-only local checks (Python version, `git` on PATH, the
32+
chosen coding tool's binary on PATH, whether `OPENAI_API_KEY` / `ANTHROPIC_API_KEY` /
33+
`GITHUB_TOKEN` are set, whether Ollama / LM Studio / llama-server are installed) and then
34+
prints the exact 10-minute path tailored to your environment. The recipe may include
35+
`--install` flags, but `pilot` itself never installs anything — you make that call.
36+
37+
Both commands accept `--target` (defaults to `cwd`) and `--json`. Run `coding-scaffold
38+
doctor --help` or `pilot --help` for the full surface.
39+
640
## What Needs A Model?
741

842
The scaffold bootstrap does not need one. `coding-scaffold setup run`, `probe`, `credentials`,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "coding-scaffold"
7-
version = "0.4.2"
7+
version = "0.5.0"
88
description = "Local-first coding agent scaffold with hardware probing, provider discovery, and routing config generation."
99
readme = "README.md"
1010
requires-python = ">=3.11"

src/coding_scaffold/cli.py

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
review_memory,
4141
write_memory_config,
4242
)
43+
from .doctor import format_doctor_text, run_doctor
44+
from .pilot import SUPPORTED_TOOLS as PILOT_SUPPORTED_TOOLS, format_pilot_text, run_pilot
4345
from .pr_template import write_pr_template
4446
from .session import (
4547
SessionStatusResult,
@@ -82,10 +84,38 @@
8284
KNOWLEDGE_BACKENDS_WITH_NONE = ["none", *KNOWLEDGE_BACKENDS]
8385

8486

87+
TOP_LEVEL_DESCRIPTION = """\
88+
Local-first scaffold for AI-assisted coding teams. Generates reviewable
89+
project-local guidance for hardware, providers, model selection, tool adapters,
90+
skills, knowledge, policy, and sessions.
91+
92+
START HERE
93+
coding-scaffold doctor see what's set up + what's next
94+
coding-scaffold pilot --target . --tool opencode print the 10-minute happy path
95+
coding-scaffold setup run --mode beginner guided full setup
96+
97+
10-MINUTE PILOT (printed by `pilot` above; or run by hand)
98+
coding-scaffold setup run --target . --tool opencode --mode beginner
99+
coding-scaffold pr-template init --target .
100+
opencode # inside the agent: /first-session, then /agentic-change
101+
102+
DAILY WORKFLOW
103+
coding-scaffold session init --task "..." reversible session trace
104+
coding-scaffold context lint --target . check agent-context files
105+
coding-scaffold eval run --target . readiness benchmark
106+
107+
ADVANCED / GOVERNANCE (safe to ignore until your team needs them)
108+
policy, mcp, skills, memory, team, permissions, tools, knowledge distill
109+
110+
The full command list is below. Every command supports --help.
111+
"""
112+
113+
85114
def build_parser() -> argparse.ArgumentParser:
86115
parser = argparse.ArgumentParser(
87116
prog="coding-scaffold",
88-
description="Prepare a local-first AI coding scaffold for a project.",
117+
description=TOP_LEVEL_DESCRIPTION,
118+
formatter_class=argparse.RawDescriptionHelpFormatter,
89119
)
90120
sub = parser.add_subparsers(dest="command", required=True, metavar="command")
91121

@@ -634,7 +664,25 @@ def build_parser() -> argparse.ArgumentParser:
634664
update.add_argument("--target", type=Path, default=Path.cwd(), help="Project directory.")
635665
update.add_argument("--json", action="store_true", help="Print machine-readable JSON.")
636666

637-
sub.add_parser("doctor", help="Print setup recommendations.")
667+
doctor = sub.add_parser(
668+
"doctor",
669+
help="Survey scaffold artifacts and recommend the next 1-3 commands.",
670+
)
671+
doctor.add_argument("--target", type=Path, default=Path.cwd(), help="Project directory.")
672+
doctor.add_argument("--json", action="store_true", help="Print machine-readable JSON.")
673+
674+
pilot = sub.add_parser(
675+
"pilot",
676+
help="Print the safe 10-minute happy path tailored to this project.",
677+
)
678+
pilot.add_argument("--target", type=Path, default=Path.cwd(), help="Project directory.")
679+
pilot.add_argument(
680+
"--tool",
681+
choices=list(PILOT_SUPPORTED_TOOLS),
682+
default="opencode",
683+
help="Coding tool to weave into the recipe (default: opencode).",
684+
)
685+
pilot.add_argument("--json", action="store_true", help="Print machine-readable JSON.")
638686
_hide_suppressed_subcommands(sub)
639687
return parser
640688

@@ -880,7 +928,26 @@ def main(argv: list[str] | None = None) -> int:
880928
return 0
881929

882930
if args.command == "doctor":
883-
_print_doctor()
931+
target = getattr(args, "target", None) or Path.cwd()
932+
report = run_doctor(target)
933+
if getattr(args, "json", False):
934+
print(json.dumps(report.to_dict(), indent=2, sort_keys=True))
935+
else:
936+
print(format_doctor_text(report))
937+
# Keep the original system snapshot at the end for continuity.
938+
_print_doctor()
939+
return 0
940+
941+
if args.command == "pilot":
942+
try:
943+
report = run_pilot(args.target, tool=args.tool)
944+
except ValueError as exc:
945+
print(f"Error: {exc}", file=sys.stderr)
946+
return 1
947+
if args.json:
948+
print(json.dumps(report.to_dict(), indent=2, sort_keys=True))
949+
else:
950+
print(format_pilot_text(report))
884951
return 0
885952

886953
if args.command == "credentials":

0 commit comments

Comments
 (0)