Skip to content

feat(team-creator v2): SUB-2 catalog-driven pk-team-create + Phase A backfill#28

Merged
projectious merged 1 commit into
mainfrom
feat/sub-2-catalog-driven
May 9, 2026
Merged

feat(team-creator v2): SUB-2 catalog-driven pk-team-create + Phase A backfill#28
projectious merged 1 commit into
mainfrom
feat/sub-2-catalog-driven

Conversation

@projectious
Copy link
Copy Markdown
Contributor

Re-targeted to main after PR #26 was auto-closed when its base branch was deleted. Same content as #26.

🤖 Generated with Claude Code

Wave 4 SUB-2 (BACK-LuckyWren, gh#20). Cuts pk-team-create over to
RoleSlots — no more archetype Roles. Builds on SUB-1's RoleSlot
primitive + 5 MCP tools.

- New `assets/archetype-catalog-mapping.yaml` (kit-default 8 archetype
  -> ROLE-* mappings). Project override path:
  context/team/archetype-catalog-mapping.yaml (delta-merged on top).
- New `team_creator_lib.py` with load_archetype_catalog_mapping,
  resolve_archetype, archetype_for_role_slot helpers.
- pk-team-create cutover: deleted role-management.create_role x8 +
  actor-profile.create_actor x8 + binding-management.create_binding
  (type=role-assignment) x8 from step 6. Replaced with
  team-manager.create_role_slot + fill_role_slot calls. Added
  --chartering-scope and --archetype-catalog-mapping CLI flags.
- pk-team-rebalance: archetype-name resolution; re-fill via
  fill_role_slot instead of clone Actor. Step 5 deactivation now
  uses close_role_slot + end_binding.
- pk-team-review: archetype-labelled diff rows.
- Chartering DEC inputs_snapshot: added archetype_catalog_mapping_file
  (kit-default | project | cli), archetype_catalog_overrides[],
  chartering_scope, role_slots[] back-pointer (no schema bump needed -
  decisionrecord.yaml has additionalProperties: true on spec).
- v0.16.0 doc scrub: clone_cap / cap_escalation / primary_contact /
  is_template / templated_from references replaced throughout
  team-creator/. Remaining 14 hits are deliberate v1-history
  annotations.
- New apply_migration_2139.py: idempotent backfill script for the
  migration entity SUB-1 shipped. v2-native projects (this repo) are
  no-op; derived projects (aibox) materialise SLOTs from legacy
  archetype-spawned Roles + back-fill role-slot-fill Bindings from
  v1 role-assignment Bindings.
- Gateway tool-catalog regenerated via `python server.py catalog`:
  152 tools (+339/-5 from SUB-1's 5 new RoleSlot tools).
- 13 new tests; all 77 in test_team_manager.py pass on both trees.

Open follow-ups for SUB-3 / SUB-4:
- SUB-3 builds on fill_role_slot's valid_from/valid_until plumbing
  cleanly (no friction).
- SUB-4 extends inputs_snapshot's chartering_scope + role_slots[]
  added here.
- A future doctor check could flag legacy archetype Roles as
  superseded after their charter has fully cut over.
- apply_migration_2139.py CLI argparses chartering_scope; if we want
  one-click migration apply, add chartering_scope to the Migration
  entity itself (deferrable).

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.

2 participants