feat(executing-a-branch-plan): add code-quality-principles reference - #1458
Merged
Conversation
Task-list-shaped plan for the code-quality-principles reference addition, per executing-a-branch-plan's own Decision 16 step ordering (task-list commit first, then push, before the draft PR opens). Refs #1388
Add a 7-principle code-design reference (Type System Discipline, Boundary Discipline, Make Operations Idempotent, Migrate Callers Then Delete Legacy APIs, Model the Domain, Separate Before Serializing Shared State, Foundational Thinking), gitapex-filtered against CLAUDE.md sections 1-5 and sibling-skill coverage so nothing here duplicates existing guidance. Wire Step 6 to apply all 7 when writing a task's own implementation code, and Step 8's refactor/simplify pass to specifically re-check the one cross-task principle (Migrate Callers Then Delete Legacy APIs) across the full accumulated diff. Refs #1388
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1458 +/- ##
=======================================
Coverage 99.57% 99.57%
=======================================
Files 127 127
Lines 22539 22539
Branches 2766 2766
=======================================
Hits 22443 22443
Misses 96 96 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ality-principles.md Two independent fresh-subagent reviews (refactor/simplify + adversarial, per this skill's own mandatory Step 8) found real defects, each verified against primary sources before fixing: - Principles 5 (Model the Domain) and 7 (Foundational Thinking) were misrendered against cursor/plugins/pstack's actual definitions (independently confirmed via web search of the primary source) -- rewritten to match: scattered-conditionals-into-one-structure for 5, data-shape-and-infrastructure-before-logic for 7. The prior wording also duplicated Principle 1 and landed on pstack's already-excluded Laziness Protocol / Subtract Before You Add ground. - The preamble's "14 excluded candidates" claim didn't add up (issue names 13; 7+13=20, not 21) and misattributed the dedup check to the excluded set rather than all 21 -- corrected, naming the missing 14th (Fix Root Causes) and its own exclusion ground. - Step 8's new sentence assigned the caller-migration re-check to the refactor/simplify pass, which this skill's own refactor-and-review-gate reference bars from behavior-affecting findings -- a half-done migration is exactly that, so the check moves to the adversarial-review sub-step instead. - Boundary Discipline's warning sign read as contradicting diagnosing-a-failure's own layered-validation technique and CLAUDE.md section 4's defense-in-depth rule -- added a carve-out for a deliberately-added layer. - Step 6's sentence: dropped a parenthetical that only fires for automatable-test tasks, narrower than the issue's own unconditional criterion; fixed "apply <a reference file>" to "apply the principles in <reference>". - SKILL.md's own capability-assumption rationale still said "lean-body-plus-five-reference-file structure" after this PR's own 6th reference file landed -- updated to six. - Added a Contents TOC (file grew past the shape checker's 100-line threshold once the fixes above landed) and a brief disambiguation on Principle 6's "serializing" (concurrency arbitration, not data serialization). skills/evaluating-skill-quality/scripts/gitapex_check_skill_shape.py: 59/59 PASS. Full pytest suite: 516 passed, no regressions. Refs #1388
…n 2/4 gaps drafting-a-pr-to-merge Step 8's independent review (reviewing-an-artifact deferred to evaluating-skill-quality, this diff being SKILL.md/references content) returned WELL-FORMED-NOT-MATURE with two named gaps, both introduced by this PR: - Dimension 4 (Clarity and structure): Step 6's new sentence told a task to apply the reference file's principles, but that code runs inside a separate dispatched `agent()` call -- nothing stated how the reference actually reaches that context, unlike Decision 17's exclusion list, which this same SKILL.md already states must be delivered in-band. Fixed: Step 6 now says each task's own dispatch prompt cites the reference's path explicitly, in-band, and notes the dispatched agent keeps Read access to fetch it from its own worktree checkout. - Dimension 2 (Conciseness): the reference file's own header narrated its full exclusion accounting (21 candidates, 14 excluded, the 13-vs-14 discrepancy) -- sediment that controls nothing a reader of the 7 kept principles does. Moved to a `spec.references` decision entry in `metadata/gitapex.yaml`, matching this skill's own existing convention for this kind of provenance (3 prior entries already do this); the file's own header now just points to it. Dimension 8 (eval coverage) and pre-existing sidecar executionRequirements.tools.write/shell drift were also named but do not block the Mature verdict and are out of this issue's own scope -- noted for a follow-up rather than bundled in here. gitapex_check_skill_shape.py: 59/59 PASS. Full pytest suite: 516 passed. Refs #1388
tvna
marked this pull request as draft
August 29, 2026 23:29
tvna
marked this pull request as ready for review
August 29, 2026 23:34
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
Adds
skills/executing-a-branch-plan/references/code-quality-principles.md(7 gitapex-filtered code-design principles) and wires it intoSKILL.mdStep 6 (per-task implementation, all 7) and Step 8 (aggregate refactor pass, one cross-task re-check of "Migrate Callers Then Delete Legacy APIs").Facts
executing-a-branch-planis the only skill in gitapex's merge pipeline authorized to write code; its Step 6/8 had no code-design-principle catalogue to apply (issue body).skills/executing-a-branch-plan/references/confirmed neitherstate-management-quality.mdnormechanism-fit.md(cited by the issue as this skill's own existing Step 6/8 reference-file precedent) actually exists in this skill's own directory, and no "if available, apply" phrasing appears in this skill'sSKILL.md-- both belong to sibling skills (evaluating-skill-quality,evaluating-deterministic-gate-quality). This skill's own real convention for a bundled reference is an unconditional bracketed link inline in prose; the two added sentences use that convention instead.skills/evaluating-skill-quality/scripts/gitapex_check_skill_shape.pyagainst the modifiedSKILL.md: 58/58 checks PASS, includinglinks-inside-skill/anchor-targets-resolvefor the new file and its Step 8 anchor link.pytestsuite (skill-shape-checker unit tests, skill-audit-disclosure gate tests, fixture-coverage gate tests): all green, no regressions.Assumptions
Risk / blast radius
Prose-only, additive change: one new reference file, two one-sentence pointers in an existing
SKILL.md. No new Step, no new Stop-boundary bullet, no new named dispatch branch, no change to the Execution log structure,StageDeviateddispatch, or the terminal handoff todrafting-a-pr-to-merge(per issue #1388's own Constraints). No runtime/code dependency.Rollback
Revert this PR; both edits are prose-only with no downstream code dependency.
Verification
references/code-quality-principles.mdexists with exactly the 7 named principlesChecklist
skills/*/SKILL.md, ..., a## Skill audit evidencesection discloses the required verdicts/waiversevals/*/split.mdKept-edit-log entry addedSkill audit evidence
description:change, no new mechanism/label/event-type introduced, no change to any input-handling or trust-boundary logic (this audit's own focus). Matches this repository's own accepted "docs-only, no behavioral change" waiver precedent, distinct from the architecturally significant change (a new label mechanism, new escalation/hang-detection logic) that warranted the full isolated-dispatch audit in issue fix(executing-a-branch-plan): Execution log fails state-management-quality.md's Axis 2/4/6 -- 5 designed fixes not yet implemented #1339/PR fix(executing-a-branch-plan): implement Axis 2/4/6 state-management fixes for Execution log #1342.claude -pdispatch, per that skill's own Isolation verification registry, against commits624ca64bandabfe430b). Round 1 found two gaps this PR itself introduced (dimension 2: unjustified sediment in the new reference file's header; dimension 4: Step 6's new instruction had no stated delivery route to the dispatched task agent that must apply it) -- both fixed, both independently re-confirmed clear in round 2's fresh, full walk. Round 2 additionally surfaced three gaps (dimensions 5, 6, 7) confirmed viagit diff origin/main...HEADto predate this PR entirely -- disclosed in## Independent review verdictbelow and filed as follow-up rather than bundled into this issue's own explicitly scoped two-file change.Full detail on both rounds is in the Execution log below.
Related Issue
Closes #1388
Acceptance Criteria Map
references/code-quality-principles.mdexists with exactly the 7 named principlesExecution log
PlanApproved{run_id: d2daee6}-- Branch Plan approved via in-session operator confirmation (the operator's opening instruction: create this PR and drive it to just before merge), branch published at commitd2daee6(task-list file:docs/superpowers/plans/2026-08-29-claude-gitapex-pr-1388-yseltw.md).TaskCompleted{run_id: d2daee6, task_id: A, commit_sha: 5abbf91c}-- code-quality-principles.md authored; SKILL.md Step 6/8 wired.TaskCompleted{run_id: d2daee6, task_id: step8-review, commit_sha: b6c26307}-- Step 8's mandatory two-layer review (fresh refactor/simplify + adversarial dispatches) found 7 real, independently-convergent issues: principles 5 (Model the Domain) and 7 (Foundational Thinking) misrendered againstcursor/plugins/pstack's actual definitions (confirmed via primary-source web search) and landing on already-excluded ground; the preamble's "14 excluded" count not adding up (7+13=20, not 21) and misattributing the dedup check; Step 8's own new sentence assigning a behavior-affecting check to the refactor/simplify sub-step, whichreferences/refactor-and-review-gate.mdbars from exactly that; Boundary Discipline's warning sign reading as contradictingdiagnosing-a-failure's layered-validation technique and CLAUDE.md section 4's defense-in-depth rule; Step 6's parenthetical narrower than the issue's own unconditional criterion; and a stale "five"-reference-file count after this PR's own sixth reference file landed. All 7 fixed in this commit;gitapex_check_skill_shape.py59/59 PASS, full pytest suite 516 passed.origin/mainadvanced 7 commits during Step 8's review round; merged cleanly (commit624ca64b), no conflict, no re-verification needed per this skill's own "a clean merge needs no further action" rule.TaskCompleted{run_id: d2daee6, task_id: dpm-step8-round1, commit_sha: 208dfa97}--drafting-a-pr-to-mergeStep 8: dispatchedevaluating-skill-quality(isolatedclaude -p) against commit624ca64b. Verdict: WELL-FORMED-NOT-MATURE, two gaps both introduced by this PR -- dimension 2 (sediment incode-quality-principles.md's header) and dimension 4 (Step 6's new instruction had no delivery route to the dispatched task agent). Both fixed in commit208dfa97: header trimmed to one sentence pointing at a newspec.referencesdecision entry inmetadata/gitapex.yaml; Step 6 now states each task's dispatch prompt cites the reference's path in-band, same as Decision 17's exclusion list.TaskCompleted{run_id: d2daee6, task_id: dpm-step8-round2, commit_sha: abfe430b}--drafting-a-pr-to-mergeStep 8 re-run (mandatory re-confirmation, stale verdict not carried forward): fresh isolatedevaluating-skill-qualitydispatch against commitabfe430b, no prior-verdict framing. Both round-1 gaps independently re-confirmed clear. Fresh full walk additionally found three gaps confirmed (viagit diff origin/main...HEAD) to predate this PR: dimension 5 (theorigin/main-drift-check procedure is inlined in Step 6 rather than deferred toexecution-and-dispatch.md-- correct content, wrong location), dimension 6 (no guard against a second concurrent invocation of this skill against the same Branch Plan;metadata/gitapex.yaml'sexecutionRequirements.tools.write/shell: []contradicts the skill's own real commit/push/shell-out behavior -- the drift scanner's two heuristic findings are real, its one deterministic finding is a checker false positive, confirmed by direct read of every match), dimension 7 (gitapex_check_task_bash_safety.py's disclosed duplication ofhooks/gitapex_check_bash_safety.pyhas no drift test between the two). None are within issue feat(executing-a-branch-plan): add a code-quality-principles reference (7 principles from pstack, gitapex-filtered), wire into Step 6/8 #1388's own Constraints (two named files, no new Step); filed as follow-up tasks rather than bundled into this PR.Independent review verdict
Both gaps this PR itself introduced (evaluating-skill-quality dimensions 2 and 4, round 1 against commit
624ca64b) are fixed and independently re-confirmed clear in round 2 (a fresh, genuinely isolated dispatch against the current head, no prior-verdict framing carried in). GitHub Copilot review was requested twice (request_copilot_review, against624ca64bandabfe430b); Copilot review is Comment-only with no pass/fail signal of its own, and no comment had posted by the time this verdict was recorded -- disclosed rather than treated as full outer-layer coverage.Round 2's fresh full walk additionally surfaced three gaps (dimensions 5, 6, 7) independently confirmed, via
git diff origin/main...HEAD, to predate this PR entirely -- not introduced by the two-file change issue #1388 scoped this PR to, and not bundled in here. See the Execution log above for detail; each is being filed as a separate follow-up task.Merge gate: independent review
This PR is also subject to the
independent-review-pendingrequiredstatus check (see
.github/workflows/independent-review-pending.yml/.github/scripts/gitapex_gate_independent_review_pending.py). It stayspending/failing until a
## Independent review verdictsection namingthis PR's current head commit is recorded in this body --
drafting-a-pr-to-merge's own Step 8 records it once its independentreview completes. There is nothing for you to do here now: do not
pre-fill this section yourself, and do not remove this note.