Skip to content

feat(primitives): renumber so Wait=P9 — restore skill-name↔primitive-number alignment#23

Merged
broomva merged 1 commit into
mainfrom
feat/renumber-wait-to-p9-v2
May 16, 2026
Merged

feat(primitives): renumber so Wait=P9 — restore skill-name↔primitive-number alignment#23
broomva merged 1 commit into
mainfrom
feat/renumber-wait-to-p9-v2

Conversation

@broomva
Copy link
Copy Markdown
Owner

@broomva broomva commented May 16, 2026

Summary

Replaces #22 (auto-closed when its base branch feat/primitive-naming-reflex was deleted on the squash-merge of #21). Identical diff, rebased onto current main which contains #21's naming rule.

The productive-wait primitive returns to P9, matching the broomva/p9 skill repo name. Skill Freshness moves to P7, Branch+Worktree Janitor moves to P8.

This closes the Name (Pn) recall-key failure mode: under the interim P7=Wait / P8=Freshness / P9=Janitor numbering, the broomva/p9 skill name pointed at primitive P9 (Janitor), making feedback_p9_reflexive.md ambiguous.

Before After
P7 = Wait (broomva/p9 skill — historical name) P7 = Skill Freshness
P8 = Skill Freshness P8 = Branch + Worktree Janitor
P9 = Branch + Worktree Janitor P9 = Wait (broomva/p9 skill — name matches number)

