chore(contract): phase 5 STEP 6 rulings [gated] (nine profiles, websites in pack-higgsfield, .env export kept, root rule, managed-connector match, name allowlist)
This commit is contained in:
1 parent
e1c102ab03
commit
ffac7e539e
1 file changed
+3
-2
@@ -10,6 +10,7 @@ Phase 5 of the context mod queue (BDR-125): per-project and per-conversation pro
|
||||
- Brainstorm answers 2026-11-01 (user): no profile = `full` (packs ON, connectors present, as today); gstack split in three packs (dev / browser / design); both higgsfield connectors denied by `deniedMcpServers` in every profile except design, web, web-full, full, max; launcher `cc <name> [profile]` as a function in `lib/cc.sh` sourced from `~/.bashrc` (user step), exporting `CLAUDE_PROFILE`, `CLAUDE_PROFILE_SETTINGS`, `TMPDIR` and running `claude --settings`; approach A = tracked packs `skills/pack-<n>/` (relative symlinks into `skills-external/`, five real dirs moved), profiles as literal settings fragments `lib/profiles/<n>.json`; `profile.sh current --plain` is the single truth for gates, hooks and statusline (supersedes BDR-024); a backend/dev profile still gets the design proposal mid-skill (`set web` / `enable design` + `/reload-plugins`, or relaunch when the source is the flag); listing budget measured last. Spec: `docs/superpowers/specs/2026-11-01-phase5-profiles-packs-design.md` (sections 1-9 approved in chat).
|
||||
- Pass B 2026-11-01 `[gated]` (plan `docs/superpowers/plans/2026-11-01-phase5-profiles-packs.md`, user answers): `lib/tests/higgsfield.test.sh` is kept, trimmed to the skills-external sync and CLI probes (spec said delete); the "no citer left" census covers hooks lib agents skills rules templates mods, root `*.sh`, CLAUDE.global.md, README, USAGE, ARCHITECTURE, Makefile, plugins.lock.json, .gitignore and excludes `lib/tests/fixtures/`, `docs/`, `.claude/`, CHANGELOG, MIGRATION; gstack `./setup` is skipped with a warn ("run make link first") when `skills/gstack` is not the helper tree, never run-then-clean. Defaults accepted by silence: `profile.sh -C <dir>`; `--plain` keys `flag=`, `model-source=`, `mcp-off=`, `connector:*=denied`, `plugin:<id>=`; new files `lib/pack-census.sh`, `lib/gstack-removed.list`, suites profile/cc/pack-census/statusline; impeccable = pack symlink to `skills-external/impeccable` moved there by the installer (not tracked, no `git mv`); `~/.bashrc` user step removes `dtach_claude` + `alias cc` and sources `lib/cc.sh`; `deniedMcpServers` union documented (`cc x web` over a `dev` project keeps the connectors denied).
|
||||
- Floor-guard `[gated 2026-11-02]` (user): the four shellcheck suppressions are authorized with their reasons: `lib/profile.sh:2` SC2016 (file-wide; the jq programs quote `$var` on purpose), `lib/cc.sh` SC2016,SC1003 (the inner `bash -c` expands `$HOME` itself; `'^\'` is dtach's detach key), `lib/pack-census.sh:2` SC2088 (`~/.claude/skills` is a grep pattern, not a path), `lib/tests/cc.test.sh` SC1091 (sources a fixture); the plan file's code samples mirror them. The five deleted suites `lib/tests/{profile-default,profile-set-managed,profile-census,gstack-removed,toggle-external-repo-resolution}.test.sh` tested the retired symlink mechanism; their live checks moved to `lib/tests/profile.test.sh` (set/current/unset semantics, default profile) and `lib/tests/pack-census.test.sh` (fragment invariants, retired gstack names, old-layout citers).
|
||||
- STEP 6 code review `[gated 2026-11-02]` (user): `backend.json` and `web-full.json` are dropped (they were byte-identical to `dev.json` and `full.json`, so `current` named the wrong profile and the advisor looped); nine profiles remain (full, max, minimal, dev, design, web, seo, qa, audit), the advisor maps backend → dev and web-full → full, and the census forbids two fragments with equal `enabledPlugins` + deny set. `higgsfield-websites` stays in pack-higgsfield (OFF by default, ON in `max` only; amends BDR-109, recorded in the phase 5 BDR). `lib/cc.sh` keeps `set -a; . ~/.claude/.env` as `dtach_claude` did (accepted risk, recorded in the BDR). Also ruled by the controller: the project root for the local file follows Claude Code's rule (git common dir root when inside a repo, else the dir; shared `.claude/settings.json` read from the session dir); the profile-name match considers only the connector names a fragment manages; profile and session names are allowlisted `^[a-z0-9][a-z0-9-]*$`.
|
||||
- Design-derived criteria are appended at STEP 3 `[gated]`.
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
@@ -18,8 +19,8 @@ Phase 5 of the context mod queue (BDR-125): per-project and per-conversation pro
|
||||
CHECK: cd /home/bchanot/Documents/claude && out=$(bash lib/pack-census.sh 2>&1) && printf '%s\n' "$out" | grep -q '^PACKS OK 9 packs 55 skills' && [ ! -e skills-disabled ] && [ ! -e .active-profile ] && [ ! -e lib/toggle-external.sh ] && [ -z "$(ls lib/profiles/*.profile 2>/dev/null)" ] && [ -L skills/model-router ] && echo PACKS-OK
|
||||
EXPECT: PACKS-OK
|
||||
EVIDENCE: MET exit=0 marker-found :: PACKS-OK
|
||||
3. `[gated 2026-11-02]` Profiles: eleven fragments `lib/profiles/{full,max,minimal,dev,backend,design,web,web-full,seo,qa,audit}.json` with the invariants of lib/profiles/README.md (same key set; model-router and security-guidance true; example-skills and brightdata false; both higgsfield connectors denied on exactly minimal, dev, backend, seo, qa, audit; full = manifest defaults); `lib/profile.sh` verbs list/show/current [--plain]/set/unset/enable/disable/diff with the merge, refusal (rc 2, nothing written), union, walk-up and timing semantics of the suite; `current --plain` keys as the plan § Task 3 states.
|
||||
CHECK: cd /home/bchanot/Documents/claude && [ "$(ls lib/profiles/*.json | wc -l)" = 11 ] && a=$(make test suite=lib/tests/profile.test.sh 2>&1) && printf '%s\n' "$a" | grep -q 'FAIL=0' && echo PROFILE-OK
|
||||
3. `[gated 2026-11-02]` Profiles: nine fragments `lib/profiles/{full,max,minimal,dev,design,web,seo,qa,audit}.json` (amended `[gated 2026-11-02]`: backend and web-full dropped as duplicates) with the invariants of lib/profiles/README.md (same key set; model-router and security-guidance true; example-skills and brightdata false; both higgsfield connectors denied on exactly minimal, dev, backend, seo, qa, audit; full = manifest defaults); `lib/profile.sh` verbs list/show/current [--plain]/set/unset/enable/disable/diff with the merge, refusal (rc 2, nothing written), union, walk-up and timing semantics of the suite; `current --plain` keys as the plan § Task 3 states.
|
||||
CHECK: cd /home/bchanot/Documents/claude && [ "$(ls lib/profiles/*.json | wc -l)" = 9 ] && a=$(make test suite=lib/tests/profile.test.sh 2>&1) && printf '%s\n' "$a" | grep -q 'FAIL=0' && echo PROFILE-OK
|
||||
EXPECT: PROFILE-OK
|
||||
EVIDENCE: MET exit=0 marker-found :: PROFILE-OK
|
||||
4. `[gated 2026-11-02]` Launcher: `lib/cc.sh` defines `cc <name> [profile]`; unknown profile → list + rc 2 and no session; with a profile `claude --settings lib/profiles/<profile>.json` runs with `CLAUDE_PROFILE`, `CLAUDE_PROFILE_SETTINGS` and `TMPDIR=$HOME/.cache/claude-tmp` exported through systemd-run + dtach; without a profile plain `claude`, TMPDIR still set, `.env` sourced.
|
||||
|
||||
Reference in new issue
Block a user