Skip to content

feat(0.17.0): crystallize BROOMVA_ROOT convention (BRO-1223 follow-up)#47

Merged
broomva merged 2 commits into
mainfrom
feat/broomva-root-convention
May 22, 2026
Merged

feat(0.17.0): crystallize BROOMVA_ROOT convention (BRO-1223 follow-up)#47
broomva merged 2 commits into
mainfrom
feat/broomva-root-convention

Conversation

@broomva
Copy link
Copy Markdown
Owner

@broomva broomva commented May 22, 2026

Summary

Crystallizes the BROOMVA_ROOT env-var convention into bstack as the first cross-cutting workspace convention. Rule-of-three earned across 6 callsites in 3 repos during the BRO-1223 work. The other architectural patterns observed once (LLM-as-index, auto-compact, haystack bench, defensive bounds check) are recorded in the candidate ledger awaiting rule-of-three.

What this PR adds

  • references/conventions.md (NEW) — first cross-cutting workspace convention reference. Contains:
    • C1 — BROOMVA_ROOT env-var override: rule + canonical Python + bash patterns; invariant; failure mode prevented (silent overwrite of live workspace); 6 known callsites; BROOMVA_WORKSPACE historical-synonym note
    • Candidate ledger (4 patterns): LLM-as-index architecture, auto-compact catalog, haystack benchmark pattern, defensive post-conversion bounds check — each with status (1 instance) and what's required for promotion
    • How to add a convention section — process for future maintainers
  • VERSION0.16.00.17.0 (additive minor bump)
  • CHANGELOG.md — 0.17.0 entry

Why a new file (not extending an existing one)

references/primitives.md defines primitive contracts; dogfood-patterns.md defines per-stack validation; stack-architecture.md describes architectural composition. None is the right home for cross-cutting workspace conventions that span all primitives. The new file keeps each reference doc's scope clean.

Rule-of-three audit

The 6 callsites that earned this promotion:

  1. ~/.claude/skills/kg/scripts/kg.py (also published as broomva/kg v0.2.x)
  2. ~/broomva/skills/bookkeeping/scripts/bookkeeping.py
  3. ~/broomva/scripts/bench-kg.py
  4. ~/broomva/scripts/bench-kg-haystack.py
  5. ~/broomva/scripts/knowledge-catalog-refresh-hook.sh
  6. ~/broomva/skills/bookkeeping/tests/test_index.py

Each independently arrived at the same os.environ.get("BROOMVA_ROOT", default) pattern — that's the rule-of-three signal P16 looks for.

What we deliberately did NOT promote

The candidate ledger records 4 BRO-1223-derived patterns at 1 instance each:

  • LLM-as-index architecture (substrate → catalog → loader composition)
  • Auto-compact catalog at >5000 entities
  • Haystack benchmark pattern (synthetic substrate + seeded needles)
  • Defensive post-conversion bounds check (R5 floor-to-zero class)

Each will promote to a full convention entry only after 2 more independent instances accumulate. Honors the discipline; avoids over-promotion.

Test plan

  • bash scripts/doctor.sh --quiet exits 0 (no behavior change — additive doc)
  • references/conventions.md parses as valid markdown
  • All 6 listed callsites still match the documented pattern (verified via grep -n "BROOMVA_ROOT" <file>)
  • CHANGELOG entry matches commit content

Refs BRO-1223 follow-up. Linear MCP still down — ticket creation deferred.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation

    • Added workspace conventions documentation outlining environment variable conventions and workspace-root resolution patterns with implementation examples.
    • Updated changelog with version 0.17.0 release information.
  • Chores

    • Bumped version to 0.17.0.

Review Change Stack

Carlos D. Escobar-Valbuena and others added 2 commits May 22, 2026 14:34
Adds references/conventions.md as the new home for cross-cutting
workspace conventions. First entry: BROOMVA_ROOT env-var override —
rule-of-three earned across 6 callsites in 3 repos.

Also records 4 single-instance candidates from this session in the
ledger at the bottom of the file (LLM-as-index architecture,
auto-compact catalog, haystack benchmark pattern, defensive
post-conversion bounds check) — all awaiting rule-of-three.

Refs BRO-1223 follow-up.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Followed up the prior commit that shipped VERSION + references/conventions.md
without the CHANGELOG entry. This commit only adds the 0.17.0 release notes.

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

linear Bot commented May 22, 2026

BRO-1223

@broomva broomva merged commit 75652b6 into main May 22, 2026
4 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e8001019-7142-417d-bfe9-60468e64fed4

📥 Commits

Reviewing files that changed from the base of the PR and between b89354c and 71593e6.

📒 Files selected for processing (3)
  • CHANGELOG.md
  • VERSION
  • references/conventions.md

📝 Walkthrough

