You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Status: needs technical refinement. This is a design sketch focused on the UX. Acceptance criteria are provisional and the open questions at the bottom must be settled before implementation.
Problem
--dry-run exists, but it does not give the user a true picture of what will happen. It classifies existing files as skip correctly when --force is absent, but with --force every path — including files it would destructively overwrite — prints a plain write. There is no distinction between creating a new file and overwriting one the user already has, and no summary of the net effect.
Observed today (init --dry-run --force --agents-only go-cli into a dir whose .agent/AGENTS.md already contains the user's own notes):
write .agent/AGENTS.md (dry-run) <- silently destroys existing user content; looks identical to a new file
write README.agent.md (dry-run) <- same
So the one moment a preview matters most — "am I about to overwrite something I care about?" — is exactly where today's output is silent. The user can't tell a safe run from a destructive one at a glance, and there's no tally to confirm the net result.
Goal
Turn the preview into a real plan: evaluated against the target directory's actual contents, classify every action and summarize it, so the user knows precisely what will change before committing. Keep it seamless — same flag, richer truth. No new dependencies (raw output, consistent with #58).
Proposed UX (illustrative — exact wording is a refinement item)
agent-init: plan for go-cli in ./myapp (--agents-only, --force)
create .agent/CODEBASE.md
create .devcontainer/Dockerfile
overwrite .agent/AGENTS.md (existing file will be replaced) <- highlighted (red/bold)
skip README.agent.md (exists; use --force to overwrite) (only when --force absent)
link AGENTS.md -> .agent/AGENTS.md
git would initialize a git repo (omit with --no-git)
Plan: 12 create, 1 overwrite, 0 skip, 3 link. Run without --dry-run to apply.
Key changes vs today:
create vs overwrite vs skip distinction, computed against the real target state. overwrite (destructive, only possible under --force) is visually prominent.
Problem
--dry-runexists, but it does not give the user a true picture of what will happen. It classifies existing files asskipcorrectly when--forceis absent, but with--forceevery path — including files it would destructively overwrite — prints a plainwrite. There is no distinction between creating a new file and overwriting one the user already has, and no summary of the net effect.Observed today (
init --dry-run --force --agents-only go-cliinto a dir whose.agent/AGENTS.mdalready contains the user's own notes):So the one moment a preview matters most — "am I about to overwrite something I care about?" — is exactly where today's output is silent. The user can't tell a safe run from a destructive one at a glance, and there's no tally to confirm the net result.
Goal
Turn the preview into a real plan: evaluated against the target directory's actual contents, classify every action and summarize it, so the user knows precisely what will change before committing. Keep it seamless — same flag, richer truth. No new dependencies (raw output, consistent with #58).
Proposed UX (illustrative — exact wording is a refinement item)
Key changes vs today:
createvsoverwritevsskipdistinction, computed against the real target state.overwrite(destructive, only possible under--force) is visually prominent.--agents-onlyand the visibility modes.Provisional acceptance criteria (pending refinement)
create/overwrite/skipbased on the target's actual contents, not a blanketwrite.overwriteactions (only reachable with--force) are visually distinct and clearly flagged as destructive.--no-git).--agents-onlyand the visibility modes once those exist.Open questions (need technical refinement)
--dry-run, or add--planas a clearer alias / discoverable verb? (agent-init plan ...?).gitignore/.git/info/exclude/ global excludes) in the plan once feat(cli): support local visibility — ignore the agent-init scaffold in the committed .gitignore #51/feat(cli): support global-default visibility — ignore the agent-init scaffold in all repos via core.excludesfile #52/feat(cli): support hidden visibility — fully hide the scaffold in one repo via .git/info/exclude (no committed trace) #53 land.overwrite, is a one-line note enough, or should the plan offer a diff of what changes? (Likely out of scope / bloat — confirm.)Related
--dry-runshould preview removals too).