feat(#188): /handover clone-first deep-dive prompt#192
Conversation
- Add Step 8 to /handover SKILL.md: after registry append, offer (default-no) to clone the project into workspace/<name>/ for the LSP-aware deep-dive path used by /code-review, /threat-model, /security-review. - Prompt explicitly surfaces ENABLE_LSP_TOOL=1, the per-language plugin install (adopter's problem, not bundled), disk cost, workspace/*/ gitignored status, cross-project grep caveat, and cold-start cost on large monorepos. Cost is owned, not assumed. - y triggers git clone <repo-url> workspace/<name>; skip-if-exists; on success offer /threat-model as the natural next skill. - n / later / unrecognised input all skip silently, no side effects. - Update Rule #7 to reflect the explicit-opt-in clone path. - Add test_handover_clone_prompt.sh — 13 spec-shape assertions on SKILL.md content (location, prompt text, cost-transparency facts) + 5 runtime-shape cases against a mocked git binary (n/later/y/ pre-existing workspace/unknown input). - Doc note in docs/multi-project.md (single-fork seed step + skill behaviour table row). Closes #188 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
atlas-apex
left a comment
There was a problem hiding this comment.
Code Review: PR #192
Commit: 84b08a9171aedbc525d95e1b0e45a349780380b8
Summary
Adds a clone-first deep-dive prompt to /handover (Step 8) that offers — default-no — to clone the project into workspace/<name>/ for LSP-aware follow-up skills (/code-review, /threat-model, /security-review). Three-branch operator response (y / n / later), with n / later / unrecognised all skipping silently. Skip-if-exists guard wraps the clone. Cost-transparency block surfaces all five required facts. Step ordering renumbered cleanly (old 8 → 9, old 9 → 10, no off-by-one). Companion 18-case test (13 spec-shape + 5 runtime-shape with mocked git) plus a doc note in docs/multi-project.md.
Checklist Results
- Architecture & Design: Pass — purely additive change to a markdown skill spec, no domain/infra layering involved
- Code Quality: Pass — bash test is well-commented, isolates state in
mktemp -d, mocksgitcleanly, separates spec-shape from runtime-shape concerns - Testing: Pass — all 18 cases green locally; full hook test sweep (16 suites) green with no regressions
- Security: Pass — no secrets, no shell-injection vectors in the test,
git cloneargv shape verified against the spec, mocked binary never reaches network - Performance: N/A — markdown spec + test
- PR Description & Glossary: Pass — Summary, Testing, and a particularly thorough Glossary (LSP, ENABLE_LSP_TOOL, deep-dive skills, workspace//, default-no prompt, skip-if-exists, spec-shape vs runtime-shape tests)
- Technical Decisions (AgDR): N/A for this PR — implements the recommendation from the LSP spike (issue #188 references the existing AgDR chain). No new technical decisions introduced; the prompt shape, default-no behaviour, and the spec-shape vs runtime-shape test split are all carry-forwards from the spike's Option 3.
Verification Performed
- Step ordering — confirmed
### 7(registry) →### 8(clone offer, new) →### 9(validation, renumbered) →### 10(summary, renumbered). No duplicates, no skipped numbers. - All 5 cost-transparency facts present in the prompt block:
ENABLE_LSP_TOOL=1, "plugin install is your problem", gitignored + ~tens of MB disk, "Cross-project semantic queries still need grep", "Cold-start on large monorepos can be 30+ seconds". - Three-branch response —
yclones with exactlygit clone <repo-url> workspace/<name>(runtime-accept-y test asserts argv match);nandlaterskip silently with nogitinvocation (both runtime tests green); unknown input treated asn. - Skip-if-exists guard —
[ -d "workspace/<name>" ]check wraps the clone; runtime-skip-if-exists test verifies nogitinvocation when the directory pre-exists. - Test suite —
bash .claude/hooks/tests/test_handover_clone_prompt.sh→Total: 18 passed, 0 failed. Full sweep across 16 hook test suites: all PASS, no regressions. - Private-name scan — no private project references in any of the three touched files; only generic placeholders (
example-app,marketing-site,some-org) and the framework's own slug (me2resh/apexyard) appear. - CI — all 4 checks green (Verify Ticket ID, lychee, markdownlint-cli2, shellcheck .claude/hooks).
- PR body has Summary / Testing / Glossary, with the Glossary defining 8 terms.
Issues Found
None.
Suggestions (non-blocking)
- The runtime simulator faithfully translates the spec but lives only inside the test file. If the spec's branching logic ever drifts (someone edits SKILL.md without updating the simulator), the runtime tests stay green against a stale simulator. The spec-shape tests catch most of this (they assert literal substrings in SKILL.md), but a future hardening would be a single source-of-truth bash snippet referenced from both the spec and the test. Not worth blocking on — the current split is documented as deliberate in the test header.
- Tiny: the
[y / n / later]brackets render as a markdown link target in some renderers. The fenced code block prevents that here, but worth keeping in mind if this prompt shape gets lifted into prose elsewhere.
Verdict
APPROVED (posted as comment — author cannot self-approve via gh API)
Reviewed by Rex (Code Reviewer Agent)
Reviewed commit: 84b08a9171aedbc525d95e1b0e45a349780380b8
- Add Step 8 to /handover SKILL.md: after registry append, offer (default-no) to clone the project into workspace/<name>/ for the LSP-aware deep-dive path used by /code-review, /threat-model, /security-review. - Prompt explicitly surfaces ENABLE_LSP_TOOL=1, the per-language plugin install (adopter's problem, not bundled), disk cost, workspace/*/ gitignored status, cross-project grep caveat, and cold-start cost on large monorepos. Cost is owned, not assumed. - y triggers git clone <repo-url> workspace/<name>; skip-if-exists; on success offer /threat-model as the natural next skill. - n / later / unrecognised input all skip silently, no side effects. - Update Rule #7 to reflect the explicit-opt-in clone path. - Add test_handover_clone_prompt.sh — 13 spec-shape assertions on SKILL.md content (location, prompt text, cost-transparency facts) + 5 runtime-shape cases against a mocked git binary (n/later/y/ pre-existing workspace/unknown input). - Doc note in docs/multi-project.md (single-fork seed step + skill behaviour table row). Closes #188 Co-authored-by: me2resh <ahmed.abdelaliem@gmail.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
/handover(between registry-append and validation) that offers (default-no) to clone the project intoworkspace/<name>/for the LSP-aware deep-dive path used by/code-review,/threat-model, and/security-review.ENABLE_LSP_TOOL=1, per-language plugin install (the adopter's problem — not bundled), disk cost (~tens of MB), gitignored status (workspace/*/), cross-project queries still need grep, and 30+s cold-start on large monorepos.yrunsgit clone <repo-url> workspace/<name>, skips if the workspace already exists, and offers/threat-modelas the natural next step.n/later/ unrecognised input all skip silently with no side effects.docs/multi-project.mdcovering both the seed-per-project step and the skill-behaviour table row.Implements #188 (LSP spike Phase 3 recommendation, Option 3 — interactive clone-first prompt).
Testing
bash .claude/hooks/tests/test_handover_clone_prompt.sh— 18 cases pass:SKILL.md(heading at the right step number, the five cost-transparency facts, three-option[y / n / later]shape, follow-up/threat-modelsuggestion, skip-if-exists branch, decline-silent semantics).gitbinary:n-> no invocation,later-> no invocation,y-> exactly onegit clone <url> workspace/<name>,ywith pre-existing workspace -> no invocation, unknown input -> no invocation.for t in .claude/hooks/tests/test_*.sh; do bash "$t"; done— full hook test sweep, all 16 suites pass with no regressions./handoverskill invocation against a public sample repo with the three operator paths (y,n,later) is the AC's smoke test and runs at adoption time — covered by the deterministic simulator in (1) for CI.Glossary
ENABLE_LSP_TOOL=1/code-review,/threat-model,/security-review— skills that benefit from LSP-aware navigation because they need to follow definitions and call sites across files.workspace/<name>/workspace/*/).yexplicitly to proceed; any other input (including silence / Enter /n/later/ unrecognised) is treated as decline. The opposite shape from a default-yes prompt.workspace/<name>/already contains a clone, the skill prints a confirmation and continues without re-cloning, avoiding a destructive overwrite.Closes #188