Walkthrough

This release crystallizes the BROOMVA_ROOT workspace-root convention into a new reference document. The version is bumped from 0.16.0 to 0.17.0, with corresponding changelog and convention documentation introducing canonical patterns for environment-variable–based workspace-root resolution across bstack scripts and skills.

Changes

Convention Crystallization and v0.17.0 Release

Layer / File(s) Summary
Workspace conventions documentation
references/conventions.md, VERSION, CHANGELOG.md
New references/conventions.md defines the mandatory BROOMVA_ROOT workspace-root convention with Python/Bash canonical patterns, invariants, legacy BROOMVA_WORKSPACE synonym, known callsites, and a candidate ledger for future conventions. Version is bumped to 0.17.0, and changelog entry announces this crystallization as a BRO-1223 follow-up.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • broomva/bstack#38: The BROOMVA_ROOT convention crystallized in this PR directly documents the environment variable that PR's bin/bstack-crystallize wrapper uses for default conversations directory selection.

Poem

🐰 A root convention blooms at last so clear,
BROOMVA_ROOT shines bright throughout the year,
With patterns set in Python, Bash, and lore,
The workspace speaks one language more,
Version bumped to mark this grand premiere! 🎉

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/broomva-root-convention

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 added a commit that referenced this pull request May 22, 2026
…48)

* feat(0.18.0): Phase 8 — multi-workspace federation registry (BRO-47)

Closes the substrate-completion-arc Phase 8 backlog. Introduces opt-in
host-level registry at ~/.broomva/global/registry.yaml + bstack status
--aggregate rollup that walks the registry and surfaces cross-workspace
composite-ω. Federation is read-only aggregation; each workspace remains
the source of truth for its own state.

New:
- bin/bstack-workspace (register/list/info/deregister dispatcher, 90 LOC)
- scripts/workspace.py (Python registry CRUD + inline YAML fallback, 523 LOC)
- schemas/workspaces.v1.json (JSON-schema draft-07 contract)
- tests/workspace.test.sh (10 hermetic cases — all GREEN)

Changed:
- bin/bstack — dispatcher: 'workspace' case + Federation help section
- bin/bstack-status — --aggregate flag, reads registry + per-workspace ω
- scripts/doctor.sh §20 — workspace-federation health (informational; hard gap only on schema mismatch)
- SKILL.md + assets/templates/{AGENTS,CLAUDE}.md.template — surface docs

Dogfood receipt:
- bash tests/workspace.test.sh → 10/10 GREEN
- bash scripts/doctor.sh → 87/90 passed (baseline unchanged; §20 informational on no-registry)
- bash scripts/compute-budget-status.sh --human → composite stable

Closes BRO-47. Built on v0.17.0 (BROOMVA_ROOT convention, #47).
Sets the substrate for v0.19.0 (BRO-48, Closure Contract).

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

* fix(0.18.0): CI green — SC2259 + status-surface Test 6 + stale comments

CI failures from PR #48 round 1:

1. shellcheck SC2259 in scripts/doctor.sh line 959 — `echo "$x" | python3 - "$y" <<'PYEOF'`
   redirected stdin (the heredoc) overriding the pipe. Fix: pass payload via
   env var (BSTACK_FED_SUMMARY) instead of pipe + heredoc.

2. tests/status-surface.test.sh Test 6 asserted "--aggregate exits 3
   (not-yet-implemented)" — was correct pre-v0.18.0 (placeholder error), now
   stale since v0.18.0 ships the implementation. Fix: assert --aggregate
   succeeds (exit 0) against an isolated empty registry (BSTACK_REGISTRY=mktemp).

3. bin/bstack-status comments at L13/L59 still said "Phase 8 placeholder"
   though the actual implementation lives at L261+ and works.

Local dogfood:
- bash tests/workspace.test.sh → 10/10 GREEN
- bash tests/status-surface.test.sh → Test 6 passes; pre-existing local S13 failures (Tests 3+4) unrelated to this PR (they pass in CI)
- bash scripts/doctor.sh → 87/90 (baseline unchanged)

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

* fix(0.18.0): canary/03 Step 4 — --aggregate ships in this PR, not Phase 8 placeholder

Same root cause as the tests/status-surface.test.sh Test 6 fix in b396302:
the canary suite also asserted "--aggregate exits 3 (Phase 8 placeholder)"
which is correct pre-v0.18.0 but stale now that --aggregate works.

Fixed: assert exit 0 with no "Phase 8 placeholder" string against an
isolated empty registry (BSTACK_REGISTRY=mktemp).

Local: bash tests/canary/03-status-surface.test.sh → 4/4 GREEN.

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

---------

Co-authored-by: Carlos D. Escobar-Valbuena <devteam@getstimulus.ai>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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