- On session start, call
acknowledge_contract(version="v2")once before any write-side processkit tool call. - Before any sub-agent /
Taskdispatch or write-side MCP call (create_*,transition_*,link_*,record_*,open_*), callroute_task(task_description)and use its recommendations. - On any domain-relevant request, consult
skill-finder(or callfind_skill(task_description)) before acting. - Do not hand-edit files under
context/— use MCP tools. - Do not browse
context/withlsorgrep— useindex-management. - Do not edit
context/templates/(read-only upstream mirror). - Full positive actions and prohibitions: see
context/skills/processkit/skill-gate/assets/compliance-contract.md.
- Call
acknowledge_contract(version="v2")once before any write-side processkit tool call. This unblocks the skill-gate for the session. - Treat each new domain-relevant request as a routing checkpoint (see Tool routing).
- Call
route_task(task_description)before any sub-agent /Task/Agentdispatch; readrecommended_team_member_slugandrecommended_model_classfrom the response. - Pass the recommended TeamMember slug as the sub-agent's identity where the harness supports it, and pick the cheapest model in the recommended class (Haiku < Sonnet < Opus).
- Bare-model sub-agent dispatch without a prior
route_taskcall is a compliance miss.
- Consult
skill-finder(or callfind_skill(task_description)) before acting whenever there is even a 1% chance a processkit skill applies. - Call
route_task(task_description)before anycreate_*,transition_*,link_*,record_*, oropen_*tool call. - Read entities through
index-management(query_entities,get_entity,search_entities) when looking up entity content.
- Write entities through MCP tools so schema validation, state-machine enforcement, and event-log auto-entry all run.
- Create the WorkItem, DecisionRecord, Note, or Artifact in the same turn you decide on it — deferred entity creation is lost.
- Log an event after any state change that an MCP write did not already produce automatically.
- Call
record_decisionin the same turn a cross-cutting recommendation is accepted. - When the last five user messages contain explicit decision language
(approved / decided / ship it / let's go / ok / yes / confirmed),
either call
record_decisionin the same turn or callskip_decision_record(reason=...)to acknowledge the skip.
- Do not hand-edit files under
context/to create or mutate entities (use MCP tools). - Do not browse
context/withls,grep, or raw filesystem walks (useindex-management). - Do not edit any file under
context/templates/(read-only upstream mirror used as a diff baseline). - Do not hand-edit the generated harness MCP config — edit the
per-skill
mcp-config.jsonand let the installer re-merge.
| Task type | Preferred MCP entry point |
|---|---|
| Read a single entity by ID | get_entity(id=...) or kind-specific get_workitem / get_decision / get_team_member |
| Read an entity by filesystem path | get_entity_by_path(path=...) |
| List entities across kinds | list_entities(kind?, state?, limit?) |
| Search entities by text | search_entities(text) or hybrid_search_entities(text) |
| Create / mutate an entity | create_* / transition_* / record_* / open_* tools (always route_task first) |
| Run the aggregator health check | run_pk_doctor(check?, fix?) |
| Run the pre-release validation sweep | run_pk_release_audit(tree?) |
| Dispatch a sub-agent | route_task(task_description=...) first → then Agent or Task with recommended model |
The Read tool is blocked on canonical entity files (paths matching
context/{workitems,decisions,artifacts,team-members,scopes,gates,actors, roles,bindings}/*.md). A PreToolUse hook enforces this at runtime.
Read is allowed (no hook block) for:
- Skill source code under
context/skills/<skill>/— scripts, SKILL.md, configs, assets are all readable directly. - Schema definitions under
context/schemas/(reading is fine; writes require a Migration + DEC). - Log entries under
context/logs/(append-only, safe to scan). - Applied migrations under
context/migrations/applied/. - TeamMember sub-files:
persona.md,card.json, and everything underknowledge/,journal/,skills/,relations/,lessons/,private/,working/. - Any file outside
context/entirely (docs/, src/, README.md, etc.).
processkit is a versioned, provider-neutral library of process
primitives, skills, and MCP servers consumed by aibox and dogfooded
here. Run pk-resume before acting. Provider-specific files
(CLAUDE.md, CODEX.md, .cursor/rules) are thin pointers — edit
this file.
- Editing/creating a file under
context/→ callfind_skill; never hand-edit entity YAML. - Creating or transitioning any entity (WorkItem, Decision, Note,
Artifact, Discussion, Scope, Gate, Binding) → use the relevant
*-managementMCP tool. - Pending migration under
context/migrations/pending/→ usemigration-managementMCP; don't move files by hand. - Cross-cutting recommendation accepted →
record_decisionorskip_decision_record(reason=...)same turn. - Authoring/reviewing a skill →
skill-builder/skill-reviewer. - Status briefing / standup / wrap-up →
status-briefing/standup-context/session-handover. - Retro / retrospective / post-release review / post-mortem →
retrospectiveskill (/pk-retro). - Any domain-specific task (PRD, audit, research ingest, discussion,
backlog add) →
find_skillfirst; see the six mandatory skill-check classes inskill-gate/SKILL.md. - Otherwise → browse
context/skills/INDEX.mdbefore falling back to general knowledge. - Schema-invalid LogEntry repair → prefer
pk-doctor --fix=schema_filename --yes(narrow, known-safe patches like insertingactor: systemfor pre-TeamMember logs). Direct hand-edit of a schema-invalid entry is permitted as an escape hatch; commit with a clear reference. LogEntries remain append-only for the normal write path.
Call route_task(task_description) before any Task / Agent /
sub-agent dispatch and read the new fields from the response:
recommended_team_member_slug— the active TeamMember whosedefault_rolematches the routed group's preferred role. Pass it as the sub-agent's identity (Claude Code:subagent_typeor model param; other harnesses: their equivalent). WhenNone, no TeamMember binding resolves — fall back to an ephemeral(role, seniority)dispatch.recommended_model_class—"fast"or"deep". Pick the cheapest concrete model in the class (Haiku < Sonnet < Opus) before dispatching; bare-model dispatch that ignores this hint inherits the parent session's model and breaks the team-dispatch token-efficiency strategy.
This section is the long form of the sub-agent-dispatch clause in
context/skills/processkit/skill-gate/assets/compliance-contract.md.
The pk-doctor team_member_exports check warns when an active
TeamMember has no Claude sub-agent export under .claude/agents/.
Harness Agent-tool sub-agents inherit the main session's permission
policy but run ephemerally — any unallowed tool call errors
immediately rather than prompting. Delegate read-only work to
sub-agents (Read, search Bash, MCP query_* / get_* / search_* /
list_*); keep mutating work on the main session (Write, Edit,
new mkdir, MCP create_* / transition_* / record_* / link_*
/ open_* / log_event, git mutations). A sub-agent permission
block is not a cue to broaden the allowlist — move the write back to
main. If MCP servers crash, hang, or fail to exit under sub-agents,
disable sub-agent MCP use for the session and implement from the main
session until the gateway lifecycle is proven stable.
npm --prefix docs-site install && npm --prefix docs-site run build
uv run scripts/smoke-test-servers.pyHard-wrap Markdown/Python/YAML at 80 cols (exempt: tables, URLs,
frontmatter, code fences). Conventional Commits; never --no-verify.
src/ ships to consumers, context/ is local — never mix. Preferences
live in per-skill context/skills/<name>/config/settings.toml. PRs:
link WorkItem ID, squash-merge, green tests before merge.
51-role catalog under context/roles/, with pure-ordinal seniority
(junior → specialist → expert → senior → principal). Persistent
identities live as TeamMembers under context/team-members/<slug>/
(directory tree: persona + A2A card + tiered memory). Ad-hoc
invocations are ephemeral (role, seniority) dispatches resolved via
model-recommender.resolve_model against model-assignment bindings.
Role and TeamMember defaults bind to provider-neutral
Artifact(kind=model-profile) entities; concrete
Artifact(kind=model-spec) candidates are selected after runtime access
gates. Model-spec filenames may encode provider/model names; model
profiles, actors, roles, and team-member identities must not.
If team-manager.get_active_interlocutor returns a configured
TeamMember, show that identity at session start. When available, also
show team-manager.get_interlocutor_runtime_binding output: resolved
model, observed harness model/effort, and any mismatch. Otherwise state
that the current speaker is an ephemeral harness agent.
Charters: DEC-20260422_0233-SpryTulip (team-member model + memory),
DEC-20260422_0234-BraveFalcon (role catalog + seniority),
DEC-20260422_0234-LoyalComet (model artifacts + binding routing),
DEC-20260503_1829-LoyalComet (provider-neutral model profiles).
See context/team/roster.md and
context/skills/processkit/team-manager/SKILL.md.
- Required MCP servers:
index-management,id-management,workitem-management,discussion-management,decision-record,event-log,skill-finder,task-router. - Never edit
.devcontainer/Dockerfile; useDockerfile.local. apiVersionlocked through v1.x;v2requires a full migration._find_lib()uses cwd; smoke testsos.chdir()before invoking servers.
context/.processkit-mcp-manifest.json records a sha256 per
context/skills/*/*/mcp/mcp-config.json plus an aggregate_sha256 over
all of them. It is regenerated at release time by
scripts/generate-mcp-manifest.py and mirrored into
src/context/ so consumers receive it in the release tarball.
Downstream installers (notably aibox sync) are expected to compare the
aggregate hash against their last-merged state and re-merge .mcp.json
when they differ — independently of whether the processkit version
changed. Without this signal, per-skill MCP-config edits made within a
release cycle never reach derived projects until the next version bump.
Tracking issue: projectious-work/aibox#54.
The mcp_config_drift pk-doctor check validates the manifest locally.
Scaffolded by processkit v0.18.1 on 2026-04-17. Re-rendered on each installer sync.