feat(team-creator v2): SUB-2 catalog-driven pk-team-create + Phase A backfill#26
Closed
projectious wants to merge 2 commits into
Closed
feat(team-creator v2): SUB-2 catalog-driven pk-team-create + Phase A backfill#26projectious wants to merge 2 commits into
projectious wants to merge 2 commits into
Conversation
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>
ed5be3c to
a2f6cef
Compare
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
Wave 4 SUB-2 of VastVale (gh#20). Builds on SUB-1 (PR #25) — uses the new
create_role_slotandfill_role_slotMCP 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-createcutover: deleted the 8x archetype-Role / 8x Actor / 8x role-assignment-Binding writes from step 6. Replaced withcreate_role_slot+fill_role_slot. Added--chartering-scopeand--archetype-catalog-mappingflags.pk-team-rebalance: archetype-name resolution; re-fill viafill_role_slotinstead of clone Actor. Step 5 deactivation usesclose_role_slot+end_binding.pk-team-review: archetype-labelled diff rows.inputs_snapshotextension:archetype_catalog_mapping_file,archetype_catalog_overrides[],chartering_scope,role_slots[]. No schema change (additionalProperties: trueon spec).clone_cap/cap_escalation/primary_contact/is_template/templated_fromreferences replaced throughoutteam-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-fillrole-slot-fillBindings.test_team_manager.pypass on bothsrc/andcontext/.Test plan
pk-team-createcreates RoleSlots (no Roles, no Actors, no role-assignment Bindings) on a fresh charter.context/team/archetype-catalog-mapping.yamllayers correctly.apply_migration_2139.pyagainst this repo — expect no-op (project is v2-native).processkit-gateway/mcp/tool-catalog.jsonlistscreate_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)
superseded_byonce their charter has fully cut over.apply_migration_2139.pyrequires--chartering-scopeon CLI today — for one-click migration apply on derived projects, addchartering_scopeto the Migration entity itself.Depends on
🤖 Generated with Claude Code