test(tui): CLI ↔ TUI infuse parity + subrole sibling listing (proposal 003 PR-6 — closes proposal 003) - #59
Merged
Merged
Conversation
…g (proposal 003 PR-6)
Closes proposal 003 (ACC TUI usability hardening). After this
merges, all six PRs of the series are on main and the v0.2.0 tag
is ready to cut.
## CLI ↔ TUI infuse parity test
`tests/test_infuse_parity.py` (NEW, 7 cases):
* `test_envelope_byte_for_byte_parity` — top-level fields
(signal_type, agent_id, collective_id, signature, approver_id)
match byte-for-byte after stripping `ts`.
* `test_both_paths_use_same_signal_type` — both publish
`signal_type=ROLE_UPDATE`.
* `test_both_paths_carry_role_definition_key` — top-level
`role_definition` key present on both.
* `test_role_definition_intersection_carries_same_values` —
recursive intersection-only diff so nested `category_b_overrides`
compares on the leaf scalars the TUI form actually carries.
Both surfaces produce identical values for the 9 fields the TUI
emits.
* `test_documents_tui_field_omissions` — regression-prevention
pin: the TUI's role_definition keys MUST be a subset of the
CLI's (TUI never sends an extra the arbiter would reject).
Prints the current omission set to pytest log for operator
visibility.
* `test_no_secrets_in_either_payload` — neither surface leaks
`api_key=` / `private_key=` / `password=` / `secret=` /
`token=` in the payload string form.
* `test_both_paths_publish_on_same_subject` — pins
`subject_role_update(cid)` = `acc.{cid}.role_update` so a
rename on either side fails CI.
## Known parity gap (deferred)
The TUI Infuse form emits a 9-field subset of the full
`RoleDefinitionConfig` pydantic schema; the CLI emits the full
`model_dump()`. The parity test pins this state — closing the
gap (either extending the TUI form OR teaching the arbiter to
default-fill missing keys) is tracked as a follow-up.
## Ecosystem subrole sibling listing
`acc/tui/screens/ecosystem.py`:
* `_subrole_siblings(roles_root, role_name)` — globs sibling
directories matching `<role>_*` that carry a `role.yaml`;
excludes the parent itself + `_base` / `TEMPLATE`; returns
sorted list, empty on no match.
* `_format_subrole_section(siblings, role_name)` — renders the
markdown section labelled "Subroles (directory-derived)" with
a one-line note that proposal 004 tracks the first-class
`parent_role` field. Empty input → empty string.
* `_show_role_detail()` appends the subrole section to the
Markdown widget's content so `coding_agent` shows its five
persona siblings, `research_planner` shows nothing (no
sibling matches that prefix), etc.
This PR does NOT introduce a `parent_role` field — that's
proposal 004. It surfaces what's already implicit in directory
naming so the operator gets the hierarchy view today.
`tests/test_ecosystem_screen_pilot.py` (8 new cases):
* `test_subrole_siblings_finds_matching_prefix` —
`coding_agent_*` matches three siblings, not `research_planner`.
* `test_subrole_siblings_excludes_parent_itself` — parent dir
not in its own sibling list.
* `test_subrole_siblings_excludes_base_and_template` —
exclusion-set respected.
* `test_subrole_siblings_skips_dirs_without_role_yaml` — a
prefix-matching dir without role.yaml isn't a role.
* `test_subrole_siblings_empty_when_nothing_matches` — clean
empty-list return.
* `test_format_subrole_section_empty_returns_blank` — empty
input → empty string (so caller can blindly append).
* `test_format_subrole_section_contains_directory_derived_label`
— rendered section names the convention + proposal 004.
* `test_role_detail_md_appends_subrole_section` — end-to-end:
selecting `coding_agent` renders both its planted siblings in
the markdown.
## Tests
**94/94 green** across the full TUI test surface (8 files):
* test_infuse_parity (7) — NEW
* test_ecosystem_screen_pilot (46) — +8 from subrole tests
* test_coding_agent_tui_pilot (8)
* test_configuration_screen_pilot (11)
* test_perf_soma_context_pilot (8)
* test_prompt_screen_pilot (13)
* test_file_picker_pilot (3)
* test_oversight_tui_diagnose (1)
## CHANGELOG
`[Unreleased]` gains:
- Added entry — Ecosystem subrole sibling listing
- New Tests subsection documenting the parity test
- "Known parity gap (deferred follow-up)" subsection making
the structural divergence operator-visible
## Manual verification
```bash
acc-tui # press 6 → Ecosystem
# Click coding_agent → role.md panel renders the role's
# narrative + a "Subroles (directory-derived)" section listing
# coding_agent_architect, _dependency, _implementer, _reviewer,
# _tester.
```
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
flg77
added a commit
that referenced
this pull request
May 13, 2026
All six PRs of proposal 003 (ACC TUI usability hardening) are on main: * #54 (PR-1) — Prompt cancel-on-timeout + CHANGELOG/version bump * #55 (PR-2) — Ecosystem role.md detail + searchable filter * #56 (PR-3) — Ecosystem roles/ watcher + selection lock * #57 (PR-4) — Configuration pane (pane 8) * #58 (PR-5) — Performance + Soma cluster/governance context * #59 (PR-6) — CLI/TUI infuse parity + subrole sibling listing pyproject.toml: 0.2.0-dev → 0.2.0 CHANGELOG.md: [Unreleased] section closed off as [0.2.0] (dated 2026-05-14) with a fresh [Unreleased] header ready for the next cycle. Tag v0.2.0 follows this merge. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
flg77
added a commit
that referenced
this pull request
Jun 11, 2026
…47, #48) (#59) * feat(demos): PR-DEMO1 — coding + financial demo collectives (proposal 018) Two runnable demo collectives + a parent hosting both as sub-collectives, showcasing the proposal-019 catalog-aware assistant routing prompts to the genuinely best-matched specialist. examples/collectives/: - demo-financial.yaml — the financial-specialist demo the operator asked for: assistant/orchestrator/reviewer/compliance_officer control plane + financial_analyst, fpa_analyst, contract_analyst, risk_compliance_analyst, account_executive, business_analyst from @acc/business-roles. - demo-coding.yaml — coding + devops from @acc/workspace-roles + @acc/devops-roles. - demo-multi.yaml — parent hub hosting both as managed sub-collectives (AoA-P3); hub assistant delegates by domain. All three validate against the CURRENT schema — the proposal-018 draft used operating_mode:, per-agent workspace_access:, autonomous_loop:, and sub-collective path:, NONE of which exist on CollectiveSpec/AgentSpec/ SubCollectiveSpec (extra='forbid'). Shipped YAMLs use only real fields + real models.yaml ids (claude-haiku workers, claude-sonnet reviewer). tests/test_demo_collectives.py — 13 tests: all three load, every agent role resolves (CONTROL + installed packs), required_packages declared, finance specialists present, sub-collectives wired, models registered. docs/DEMOS.md — operator runbook showing the 019 capabilities live (catalog_query routing rationale, PROPOSE_SPAWN/INFUSE, ROLE_GAP). Deferred (proposal 018 PR-DEMO2..4): golden-prompt suite, WorkflowGraph + Prompt-pane Workflow tab. Branched off main — independently mergeable. Sweep: 3074 passed, 69 skipped (delta +13). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * feat(demos): demo golden prompts incl. the MOTD regression guard (proposal 018) Four hand-authored golden prompts in the existing PR-K schema, flat in examples/golden_prompts/ so the Diagnostics-pane runner picks them up — the operator's "added to our prompt history within the golden prompts; benchmark against after a role or model change." - demo_coding_motd_playbook.yaml — the exact MOTD/Ansible scenario that opened the autonomy investigation, pinned as a re-runnable benchmark (target devops_engineer). Permanent regression guard. - demo_coding_unit_test.yaml — coding_agent writes a pytest. - demo_financial_runway_forecast.yaml — financial_analyst forecast. - demo_financial_contract_risk.yaml — contract_analyst risk memo. Each targets the specialist role directly (stable benchmark, not the model-dependent assistant routing output) and asserts reply_non_empty + domain keyword content. Richer MOTD assertions (dnf-not-pip, no-OS-hedge) need proposal-016 perception + a negative-match expects field — tracked there, not asserted here. tests/test_demo_golden_prompts.py — 9 tests (load + schema-valid + target real roles + MOTD scenario pinned). Existing golden-suite tests use tmp_path, so adding files to examples/golden_prompts/ doesn't perturb them. Sweep: 3083 passed, 69 skipped (delta +9). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs: proposal 019 (assistant as system operator) + demo walkthrough (#48) Full implementation documentation + lighthouse test runbook for the proposals 016-019 work (PRs #42-#47), with TUI screenshots captured via the acc-tui-docs screenshot tool. docs/proposal-019-screens/: - walkthrough.md — what shipped (catalog_query skill, PROPOSE_INFUSE authorization, role-gap discovery, demo collectives, demo golden prompts), the operator workflow across panes with "behind the scenes" NATS/arbiter/cognitive-core mechanics, and a step-by-step "how to test on lighthouse" runbook (deploy demo-financial.yaml → catalog-aware routing → gap/infusion paths → golden-prompt benchmarks → sub-collective multi demo). - scenario.yaml — reproducible tui_screenshots scenario (the durable artifact; re-run on UI change). - 01_prompt_financial.svg, 02_ecosystem_assistant.svg, 03_compliance.svg, 04_diagnostics.svg — headless Textual renders (wiring/layout; data screens show empty state — captioned honestly). Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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
PR-6 of proposal 003 (ACC TUI usability hardening). Final PR of the series — closes proposal 003. After this merges, all six PRs (#54, #55, #56, #57, #58, #59) are on
mainand we can cutv0.2.0.Two deliverables
1. CLI ↔ TUI infuse parity test
tests/test_infuse_parity.py(new, 7 cases). Pins what's actually equivalent between the CLI's_cmd_infuseand the TUI'saction_applyROLE_UPDATE payloads. Catches regression in either direction.test_envelope_byte_for_byte_paritytstest_both_paths_use_same_signal_typesignal_type=ROLE_UPDATEon bothtest_both_paths_carry_role_definition_keyrole_definitionkey present on bothtest_role_definition_intersection_carries_same_valuescategory_b_overrides)test_documents_tui_field_omissionstest_no_secrets_in_either_payloadapi_key=/password=/private_key=/secret=/token=stringstest_both_paths_publish_on_same_subjectsubject_role_update(cid) == "acc.{cid}.role_update"— rename catchesKnown structural gap surfaced by the test (deferred): the CLI emits the full pydantic
model_dump()(~15+ fields); the TUI form emits a 9-field subset. Closing this — either extending the TUI form or teaching the arbiter to default-fill — is a follow-up.2. Ecosystem subrole sibling listing
acc/tui/screens/ecosystem.pygains_subrole_siblings()+_format_subrole_section()helpers. When the selected role has sibling directories matching<role>_*with arole.yaml, they're listed under a "Subroles (directory-derived)" Markdown section appended to the role.md view.coding_agent→ listscoding_agent_architect,coding_agent_dependency,coding_agent_implementer,coding_agent_reviewer,coding_agent_tester.The section is explicitly labelled directory-derived because the first-class
parent_rolefield is deferred to proposal 004.Tests
94/94 green across the full TUI test surface (8 test files):
test_infuse_parity.py(7 cases, new)test_ecosystem_screen_pilot.py(46, +8 new subrole cases)test_coding_agent_tui_pilot.py(8)test_configuration_screen_pilot.py(11)test_perf_soma_context_pilot.py(8)test_prompt_screen_pilot.py(13)test_file_picker_pilot.py(3)test_oversight_tui_diagnose.py(1)CHANGELOG
[Unreleased]gains the subrole listing entry, a new Tests subsection documenting the parity test, and a "Known parity gap (deferred follow-up)" subsection that makes the structural divergence operator-visible.Closing proposal 003
When this PR merges:
Cut
v0.2.0after merge:git tag -a v0.2.0 -m "v0.2.0 — TUI usability hardening (proposal 003)" git push --tagsReference
Proposal 003 —
…\ACC Implementation\003 - ACC TUI usability hardening.md(operator vault).🤖 Generated with Claude Code