Changes (same as the original #22)

  • SKILL.md: description-block prose + primitive table P7/P8/P9 swap + Short-name index in the naming-convention section.
  • references/primitives.md: TOC + section bodies P7/P8/P9 swap + Short-name index. Legacy-path callouts.
  • assets/templates/settings.json.snippet: skill-freshness-hook.sh's _bstack_primitive annotation flipped P8 → P7.
  • assets/templates/policy.yaml.template: two comment headers updated for P9 productive-wait.
  • scripts/doctor.sh: comment block + P_NAMES + REFLEXIVE_PRIMS + HOOK_LABELS + SCRIPT_PATHS all updated. NEW Section 9 — Naming convention propagation lints CLAUDE.md + AGENTS.md for the Name (Pn) rule + 20-entry Short-name index.
  • tests/template_lockstep.test.sh: explanatory comment updated.
  • VERSION: 0.1.0 → 0.2.0
  • CHANGELOG.md: 0.2.0 entry.

Test plan

Companion PR

Workspace PR: broomva/workspace#62 wires the runtime mechanisms (CLAUDE.md + AGENTS.md + scripts/skill-freshness-hook.sh + scripts/branch-janitor.sh + memory feedback files).

Why a new PR

The original #22 was stacked on #21's branch. When you squash-merged #21 with --delete-branch, GitHub auto-closed #22. The branch state was rebased locally onto the new main, but the workspace control gate (Gate (P2)) correctly blocked the force-push to the original branch (G1: force-push policy). Pushed to a new branch + opened this fresh PR — same diff, clean base.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added validation checks for naming convention rules in documentation
    • Added short-name index validation requiring exactly 20 entries
  • Documentation

    • Updated primitive documentation to reflect renumbering adjustments
    • Expanded migration behavior and environment variable guidance
  • Chores

    • Version bumped to 0.2.0
    • Updated configuration templates to align with primitive reassignment
    • Enhanced validation tooling with new linting rules

Review Change Stack

…number alignment

The productive-wait primitive returns to P9, matching the `broomva/p9`
skill repo name. Skill Freshness moves to P7, Branch+Worktree Janitor
moves to P8. This closes the Name (Pn) recall-key failure mode the
naming rule (PR #21) was designed to prevent: under the interim
P7=Wait / P8=Freshness / P9=Janitor numbering, the `broomva/p9` skill
name pointed at primitive P9 (Janitor), making `feedback_p9_reflexive.md`
ambiguous — was it about the skill (Wait) or the primitive number
(Janitor)? The 2026-05-16 renumber restores Wait = P9 = `broomva/p9`
everywhere.

Stacked on PR #21 (`feat/primitive-naming-reflex`) so this PR carries
both the naming rule and the alignment fix it makes possible.

Changes:
- SKILL.md: description-block prose + primitive table P7/P8/P9 swap +
  Short-name index in the naming-convention section. Added prose
  explaining why Wait sits at P9 (skill repo name commitment).
- references/primitives.md: TOC + section bodies P7/P8/P9 swap +
  Short-name index. Section bodies carry legacy-path callouts pointing
  at the OPPOSITE direction now (~/.config/broomva/p7/ canonical, p8/
  legacy for freshness; p8-janitor/ canonical, p9-janitor/ legacy for
  janitor). The §P9 Skill name paragraph now explains the renumber
  rationale + the "numeric soup" failure mode it closes.
- assets/templates/settings.json.snippet: skill-freshness-hook.sh's
  `_bstack_primitive` annotation flipped P8 → P7.
- assets/templates/policy.yaml.template: two comment headers updated
  to mark the ci_watch + auto_merge blocks as P9 primitives.
- assets/templates/{CLAUDE,AGENTS}.md.template: no changes — these were
  already in the target ordering (the templates have been ahead of the
  workspace this whole time, which is what made the renumber possible
  in one PR).
- scripts/doctor.sh:
  - Section 1-8 comment block updated for new numbering.
  - P_NAMES array swap (P7=Skill Freshness, P8=Janitor, P9=Wait).
  - REFLEXIVE_PRIMS now includes P9 (Wait, reasoning-enforced) and
    excludes P7 (Freshness, hook-enforced).
  - HOOK_LABELS skill-freshness-hook.sh label flipped P8 → P7.
  - SCRIPT_PATHS reordered so SCRIPT_LABELS=(P1 P2 P6 P7 P8 P9 P12)
    matches the new path-to-primitive mapping.
  - NEW Section 9 — Naming convention propagation. Lints CLAUDE.md +
    AGENTS.md for (a) presence of the Name (Pn) naming rule in prose
    and (b) a Short-name index with exactly 20 entries. Closes the
    silent-drift failure mode where governance edits could leave the
    index mismatched with the primitive count.
- tests/template_lockstep.test.sh: updated explanatory comment to
  reflect that templates and workspace canonical now agree. Kept in
  WARN mode for one release cycle to ease in-place upgrades from
  downstream workspaces still on legacy ordering.
- VERSION: 0.1.0 → 0.2.0.
- CHANGELOG.md: 0.2.0 entry covering the renumber rationale, the
  migration path (legacy env vars + config dirs still honored), the
  naming-rule propagation (PR #21 carry-forward), and the doctor
  Section 9 extension.

Workspace PR-A (companion to this PR) will follow shortly with the
runtime changes (CLAUDE.md + AGENTS.md + scripts/skill-freshness-hook.sh +
scripts/branch-janitor.sh) so the workspace mechanisms match these
declarative bstack changes. Until PR-A lands, doctor against the
workspace reports a single P9-missing-reflexive-rule gap — that's the
expected coordination signal.

Validation:
- tests/template_lockstep.test.sh: 15/15 (canonical count = 20)
- scripts/doctor.sh: 78/79 — only gap is workspace AGENTS.md P9
  missing reflexive rule, which PR-A fixes. Section 9 Name (Pn) lint
  passes for both CLAUDE.md + AGENTS.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 16, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR releases version 0.2.0, which renumbers primitives P7–P9 to align "Wait" (CI Watcher + Productive Wait) back to P9 and the broomva/p9 skill repo name, moving Freshness to P7 and Janitor to P8. The renumbering and the propagated Name (Pn) naming convention are documented across all system surfaces with new validation enforcement.

Changes

Primitive Renumbering Release

Layer / File(s) Summary
Release version and changelog
VERSION, CHANGELOG.md
Version is bumped to 0.2.0 and CHANGELOG.md documents the renumbering rationale, environment variable mappings, backward-compatibility fallback paths, naming convention propagation, and doctor script validation enhancements.
Canonical documentation: SKILL.md and references/primitives.md
SKILL.md, references/primitives.md
SKILL.md and references/primitives.md are updated to establish the new P7–P9 numbering with detailed scope descriptions, invariants, legacy config compatibility, skill-name history explaining the interim mismatch, and the "numeric soup" bare-`Pn` failure mode.
Asset templates: policy and settings hooks
assets/templates/policy.yaml.template, assets/templates/settings.json.snippet
Policy and settings templates are updated so primitive comments and hook _bstack_primitive values (e.g., SessionStart hook mapped to P7 Freshness) reflect the new P7–P9 numbering.
Validation enforcement in scripts/doctor.sh
scripts/doctor.sh
doctor.sh reorders primitive name arrays and reflexive-trigger enforcement sets, adjusts hook wiring labels and script-path alignment, and adds a new "naming convention propagation" check that validates `Name (Pn)` rule presence in CLAUDE.md and AGENTS.md plus Short-name index cardinality (exactly 20 primitives).
Test documentation for reflexive trigger detection
tests/template_lockstep.test.sh
Test file comments are updated to explain reflexive-trigger detection remains in WARN mode for this release with planned promotion to a hard assertion in 0.3.0; no test logic is changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • broomva/bstack#21: Propagates the same Name (Pn) naming convention into documentation surfaces; this PR extends that work with doctor script enforcement.
  • broomva/bstack#9: Updates primitive-numbering validation logic in doctor.sh around the P7–P9 area, with this PR's renumbering directly affecting the same validation arrays.
  • broomva/bstack#5: Modifies doctor.sh primitive verification and reflexive-trigger enforcement sets; this PR's P7–P9 reordering affects the same validation logic.

🐰 A hop, skip, and jump through the numbering lanes,
Wait hops back to P9, where it belongs once again,
Freshness and Janitor shift their places with grace,
Naming conventions guide us through the bstack space!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: renumbering primitives so Wait returns to P9, which restores the critical alignment between the broomva/p9 skill name and its primitive number.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/renumber-wait-to-p9-v2

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@broomva broomva merged commit 322ba23 into main May 16, 2026
1 check was pending
@broomva broomva deleted the feat/renumber-wait-to-p9-v2 branch May 16, 2026 15:00
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.

1 participant