[#313] refactor: progressive disclosure for implement/review/bootstrap (task T5)#331
Open
rucka wants to merge 1 commit into
Open
[#313] refactor: progressive disclosure for implement/review/bootstrap (task T5)#331rucka wants to merge 1 commit into
rucka wants to merge 1 commit into
Conversation
…p (task T5) Fix pair-cli multi-file skill install: same-directory sibling links inside a flatten+prefix'd skill dir were mis-rewritten to a stale dataset-relative path (link-rewriter.ts) — a real, contained CLI gap found via fixture test, fixed in-story per the story's edge-case rule. Disclose bulky reference material from the 3 orchestrator SKILL.md files into sibling files behind sharp context pointers: - implement: Phase 4 (Post-Review Merge) -> post-review-merge.md - review: Step 3.2 degradation levels -> degradation-levels.md; Phase 6 (Merge & Close) -> merge-and-cascade.md - bootstrap: Step 2.2 assess-* sequence/section-ownership -> assess-orchestration.md Dataset + .claude mirror updated in the same commit for all 7 touched/new files, byte-consistent under the flatten+prefix transform. Refs: #313 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
18 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What Changed
Task T5 of story #313 (own PR — each
#313task ships on its own branch/PR per the story's established pattern: T1/T2/T3/T4/T7/T8). Applies progressive disclosure to the 3 orchestrators (implement423,review391,bootstrap314 lines): SKILL.md keeps steps + HALT + core rules on top; bulky branch-gated reference material moves into named sibling files behind sharply-worded context pointers.Why This Change
AC5 of #313: the 3 orchestrators kept HALT conditions ~380 lines away from the phases they govern, with zero progressive disclosure across the corpus. Pushing reference-only material that a minority of runs ever reach (a specific degradation level, a re-invocation-only merge phase, an installed-optional-skill orchestration detail) into sibling files keeps the top of each SKILL.md — the part every run needs — readable.
Story Context
Story: #313 — Skill corpus effectiveness. Task: T5 (checklist item in the story body).
Acceptance Criteria: AC5 (SKILL.md leads with steps/HALT/core rules; bulky reference disclosed behind sharp pointers; install pipeline ships multi-file skill dirs or the CLI gap is fixed in-story).
Prerequisite check (gates the whole approach)
Verified whether pair-cli's install/mirror pipeline (flatten + prefix,
packages/content-ops) ships a multi-file skill dir correctly, per the story's Edge Case rule.Result: mostly worked, one real gap found and fixed (CLI extended in-story — small/contained, per the rule).
SKILL.md+ sibling.mdfiles) and ran it through the real pipeline (copyPathOpswithflatten+prefix, and the fullhandleInstallCommandpath with a deepnode_modules-style dataset root, mirroring production).collectFilesincopy-directory-transforms.tsalready recurses the whole skill directory (not justSKILL.md) and copies every sibling file to the transformed target dir — multi-file skill dirs ship.SKILL.md→./edge-cases.md) were rewritten to a stale dataset-relative path (../../.skills/process/implement/edge-cases.md) instead of staying./edge-cases.md. Root cause:link-rewriter.ts'sreRootTarget(built for links escaping the skill dir into the wider KB, e.g..pair/adoption/...) was also being applied to links resolving inside the very directory this copy operation is moving — the two link-rewriting concerns weren't distinguished.rebaseWithinMovedDir— same-directory links now rebase 1:1 onto the new directory (priority over the coarser dataset-root re-root), which escaping links still use unchanged. ~25 lines,packages/content-ops/src/ops/link-rewriter.ts.packages/content-ops/src/ops/copy/copy-directory-transforms.test.ts("multi-file skill directories" describe block) andapps/pair-cli/src/commands/install/handler.test.ts("Skill corpus effectiveness: trigger descriptions, shared references, progressive disclosure, sharpened criteria, router fixes, authoring standard + eval #313 T5 prerequisite" describe block, full production-shaped pipeline).What was disclosed, per orchestrator
implementpost-review-merge.mdreviewdegradation-levels.mdreviewmerge-and-cascade.mdbootstrapassess-*skill is installedassess-orchestration.mdEach disclosed block is replaced in SKILL.md with a sharp context pointer naming exactly what's there and when it applies (e.g. "see
degradation-levels.mdfor the exact steps of each of the 4 levels"), per the authoring standard's principle 2. HALT conditions stay co-located in SKILL.md's main HALT list even where the detailed steps moved (e.g. implement's "PR not approved (Step 4.1)").Verification (AC5 bar)
Install dry-run with fixture: see Prerequisite check above — confirmed failing pre-fix, passing post-fix, now a permanent regression test in both
content-opsandpair-cli.Orchestrator dry-run reaches disclosed material (installed mirror only, one scenario per orchestrator):
implement— scenario: developer re-invokes/pair-process-implementafter PR approval. MirrorSKILL.mdPhase 4 reads "...re-invoke/pair-process-implementto merge and close — see post-review-merge.md for the verify-approval, merge-commit, merge, and parent-cascade steps...";post-review-merge.mdcontains Steps 4.1–4.4 and the merge completion output. Pointer resolves, material found.review— scenario: Level 3 degradation (only/pair-capability-assess-stackinstalled). MirrorSKILL.mdStep 3.2 reads "Run the procedure for the level determined in Step 3.1 — see degradation-levels.md...";degradation-levels.mdcontains the Level 3 procedure. Pointer resolves, material found.review(second scenario, Phase 6) — reviewer selects "Merge now" in Step 5.4. MirrorSKILL.mdPhase 6 reads "...see merge-and-cascade.md for the merge-strategy, merge-commit, merge, parent-cascade, branch-cleanup, and post-merge-manual-test steps..."; sibling contains Steps 6.1–6.6. Pointer resolves, material found.bootstrap— scenario: at least oneassess-*skill installed. MirrorSKILL.mdStep 2.2 reads "...see assess-orchestration.md for the sequence, each skill's owned adoption-file section, and the parallel-safety/partial-installation rules"; sibling contains the 8-item sequence and the 9-row section-ownership table. Pointer resolves, material found.Mirror discipline
Dataset (
packages/knowledge-hub/dataset/.skills/process/{implement,review,bootstrap}/) and.claude/skills/pair-process-{implement,review,bootstrap}/updated in the same commit for all 7 touched/new files (3 editedSKILL.md+ 4 new sibling files), byte-consistent under the existing flatten+prefix name-rewrite transform (/verify-quality→/pair-capability-verify-quality, etc.) — verified by regenerating the 3 skill dirs through the real (now-fixed) install pipeline and diffing against the committed mirrors; the only differences are the established slash-rewrite pattern plus this task's own edits. One regex boundary quirk in the automated pipeline (/record-decision(immediately followed by(isn't matched by the boundary-aware rewrite regex — a pre-existing, narrow limitation, not part of this fix) was corrected by hand in the 2 new sibling files that contain that exact substring, matching the pattern already established in the pre-existing mirrors.Testing
Files Changed
process/{implement,review,bootstrap}/SKILL.md(dataset +.claude/skillsmirror) — disclosed sections replaced with context pointers.post-review-merge.md(implement),degradation-levels.md+merge-and-cascade.md(review),assess-orchestration.md(bootstrap) — dataset + mirror.packages/content-ops/src/ops/link-rewriter.ts— same-directory sibling link rebase (the CLI gap from the prerequisite check).packages/content-ops/src/ops/copy/copy-directory-transforms.test.ts,apps/pair-cli/src/commands/install/handler.test.ts— permanent multi-file-skill fixture regression tests.Refs: #313
🤖 Generated with Claude Code