Skip to content

Add quest init and uninstall - #22

Merged
kixelated merged 4 commits into
kixelated:mainfrom
t0ms:quest/m0/init
Sep 30, 2026
Merged

kixelated merged 4 commits into
kixelated:mainfrom
t0ms:quest/m0/init

Conversation

@t0ms

@t0ms t0ms commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add quest init: writes a stub per shipped skill (skills::all()) into .claude/skills/, links .agents/skills to it (or the reverse when .agents/skills is the real directory), seeds quest/README.md when missing, adds /.scratch/ to .gitignore, and appends one reference line to AGENTS.md (or CLAUDE.md when that is the only one present).
  • Add quest uninstall: removes byte-identical stubs, the link it made, empty skill directories, the reference line, and the ignore entry. It never touches the quest tree.
  • Both commands are idempotent and print the paths they changed, relative to --root.
  • Replace the manual setup and removal steps in docs/getting-started.md; complete and delete quest/m0/init.md.

Takeover changes

  • Simplified src/setup.rs: one layout decision instead of two duplicated matches, and shared line helpers for .gitignore and the instructions file.
  • Fixed uninstall failing when .claude/skills links to a real .agents/skills (it called remove_dir on the symlink).
  • A round trip now restores user files exactly, dropping the blank line that used to be left behind.
  • Merged main (Add quest-export skill #23 export skill, feat(release): publish release binaries with cargo-dist #24 release binaries): removal docs now run /quest-export and then quest uninstall, and the setup guide has no remaining requirements.

Decisions

Decision Choice
Reference line When work mentions a quest, run \quest guide` and follow it.`
Both AGENTS.md and CLAUDE.md Append to AGENTS.md only; uninstall strips it from both
Both skill dirs are real directories Refuse with an error
Existing same-named skill that isn't a stub Refuse with an error

Validation

  • just check and just test in the Nix shell; CI passes on Ubuntu and macOS.
  • Integration tests in tests/init.rs cover idempotency, refusals, AGENTS vs CLAUDE, and exact round trips for both skill layouts.

Limitations

  • Stubs embed each skill's description, so a release that changes a description makes old stubs stop matching. After that, init refuses them and uninstall leaves them in place.

(written by Claude Opus 5.5)

🤖 Generated with Claude Code

Automate skill stub installation, quest root seeding, scratch gitignore,
and agent reference lines with idempotent init/uninstall commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@t0ms

t0ms commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Outcome (paper trail)

Implemented quest init / quest uninstall per the quest plan. Stub enumeration uses skills::all() so future skills (e.g. export) require no init code changes.

Decisions locked in this PR

  • Reference line: When work mentions a quest, run \quest guide` and follow it.`
  • Init appends to AGENTS.md when it exists; otherwise CLAUDE.md; otherwise creates AGENTS.md.
  • Uninstall removes that exact line from both AGENTS.md and CLAUDE.md if present.
  • Conflicting real .claude/skills and .agents/skills directories → init error.
  • Fresh repos: stubs under .claude/skills, symlink .agents/skills → ../.claude/skills.

Suggested follow-ups

  1. Setup guide (quest/m0/setup.md) — wire the README one-liner to quest init; do after release binaries.
  2. Release proof CI — scripted lifecycle test in CI; do when binaries and export skill land.
  3. README CLI examples — optional init/uninstall in the Try it section for discoverability.

Verification: just fix, just check, just test passed on host tooling (no Nix shell).

(written by Claude Opus 5.5)

@t0ms
t0ms marked this pull request as ready for review September 29, 2026 12:54
@t0ms

t0ms commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

The CI runs for this fork PR are waiting on maintainer approval ("action required"). Could a maintainer approve the workflow runs so Check can run? The PR can't be merged or put on auto-merge from the fork.

(written by Claude Opus 5.5)

kixelated and others added 3 commits September 29, 2026 17:28
Share one layout decision and line helpers between init and uninstall,
report paths relative to the root, and remove empty skill directories.
Uninstall no longer fails when .claude/skills links to a real
.agents/skills, and a round trip restores user files exactly.
Docs no longer point at the unimplemented export skill.

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

Copy link
Copy Markdown
Owner

Merge summary

Thanks @t0ms. I took this over and am merging it.

Changes on top of the original

  • Simplified src/setup.rs: one layout decision shared by init and uninstall, plus shared line helpers.
  • Fixed uninstall failing when .claude/skills links to a real .agents/skills, with a regression test.
  • A round trip now restores user files exactly and removes empty skill directories and the link.
  • Merged main (Add quest-export skill #23 export skill, feat(release): publish release binaries with cargo-dist #24 release binaries). Removal docs now run /quest-export and then quest uninstall, and quest/m0/setup.md has no remaining requirements.

Decisions

  • Kept the reference line, the AGENTS.md-first targeting, and refusing on two real skill directories or a non-stub skill.
  • The maintainer accepted the takeover review as this PR's review.

Follow-up

  • Stubs embed skill descriptions, so a release that changes one makes old stubs stop matching. This will be scoped with /quest-plan after merge.

(written by Claude Opus 5.5)

@kixelated
kixelated merged commit 1992ecb into kixelated:main Sep 30, 2026
7 checks passed
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.

2 participants