Repository navigation
docs(skill): build the semantic index at /slice-codebase time so locate is discoverable - #18
Conversation
…te is discoverable
The embedding index only ever bootstrapped reactively: an agent had to reach
for `slice locate`, hit the exit-1 "no code semantic index" hint, and build it
— or a human had to run it by hand. /slice-codebase only ever *rebuilt* an
existing index ("if SEMANTIC*.json exists"), never created the first one, so a
freshly sliced repo had no index and natural-language discovery silently did
nothing useful.
Make the index a setup-time artifact tied to the same trigger that creates the
slices:
- SKILL.md Phase 3: drop the index note buried in the Validate step; add an
explicit final "Build the semantic index" step that builds on initial
generation (and rebuilds after a re-slice), gated on the semantic feature +
OPENROUTER_API_KEY, else tell the user.
- setup.md §2/§6: note the skill builds the index as its final step; the manual
build is the "any time slices change" path.
The reactive exit-1 hint stays as the safety net it already is.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@greptile review |
Greptile SummaryThis docs-only PR promotes the semantic index build from a buried validate-step note into an explicit, first-class Phase 3 step 4 in the
Confidence Score: 5/5Docs-only change with no binary modifications; safe to merge. Both changed files are documentation and skill instructions with no executable code. The cross-reference fix, the new explicit semantic-index step, and the dual-gate alignment in Diff Slice Update are all internally consistent and match the actual CLI behaviour described in docs/setup.md §1. skills/slice-codebase/SKILL.md — the ## Output section (lines 190-193) still does not include a bullet for semantic-index built/skipped status, which was raised in a prior review and left unresolved by this PR. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["slice-codebase skill triggered"] --> B{"slices/ present and INDEX.md?"}
B -- No --> C[Full Slice Generation]
B -- "exit 0" --> Z[Report: slices up to date]
B -- "exit 1" --> D[Diff Slice Update]
C --> C1[Phase 1: Scout agent]
C1 --> C2[Phase 2: Refine agents in parallel]
C2 --> C3["slice check --require-verification"]
C3 -- Pass --> C4["slice sync-index"]
C3 -- Fail --> C3fix[Fix slice files, re-run]
C3fix --> C3
C4 --> C5{"semantic feature + OPENROUTER_API_KEY?"}
C5 -- Both present --> C6["slice semantic-index --units code"]
C5 -- Either missing --> C7[Tell user: index not built]
C6 --> OUT[Output report]
C7 --> OUT
D --> D1["git diff since last-updated-sha"]
D1 --> D2[Scout: identify affected slices]
D2 --> D3["Update slices + slice sync-index"]
D3 --> D4["slice check"]
D4 --> D5{"SEMANTIC*.json exists?"}
D5 -- No --> OUT
D5 -- Yes --> D6{"semantic feature + OPENROUTER_API_KEY?"}
D6 -- Both present --> D7["slice semantic-index --units code"]
D6 -- Either missing --> D8[Tell user: index stale]
D7 --> OUT
D8 --> OUT
Reviews (5): Last reviewed commit: "docs(skill): address review — align diff..." | Re-trigger Greptile |
There was a problem hiding this comment.
Pull request overview
Updates the documentation around /slice-codebase so the semantic embedding index is treated as a setup-time artifact (when available), making slice locate / slice find --semantic discoverable and usable immediately in freshly-sliced repos.
Changes:
- Moves semantic-index guidance out of the Phase 3 “Validate” step and adds an explicit final “Build the semantic index” step to
/slice-codebase’s SKILL.md instructions. - Updates
docs/setup.mdto note the skill builds the index as its final step (whensemantic+OPENROUTER_API_KEYare present) and clarifies the manual rebuild path when slices change.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| skills/slice-codebase/SKILL.md | Adds an explicit Phase 3 step to build the semantic index so semantic discovery works immediately. |
| docs/setup.md | Documents the skill’s semantic-index build behavior and the manual (re)build workflow. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis docs-only PR promotes the semantic index build from a reactive, buried note in the Validate step to an explicit final step (Step 4) in Phase 3 of Full Slice Generation, ensuring
Confidence Score: 4/5Documentation-only change with no binary modifications; safe to merge after addressing the two minor inconsistencies flagged. The core change is well-scoped: the new Step 4 in Full Slice Generation correctly gates on both the binary feature and the API key, and the fallback message is clear. The two issues found are a stale The Diff Slice Update section in Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Phase 3 — Validate and Index] --> B[Step 1: slice check --require-verification]
B --> C{Pass?}
C -- No --> D[Fix offending slice files, re-run]
D --> B
C -- Yes --> E[Step 2: Self-review each card\ndependency direction, section grammar]
E --> F[Step 3: slice sync-index\ngenerate slices/INDEX.md]
F --> G{semantic feature\n+ OPENROUTER_API_KEY?}
G -- Yes --> H[Step 4: slice semantic-index --units code\nbuild embedding index]
H --> I[slice locate / find --semantic\nwork immediately]
G -- No --> J[Skip index build\nTell user to run command once available]
J --> K[Done]
I --> K
|
…wording
- SKILL.md Diff Slice Update (step 5): gate the index rebuild on OPENROUTER_API_KEY
too, matching the new full-generation step 4 — a keyless semantic binary now gets
the clean "needs a rebuild" message instead of an API error.
- SKILL.md step 4: quote the full exit-1 hint (`slice semantic-index --units code`)
to match the actual CLI message.
- setup.md: correct stale `(see §7)` → `§6`; add missing relative pronoun
("index that `slice locate` queries").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@greptile review |
1 similar comment
|
@greptile review |
Why
The embedding index only ever bootstrapped reactively: an agent had to reach for
slice locate, hit the exit-1no code semantic indexhint, and build it — or a human ran it by hand./slice-codebaseonly ever rebuilt an existing index (if SEMANTIC*.json exists), never created the first one. So a freshly sliced repo had no index and natural-language discovery silently did nothing.What
Make the index a setup-time artifact tied to the same trigger that creates the slices:
SKILL.mdPhase 3 — drop the index note buried in the Validate step; add an explicit final "Build the semantic index" step that builds on initial generation (and rebuilds after a re-slice), gated on thesemanticfeature +OPENROUTER_API_KEY, else tell the user.docs/setup.md§2/§6 — note the skill builds the index as its final step; the manual build is the "any time slices change" path.The reactive exit-1 hint stays as the safety net it already is.
Docs/skill only — no binary changes.
🤖 Generated with Claude Code