Skip to content

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

Closed
projectious wants to merge 2 commits into
feat/sub-1-roleslot-primitivefrom
feat/sub-2-catalog-driven
Closed

feat(team-creator v2): SUB-2 catalog-driven pk-team-create + Phase A backfill#26
projectious wants to merge 2 commits into
feat/sub-1-roleslot-primitivefrom
feat/sub-2-catalog-driven

Conversation

@projectious
Copy link
Copy Markdown
Contributor

Summary

Wave 4 SUB-2 of VastVale (gh#20). Builds on SUB-1 (PR #25) — uses the new create_role_slot and fill_role_slot MCP tools to charter teams without writing v1 archetype Roles.

Base: feat/sub-1-roleslot-primitive (PR #25). Will rebase up the chain when #24 and #25 land on main.

What ships

  • assets/archetype-catalog-mapping.yaml (new): kit-default 8-archetype → ROLE-* mapping. Project override: context/team/archetype-catalog-mapping.yaml (delta-merged).
  • team_creator_lib.py (new, 291 lines): load_archetype_catalog_mapping, resolve_archetype, archetype_for_role_slot.
  • pk-team-create cutover: deleted the 8x archetype-Role / 8x Actor / 8x role-assignment-Binding writes from step 6. Replaced with create_role_slot + fill_role_slot. Added --chartering-scope and --archetype-catalog-mapping flags.
  • pk-team-rebalance: archetype-name resolution; re-fill via fill_role_slot instead of clone Actor. Step 5 deactivation uses close_role_slot + end_binding.
  • pk-team-review: archetype-labelled diff rows.
  • DEC inputs_snapshot extension: archetype_catalog_mapping_file, archetype_catalog_overrides[], chartering_scope, role_slots[]. No schema change (additionalProperties: true on spec).
  • v0.16.0 doc scrub: clone_cap / cap_escalation / primary_contact / is_template / templated_from references replaced throughout team-creator/. 14 remaining hits are deliberate v1-history annotations.
  • apply_migration_2139.py (new, 407 lines): idempotent Phase A backfill for the migration SUB-1 shipped. v2-native projects no-op; derived projects (aibox) materialise SLOTs + back-fill role-slot-fill Bindings.
  • Gateway tool-catalog regenerated: 152 tools (+339/-5 reflecting SUB-1's 5 new RoleSlot tools).
  • 13 new tests; all 77 in test_team_manager.py pass on both src/ and context/.

Test plan

  • Restart MCP servers; verify pk-team-create creates RoleSlots (no Roles, no Actors, no role-assignment Bindings) on a fresh charter.
  • Verify project-override mapping at context/team/archetype-catalog-mapping.yaml layers correctly.
  • Run apply_migration_2139.py against this repo — expect no-op (project is v2-native).
  • Verify processkit-gateway/mcp/tool-catalog.json lists create_role_slot, get_role_slot, list_role_slots, fill_role_slot, close_role_slot.
  • diff -r --exclude=__pycache__ src/context/skills/processkit/ context/skills/processkit/ clean.

Open follow-ups (not in this PR)

  • A future pk-doctor check could flag legacy archetype Roles as superseded_by once their charter has fully cut over.
  • apply_migration_2139.py requires --chartering-scope on CLI today — for one-click migration apply on derived projects, add chartering_scope to the Migration entity itself.

Depends on

🤖 Generated with Claude Code

claude added 2 commits May 9, 2026 23:43
Phase A of VastVale (gh#20) team-creator v2 — additive, reversible.
The cutover (Phase B) and v0.16.0 field cleanup (Phase C) are future
sub-WorkItems.

- New SCHEMA-roleslot v1.0.0 (id pattern SLOT-<scope>-<role>-<rank>;
  state machine open -> filled -> closed; closed_at + close_reason
  added for terminal-state forensics, strictly additive)
- binding.yaml gains role-slot-fill known_type with conditional
  validation (subject TEAMMEMBER-*, target SLOT-*, target_kind RoleSlot)
- _lib/processkit indexes RoleSlot in KIND_PREFIXES + DEFAULT_DIRS
- team-manager MCP server gains 5 tools: create_role_slot,
  get_role_slot, list_role_slots, fill_role_slot, close_role_slot
  (fill creates the role-slot-fill Binding inline; rollback on
  binding-write failure)
- get_interlocutor_runtime_binding gains _roleslot_pre_step:
  surfaces binding.roleslot_pre_step = {slot, team_member,
  applied_seniority} when a filled slot matches active interlocutor's
  default_role + default_seniority + scope. The 8 model-assignment
  binding layers remain unchanged.
- Migration 20260509_2139_0.25.8-to-0.26.0.md (state=pending,
  feasibility=full rollback): describes Phase A backfill plan;
  no apply script ships in this PR (no v1 archetype Roles to
  backfill from on this branch — SUB-2 LuckyWren ships the
  catalog-driven cutover that obviates the backfill).
- 11 new tests, all 68/68 team-manager tests pass on both
  src/ and context/ trees.

Findings:
- v0.16.0 capacity fields (clone_cap, cap_escalation, is_template,
  templated_from, primary_contact) are NOT in role.yaml or
  team-member.yaml — already removed at v0.19.0 actor->team-member
  migration. Field references survive only in team-creator skill docs;
  doc-scrub falls naturally to SUB-2 LuckyWren.
- RoleSlot.default_model_profile surfaces in the resolver response
  but does NOT yet wire into model-recommender Layer 8 — that's a
  deeper change excluded by "do not reshape the 8 layers" constraint.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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>
@projectious projectious force-pushed the feat/sub-1-roleslot-primitive branch from ed5be3c to a2f6cef Compare May 9, 2026 22:09
@projectious projectious deleted the branch feat/sub-1-roleslot-primitive May 9, 2026 22:10
@projectious projectious closed this May 9, 2026
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