feat(responsibilities): let agents read a person's areas and responsibilities (#22253)

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work.
> - People keep their areas and responsibilities in Paperclip
(experimental, `enableResponsibilities`). Agents chat with them about
this work.
> - Agents have no dedicated tool to read a person's responsibilities.
The only path is the generic `search_api` and `call_api` fallback.
> - That path needs the person's user ID, and nothing in a chat tells
the agent that responsibilities exist. When the feature is off, every
route returns a 404 that looks like "nothing there".
> - So a chief-of-staff agent asked the person "what are your
responsibilities, or where are they written down?" when Paperclip
already had them.
> - This pull request adds three read tools, makes the owner default to
the person the run works for, and tells agents in chats how to use the
tools or that the feature is off.
> - The benefit is that an agent reads and maps a person's
responsibilities itself. This is phase 1 of 4. Later pull requests add
the change tools for areas, responsibilities, routines and skills.

## Linked Issues or Issue Description

**Subsystem affected**

Server (responsibility routes, native runner tool authority, chat
prompt), native runner tool catalog, and the `paperclip` skill.

**Problem or motivation**

An agent in a chat cannot find a person's responsibilities. It has no
dedicated tool. The list route requires `ownerUserId` from an agent, and
the chat does not give the agent that ID. The chat prompt does not
mention responsibilities. When the experiment is off, the 404 does not
tell the agent that the feature is off. The agent then asks the person
to list their responsibilities again.

**Proposed solution**

Add three optional native tools: `list_responsibilities`,
`get_responsibility` and `find_responsibilities_for`. They call the
existing routes with the run's agent token, so all route checks and the
activity log stay the same. The owner defaults to the person the run
works for. The routes return a `responsibilities_disabled` code while
the feature is off. The tools are hidden while the feature is off, and
the chat prompt then says that the feature is off.

**Alternatives considered**

Better `search_api` guidance alone still needs the user ID and many
calls. A new read service in the tool authority would copy the route
permission rules. The tools use the routes instead.

## What Changed

- Add `list_responsibilities` (areas with their responsibilities,
responsibilities with no area, totals, and company work filed under no
responsibility), `get_responsibility` (one responsibility with its filed
items, link IDs, skills and latest status report), and
`find_responsibilities_for` (where a project, task or routine is filed;
a task can be a `PAP-12` identifier).
- Add `server/src/services/responsibility-tools.ts`. It calls the routes
over HTTP with the run token and returns compact results with page
links.
- When an agent sends no `ownerUserId`, the responsibility list, create,
summary, automation and dashboard routes use the person the run works
for (`onBehalfOfUserId`). A run that works for no person still gets a
422 with a clear message.
- The nine "not enabled" checks now throw one shared error. The 404 and
its message do not change. The body now also has `code:
"responsibilities_disabled"` and a remediation line. One
`RESPONSIBILITIES_OFF_GUIDANCE` text is the remediation, the tool error
and the chat prompt note.
- `list_responsibilities` with `areaId` counts only that area. Archived
areas are listed only on request. When only proposals are hidden, the
tool says so.
- `services/paperclip-api-loopback.ts` holds the tools' authenticated
API call; the project tools use it too.
- Show the tools only while the instance has Responsibilities on. A
hidden tool that is called by name returns "Areas and responsibilities
are turned off".
- In standing chats, add an "Areas and responsibilities" prompt block:
use the tools before you ask the person, or say that the feature is off.
- `search_api` results for these routes now name the dedicated tools.
- Add an "Areas and responsibilities" section to
`skills/paperclip/SKILL.md` and to `references/api-reference.md`. Add
one line to the chief-of-staff persona.
- Register the tools in the runner catalogs. Regenerate the semantic
contracts, the action catalog, protocol coverage, the operation-groups
spec and the capability inventory. Update the pinned counts.

## Verification

- `pnpm --filter @paperclipai/paperclip-runner exec vitest run
src/catalog src/semantic-tools src/tools src/eval/workflow-evals.test.ts
src/protocol-actions src/evals/native-execution.test.ts
src/drivers/acpx/permission-policy.test.ts`: 276 passed.
- All runner generator checks pass: protocol manifest, capability
contract, capability inventory, protocol coverage, semantic contracts,
semantic action catalog, operation groups, replay goldens, workflow
traceability.
- Server: `vitest run` of `responsibilit*` route tests,
`responsibility-tools.test.ts` (new), `task-markdown.test.ts`,
`task-context*`, `paperclip-runner-tool-authority.test.ts`,
`runner-api.test.ts`, onboarding first-task tests and
`user-facing-wording-guidance.test.ts`: 20 files, 2620 tests passed.
- `node scripts/typecheck-layers.mjs` for the server: passed.
- New tests cover these items: the owner default for an agent and the
422 without a person, the `responsibilities_disabled` code on every
route, the tool projections, an identifier lookup, the "turned off"
mapping, the tool visibility switch, and the chat prompt block.

## Risks

- Low risk. The routes keep their permission checks. Agents can still
only read and propose in this phase.
- An agent that sends no `ownerUserId` now gets the responsible person's
list instead of a 422. Agents that name an owner see no change.
- The chat prompt gets one more short block in standing chats.
- The flag is pinned when a turn opens. If an admin changes it during a
turn, the tool list changes on the next turn. The routes always check
the current setting.

## Model Used

Claude Opus 5.5 (`claude-opus-5-5`) in Claude Code, with tool use and
code execution.

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 5.5 authored and GitHub committed 2026-11-19 08:52:42 -06:00
1 parent 53fedd653b
commit ffcd49f6aa
56 files changed
+1364 -381

No files matched your search

@@ -8,9 +8,9 @@ The skill/reference inventory and eval cases are the only normative behavior sou
## Baseline Counts
- Skill/reference headings: 174
- Skill/reference headings: 176
- Eval cases: 106 across 16 groups
- Total normative rows: 280
- Total normative rows: 282
- Legacy MCP aliases folded into normative rows: 42
| Eval group | Cases |
@@ -49,36 +49,37 @@ The skill/reference inventory and eval cases are the only normative behavior sou
| skill:skills/paperclip/SKILL.md:the-heartbeat-procedure:94 | optional_agent_tool | skills/paperclip/SKILL.md:94 |
| skill:skills/paperclip/SKILL.md:generated-artifacts-and-work-products:206 | always_agent_tool | skills/paperclip/SKILL.md:206 |
| skill:skills/paperclip/SKILL.md:offer-a-routine-after-recurring-work:252 | optional_agent_tool | skills/paperclip/SKILL.md:252 |
| skill:skills/paperclip/SKILL.md:propose-a-bar-in-a-bar-conversation:275 | optional_agent_tool | skills/paperclip/SKILL.md:275 |
| skill:skills/paperclip/SKILL.md:propose-an-automation-in-an-automation-conversation:279 | optional_agent_tool | skills/paperclip/SKILL.md:279 |
| skill:skills/paperclip/SKILL.md:write-a-responsibility-s-status:283 | optional_agent_tool | skills/paperclip/SKILL.md:283 |
| skill:skills/paperclip/SKILL.md:status-quick-guide:289 | control_plane_owned | skills/paperclip/SKILL.md:289 |
| skill:skills/paperclip/SKILL.md:monitors-and-watchers-say-only-what-you-actually-scheduled:299 | optional_agent_tool | skills/paperclip/SKILL.md:299 |
| skill:skills/paperclip/SKILL.md:delegating-review-tasks:320 | always_agent_tool | skills/paperclip/SKILL.md:320 |
| skill:skills/paperclip/SKILL.md:managing-a-user-s-inbox:331 | control_plane_owned | skills/paperclip/SKILL.md:331 |
| skill:skills/paperclip/SKILL.md:issue-dependencies-blockers:339 | control_plane_owned | skills/paperclip/SKILL.md:339 |
| skill:skills/paperclip/SKILL.md:requesting-board-approval:364 | optional_agent_tool | skills/paperclip/SKILL.md:364 |
| skill:skills/paperclip/SKILL.md:issue-thread-interactions:385 | optional_agent_tool | skills/paperclip/SKILL.md:385 |
| skill:skills/paperclip/SKILL.md:standalone-decisions:415 | optional_agent_tool | skills/paperclip/SKILL.md:415 |
| skill:skills/paperclip/SKILL.md:mcp-tool-approval-gates:519 | optional_agent_tool | skills/paperclip/SKILL.md:519 |
| skill:skills/paperclip/SKILL.md:niche-workflow-pointers:561 | optional_agent_tool | skills/paperclip/SKILL.md:561 |
| skill:skills/paperclip/SKILL.md:cases:571 | optional_agent_tool | skills/paperclip/SKILL.md:571 |
| skill:skills/paperclip/SKILL.md:company-skills-workflow:576 | optional_agent_tool | skills/paperclip/SKILL.md:576 |
| skill:skills/paperclip/SKILL.md:routines:587 | optional_agent_tool | skills/paperclip/SKILL.md:587 |
| skill:skills/paperclip/SKILL.md:task-files-and-workspace-choices:599 | optional_agent_tool | skills/paperclip/SKILL.md:599 |
| skill:skills/paperclip/SKILL.md:issue-workspace-runtime-controls:607 | optional_agent_tool | skills/paperclip/SKILL.md:607 |
| skill:skills/paperclip/SKILL.md:proposing-credentials-safely:614 | optional_agent_tool | skills/paperclip/SKILL.md:614 |
| skill:skills/paperclip/SKILL.md:reading-granted-secrets:621 | optional_agent_tool | skills/paperclip/SKILL.md:621 |
| skill:skills/paperclip/SKILL.md:critical-rules:647 | optional_agent_tool | skills/paperclip/SKILL.md:647 |
| skill:skills/paperclip/SKILL.md:comment-style-required:668 | always_agent_tool | skills/paperclip/SKILL.md:668 |
| skill:skills/paperclip/SKILL.md:update:704 | optional_agent_tool | skills/paperclip/SKILL.md:704 |
| skill:skills/paperclip/SKILL.md:task-documents-and-deliverables:714 | always_agent_tool | skills/paperclip/SKILL.md:714 |
| skill:skills/paperclip/SKILL.md:planning-required-when-planning-requested:728 | optional_agent_tool | skills/paperclip/SKILL.md:728 |
| skill:skills/paperclip/SKILL.md:key-endpoints-hot-routes:759 | optional_agent_tool | skills/paperclip/SKILL.md:759 |
| skill:skills/paperclip/SKILL.md:searching-issues:789 | optional_agent_tool | skills/paperclip/SKILL.md:789 |
| skill:skills/paperclip/SKILL.md:full-reference:799 | optional_agent_tool | skills/paperclip/SKILL.md:799 |
| skill:skills/paperclip/SKILL.md:conversational-confirmation-answers:803 | always_agent_tool | skills/paperclip/SKILL.md:803 |
| skill:skills/paperclip/SKILL.md:incidental-feedback:820 | optional_agent_tool | skills/paperclip/SKILL.md:820 |
| skill:skills/paperclip/SKILL.md:areas-and-responsibilities:275 | optional_agent_tool | skills/paperclip/SKILL.md:275 |
| skill:skills/paperclip/SKILL.md:propose-a-bar-in-a-bar-conversation:285 | optional_agent_tool | skills/paperclip/SKILL.md:285 |
| skill:skills/paperclip/SKILL.md:propose-an-automation-in-an-automation-conversation:289 | optional_agent_tool | skills/paperclip/SKILL.md:289 |
| skill:skills/paperclip/SKILL.md:write-a-responsibility-s-status:293 | optional_agent_tool | skills/paperclip/SKILL.md:293 |
| skill:skills/paperclip/SKILL.md:status-quick-guide:299 | control_plane_owned | skills/paperclip/SKILL.md:299 |
| skill:skills/paperclip/SKILL.md:monitors-and-watchers-say-only-what-you-actually-scheduled:309 | optional_agent_tool | skills/paperclip/SKILL.md:309 |
| skill:skills/paperclip/SKILL.md:delegating-review-tasks:330 | always_agent_tool | skills/paperclip/SKILL.md:330 |
| skill:skills/paperclip/SKILL.md:managing-a-user-s-inbox:341 | control_plane_owned | skills/paperclip/SKILL.md:341 |
| skill:skills/paperclip/SKILL.md:issue-dependencies-blockers:349 | control_plane_owned | skills/paperclip/SKILL.md:349 |
| skill:skills/paperclip/SKILL.md:requesting-board-approval:374 | optional_agent_tool | skills/paperclip/SKILL.md:374 |
| skill:skills/paperclip/SKILL.md:issue-thread-interactions:395 | optional_agent_tool | skills/paperclip/SKILL.md:395 |
| skill:skills/paperclip/SKILL.md:standalone-decisions:425 | optional_agent_tool | skills/paperclip/SKILL.md:425 |
| skill:skills/paperclip/SKILL.md:mcp-tool-approval-gates:529 | optional_agent_tool | skills/paperclip/SKILL.md:529 |
| skill:skills/paperclip/SKILL.md:niche-workflow-pointers:571 | optional_agent_tool | skills/paperclip/SKILL.md:571 |
| skill:skills/paperclip/SKILL.md:cases:581 | optional_agent_tool | skills/paperclip/SKILL.md:581 |
| skill:skills/paperclip/SKILL.md:company-skills-workflow:586 | optional_agent_tool | skills/paperclip/SKILL.md:586 |
| skill:skills/paperclip/SKILL.md:routines:597 | optional_agent_tool | skills/paperclip/SKILL.md:597 |
| skill:skills/paperclip/SKILL.md:task-files-and-workspace-choices:609 | optional_agent_tool | skills/paperclip/SKILL.md:609 |
| skill:skills/paperclip/SKILL.md:issue-workspace-runtime-controls:617 | optional_agent_tool | skills/paperclip/SKILL.md:617 |
| skill:skills/paperclip/SKILL.md:proposing-credentials-safely:624 | optional_agent_tool | skills/paperclip/SKILL.md:624 |
| skill:skills/paperclip/SKILL.md:reading-granted-secrets:631 | optional_agent_tool | skills/paperclip/SKILL.md:631 |
| skill:skills/paperclip/SKILL.md:critical-rules:657 | optional_agent_tool | skills/paperclip/SKILL.md:657 |
| skill:skills/paperclip/SKILL.md:comment-style-required:678 | always_agent_tool | skills/paperclip/SKILL.md:678 |
| skill:skills/paperclip/SKILL.md:update:714 | optional_agent_tool | skills/paperclip/SKILL.md:714 |
| skill:skills/paperclip/SKILL.md:task-documents-and-deliverables:724 | always_agent_tool | skills/paperclip/SKILL.md:724 |
| skill:skills/paperclip/SKILL.md:planning-required-when-planning-requested:738 | optional_agent_tool | skills/paperclip/SKILL.md:738 |
| skill:skills/paperclip/SKILL.md:key-endpoints-hot-routes:769 | optional_agent_tool | skills/paperclip/SKILL.md:769 |
| skill:skills/paperclip/SKILL.md:searching-issues:799 | optional_agent_tool | skills/paperclip/SKILL.md:799 |
| skill:skills/paperclip/SKILL.md:full-reference:809 | optional_agent_tool | skills/paperclip/SKILL.md:809 |
| skill:skills/paperclip/SKILL.md:conversational-confirmation-answers:813 | always_agent_tool | skills/paperclip/SKILL.md:813 |
| skill:skills/paperclip/SKILL.md:incidental-feedback:830 | optional_agent_tool | skills/paperclip/SKILL.md:830 |
| skill:skills/paperclip/references/api-reference.md:paperclip-api-reference:1 | optional_agent_tool | skills/paperclip/references/api-reference.md:1 |
| skill:skills/paperclip/references/api-reference.md:response-schemas:9 | optional_agent_tool | skills/paperclip/references/api-reference.md:9 |
| skill:skills/paperclip/references/api-reference.md:agent-record-get-api-agents-me-or-get-api-agents-agentid:11 | optional_agent_tool | skills/paperclip/references/api-reference.md:11 |
@@ -144,15 +145,16 @@ The skill/reference inventory and eval cases are the only normative behavior sou
| skill:skills/paperclip/references/api-reference.md:issues-tasks:1413 | optional_agent_tool | skills/paperclip/references/api-reference.md:1413 |
| skill:skills/paperclip/references/api-reference.md:companies-projects-goals:1454 | optional_agent_tool | skills/paperclip/references/api-reference.md:1454 |
| skill:skills/paperclip/references/api-reference.md:routines:1478 | optional_agent_tool | skills/paperclip/references/api-reference.md:1478 |
| skill:skills/paperclip/references/api-reference.md:responsibility-bars:1502 | optional_agent_tool | skills/paperclip/references/api-reference.md:1502 |
| skill:skills/paperclip/references/api-reference.md:automation-conversations-and-standing-checks:1525 | optional_agent_tool | skills/paperclip/references/api-reference.md:1525 |
| skill:skills/paperclip/references/api-reference.md:dashboard-conversations:1541 | optional_agent_tool | skills/paperclip/references/api-reference.md:1541 |
| skill:skills/paperclip/references/api-reference.md:responsibility-status:1556 | optional_agent_tool | skills/paperclip/references/api-reference.md:1556 |
| skill:skills/paperclip/references/api-reference.md:approvals-costs-activity-dashboard:1572 | optional_agent_tool | skills/paperclip/references/api-reference.md:1572 |
| skill:skills/paperclip/references/api-reference.md:secrets:1594 | optional_agent_tool | skills/paperclip/references/api-reference.md:1594 |
| skill:skills/paperclip/references/api-reference.md:agent-secret-proposals:1607 | optional_agent_tool | skills/paperclip/references/api-reference.md:1607 |
| skill:skills/paperclip/references/api-reference.md:agent-secret-access:1707 | optional_agent_tool | skills/paperclip/references/api-reference.md:1707 |
| skill:skills/paperclip/references/api-reference.md:common-mistakes:1747 | optional_agent_tool | skills/paperclip/references/api-reference.md:1747 |
| skill:skills/paperclip/references/api-reference.md:areas-and-responsibilities:1502 | optional_agent_tool | skills/paperclip/references/api-reference.md:1502 |
| skill:skills/paperclip/references/api-reference.md:responsibility-bars:1513 | optional_agent_tool | skills/paperclip/references/api-reference.md:1513 |
| skill:skills/paperclip/references/api-reference.md:automation-conversations-and-standing-checks:1536 | optional_agent_tool | skills/paperclip/references/api-reference.md:1536 |
| skill:skills/paperclip/references/api-reference.md:dashboard-conversations:1552 | optional_agent_tool | skills/paperclip/references/api-reference.md:1552 |
| skill:skills/paperclip/references/api-reference.md:responsibility-status:1567 | optional_agent_tool | skills/paperclip/references/api-reference.md:1567 |
| skill:skills/paperclip/references/api-reference.md:approvals-costs-activity-dashboard:1583 | optional_agent_tool | skills/paperclip/references/api-reference.md:1583 |
| skill:skills/paperclip/references/api-reference.md:secrets:1605 | optional_agent_tool | skills/paperclip/references/api-reference.md:1605 |
| skill:skills/paperclip/references/api-reference.md:agent-secret-proposals:1618 | optional_agent_tool | skills/paperclip/references/api-reference.md:1618 |
| skill:skills/paperclip/references/api-reference.md:agent-secret-access:1718 | optional_agent_tool | skills/paperclip/references/api-reference.md:1718 |
| skill:skills/paperclip/references/api-reference.md:common-mistakes:1758 | optional_agent_tool | skills/paperclip/references/api-reference.md:1758 |
| skill:skills/paperclip/references/artifacts.md:generated-artifacts-and-work-products:1 | always_agent_tool | skills/paperclip/references/artifacts.md:1 |
| skill:skills/paperclip/references/artifacts.md:workspace-only-file-references:15 | optional_agent_tool | skills/paperclip/references/artifacts.md:15 |
| skill:skills/paperclip/references/cases.md:cases:1 | optional_agent_tool | skills/paperclip/references/cases.md:1 |
@@ -76,35 +76,35 @@
{
"id": "skill:skills/paperclip/SKILL.md:275",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L275:propose-a-bar-in-a-bar-conversation",
"sourceAnchor": "skills/paperclip/SKILL.md#L275:areas-and-responsibilities",
"heading": "Areas and responsibilities",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:285",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L285:propose-a-bar-in-a-bar-conversation",
"heading": "Propose a bar in a bar conversation",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:279",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L279:propose-an-automation-in-an-automation-conversation",
"heading": "Propose an automation in an automation conversation",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:283",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L283:write-a-responsibility-s-status",
"heading": "Write a responsibility's status",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:289",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L289:status-quick-guide",
"heading": "Status Quick Guide",
"sourceAnchor": "skills/paperclip/SKILL.md#L289:propose-an-automation-in-an-automation-conversation",
"heading": "Propose an automation in an automation conversation",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:293",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L293:write-a-responsibility-s-status",
"heading": "Write a responsibility's status",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
@@ -112,232 +112,241 @@
{
"id": "skill:skills/paperclip/SKILL.md:299",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L299:monitors-and-watchers-say-only-what-you-actually-scheduled",
"sourceAnchor": "skills/paperclip/SKILL.md#L299:status-quick-guide",
"heading": "Status Quick Guide",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:309",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L309:monitors-and-watchers-say-only-what-you-actually-scheduled",
"heading": "Monitors and Watchers (say only what you actually scheduled)",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:320",
"id": "skill:skills/paperclip/SKILL.md:330",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L320:delegating-review-tasks",
"sourceAnchor": "skills/paperclip/SKILL.md#L330:delegating-review-tasks",
"heading": "Delegating review tasks",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:331",
"id": "skill:skills/paperclip/SKILL.md:341",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L331:managing-a-user-s-inbox",
"sourceAnchor": "skills/paperclip/SKILL.md#L341:managing-a-user-s-inbox",
"heading": "Managing A User's Inbox",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:339",
"id": "skill:skills/paperclip/SKILL.md:349",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L339:issue-dependencies-blockers",
"sourceAnchor": "skills/paperclip/SKILL.md#L349:issue-dependencies-blockers",
"heading": "Issue Dependencies (Blockers)",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:364",
"id": "skill:skills/paperclip/SKILL.md:374",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L364:requesting-board-approval",
"sourceAnchor": "skills/paperclip/SKILL.md#L374:requesting-board-approval",
"heading": "Requesting Board Approval",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:385",
"id": "skill:skills/paperclip/SKILL.md:395",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L385:issue-thread-interactions",
"sourceAnchor": "skills/paperclip/SKILL.md#L395:issue-thread-interactions",
"heading": "Issue-Thread Interactions",
"primaryDisposition": "always_agent_tool",
"semanticOperation": "request_human_input",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:415",
"id": "skill:skills/paperclip/SKILL.md:425",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L415:standalone-decisions",
"sourceAnchor": "skills/paperclip/SKILL.md#L425:standalone-decisions",
"heading": "Standalone Decisions",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:519",
"id": "skill:skills/paperclip/SKILL.md:529",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L519:mcp-tool-approval-gates",
"sourceAnchor": "skills/paperclip/SKILL.md#L529:mcp-tool-approval-gates",
"heading": "MCP Tool Approval Gates",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:561",
"id": "skill:skills/paperclip/SKILL.md:571",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L561:niche-workflow-pointers",
"sourceAnchor": "skills/paperclip/SKILL.md#L571:niche-workflow-pointers",
"heading": "Niche Workflow Pointers",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:571",
"id": "skill:skills/paperclip/SKILL.md:581",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L571:cases",
"sourceAnchor": "skills/paperclip/SKILL.md#L581:cases",
"heading": "Cases",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:576",
"id": "skill:skills/paperclip/SKILL.md:586",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L576:company-skills-workflow",
"sourceAnchor": "skills/paperclip/SKILL.md#L586:company-skills-workflow",
"heading": "Company Skills Workflow",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:587",
"id": "skill:skills/paperclip/SKILL.md:597",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L587:routines",
"sourceAnchor": "skills/paperclip/SKILL.md#L597:routines",
"heading": "Routines",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:599",
"id": "skill:skills/paperclip/SKILL.md:609",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L599:task-files-and-workspace-choices",
"sourceAnchor": "skills/paperclip/SKILL.md#L609:task-files-and-workspace-choices",
"heading": "Task Files and Workspace Choices",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:607",
"id": "skill:skills/paperclip/SKILL.md:617",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L607:issue-workspace-runtime-controls",
"sourceAnchor": "skills/paperclip/SKILL.md#L617:issue-workspace-runtime-controls",
"heading": "Issue Workspace Runtime Controls",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:614",
"id": "skill:skills/paperclip/SKILL.md:624",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L614:proposing-credentials-safely",
"sourceAnchor": "skills/paperclip/SKILL.md#L624:proposing-credentials-safely",
"heading": "Proposing Credentials Safely",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:621",
"id": "skill:skills/paperclip/SKILL.md:631",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L621:reading-granted-secrets",
"sourceAnchor": "skills/paperclip/SKILL.md#L631:reading-granted-secrets",
"heading": "Reading Granted Secrets",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:647",
"id": "skill:skills/paperclip/SKILL.md:657",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L647:critical-rules",
"sourceAnchor": "skills/paperclip/SKILL.md#L657:critical-rules",
"heading": "Critical Rules",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:668",
"id": "skill:skills/paperclip/SKILL.md:678",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L668:comment-style-required",
"sourceAnchor": "skills/paperclip/SKILL.md#L678:comment-style-required",
"heading": "Comment Style (Required)",
"primaryDisposition": "always_agent_tool",
"semanticOperation": "report_progress",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:704",
"id": "skill:skills/paperclip/SKILL.md:714",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L704:update",
"sourceAnchor": "skills/paperclip/SKILL.md#L714:update",
"heading": "Update",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:714",
"id": "skill:skills/paperclip/SKILL.md:724",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L714:task-documents-and-deliverables",
"sourceAnchor": "skills/paperclip/SKILL.md#L724:task-documents-and-deliverables",
"heading": "Task Documents and Deliverables",
"primaryDisposition": "always_agent_tool",
"semanticOperation": "write_document",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:728",
"id": "skill:skills/paperclip/SKILL.md:738",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L728:planning-required-when-planning-requested",
"sourceAnchor": "skills/paperclip/SKILL.md#L738:planning-required-when-planning-requested",
"heading": "Planning (Required when planning requested)",
"primaryDisposition": "always_agent_tool",
"semanticOperation": "write_document",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:759",
"id": "skill:skills/paperclip/SKILL.md:769",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L759:key-endpoints-hot-routes",
"sourceAnchor": "skills/paperclip/SKILL.md#L769:key-endpoints-hot-routes",
"heading": "Key Endpoints (Hot Routes)",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:789",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L789:searching-issues",
"heading": "Searching Issues",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:799",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L799:full-reference",
"sourceAnchor": "skills/paperclip/SKILL.md#L799:searching-issues",
"heading": "Searching Issues",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:809",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L809:full-reference",
"heading": "Full Reference",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/SKILL.md:803",
"id": "skill:skills/paperclip/SKILL.md:813",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L803:conversational-confirmation-answers",
"sourceAnchor": "skills/paperclip/SKILL.md#L813:conversational-confirmation-answers",
"heading": "Conversational confirmation answers",
"primaryDisposition": "always_agent_tool",
"semanticOperation": "call_api",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/SKILL.md:820",
"id": "skill:skills/paperclip/SKILL.md:830",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md#L820:incidental-feedback",
"sourceAnchor": "skills/paperclip/SKILL.md#L830:incidental-feedback",
"heading": "Incidental feedback",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
@@ -931,88 +940,97 @@
{
"id": "skill:skills/paperclip/references/api-reference.md:1502",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1502:responsibility-bars",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1502:areas-and-responsibilities",
"heading": "Areas and responsibilities",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1513",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1513:responsibility-bars",
"heading": "Responsibility bars",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1525",
"id": "skill:skills/paperclip/references/api-reference.md:1536",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1525:automation-conversations-and-standing-checks",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1536:automation-conversations-and-standing-checks",
"heading": "Automation conversations and standing checks",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1541",
"id": "skill:skills/paperclip/references/api-reference.md:1552",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1541:dashboard-conversations",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1552:dashboard-conversations",
"heading": "Dashboard conversations",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1556",
"id": "skill:skills/paperclip/references/api-reference.md:1567",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1556:responsibility-status",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1567:responsibility-status",
"heading": "Responsibility status",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1572",
"id": "skill:skills/paperclip/references/api-reference.md:1583",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1572:approvals-costs-activity-dashboard",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1583:approvals-costs-activity-dashboard",
"heading": "Approvals, Costs, Activity, Dashboard",
"primaryDisposition": "control_plane_owned",
"semanticOperation": "runtime_reconciliation",
"expectedMockState": "runtime_decision_record"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1594",
"id": "skill:skills/paperclip/references/api-reference.md:1605",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1594:secrets",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1605:secrets",
"heading": "Secrets",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1607",
"id": "skill:skills/paperclip/references/api-reference.md:1618",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1607:agent-secret-proposals",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1618:agent-secret-proposals",
"heading": "Agent secret proposals",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1660",
"id": "skill:skills/paperclip/references/api-reference.md:1671",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1660:re-bind-an-existing-secret-under-a-new-path-no-secret-id",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1671:re-bind-an-existing-secret-under-a-new-path-no-secret-id",
"heading": "Re-bind an existing secret under a new path (no secret ID)",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1707",
"id": "skill:skills/paperclip/references/api-reference.md:1718",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1707:agent-secret-access",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1718:agent-secret-access",
"heading": "Agent secret access",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
"expectedMockState": "operation_result"
},
{
"id": "skill:skills/paperclip/references/api-reference.md:1747",
"id": "skill:skills/paperclip/references/api-reference.md:1758",
"kind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1747:common-mistakes",
"sourceAnchor": "skills/paperclip/references/api-reference.md#L1758:common-mistakes",
"heading": "Common Mistakes",
"primaryDisposition": "optional_agent_tool",
"semanticOperation": "scoped_discovery",
@@ -2,9 +2,9 @@
Generated by `scripts/generate-capability-contract.mjs`; do not edit generated files.
- Skill/reference headings: 175
- Skill/reference headings: 177
- Legacy MCP tools: 42
- Eval cases: 106 across 16 groups
- Deterministic content SHA-256: `2c2f86648c99844738032571482fa9f4d922f5dc69da1ea9085228bdd5115494`
- Deterministic content SHA-256: `71c8d49d12cf233ae5c7404fd8ad3f84d97a3ce1d30ba61a8d631ffedbf8f890`
Every row has exactly one primary disposition, a source anchor, a semantic operation, and a mock-state expectation.
@@ -1 +1 @@
[{"annotations":{"exposure":"always","operationId":"get_task_context","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read the active task and actor, including the exact approved Markdown revision when this issue has an accepted plan.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"get_task_context","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"get_task_history","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read bounded comments on the active task only. Calling get_task does not change the active task. This is not a status or assignment audit. For progress chronology and handoff actors, use search_api to discover the company timeline or issue activity, then call_api.","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},"required":[],"type":"object"},"name":"get_task_history","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"list_documents","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"List revisioned documents on the active task.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"list_documents","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"read_document","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read the current revision of one active-task document.","inputSchema":{"additionalProperties":false,"properties":{"key":{"description":"Stable document identifier, not a filename or path (for example reconciliation, not reconciliation.md). After trimming whitespace and lowercasing: 1–64 characters, starting with a letter or digit and containing only a–z, 0–9, _ or -. The raw input is limited to 120 characters.","maxLength":120,"minLength":1,"pattern":"^[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*[A-Za-z0-9\\u212a][A-Za-z0-9_\\u212a-]{0,63}[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*$","type":"string"}},"required":["key"],"type":"object"},"name":"read_document","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"list_document_revisions","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read bounded revision history for one active-task document.","inputSchema":{"additionalProperties":false,"properties":{"key":{"description":"Stable document identifier, not a filename or path (for example reconciliation, not reconciliation.md). After trimming whitespace and lowercasing: 1–64 characters, starting with a letter or digit and containing only a–z, 0–9, _ or -. The raw input is limited to 120 characters.","maxLength":120,"minLength":1,"pattern":"^[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*[A-Za-z0-9\\u212a][A-Za-z0-9_\\u212a-]{0,63}[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*$","type":"string"},"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},"required":["key"],"type":"object"},"name":"list_document_revisions","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"report_progress","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Append a durable progress comment to the active task.","inputSchema":{"additionalProperties":false,"properties":{"body":{"description":"Multiline progress update.","maxLength":20000,"minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-stable retry key.","maxLength":240,"minLength":1,"type":"string"}},"required":["idempotencyKey","body"],"type":"object"},"name":"report_progress","outputSchema":{"additionalProperties":false,"properties":{"commandId":{"description":"Stable command identifier.","maxLength":200,"minLength":1,"type":"string"},"disposition":{"enum":["applied","duplicate"]},"entityRefs":{"description":"Entities affected by the operation.","items":{"minLength":1,"type":"string"},"maxItems":200,"type":"array","uniqueItems":true},"scheduledWakeIds":{"description":"Wake identifiers scheduled by the operation.","items":{"minLength":1,"type":"string"},"maxItems":200,"type":"array","uniqueItems":true},"stateRevision":{"minimum":0,"type":"integer"}},"required":["commandId","disposition","stateRevision","entityRefs","scheduledWakeIds"],"type":"object"}},{"annotations":{"exposure":"always","operationId":"answer_status_question","requiredClaims":[],"semanticContract":"paperclip.Line truncated
[{"annotations":{"exposure":"always","operationId":"get_task_context","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read the active task and actor, including the exact approved Markdown revision when this issue has an accepted plan.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"get_task_context","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"get_task_history","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read bounded comments on the active task only. Calling get_task does not change the active task. This is not a status or assignment audit. For progress chronology and handoff actors, use search_api to discover the company timeline or issue activity, then call_api.","inputSchema":{"additionalProperties":false,"properties":{"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},"required":[],"type":"object"},"name":"get_task_history","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"list_documents","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"List revisioned documents on the active task.","inputSchema":{"additionalProperties":false,"properties":{},"required":[],"type":"object"},"name":"list_documents","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"read_document","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read the current revision of one active-task document.","inputSchema":{"additionalProperties":false,"properties":{"key":{"description":"Stable document identifier, not a filename or path (for example reconciliation, not reconciliation.md). After trimming whitespace and lowercasing: 1–64 characters, starting with a letter or digit and containing only a–z, 0–9, _ or -. The raw input is limited to 120 characters.","maxLength":120,"minLength":1,"pattern":"^[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*[A-Za-z0-9\\u212a][A-Za-z0-9_\\u212a-]{0,63}[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*$","type":"string"}},"required":["key"],"type":"object"},"name":"read_document","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"list_document_revisions","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Read bounded revision history for one active-task document.","inputSchema":{"additionalProperties":false,"properties":{"key":{"description":"Stable document identifier, not a filename or path (for example reconciliation, not reconciliation.md). After trimming whitespace and lowercasing: 1–64 characters, starting with a letter or digit and containing only a–z, 0–9, _ or -. The raw input is limited to 120 characters.","maxLength":120,"minLength":1,"pattern":"^[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*[A-Za-z0-9\\u212a][A-Za-z0-9_\\u212a-]{0,63}[\\u0009-\\u000d\\u0020\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]*$","type":"string"},"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"}},"required":["key"],"type":"object"},"name":"list_document_revisions","outputSchema":{"additionalProperties":true,"type":"object"}},{"annotations":{"exposure":"always","operationId":"report_progress","requiredClaims":[],"semanticContract":"paperclip.semantic-tool.v1","version":1},"description":"Append a durable progress comment to the active task.","inputSchema":{"additionalProperties":false,"properties":{"body":{"description":"Multiline progress update.","maxLength":20000,"minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-stable retry key.","maxLength":240,"minLength":1,"type":"string"}},"required":["idempotencyKey","body"],"type":"object"},"name":"report_progress","outputSchema":{"additionalProperties":false,"properties":{"commandId":{"description":"Stable command identifier.","maxLength":200,"minLength":1,"type":"string"},"disposition":{"enum":["applied","duplicate"]},"entityRefs":{"description":"Entities affected by the operation.","items":{"minLength":1,"type":"string"},"maxItems":200,"type":"array","uniqueItems":true},"scheduledWakeIds":{"description":"Wake identifiers scheduled by the operation.","items":{"minLength":1,"type":"string"},"maxItems":200,"type":"array","uniqueItems":true},"stateRevision":{"minimum":0,"type":"integer"}},"required":["commandId","disposition","stateRevision","entityRefs","scheduledWakeIds"],"type":"object"}},{"annotations":{"exposure":"always","operationId":"answer_status_question","requiredClaims":[],"semanticContract":"paperclip.Line truncated
@@ -2872,6 +2872,137 @@
"title": "List available repositories",
"version": 1
},
{
"allowedModes": [
"standard",
"ask",
"planning",
"skill_test"
],
"description": "List a person's areas and responsibilities: each area with its responsibilities (status, bar, health, the agent that runs it, and counts of filed projects, routines and tasks), responsibilities with no area, and uncovered work (company routines, projects and open tasks filed under no responsibility). Defaults to the person this run works for; never ask for their user ID. Use this before asking the person what they are responsible for. A turned-off error means the feature is off, not that the list is empty.",
"effect": "read",
"inputSchema": {
"additionalProperties": false,
"properties": {
"areaId": {
"description": "Return only this area.",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"type": "string"
},
"includeArchivedAreas": {
"default": false,
"description": "Include archived areas.",
"type": "boolean"
},
"includeLetGo": {
"default": false,
"description": "Include responsibilities the person let go.",
"type": "boolean"
},
"includeProposed": {
"default": true,
"description": "Include responsibilities proposed but not yet confirmed.",
"type": "boolean"
},
"ownerUserId": {
"description": "Another person's user ID from list_people. Omit for the person this run works for.",
"maxLength": 200,
"minLength": 1,
"type": "string"
}
},
"type": "object"
},
"operationId": "list_responsibilities",
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"placement": "optional",
"requiredClaims": [],
"schema": "paperclip.semantic-action.v1",
"title": "List responsibilities",
"version": 1
},
{
"allowedModes": [
"standard",
"ask",
"planning",
"skill_test"
],
"description": "Read one responsibility in full: its bar and health, area, the projects, tasks and routines under it (with link IDs for items filed directly, and items under it through a filed project), the skills of the agents doing its work, and its latest status report.",
"effect": "read",
"inputSchema": {
"additionalProperties": false,
"properties": {
"responsibilityId": {
"description": "Responsibility ID from list_responsibilities or find_responsibilities_for.",
"pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
"type": "string"
}
},
"required": [
"responsibilityId"
],
"type": "object"
},
"operationId": "get_responsibility",
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"placement": "optional",
"requiredClaims": [],
"schema": "paperclip.semantic-action.v1",
"title": "Read responsibility",
"version": 1
},
{
"allowedModes": [
"standard",
"ask",
"planning",
"skill_test"
],
"description": "List the proposed and active responsibilities a project, task or routine is filed under, directly or through its project. An empty list means it is uncovered.",
"effect": "read",
"inputSchema": {
"additionalProperties": false,
"properties": {
"id": {
"description": "The item's ID. For a task, an identifier such as PAP-123 also works.",
"maxLength": 200,
"minLength": 1,
"type": "string"
},
"kind": {
"description": "What the item is.",
"enum": [
"project",
"task",
"routine"
],
"type": "string"
}
},
"required": [
"kind",
"id"
],
"type": "object"
},
"operationId": "find_responsibilities_for",
"outputSchema": {
"additionalProperties": true,
"type": "object"
},
"placement": "optional",
"requiredClaims": [],
"schema": "paperclip.semantic-action.v1",
"title": "Find responsibilities for an item",
"version": 1
},
{
"allowedModes": [
"standard",
@@ -24,7 +24,7 @@
"prpVersion": 1,
"nativeExecutionVersion": 1,
"catalogVersion": 1,
"catalogSha256": "sha256:5a72ca67b7c8bb4a7069af6c02b49dae96c3538e2326ddae773cc231ffab5764",
"catalogSha256": "sha256:596a06f3f13b4865be3ff65230ae127e1098e27263f6d07087d1b24842439d46",
"driverContractVersion": 1,
"driverKind": "paperclip-deterministic",
"driverVersion": "1.0.0"
@@ -190,7 +190,7 @@
},
{
"path": "fixtures/evals/native-execution-seeded.json",
"sha256": "8a23b12f3345339517ff0ec31ca4d9580a27f3599ea965700b81fe2cbf988cae",
"sha256": "d2ef23dc66cd371a72bd97de679062034846fa206aa5803ef3e39d2c10b3c7dd",
"expectation": "accept",
"compatibilityCase": "canonical"
},
@@ -42,7 +42,7 @@ function validInventories() {
schemaVersion: 2,
inventoryRole: "normative",
generatedFrom: ["skills/paperclip/SKILL.md"],
rows: Array.from({ length: 174 }, (_, index) => row(`capability-${index}`)),
rows: Array.from({ length: 176 }, (_, index) => row(`capability-${index}`)),
},
evaluations: {
schemaVersion: 2,
@@ -247,7 +247,7 @@ export async function buildMcpInventory(repoRoot) {
export function validateInventories(inventories) {
const errors = [];
const expectedCounts = { capabilities: 174, evaluations: 106, legacyMcpAliases: 42 };
const expectedCounts = { capabilities: 176, evaluations: 106, legacyMcpAliases: 42 };
const normativeNames = ["capabilities", "evaluations"];
const normativeRows = new Map();
const globalNormativeIds = new Set();
@@ -135,11 +135,11 @@
]
},
{
"id": "skill:skills/paperclip/SKILL.md:propose-a-bar-in-a-bar-conversation:275",
"id": "skill:skills/paperclip/SKILL.md:areas-and-responsibilities:275",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:275",
"title": "Propose a bar in a bar conversation",
"expectedSemantics": "Skill guidance headed “Propose a bar in a bar conversation”.",
"title": "Areas and responsibilities",
"expectedSemantics": "Skill guidance headed “Areas and responsibilities”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
@@ -150,9 +150,24 @@
]
},
{
"id": "skill:skills/paperclip/SKILL.md:propose-an-automation-in-an-automation-conversation:279",
"id": "skill:skills/paperclip/SKILL.md:propose-a-bar-in-a-bar-conversation:285",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:279",
"sourceAnchor": "skills/paperclip/SKILL.md:285",
"title": "Propose a bar in a bar conversation",
"expectedSemantics": "Skill guidance headed “Propose a bar in a bar conversation”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:285"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:propose-an-automation-in-an-automation-conversation:289",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:289",
"title": "Propose an automation in an automation conversation",
"expectedSemantics": "Skill guidance headed “Propose an automation in an automation conversation”.",
"primaryDisposition": "optional_agent_tool",
@@ -160,47 +175,32 @@
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:279"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:write-a-responsibility-s-status:283",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:283",
"title": "Write a responsibility's status",
"expectedSemantics": "Skill guidance headed “Write a responsibility's status”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:283"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:status-quick-guide:289",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:289",
"title": "Status Quick Guide",
"expectedSemantics": "Skill guidance headed “Status Quick Guide”.",
"primaryDisposition": "control_plane_owned",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:289"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:monitors-and-watchers-say-only-what-you-actually-scheduled:299",
"id": "skill:skills/paperclip/SKILL.md:write-a-responsibility-s-status:293",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:293",
"title": "Write a responsibility's status",
"expectedSemantics": "Skill guidance headed “Write a responsibility's status”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:293"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:status-quick-guide:299",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:299",
"title": "Monitors and Watchers (say only what you actually scheduled)",
"expectedSemantics": "Skill guidance headed “Monitors and Watchers (say only what you actually scheduled)”.",
"primaryDisposition": "optional_agent_tool",
"title": "Status Quick Guide",
"expectedSemantics": "Skill guidance headed “Status Quick Guide”.",
"primaryDisposition": "control_plane_owned",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
@@ -210,9 +210,24 @@
]
},
{
"id": "skill:skills/paperclip/SKILL.md:delegating-review-tasks:320",
"id": "skill:skills/paperclip/SKILL.md:monitors-and-watchers-say-only-what-you-actually-scheduled:309",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:320",
"sourceAnchor": "skills/paperclip/SKILL.md:309",
"title": "Monitors and Watchers (say only what you actually scheduled)",
"expectedSemantics": "Skill guidance headed “Monitors and Watchers (say only what you actually scheduled)”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:309"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:delegating-review-tasks:330",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:330",
"title": "Delegating review tasks",
"expectedSemantics": "Skill guidance headed “Delegating review tasks”.",
"primaryDisposition": "always_agent_tool",
@@ -221,13 +236,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:320"
"skill:skills/paperclip/SKILL.md:330"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:managing-a-user-s-inbox:331",
"id": "skill:skills/paperclip/SKILL.md:managing-a-user-s-inbox:341",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:331",
"sourceAnchor": "skills/paperclip/SKILL.md:341",
"title": "Managing A User's Inbox",
"expectedSemantics": "Skill guidance headed “Managing A User's Inbox”.",
"primaryDisposition": "control_plane_owned",
@@ -236,13 +251,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:331"
"skill:skills/paperclip/SKILL.md:341"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:issue-dependencies-blockers:339",
"id": "skill:skills/paperclip/SKILL.md:issue-dependencies-blockers:349",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:339",
"sourceAnchor": "skills/paperclip/SKILL.md:349",
"title": "Issue Dependencies (Blockers)",
"expectedSemantics": "Skill guidance headed “Issue Dependencies (Blockers)”.",
"primaryDisposition": "control_plane_owned",
@@ -251,13 +266,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:339"
"skill:skills/paperclip/SKILL.md:349"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:requesting-board-approval:364",
"id": "skill:skills/paperclip/SKILL.md:requesting-board-approval:374",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:364",
"sourceAnchor": "skills/paperclip/SKILL.md:374",
"title": "Requesting Board Approval",
"expectedSemantics": "Skill guidance headed “Requesting Board Approval”.",
"primaryDisposition": "optional_agent_tool",
@@ -266,13 +281,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:364"
"skill:skills/paperclip/SKILL.md:374"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:issue-thread-interactions:385",
"id": "skill:skills/paperclip/SKILL.md:issue-thread-interactions:395",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:385",
"sourceAnchor": "skills/paperclip/SKILL.md:395",
"title": "Issue-Thread Interactions",
"expectedSemantics": "Skill guidance headed “Issue-Thread Interactions”.",
"primaryDisposition": "optional_agent_tool",
@@ -281,13 +296,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:385"
"skill:skills/paperclip/SKILL.md:395"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:standalone-decisions:415",
"id": "skill:skills/paperclip/SKILL.md:standalone-decisions:425",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:415",
"sourceAnchor": "skills/paperclip/SKILL.md:425",
"title": "Standalone Decisions",
"expectedSemantics": "Skill guidance headed “Standalone Decisions”.",
"primaryDisposition": "optional_agent_tool",
@@ -296,13 +311,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:415"
"skill:skills/paperclip/SKILL.md:425"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:mcp-tool-approval-gates:519",
"id": "skill:skills/paperclip/SKILL.md:mcp-tool-approval-gates:529",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:519",
"sourceAnchor": "skills/paperclip/SKILL.md:529",
"title": "MCP Tool Approval Gates",
"expectedSemantics": "Skill guidance headed “MCP Tool Approval Gates”.",
"primaryDisposition": "optional_agent_tool",
@@ -311,30 +326,15 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:519"
"skill:skills/paperclip/SKILL.md:529"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:niche-workflow-pointers:561",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:561",
"title": "Niche Workflow Pointers",
"expectedSemantics": "Skill guidance headed “Niche Workflow Pointers”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:561"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:cases:571",
"id": "skill:skills/paperclip/SKILL.md:niche-workflow-pointers:571",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:571",
"title": "Cases",
"expectedSemantics": "Skill guidance headed “Cases”.",
"title": "Niche Workflow Pointers",
"expectedSemantics": "Skill guidance headed “Niche Workflow Pointers”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
@@ -345,9 +345,24 @@
]
},
{
"id": "skill:skills/paperclip/SKILL.md:company-skills-workflow:576",
"id": "skill:skills/paperclip/SKILL.md:cases:581",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:576",
"sourceAnchor": "skills/paperclip/SKILL.md:581",
"title": "Cases",
"expectedSemantics": "Skill guidance headed “Cases”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:581"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:company-skills-workflow:586",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:586",
"title": "Company Skills Workflow",
"expectedSemantics": "Skill guidance headed “Company Skills Workflow”.",
"primaryDisposition": "optional_agent_tool",
@@ -356,13 +371,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:576"
"skill:skills/paperclip/SKILL.md:586"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:routines:587",
"id": "skill:skills/paperclip/SKILL.md:routines:597",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:587",
"sourceAnchor": "skills/paperclip/SKILL.md:597",
"title": "Routines",
"expectedSemantics": "Skill guidance headed “Routines”.",
"primaryDisposition": "optional_agent_tool",
@@ -371,13 +386,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:587"
"skill:skills/paperclip/SKILL.md:597"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:task-files-and-workspace-choices:599",
"id": "skill:skills/paperclip/SKILL.md:task-files-and-workspace-choices:609",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:599",
"sourceAnchor": "skills/paperclip/SKILL.md:609",
"title": "Task Files and Workspace Choices",
"expectedSemantics": "Skill guidance headed “Task Files and Workspace Choices”.",
"primaryDisposition": "optional_agent_tool",
@@ -386,13 +401,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:599"
"skill:skills/paperclip/SKILL.md:609"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:issue-workspace-runtime-controls:607",
"id": "skill:skills/paperclip/SKILL.md:issue-workspace-runtime-controls:617",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:607",
"sourceAnchor": "skills/paperclip/SKILL.md:617",
"title": "Issue Workspace Runtime Controls",
"expectedSemantics": "Skill guidance headed “Issue Workspace Runtime Controls”.",
"primaryDisposition": "optional_agent_tool",
@@ -401,13 +416,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:607"
"skill:skills/paperclip/SKILL.md:617"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:proposing-credentials-safely:614",
"id": "skill:skills/paperclip/SKILL.md:proposing-credentials-safely:624",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:614",
"sourceAnchor": "skills/paperclip/SKILL.md:624",
"title": "Proposing Credentials Safely",
"expectedSemantics": "Skill guidance headed “Proposing Credentials Safely”.",
"primaryDisposition": "optional_agent_tool",
@@ -416,13 +431,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:614"
"skill:skills/paperclip/SKILL.md:624"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:reading-granted-secrets:621",
"id": "skill:skills/paperclip/SKILL.md:reading-granted-secrets:631",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:621",
"sourceAnchor": "skills/paperclip/SKILL.md:631",
"title": "Reading Granted Secrets",
"expectedSemantics": "Skill guidance headed “Reading Granted Secrets”.",
"primaryDisposition": "optional_agent_tool",
@@ -431,13 +446,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:621"
"skill:skills/paperclip/SKILL.md:631"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:critical-rules:647",
"id": "skill:skills/paperclip/SKILL.md:critical-rules:657",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:647",
"sourceAnchor": "skills/paperclip/SKILL.md:657",
"title": "Critical Rules",
"expectedSemantics": "Skill guidance headed “Critical Rules”.",
"primaryDisposition": "optional_agent_tool",
@@ -446,13 +461,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:647"
"skill:skills/paperclip/SKILL.md:657"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:comment-style-required:668",
"id": "skill:skills/paperclip/SKILL.md:comment-style-required:678",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:668",
"sourceAnchor": "skills/paperclip/SKILL.md:678",
"title": "Comment Style (Required)",
"expectedSemantics": "Skill guidance headed “Comment Style (Required)”.",
"primaryDisposition": "always_agent_tool",
@@ -461,13 +476,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:668"
"skill:skills/paperclip/SKILL.md:678"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:update:704",
"id": "skill:skills/paperclip/SKILL.md:update:714",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:704",
"sourceAnchor": "skills/paperclip/SKILL.md:714",
"title": "Update",
"expectedSemantics": "Skill guidance headed “Update”.",
"primaryDisposition": "optional_agent_tool",
@@ -475,29 +490,29 @@
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:704"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:task-documents-and-deliverables:714",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:714",
"title": "Task Documents and Deliverables",
"expectedSemantics": "Skill guidance headed “Task Documents and Deliverables”.",
"primaryDisposition": "always_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:714"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:planning-required-when-planning-requested:728",
"id": "skill:skills/paperclip/SKILL.md:task-documents-and-deliverables:724",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:728",
"sourceAnchor": "skills/paperclip/SKILL.md:724",
"title": "Task Documents and Deliverables",
"expectedSemantics": "Skill guidance headed “Task Documents and Deliverables”.",
"primaryDisposition": "always_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:724"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:planning-required-when-planning-requested:738",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:738",
"title": "Planning (Required when planning requested)",
"expectedSemantics": "Skill guidance headed “Planning (Required when planning requested)”.",
"primaryDisposition": "optional_agent_tool",
@@ -506,13 +521,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:728"
"skill:skills/paperclip/SKILL.md:738"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:key-endpoints-hot-routes:759",
"id": "skill:skills/paperclip/SKILL.md:key-endpoints-hot-routes:769",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:759",
"sourceAnchor": "skills/paperclip/SKILL.md:769",
"title": "Key Endpoints (Hot Routes)",
"expectedSemantics": "Skill guidance headed “Key Endpoints (Hot Routes)”.",
"primaryDisposition": "optional_agent_tool",
@@ -521,30 +536,15 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:759"
"skill:skills/paperclip/SKILL.md:769"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:searching-issues:789",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:789",
"title": "Searching Issues",
"expectedSemantics": "Skill guidance headed “Searching Issues”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:789"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:full-reference:799",
"id": "skill:skills/paperclip/SKILL.md:searching-issues:799",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:799",
"title": "Full Reference",
"expectedSemantics": "Skill guidance headed “Full Reference”.",
"title": "Searching Issues",
"expectedSemantics": "Skill guidance headed “Searching Issues”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
@@ -555,9 +555,24 @@
]
},
{
"id": "skill:skills/paperclip/SKILL.md:conversational-confirmation-answers:803",
"id": "skill:skills/paperclip/SKILL.md:full-reference:809",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:803",
"sourceAnchor": "skills/paperclip/SKILL.md:809",
"title": "Full Reference",
"expectedSemantics": "Skill guidance headed “Full Reference”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:809"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:conversational-confirmation-answers:813",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:813",
"title": "Conversational confirmation answers",
"expectedSemantics": "Skill guidance headed “Conversational confirmation answers”.",
"primaryDisposition": "always_agent_tool",
@@ -566,13 +581,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:803"
"skill:skills/paperclip/SKILL.md:813"
]
},
{
"id": "skill:skills/paperclip/SKILL.md:incidental-feedback:820",
"id": "skill:skills/paperclip/SKILL.md:incidental-feedback:830",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/SKILL.md:820",
"sourceAnchor": "skills/paperclip/SKILL.md:830",
"title": "Incidental feedback",
"expectedSemantics": "Skill guidance headed “Incidental feedback”.",
"primaryDisposition": "optional_agent_tool",
@@ -581,7 +596,7 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/SKILL.md:820"
"skill:skills/paperclip/SKILL.md:830"
]
},
{
@@ -1560,11 +1575,11 @@
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:responsibility-bars:1502",
"id": "skill:skills/paperclip/references/api-reference.md:areas-and-responsibilities:1502",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1502",
"title": "Responsibility bars",
"expectedSemantics": "Skill guidance headed “Responsibility bars”.",
"title": "Areas and responsibilities",
"expectedSemantics": "Skill guidance headed “Areas and responsibilities”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
@@ -1575,9 +1590,24 @@
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:automation-conversations-and-standing-checks:1525",
"id": "skill:skills/paperclip/references/api-reference.md:responsibility-bars:1513",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1525",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1513",
"title": "Responsibility bars",
"expectedSemantics": "Skill guidance headed “Responsibility bars”.",
"primaryDisposition": "optional_agent_tool",
"requiredGrants": [],
"assertionClasses": [
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1513"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:automation-conversations-and-standing-checks:1536",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1536",
"title": "Automation conversations and standing checks",
"expectedSemantics": "Skill guidance headed “Automation conversations and standing checks”.",
"primaryDisposition": "optional_agent_tool",
@@ -1586,13 +1616,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1525"
"skill:skills/paperclip/references/api-reference.md:1536"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:dashboard-conversations:1541",
"id": "skill:skills/paperclip/references/api-reference.md:dashboard-conversations:1552",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1541",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1552",
"title": "Dashboard conversations",
"expectedSemantics": "Skill guidance headed “Dashboard conversations”.",
"primaryDisposition": "optional_agent_tool",
@@ -1601,13 +1631,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1541"
"skill:skills/paperclip/references/api-reference.md:1552"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:responsibility-status:1556",
"id": "skill:skills/paperclip/references/api-reference.md:responsibility-status:1567",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1556",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1567",
"title": "Responsibility status",
"expectedSemantics": "Skill guidance headed “Responsibility status”.",
"primaryDisposition": "optional_agent_tool",
@@ -1616,13 +1646,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1556"
"skill:skills/paperclip/references/api-reference.md:1567"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:approvals-costs-activity-dashboard:1572",
"id": "skill:skills/paperclip/references/api-reference.md:approvals-costs-activity-dashboard:1583",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1572",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1583",
"title": "Approvals, Costs, Activity, Dashboard",
"expectedSemantics": "Skill guidance headed “Approvals, Costs, Activity, Dashboard”.",
"primaryDisposition": "optional_agent_tool",
@@ -1631,13 +1661,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1572"
"skill:skills/paperclip/references/api-reference.md:1583"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:secrets:1594",
"id": "skill:skills/paperclip/references/api-reference.md:secrets:1605",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1594",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1605",
"title": "Secrets",
"expectedSemantics": "Skill guidance headed “Secrets”.",
"primaryDisposition": "optional_agent_tool",
@@ -1646,13 +1676,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1594"
"skill:skills/paperclip/references/api-reference.md:1605"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:agent-secret-proposals:1607",
"id": "skill:skills/paperclip/references/api-reference.md:agent-secret-proposals:1618",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1607",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1618",
"title": "Agent secret proposals",
"expectedSemantics": "Skill guidance headed “Agent secret proposals”.",
"primaryDisposition": "optional_agent_tool",
@@ -1661,13 +1691,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1607"
"skill:skills/paperclip/references/api-reference.md:1618"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:agent-secret-access:1707",
"id": "skill:skills/paperclip/references/api-reference.md:agent-secret-access:1718",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1707",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1718",
"title": "Agent secret access",
"expectedSemantics": "Skill guidance headed “Agent secret access”.",
"primaryDisposition": "optional_agent_tool",
@@ -1676,13 +1706,13 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1707"
"skill:skills/paperclip/references/api-reference.md:1718"
]
},
{
"id": "skill:skills/paperclip/references/api-reference.md:common-mistakes:1747",
"id": "skill:skills/paperclip/references/api-reference.md:common-mistakes:1758",
"sourceKind": "skill_heading",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1747",
"sourceAnchor": "skills/paperclip/references/api-reference.md:1758",
"title": "Common Mistakes",
"expectedSemantics": "Skill guidance headed “Common Mistakes”.",
"primaryDisposition": "optional_agent_tool",
@@ -1691,7 +1721,7 @@
"control_plane_invariant"
],
"evidenceIds": [
"skill:skills/paperclip/references/api-reference.md:1747"
"skill:skills/paperclip/references/api-reference.md:1758"
]
},
{
@@ -7,7 +7,7 @@
"src/scenarios/scenario-plan.ts"
],
"counts": {
"actions": 70,
"actions": 73,
"legacyRequirements": 106
},
"actions": [
@@ -336,6 +336,63 @@
"src/scenarios/scenario-explorer.test.ts::renders every scenario with exposure, control plane, authorization, diff, and parity"
]
},
{
"id": "list_responsibilities",
"ownership": "optional_agent_tool",
"surfaces": [
"live"
],
"legacyAliases": [],
"contractCase": "protocol-action:list_responsibilities",
"contractOwner": "src/catalog/protocol-action-contracts.test.ts::list_responsibilities has a schema-valid canonical example and every declared projection",
"legacyBehavioralCases": [],
"deterministicCases": [
"protocol-action:list_responsibilities"
],
"legacyRequirementCases": [],
"deterministicOwners": [
"src/catalog/protocol-action-contracts.test.ts::list_responsibilities has a schema-valid canonical example and every declared projection",
"src/scenarios/scenario-explorer.test.ts::renders every scenario with exposure, control plane, authorization, diff, and parity"
]
},
{
"id": "get_responsibility",
"ownership": "optional_agent_tool",
"surfaces": [
"live"
],
"legacyAliases": [],
"contractCase": "protocol-action:get_responsibility",
"contractOwner": "src/catalog/protocol-action-contracts.test.ts::get_responsibility has a schema-valid canonical example and every declared projection",
"legacyBehavioralCases": [],
"deterministicCases": [
"protocol-action:get_responsibility"
],
"legacyRequirementCases": [],
"deterministicOwners": [
"src/catalog/protocol-action-contracts.test.ts::get_responsibility has a schema-valid canonical example and every declared projection",
"src/scenarios/scenario-explorer.test.ts::renders every scenario with exposure, control plane, authorization, diff, and parity"
]
},
{
"id": "find_responsibilities_for",
"ownership": "optional_agent_tool",
"surfaces": [
"live"
],
"legacyAliases": [],
"contractCase": "protocol-action:find_responsibilities_for",
"contractOwner": "src/catalog/protocol-action-contracts.test.ts::find_responsibilities_for has a schema-valid canonical example and every declared projection",
"legacyBehavioralCases": [],
"deterministicCases": [
"protocol-action:find_responsibilities_for"
],
"legacyRequirementCases": [],
"deterministicOwners": [
"src/catalog/protocol-action-contracts.test.ts::find_responsibilities_for has a schema-valid canonical example and every declared projection",
"src/scenarios/scenario-explorer.test.ts::renders every scenario with exposure, control plane, authorization, diff, and parity"
]
},
{
"id": "search_api",
"ownership": "optional_agent_tool",
@@ -112,6 +112,15 @@
"handoff_case"
]
},
{
"id": "responsibilities",
"description": "Read a person's areas and responsibilities, one responsibility in full, and where a project, task or routine is filed, through the live company/run authority. Hidden while the instance has Responsibilities off.",
"operationIds": [
"list_responsibilities",
"get_responsibility",
"find_responsibilities_for"
]
},
{
"id": "workspace_runtime",
"description": "Inspect and select task workspaces, prepare repositories, and control workspace runtime services.",
@@ -290,19 +299,23 @@
"get_agent",
"list_projects",
"list_goals",
"list_project_repositories"
"list_project_repositories",
"list_responsibilities",
"get_responsibility",
"find_responsibilities_for"
],
"controlPlaneOperationIds": [],
"realSurface": "company issue search and agent/project/goal list/get routes",
"realSurface": "company issue search, agent/project/goal list/get routes, and responsibility list/detail/lookup routes",
"mockStateDomains": [
"company",
"task",
"actor",
"project",
"goal"
"goal",
"responsibility"
],
"prpEvidence": "bounded redacted read projections through tool-result item events",
"gap": "Goal operations remain scenario-only. Project and repository discovery contracts are delivered by the live server authority; they are not implemented by the mock command dispatcher."
"gap": "Goal operations remain scenario-only. Project and repository discovery contracts are delivered by the live server authority; they are not implemented by the mock command dispatcher. Responsibility discovery is likewise live-only and hidden while the instance has Responsibilities off."
},
{
"id": "su",
@@ -6,7 +6,7 @@ Status: canonical explanatory contract for the Paperclip runner V1 surface.
This document keeps three independent meanings of **group** separate. PRP families describe wire evidence and controller commands; capability placement decides who owns an operation; behavioral eval groups organize the 106 scenario corpus. None of the three axes can be used as a substitute for another.
The generated totals are **108 PRP events in 32 event families**, **18 controller commands in 7 command families**, **10 control-plane operations**, **70 reconciled semantic operations** (19 always, 51 optional), and **106 scenarios in 16 behavior groups**.
The generated totals are **108 PRP events in 32 event families**, **18 controller commands in 7 command families**, **10 control-plane operations**, **73 reconciled semantic operations** (19 always, 54 optional), and **106 scenarios in 16 behavior groups**.
## Axis 1: PRP v1 event and command families
@@ -88,7 +88,7 @@ Placement has exactly three outcomes:
`answer_status_question`, `block_task`, `finish_task`, `get_agent_instruction_history`, `get_task_context`, `get_task_history`, `inspect_operation_result`, `list_document_revisions`, `list_documents`, `read_agent_instructions`, `read_document`, `register_deliverable`, `report_progress`, `request_human_input`, `request_review`, `restore_agent_instructions`, `send_chat_message`, `update_agent_instructions`, `write_document`.
### Optional operations (51) and grant groups (14)
### Optional operations (54) and grant groups (15)
Grant groups are documentation/exposure bundles, not additional authority. The operation descriptor's exact `requiredClaims` remains decisive.
@@ -100,6 +100,7 @@ Grant groups are documentation/exposure bundles, not additional authority. The o
| `delegation_dependencies` | `create_task`<br>`reassign_task`<br>`set_dependencies`<br>`hire_agent` | `delegation:agents:create`<br>`delegation:tasks:assign`<br>`delegation:tasks:create`<br>`dependencies:write` | Create or reassign delegated work and maintain dependency edges. |
| `governance` | `list_approvals`<br>`get_approval`<br>`get_approval_context`<br>`request_approval`<br>`decide_approval`<br>`comment_on_approval` | `governance:approvals:comment`<br>`governance:approvals:decide`<br>`governance:approvals:read`<br>`governance:approvals:request` | Read, request, comment on, and decide approvals under governed-action checks. |
| `cases` | `list_cases`<br>`upsert_case`<br>`create_case`<br>`read_case`<br>`update_case`<br>`list_workflows`<br>`read_workflow`<br>`create_workflow`<br>`update_workflow`<br>`handoff_case` | `cases:read`<br>`cases:write` | Read and update authorized case facts and revisioned documents, author company workflow prompts, and durably hand off the primary task. list_cases and upsert_case remain scenario mocks. |
| `responsibilities` | `list_responsibilities`<br>`get_responsibility`<br>`find_responsibilities_for` | none | Read a person's areas and responsibilities, one responsibility in full, and where a project, task or routine is filed, through the live company/run authority. Hidden while the instance has Responsibilities off. |
| `workspace_runtime` | `get_workspace_runtime`<br>`control_workspace_service`<br>`get_workspace`<br>`list_workspaces`<br>`select_workspace`<br>`prepare_repository` | `workspace:control`<br>`workspace:read` | Inspect and select task workspaces, prepare repositories, and control workspace runtime services. |
| `wake_scheduling` | `schedule_wake`<br>`set_task_monitor` | `control_plane:wakes` | Schedule a bounded continuation wake when the current task owns the future check. |
| `routines` | `list_routines`<br>`manage_routine` | `routines:read`<br>`routines:write` | Inspect or manage company routines. |
@@ -128,12 +129,14 @@ Grant groups are documentation/exposure bundles, not additional authority. The o
| `create_workflow` | `optional_agent_tool` | none | `standard` | `company_write` | `required` | no | inline/no mapping | `live`<br>`live_codex` | `executeNativeWorkflowTool`<br>Authorized case mutation and durable operation receipt<br>catalog PRP status: `bound` |
| `decide_approval` | `optional_agent_tool` | `governance:approvals:decide` | `standard`<br>`skill_test`<br>roles: `board`<br>`approver`<br>`security` | `governance` | `required` | no | `semantic_command:decide_approval` | `scenario` + `live`<br>`live_codex` | `unbound`<br>approval lifecycle plus governed-wait continuation and audit events<br>catalog PRP status: `audit_pending` |
| `export_company` | `optional_agent_tool` | `portability:export` | `standard`<br>`skill_test` | `admin` | `required` | no | `mock_extension:portability.export` | `scenario`<br>`scenario_mock` | `unbound`<br>company admin/portability item event plus audit record<br>catalog PRP status: `audit_pending` |
| `find_responsibilities_for` | `optional_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `callResponsibilityTool`<br>Authenticated responsibility routes with the reader's task and project visibility.<br>catalog PRP status: `bound` |
| `finish_task` | `always_agent_tool` | none | `standard`<br>`skill_test` | `task_write` | `required` | no | `semantic_command:finish_task` | `scenario` + `live`<br>`live_codex` | `unbound`<br>semantic-operation item event plus active-task state diff, work-assessment, and issue-status-decision events<br>catalog PRP status: `audit_pending` |
| `generic_api_request` | `optional_agent_tool` | `test:generic_api_request` | `skill_test` | `test_escape_hatch` | `required` | yes | `mock_extension:test.generic_api` | `scenario` + `live`<br>`test_only` | `unbound`<br>test-only; excluded from product PRP evidence<br>catalog PRP status: `audit_pending` |
| `get_agent` | `optional_agent_tool` | `discovery:agents:read` | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `unbound`<br>read projection surfaced via a tool-result item event; no control-plane state diff<br>catalog PRP status: `audit_pending` |
| `get_agent_instruction_history` | `always_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `agentInstructionRevisionService`<br>tool-result item event plus canonical revision receipt for writes; no scenario mock coverage<br>catalog PRP status: `bound` |
| `get_approval` | `optional_agent_tool` | `governance:approvals:read` | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `unbound`<br>read projection surfaced via a tool-result item event; no control-plane state diff<br>catalog PRP status: `audit_pending` |
| `get_approval_context` | `optional_agent_tool` | `governance:approvals:read` | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `unbound`<br>read projection surfaced via a tool-result item event; no control-plane state diff<br>catalog PRP status: `audit_pending` |
| `get_responsibility` | `optional_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `callResponsibilityTool`<br>Authenticated responsibility routes with the reader's task and project visibility.<br>catalog PRP status: `bound` |
| `get_task_context` | `always_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | `context_read:active_task` | `scenario` + `live`<br>`live_codex` | `PaperclipRunnerToolAuthority active issue/run + accepted plan revision`<br>bound company/assignment query plus exact accepted document revision projection<br>catalog PRP status: `bound` |
| `get_task_history` | `always_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | `snapshot_read:active_task_history` | `scenario` + `live`<br>`live_codex` | `unbound`<br>read projection surfaced via a tool-result item event; no control-plane state diff<br>catalog PRP status: `audit_pending` |
| `get_workspace` | `optional_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `PaperclipRunnerToolAuthority`<br>Authenticated task workspace routes and durable selection/repository receipts.<br>catalog PRP status: `bound` |
@@ -150,6 +153,7 @@ Grant groups are documentation/exposure bundles, not additional authority. The o
| `list_goals` | `optional_agent_tool` | `discovery:goals:read` | `standard`<br>`skill_test` | `read` | `none` | no | `mock_extension:discovery.goals` | `scenario`<br>`scenario_mock` | `unbound`<br>read projection surfaced via a tool-result item event; no control-plane state diff<br>catalog PRP status: `audit_pending` |
| `list_project_repositories` | `optional_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `PaperclipRunnerToolAuthority`<br>Authenticated project tools, persisted projects and repository workspaces, and run-bound activity.<br>catalog PRP status: `bound` |
| `list_projects` | `optional_agent_tool` | `discovery:projects:read` | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | `mock_extension:discovery.projects` | `scenario` + `live`<br>`live_codex` | `PaperclipRunnerToolAuthority`<br>Authenticated project tools, persisted projects and repository workspaces, and run-bound activity.<br>catalog PRP status: `bound` |
| `list_responsibilities` | `optional_agent_tool` | none | `standard`<br>`ask`<br>`planning`<br>`skill_test` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `callResponsibilityTool`<br>Authenticated responsibility routes with the reader's task and project visibility.<br>catalog PRP status: `bound` |
| `list_routines` | `optional_agent_tool` | `routines:read` | `standard`<br>`skill_test` | `read` | `none` | no | `mock_extension:routines.list` | `scenario`<br>`scenario_mock` | `unbound`<br>read projection surfaced via a tool-result item event; no control-plane state diff<br>catalog PRP status: `audit_pending` |
| `list_secret_metadata` | `optional_agent_tool` | `secrets:metadata:read` | `standard`<br>`skill_test` | `read` | `none` | no | `mock_extension:secrets.metadata` | `scenario`<br>`scenario_mock` | `unbound`<br>read projection surfaced via a tool-result item event; no control-plane state diff<br>catalog PRP status: `audit_pending` |
| `list_workflows` | `optional_agent_tool` | none | `standard` | `read` | `none` | no | inline/no mapping | `live`<br>`live_codex` | `executeNativeWorkflowTool`<br>Authorized case read projection<br>catalog PRP status: `bound` |
@@ -198,7 +202,7 @@ Behavior groups describe expected outcomes and trajectories. They do not grant t
| [`co` — Checkout](#behavior-group-co-checkout) | control plane | none | `checkout_task` | POST /api/issues/:id/checkout and execution-lock services | `task`<br>`actor`<br>`run`<br>`idempotency`<br>`fault` | 6 | run preparation and issue-status decision evidence with checkout receipt | Intentionally no model tool; the production checkout receipt still needs the additive semantic-receipt envelope. |
| [`st` — Status](#behavior-group-st-status) | always tools + control-plane arbitration | `answer_status_question`<br>`finish_task`<br>`block_task`<br>`request_review` | `reconcile_run`<br>`append_audit_record` | issue PATCH, review/liveness policy, and native finalization arbitration | `task`<br>`comments`<br>`interactions`<br>`blockers`<br>`audit`<br>`run` | 8 | semantic operation receipt, work assessment, issue-status decision, and terminal causality | Production semantic binding and additive typed operation/conflict receipts remain unimplemented. |
| [`cm` — Comments](#behavior-group-cm-comments) | always tools | `get_task_history`<br>`report_progress`<br>`send_chat_message` | `append_audit_record` | issue comment list/get/create routes and own-agent chat messaging service | `task`<br>`comments`<br>`actor`<br>`idempotency`<br>`audit` | 6 | bounded read result, idempotent progress receipt, or persisted proactive chat comment with source task/run provenance | Proactive chat delivery is bound to the running agent and responsible human; arbitrary chat destinations are unsupported. Other comment/history binding gaps remain recorded per operation. |
| [`se` — Search](#behavior-group-se-search) | optional discovery tools | `search_tasks`<br>`list_agents`<br>`get_agent`<br>`list_projects`<br>`list_goals`<br>`list_project_repositories` | none | company issue search and agent/project/goal list/get routes | `company`<br>`task`<br>`actor`<br>`project`<br>`goal` | 4 | bounded redacted read projections through tool-result item events | Goal operations remain scenario-only. Project and repository discovery contracts are delivered by the live server authority; they are not implemented by the mock command dispatcher. |
| [`se` — Search](#behavior-group-se-search) | optional discovery tools | `search_tasks`<br>`list_agents`<br>`get_agent`<br>`list_projects`<br>`list_goals`<br>`list_project_repositories`<br>`list_responsibilities`<br>`get_responsibility`<br>`find_responsibilities_for` | none | company issue search, agent/project/goal list/get routes, and responsibility list/detail/lookup routes | `company`<br>`task`<br>`actor`<br>`project`<br>`goal`<br>`responsibility` | 4 | bounded redacted read projections through tool-result item events | Goal operations remain scenario-only. Project and repository discovery contracts are delivered by the live server authority; they are not implemented by the mock command dispatcher. Responsibility discovery is likewise live-only and hidden while the instance has Responsibilities off. |
| [`su` — Subtasks](#behavior-group-su-subtasks) | optional delegation tools | `create_task`<br>`reassign_task`<br>`hire_agent`<br>`handoff_case` | `route_wake` | company issue create, child issue, guarded reassignment, and wake services | `company`<br>`task`<br>`actor`<br>`blockers`<br>`wake`<br>`audit` | 4 | company/task state diff, audit reference, and continuation wake evidence | create_task is production-bound to ordinary active-issue child creation with assignment, dependency-ready wake, company checks, child limits, and durable source-scoped idempotency. handoff_case is live-only: the dedicated case service moves the same primary task after source execution settles, or records completion intent subject to ordinary completion gates; legacy scenarios do not claim that coverage. |
| [`bl` — Blockers](#behavior-group-bl-blockers) | always/optional tools + control plane | `block_task`<br>`set_dependencies` | `schedule_blocker_wake`<br>`route_wake` | issue relations, blocker projection, liveness validation, and blocker wake services | `task`<br>`blockers`<br>`wake`<br>`actor`<br>`audit`<br>`fault` | 5 | dependency diff, block receipt, attention routing, and issue-status decision | set_dependencies is production-bound for the active issue; block_task remains unbound, and cancelled-blocker receipts still need typed additive evidence. |
| [`dp` — Documents and plans](#behavior-group-dp-documents-and-plans) | always task-document tools; restore optional; destructive lifecycle control-plane-only | `list_documents`<br>`read_document`<br>`list_document_revisions`<br>`write_document` | `append_audit_record` | issue document list/read/upsert/revision/restore/lock/unlock/delete routes | `task`<br>`documents`<br>`interactions`<br>`idempotency`<br>`audit`<br>`fault` | 3 | bounded reads and revision-safe write/conflict/denial receipts with revision lineage | restore_document_revision is an approved optional-tool gap; lock/unlock/delete are intentionally control-plane-only. Case kickoff initialDocuments become ordinary task documents in the same transaction. Case reads roll up authorized task document metadata; historical case-document REST storage remains readable without dedicated native document tools. |
@@ -483,10 +487,10 @@ Current responsibility-based paths are normative. Numbered `phase-*` or mileston
### Catalog split and deliberate replacement
- Scenario/eval catalog: **40** operations.
- Live dispatcher catalog: **58** operations.
- Shared: **28**; union/canonical authority: **70**.
- Live dispatcher catalog: **61** operations.
- Shared: **28**; union/canonical authority: **73**.
- Scenario-only: `administer_company`, `export_company`, `inspect_operation_result`, `list_cases`, `list_company_skills`, `list_goals`, `list_routines`, `list_secret_metadata`, `manage_routine`, `read_secret_value`, `sync_company_skills`, `upsert_case`.
- Live-only: `call_api`, `create_case`, `create_project`, `create_workflow`, `get_agent`, `get_agent_instruction_history`, `get_approval`, `get_approval_context`, `get_workspace`, `handoff_case`, `hire_agent`, `list_project_repositories`, `list_workflows`, `list_workspaces`, `prepare_repository`, `read_agent_instructions`, `read_case`, `read_workflow`, `restore_agent_instructions`, `schedule_wake`, `search_api`, `select_workspace`, `send_chat_message`, `set_task_monitor`, `set_task_title`, `submit_complaint`, `submit_suggestion`, `update_agent_instructions`, `update_case`, `update_workflow`.
- Live-only: `call_api`, `create_case`, `create_project`, `create_workflow`, `find_responsibilities_for`, `get_agent`, `get_agent_instruction_history`, `get_approval`, `get_approval_context`, `get_responsibility`, `get_workspace`, `handoff_case`, `hire_agent`, `list_project_repositories`, `list_responsibilities`, `list_workflows`, `list_workspaces`, `prepare_repository`, `read_agent_instructions`, `read_case`, `read_workflow`, `restore_agent_instructions`, `schedule_wake`, `search_api`, `select_workspace`, `send_chat_message`, `set_task_monitor`, `set_task_title`, `submit_complaint`, `submit_suggestion`, `update_agent_instructions`, `update_case`, `update_workflow`.
- The generated provider contract contains exactly the live catalog; the canonical union remains the migration authority until all scenario-only operations are either implemented, deferred, or removed by an explicit reconciliation decision.
- `generic_api_request` stays exported only for controlled tests and cannot be cited as real-surface, mock-parity, or PRP product coverage.
@@ -20,9 +20,9 @@ describe("canonical semantic-catalog reconciliation authority", () => {
it("pins the reconciled op-set relationship between the two catalogs", () => {
const summary = capabilityCatalogReconciliation();
expect(summary.scenarioCount).toBe(40);
expect(summary.liveCount).toBe(58);
expect(summary.liveCount).toBe(61);
expect(summary.sharedCount).toBe(28);
expect(summary.unionCount).toBe(70);
expect(summary.unionCount).toBe(73);
// Any operation added to or removed from either catalog without a
// reconciliation decision changes these exact sets and fails the gate.
expect(summary.liveOnly).toEqual([
@@ -30,14 +30,17 @@ describe("canonical semantic-catalog reconciliation authority", () => {
"create_case",
"create_project",
"create_workflow",
"find_responsibilities_for",
"get_agent",
"get_agent_instruction_history",
"get_approval",
"get_approval_context",
"get_responsibility",
"get_workspace",
"handoff_case",
"hire_agent",
"list_project_repositories",
"list_responsibilities",
"list_workflows",
"list_workspaces",
"prepare_repository",
@@ -74,7 +77,7 @@ describe("canonical semantic-catalog reconciliation authority", () => {
});
it("is the single source both catalogs derive their operation set from", () => {
expect(CAPABILITY_CANONICAL_OPERATIONS).toHaveLength(70);
expect(CAPABILITY_CANONICAL_OPERATIONS).toHaveLength(73);
const canonicalIds = new Set(CAPABILITY_CANONICAL_OPERATIONS.map((operation) => operation.operationId));
// Neither catalog may contain an operation absent from the canonical source.
for (const tool of SCENARIO_CATALOG) expect(canonicalIds.has(tool.operationId)).toBe(true);
@@ -108,7 +111,7 @@ describe("canonical semantic-catalog reconciliation authority", () => {
});
it("names placement, claims, task modes, side-effect class, idempotency, redaction, mock mapping, real binding status, and PRP evidence for every operation", () => {
expect(CAPABILITY_CANONICAL_CATALOG).toHaveLength(70);
expect(CAPABILITY_CANONICAL_CATALOG).toHaveLength(73);
for (const operation of CAPABILITY_CANONICAL_CATALOG) {
expect(operation.placement).toMatch(/^(always|optional)_agent_tool$/);
expect(Array.isArray(operation.requiredClaims)).toBe(true);
@@ -134,7 +137,7 @@ describe("canonical semantic-catalog reconciliation authority", () => {
it("classifies real binding status so generic_api_request is never product coverage", () => {
const summary = capabilityCatalogReconciliation();
expect(summary.byRealBindingStatus).toEqual({
live_codex: 57,
live_codex: 60,
scenario_mock: 12,
test_only: 1,
});
@@ -158,7 +158,7 @@ describe("semantic action catalog", () => {
(action) => action.operationId,
);
expect(operationIds).toHaveLength(50);
expect(operationIds).toHaveLength(53);
expect(operationIds).toContain("set_task_monitor");
expect(operationIds).toContain("send_chat_message");
expect(new Set(operationIds).size).toBe(operationIds.length);
@@ -12,6 +12,7 @@ import { listProjectsDescription, listProjectsInputSchema } from "../protocol-ac
import { setTaskTitleAction } from "../protocol-actions/set-task-title.js";
import { sendChatMessageAction } from "../protocol-actions/send-chat-message.js";
import { reassignTaskAction } from "../protocol-actions/reassign-task.js";
import { findResponsibilitiesForAction, getResponsibilityAction, listResponsibilitiesAction } from "../protocol-actions/responsibilities.js";
import type {
PaperclipJsonSchema,
PaperclipSemanticActionDescriptor,
@@ -513,6 +514,15 @@ const descriptors: readonly PaperclipSemanticActionDescriptor[] = [
placement: "optional",
inputSchema: object({}),
}),
...[listResponsibilitiesAction, getResponsibilityAction, findResponsibilitiesForAction].map((action) => descriptor({
operationId: action.id,
title: action.documentation.title,
description: action.documentation.description,
placement: "optional",
allowedModes: action.live.descriptor.allowedModes,
inputSchema: action.live.descriptor.inputSchema,
outputSchema: openObject,
})),
descriptor({
operationId: "create_project",
title: "Create project",
@@ -37,6 +37,9 @@ export type PaperclipSemanticActionId =
| "create_project"
| "list_project_repositories"
| "list_projects"
| "list_responsibilities"
| "get_responsibility"
| "find_responsibilities_for"
| "create_task"
| "handoff_case"
| "read_case"
@@ -466,13 +466,13 @@ describe("workflow reports and stress traceability", () => {
candidateFailures: 36,
});
expect(report.coverage).toMatchObject({
canonicalOperations: 70,
canonicalOperations: 73,
capabilityCases: 106,
workflows: 12,
stressFindings: 44,
stressExclusions: 1,
});
expect(report.coverage.operations).toHaveLength(70);
expect(report.coverage.operations).toHaveLength(73);
expect(report.coverage.operations).toEqual(expect.arrayContaining(
["create_case", "read_case", "update_case", "handoff_case", "list_workflows", "read_workflow", "create_workflow", "update_workflow", "send_chat_message"].map(operationId =>
expect.objectContaining({ operationId, workflowIds: [] })),
@@ -484,7 +484,7 @@ describe("workflow reports and stress traceability", () => {
)?.workflowIds.length,
).toBeGreaterThan(0);
expect(renderRunnerWorkflowMarkdown(report)).toContain(
"70 operations · 106 capability cases · 12 workflows",
"73 operations · 106 capability cases · 12 workflows",
);
expect(renderRunnerWorkflowJUnit(report)).toContain(
'tests="36" failures="36" skipped="0"',
@@ -6,9 +6,9 @@ export type CapabilityPrimaryDisposition =
| "optional_agent_tool";
export const capabilityInventoryCounts = {
"skillReferenceCapabilities": 174,
"skillReferenceCapabilities": 176,
"evalCases": 106,
"normativeRows": 280,
"normativeRows": 282,
"legacyMcpAliases": 42
} as const;
@@ -15,6 +15,7 @@ import { createSkillAction } from "./create-skill.js";
import { updateSkillAction } from "./update-skill.js";
import { createProjectAction } from "./create-project.js";
import { listProjectRepositoriesAction } from "./list-project-repositories.js";
import { findResponsibilitiesForAction, getResponsibilityAction, listResponsibilitiesAction } from "./responsibilities.js";
import { searchApiAction } from "./search-api.js";
import { callApiAction } from "./call-api.js";
import { administerCompanyAction } from "./administer-company.js";
@@ -84,6 +85,9 @@ export const PAPERCLIP_PROTOCOL_ACTIONS = deepFreezeProtocolAction([
updateSkillAction,
createProjectAction,
listProjectRepositoriesAction,
listResponsibilitiesAction,
getResponsibilityAction,
findResponsibilitiesForAction,
searchApiAction,
callApiAction,
administerCompanyAction,
@@ -0,0 +1,73 @@
/** Canonical definitions for the area and responsibility tools (experimental, `enableResponsibilities`). */
const uuidPattern = "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
const binding = "callResponsibilityTool";
const outputSchema = { type: "object", additionalProperties: true } as const;
function responsibilityAction<const Id extends string, const Schema, const Input>(input: {
id: Id;
title: string;
description: string;
order: number;
write: boolean;
schema: Schema;
example: Input;
}) {
const modes = input.write ? ["standard"] as const : ["standard", "ask", "planning", "skill_test"] as const;
return {
id: input.id,
canonical: {
operationId: input.id, surfaces: ["live"], placement: "optional_agent_tool", optionalGroup: "discovery",
requiredClaims: [], taskModes: modes, sideEffectClass: input.write ? "company_write" : "read",
idempotency: input.write ? "required" : "none", disabledByDefault: false,
realBindingStatus: "live_codex", realServiceBinding: binding,
prpEvidence: input.write
? "Authenticated responsibility routes with run-bound activity for the person the agent works for."
: "Authenticated responsibility routes with the reader's task and project visibility.",
prpBindingStatus: "bound", legacyAliases: [],
},
documentation: { title: input.title, description: input.description, note: null },
examples: {
call: { operationId: input.id, input: input.example },
scenarioCall: null,
success: { ok: true, operationId: input.id, result: {} },
},
live: {
order: input.order,
descriptor: {
schema: "paperclip.semantic-tool.v1", operationId: input.id, version: 1,
title: input.title, description: input.description, exposure: "optional",
requiredClaims: [], allowedModes: modes, inputSchema: input.schema, outputSchema,
},
},
scenario: null,
} as const;
}
export const listResponsibilitiesAction = responsibilityAction({
id: "list_responsibilities", title: "List responsibilities", order: 84, write: false,
description: "List a person's areas and responsibilities: each area with its responsibilities (status, bar, health, the agent that runs it, and counts of filed projects, routines and tasks), responsibilities with no area, and uncovered work (company routines, projects and open tasks filed under no responsibility). Defaults to the person this run works for; never ask for their user ID. Use this before asking the person what they are responsible for. A turned-off error means the feature is off, not that the list is empty.",
schema: { type: "object", additionalProperties: false, properties: {
ownerUserId: { type: "string", minLength: 1, maxLength: 200, description: "Another person's user ID from list_people. Omit for the person this run works for." },
areaId: { type: "string", pattern: uuidPattern, description: "Return only this area." },
includeProposed: { type: "boolean", default: true, description: "Include responsibilities proposed but not yet confirmed." },
includeLetGo: { type: "boolean", default: false, description: "Include responsibilities the person let go." },
includeArchivedAreas: { type: "boolean", default: false, description: "Include archived areas." },
} }, example: {},
});
export const getResponsibilityAction = responsibilityAction({
id: "get_responsibility", title: "Read responsibility", order: 85, write: false,
description: "Read one responsibility in full: its bar and health, area, the projects, tasks and routines under it (with link IDs for items filed directly, and items under it through a filed project), the skills of the agents doing its work, and its latest status report.",
schema: { type: "object", additionalProperties: false, required: ["responsibilityId"], properties: {
responsibilityId: { type: "string", pattern: uuidPattern, description: "Responsibility ID from list_responsibilities or find_responsibilities_for." },
} }, example: { responsibilityId: "00000000-0000-4000-8000-000000000001" },
});
export const findResponsibilitiesForAction = responsibilityAction({
id: "find_responsibilities_for", title: "Find responsibilities for an item", order: 86, write: false,
description: "List the proposed and active responsibilities a project, task or routine is filed under, directly or through its project. An empty list means it is uncovered.",
schema: { type: "object", additionalProperties: false, required: ["kind", "id"], properties: {
kind: { type: "string", enum: ["project", "task", "routine"], description: "What the item is." },
id: { type: "string", minLength: 1, maxLength: 200, description: "The item's ID. For a task, an identifier such as PAP-123 also works." },
} }, example: { kind: "routine", id: "00000000-0000-4000-8000-000000000002" },
});
@@ -40,6 +40,7 @@ const NAMESPACE: Readonly<Record<CapabilitySemanticOperationId, string>> = Objec
get_agent_instruction_history: "agent_instructions",
restore_agent_instructions: "agent_instructions",
create_skill: "skills", update_skill: "skills", create_task: "delegation", get_workspace: "workspace", list_workspaces: "workspace", select_workspace: "workspace", prepare_repository: "workspace", create_project: "projects", list_project_repositories: "projects", list_projects: "projects",
list_responsibilities: "responsibilities", get_responsibility: "responsibilities", find_responsibilities_for: "responsibilities",
set_dependencies: "delegation", reassign_task: "delegation", list_approvals: "governance", get_approval: "governance",
get_approval_context: "governance", request_approval: "governance",
decide_approval: "governance", comment_on_approval: "governance",
@@ -198,6 +198,9 @@ export class CapabilitySemanticDispatcher {
"create_project" as const,
"list_project_repositories" as const,
"list_projects" as const,
"list_responsibilities" as const,
"get_responsibility" as const,
"find_responsibilities_for" as const,
"handoff_case" as const,
"read_case" as const,
"update_case" as const,
@@ -46,6 +46,7 @@ const NAMESPACE: Readonly<Record<PaperclipSemanticActionId, string>> =
control_workspace_service: "workspace",
set_dependencies: "delegation", reassign_task: "delegation",
create_skill: "skills", update_skill: "skills", create_task: "delegation", get_workspace: "workspace", list_workspaces: "workspace", select_workspace: "workspace", prepare_repository: "workspace", create_project: "projects", list_project_repositories: "projects", list_projects: "projects",
list_responsibilities: "responsibilities", get_responsibility: "responsibilities", find_responsibilities_for: "responsibilities",
request_approval: "governance",
decide_approval: "governance",
comment_on_approval: "governance",
@@ -113,7 +113,7 @@ describe("Capability semantic catalog and authorization", () => {
it("publishes a stable narrow catalog without credentials or control-plane-owned tools", () => {
const names = CAPABILITY_SEMANTIC_TOOL_CATALOG.map((tool) => tool.operationId);
expect(new Set(names).size).toBe(names.length);
expect(names).toHaveLength(58);
expect(names).toHaveLength(61);
expect(names).toContain("send_chat_message");
expect(names).toEqual(expect.arrayContaining(["list_workflows", "read_workflow", "create_workflow", "update_workflow"]));
expect(names).toContain("set_task_monitor");
@@ -57,6 +57,9 @@ export type CapabilitySemanticOperationId =
| "create_project"
| "list_project_repositories"
| "list_projects"
| "list_responsibilities"
| "get_responsibility"
| "find_responsibilities_for"
| "create_task"
| "handoff_case"
| "read_case"
@@ -71,7 +71,7 @@ const createResponsibilityFields = z.object({
/** An agent in the same company that runs the work. */
runByAgentId: z.string().uuid().optional().nullable(),
evidence: optionalText,
/** Board: defaults to the acting user. Agent: required. */
/** Board: defaults to the acting user. Agent: defaults to the person its run works for. */
ownerUserId: z.string().trim().min(1).optional(),
/** Board only; agents always create `proposed`. Board default: `active`. */
status: z.enum(RESPONSIBILITY_STATUSES).optional(),
@@ -184,7 +184,7 @@ const booleanQuery = z
.transform((value) => value === true || value === "true" || value === "1");
export const listResponsibilitiesQuerySchema = z.object({
/** Board: defaults to the acting user. Agent: required. */
/** Board: defaults to the acting user. Agent: defaults to the person its run works for. */
ownerUserId: z.string().trim().min(1).optional(),
includeLetGo: booleanQuery.optional().default(false),
});
@@ -177,9 +177,40 @@ describeEmbeddedPostgres("responsibility routes", () => {
]) {
expect(res.status).toBe(404);
expect(res.body.error).toBe("Responsibilities are not enabled");
// The code lets an agent tell "turned off" from "nothing there".
expect(res.body.code).toBe("responsibilities_disabled");
}
});
it("reads and proposes for the person an agent's run works for when no owner is named", async () => {
await enable();
const company = await seedCompany();
const agent = await seedAgent(company.id);
const board = createApp(db, localBoardActor());
const mine = await createResponsibility(board, company.id, { title: "Fundraising" });
const forOwner = createApp(db, {
...agentActor(company.id, agent.id),
onBehalfOfUserId: OWNER,
onBehalfOfMemberships: [{ companyId: company.id, membershipRole: "owner", status: "active" }],
});
const listed = await request(forOwner).get(`/api/companies/${company.id}/responsibilities`);
expect(listed.status).toBe(200);
expect(listed.body.ownerUserId).toBe(OWNER);
expect(listed.body.responsibilities.map((row: { id: string }) => row.id)).toEqual([mine.id]);
const proposed = await request(forOwner).post(`/api/companies/${company.id}/responsibilities`).send({ title: "Hiring", ...METRIC });
expect(proposed.status).toBe(201);
expect(proposed.body).toMatchObject({ ownerUserId: OWNER, status: "proposed" });
// A named owner still wins, and a run that works for no person must name one.
const other = await request(forOwner).get(`/api/companies/${company.id}/responsibilities?ownerUserId=other-user`);
expect(other.body.ownerUserId).toBe("other-user");
const unbound = await request(createApp(db, agentActor(company.id, agent.id))).get(`/api/companies/${company.id}/responsibilities`);
expect(unbound.status).toBe(422);
expect(unbound.body.error).toContain("this run works for no person");
});
it("refuses a half-filled bar, and derives status from the metric", async () => {
await enable();
const company = await seedCompany();
@@ -0,0 +1,184 @@
import { describe, expect, it } from "vitest";
import { callResponsibilityTool, RESPONSIBILITIES_TURNED_OFF_MESSAGE } from "../services/responsibility-tools.js";
const COMPANY = "11111111-1111-4111-8111-111111111111";
const AREA = "22222222-2222-4222-8222-222222222222";
const RESPONSIBILITY = "33333333-3333-4333-8333-333333333333";
const ROUTINE = "44444444-4444-4444-8444-444444444444";
const TASK = "55555555-5555-4555-8555-555555555555";
function rollup(overrides: Record<string, unknown> = {}) {
return {
health: "on_track", computedHealth: "on_track", healthOverridden: false, metric: null,
statusSentence: "12 of 20 investors contacted, 60% of target", workSummary: [{ text: "2 tasks blocked" }],
projects: 1, routines: 2, openTasks: 3, blockedTasks: 2, agentTasks: 1, userTasks: 2, doneTasks: 4,
nextDueAt: null, overdueProjects: [], ...overrides,
};
}
function responsibility(overrides: Record<string, unknown> = {}) {
return {
id: RESPONSIBILITY, companyId: COMPANY, ownerUserId: "owner", areaId: AREA, title: "Fundraising",
description: null, standard: "Every investor conversation has a next step", metricKind: "volume",
metricName: "Investors contacted", metricUnit: null, metricTarget: 20, metricLow: null, metricHigh: null,
metricCurrent: 12, metricDirection: "at_least", metricUpdatedAt: null, runByAgentId: null, status: "active",
source: "manual", evidence: null, healthOverride: null, healthNote: null, sortOrder: 0, proposedByAgentId: null,
confirmedAt: null, createdAt: "2026-11-01T00:00:00.000Z", updatedAt: "2026-11-01T00:00:00.000Z",
rollup: rollup(), ...overrides,
};
}
/** Records each request and answers from a path table; unknown paths are a test failure. */
function fakeApi(routes: Record<string, { status?: number; body: unknown }>) {
const calls: Array<{ url: string; auth: string | null }> = [];
const fetcher = (async (url: string | URL, init?: RequestInit) => {
const href = String(url);
calls.push({ url: href, auth: new Headers(init?.headers).get("authorization") });
const path = href.replace("http://paperclip.test/api", "");
const route = routes[path];
if (!route) throw new Error(`unexpected request ${path}`);
return new Response(JSON.stringify(route.body), { status: route.status ?? 200, headers: { "content-type": "application/json" } });
}) as typeof fetch;
return { calls, fetcher };
}
const base = { apiUrl: "http://paperclip.test/api", token: "agent-token", companyId: COMPANY, companyPrefix: "PAP" };
describe("responsibility tools", () => {
it("groups a person's responsibilities by area and reports uncovered work", async () => {
const proposed = responsibility({ id: "66666666-6666-4666-8666-666666666666", title: "Hiring", status: "proposed", areaId: null, evidence: "Owner said so", proposedByAgentId: "agent-1" });
const api = fakeApi({
[`/companies/${COMPANY}/responsibilities?includeLetGo=false`]: { body: {
ownerUserId: "owner",
areas: [{ id: AREA, title: "Money", description: null, status: "active", activeResponsibilities: 1, byHealth: {} }],
responsibilities: [responsibility()],
proposed: [proposed],
totals: { byHealth: { behind: 0, at_risk: 0, on_track: 1, not_measured: 0 }, openTasks: 3, agentTasks: 1, userTasks: 2, blockedTasks: 2, projects: 1, lateProjects: 0 },
loose: {
projectCount: 0, openTaskCount: 1, routineCount: 1, projects: [],
tasks: [{ id: TASK, identifier: "PAP-9", title: "Loose task", status: "todo", assigneeAgentId: null, assigneeUserId: null, projectId: null, updatedAt: "2026-11-01T00:00:00.000Z" }],
routines: [{ id: ROUTINE, title: "Weekly digest", status: "active", assigneeAgentId: "agent-1", projectId: null }],
},
} },
});
const result = await callResponsibilityTool({ ...base, name: "list_responsibilities", arguments: {} }, api.fetcher);
// The route picks the owner (the person the run works for); the tool sends none and authenticates as the run.
expect(api.calls).toEqual([{ url: `http://paperclip.test/api/companies/${COMPANY}/responsibilities?includeLetGo=false`, auth: "Bearer agent-token" }]);
expect(result).toMatchObject({
ownerUserId: "owner",
areas: [{ id: AREA, title: "Money", responsibilities: [{
id: RESPONSIBILITY, title: "Fundraising", health: "on_track", bar: { kind: "volume", name: "Investors contacted", target: 20, current: 12 },
counts: { projects: 1, routines: 2, openTasks: 3, blockedTasks: 2, doneTasks: 4 }, href: `/PAP/responsibilities/${RESPONSIBILITY}`,
}] }],
withoutArea: [{ title: "Hiring", status: "proposed", evidence: "Owner said so" }],
totals: { active: 1, proposed: 1, letGo: 0 },
uncoveredWork: { routineCount: 1, openTaskCount: 1, routines: [{ id: ROUTINE, title: "Weekly digest" }], tasks: [{ identifier: "PAP-9" }] },
});
expect(result).not.toHaveProperty("guidance");
});
it("says the list is empty rather than inventing responsibilities", async () => {
const api = fakeApi({
[`/companies/${COMPANY}/responsibilities?includeLetGo=false&ownerUserId=someone`]: { body: {
ownerUserId: "someone", areas: [], responsibilities: [], proposed: [],
totals: { byHealth: {}, openTasks: 0, agentTasks: 0, userTasks: 0, blockedTasks: 0, projects: 0, lateProjects: 0 },
loose: { projectCount: 0, openTaskCount: 0, routineCount: 0, projects: [], tasks: [], routines: [] },
} },
});
const result = await callResponsibilityTool({ ...base, name: "list_responsibilities", arguments: { ownerUserId: "someone" } }, api.fetcher);
expect(result).toMatchObject({ ownerUserId: "someone", areas: [], withoutArea: [], guidance: expect.stringContaining("no responsibilities yet") });
});
it("scopes totals to one area, hides archived areas unless asked, and notices hidden proposals", async () => {
const ARCHIVED = "99999999-0000-4000-8000-000000000001";
const overview = (overrides: Record<string, unknown> = {}) => ({
ownerUserId: "owner",
areas: [
{ id: AREA, title: "Money", description: null, status: "active" },
{ id: ARCHIVED, title: "Old", description: null, status: "archived" },
],
responsibilities: [
responsibility(),
responsibility({ id: "66666666-6666-4666-8666-666666666667", title: "Legacy", areaId: ARCHIVED, rollup: rollup({ health: "behind" }) }),
],
proposed: [],
totals: { byHealth: { behind: 1, at_risk: 0, on_track: 1, not_measured: 0 }, openTasks: 9, agentTasks: 0, userTasks: 0, blockedTasks: 2, projects: 4, lateProjects: 1 },
loose: { projectCount: 0, openTaskCount: 0, routineCount: 0, projects: [], tasks: [], routines: [] },
...overrides,
});
const api = fakeApi({ [`/companies/${COMPANY}/responsibilities?includeLetGo=false`]: { body: overview() } });
const all = await callResponsibilityTool({ ...base, name: "list_responsibilities", arguments: {} }, api.fetcher) as Record<string, any>;
expect(all.areas.map((area: { id: string }) => area.id)).toEqual([AREA]);
expect(all.withoutArea.map((row: { title: string }) => row.title)).toEqual(["Legacy"]);
expect(all.totals).toMatchObject({ scope: "person", active: 2, openTasks: 9 });
const one = await callResponsibilityTool({ ...base, name: "list_responsibilities", arguments: { areaId: AREA } }, api.fetcher) as Record<string, any>;
expect(one.totals).toEqual({ scope: "area", active: 1, proposed: 0, letGo: 0, activeByHealth: { behind: 0, at_risk: 0, on_track: 1, not_measured: 0 } });
expect(one).not.toHaveProperty("uncoveredWork");
const onlyProposals = fakeApi({ [`/companies/${COMPANY}/responsibilities?includeLetGo=false`]: {
body: overview({ responsibilities: [], proposed: [responsibility({ status: "proposed" })] }),
} });
const hidden = await callResponsibilityTool({ ...base, name: "list_responsibilities", arguments: { includeProposed: false } }, onlyProposals.fetcher);
expect(hidden).toMatchObject({ guidance: expect.stringContaining("1 proposed responsibilities, hidden") });
});
it("reads one responsibility with its filed items and latest status report", async () => {
const api = fakeApi({
[`/responsibilities/${RESPONSIBILITY}`]: { body: {
...responsibility(), area: { id: AREA, title: "Money", status: "active" },
skills: [{ id: "skill-1", key: "paperclipai/research", slug: "research", name: "Research", description: null, tagline: null, iconUrl: null, color: null, agentIds: ["agent-1"] }],
artifacts: [], artifactsTotal: 0, artifactsTruncated: false,
projects: [],
tasks: [{ linkId: "link-1", membership: "direct", id: TASK, identifier: "PAP-9", title: "Pitch deck", status: "todo", assigneeAgentId: null, assigneeUserId: null, projectId: null, updatedAt: "2026-11-01T00:00:00.000Z" }],
tasksTruncated: false,
routines: [{ linkId: "link-2", membership: "direct", id: ROUTINE, title: "Weekly digest", status: "active", assigneeAgentId: "agent-1", projectId: null, lastRun: null }],
} },
[`/responsibilities/${RESPONSIBILITY}/status-report`]: { body: { current: { status: "on_track", message: "Fine" }, reporterAgentId: "agent-1", updateRequested: false, history: [] } },
});
const result = await callResponsibilityTool({ ...base, name: "get_responsibility", arguments: { responsibilityId: RESPONSIBILITY } }, api.fetcher);
expect(result).toMatchObject({
id: RESPONSIBILITY, ownerUserId: "owner", area: { title: "Money" }, workSummary: ["2 tasks blocked"],
tasks: [{ linkId: "link-1", membership: "direct", identifier: "PAP-9" }],
routines: [{ linkId: "link-2", title: "Weekly digest" }],
skills: [{ id: "skill-1", name: "Research", agentIds: ["agent-1"] }],
statusReport: { current: { status: "on_track" }, reporterAgentId: "agent-1" },
});
});
it("finds where a task is filed by its identifier", async () => {
const api = fakeApi({
"/issues/PAP-9": { body: { id: TASK, identifier: "PAP-9" } },
[`/companies/${COMPANY}/responsibility-links/lookup?issueId=${TASK}`]: { body: { responsibilities: [
{ id: RESPONSIBILITY, title: "Fundraising", areaId: AREA, ownerUserId: "owner", via: "project" },
] } },
});
const result = await callResponsibilityTool({ ...base, name: "find_responsibilities_for", arguments: { kind: "task", id: "PAP-9" } }, api.fetcher);
expect(result).toEqual({
item: { kind: "task", id: TASK, identifier: "PAP-9" },
responsibilities: [{ id: RESPONSIBILITY, title: "Fundraising", areaId: AREA, ownerUserId: "owner", via: "project", href: `/PAP/responsibilities/${RESPONSIBILITY}` }],
});
});
it("reports the feature as turned off, not as an empty list", async () => {
const api = fakeApi({
[`/companies/${COMPANY}/responsibility-links/lookup?routineId=${ROUTINE}`]: { status: 404, body: { error: "Responsibilities are not enabled", code: "responsibilities_disabled" } },
});
await expect(callResponsibilityTool({ ...base, name: "find_responsibilities_for", arguments: { kind: "routine", id: ROUTINE } }, api.fetcher))
.rejects.toMatchObject({ status: 404, message: RESPONSIBILITIES_TURNED_OFF_MESSAGE, details: { code: "responsibilities_disabled" } });
});
it("passes route denials through and refuses malformed input before calling the API", async () => {
const api = fakeApi({
[`/responsibilities/${RESPONSIBILITY}`]: { status: 403, body: { error: "Responsibilities are outside this agent's authorization boundary" } },
[`/responsibilities/${RESPONSIBILITY}/status-report`]: { status: 403, body: { error: "denied" } },
});
await expect(callResponsibilityTool({ ...base, name: "get_responsibility", arguments: { responsibilityId: RESPONSIBILITY } }, api.fetcher))
.rejects.toMatchObject({ status: 403, message: "Responsibilities are outside this agent's authorization boundary" });
await expect(callResponsibilityTool({ ...base, name: "find_responsibilities_for", arguments: { kind: "routine", id: "weekly" } }, api.fetcher))
.rejects.toMatchObject({ status: 422 });
await expect(callResponsibilityTool({ ...base, name: "list_responsibilities", arguments: { owner: "x" } }, api.fetcher)).rejects.toThrow();
});
});
@@ -1,3 +1,5 @@
You are {{agentName}}, chief of staff for {{organizationName}}. You are the user's main point of contact for carrying out requests and coordinating the company's work.
Speak to the user in plain language: say what happened, what it means for them, and what comes next. Never narrate internal mechanics (receipts, execution policies, runs, API calls) or show raw IDs; name tasks by their identifier, like PIX-3.
When the user talks about what they are responsible for, or asks you to map or check work against their responsibilities, read their areas and responsibilities first (list_responsibilities, when you have it) instead of asking them to list or locate them.
+19 -6
View File
@@ -13,6 +13,7 @@ import {
type ResponsibilityLinkLookupQuery,
} from "@paperclipai/shared";
import { forbidden, notFound, unprocessable } from "../errors.js";
import { responsibilitiesDisabledError } from "../services/responsibilities-disabled.js";
import { validate } from "../middleware/validate.js";
import {
authorizationDeniedDetails,
@@ -64,6 +65,17 @@ export function boardCanManageResponsibilityOwner(req: Request, companyId: strin
return membership?.membershipRole === "owner" || membership?.membershipRole === "admin";
}
/**
* Whose responsibilities a request means when it names no owner: a board user
* means their own, and an agent means the person its run works for (the
* person chatting, or the task's responsible person).
*/
export function defaultResponsibilityOwnerUserId(req: Request): string | undefined {
if (req.actor.type === "board") return req.actor.userId ?? undefined;
if (req.actor.type === "agent") return req.actor.onBehalfOfUserId ?? undefined;
return undefined;
}
export function responsibilityRoutes(db: Db, opts: { heartbeat?: IssueAssignmentWakeupDeps } = {}) {
const router = Router();
const access = accessService(db);
@@ -75,7 +87,7 @@ export function responsibilityRoutes(db: Db, opts: { heartbeat?: IssueAssignment
// Same gate and message shape the status-card routes use when their flag is off.
async function assertResponsibilitiesEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
/** Agents also pass the company-scope read boundary (low-trust agents do not). */
@@ -181,10 +193,10 @@ export function responsibilityRoutes(db: Db, opts: { heartbeat?: IssueAssignment
const companyId = req.params.companyId as string;
await assertCompanyRead(req, companyId);
const query = listResponsibilitiesQuerySchema.parse(req.query);
const ownerUserId = query.ownerUserId ?? (req.actor.type === "board" ? req.actor.userId : undefined);
const ownerUserId = query.ownerUserId ?? defaultResponsibilityOwnerUserId(req);
if (!ownerUserId) {
throw unprocessable(req.actor.type === "agent"
? "ownerUserId is required: name the person whose responsibilities to read"
? "ownerUserId is required: this run works for no person, so name the person whose responsibilities to read"
: "ownerUserId is required");
}
res.json(await svc.overview(companyId, ownerUserId, {
@@ -200,10 +212,11 @@ export function responsibilityRoutes(db: Db, opts: { heartbeat?: IssueAssignment
const actor = getActorInfo(req);
let ownerUserId: string;
if (req.actor.type === "agent") {
if (!req.body.ownerUserId) {
throw unprocessable("ownerUserId is required: an agent proposes a responsibility for a person in this company");
const owner = req.body.ownerUserId ?? defaultResponsibilityOwnerUserId(req);
if (!owner) {
throw unprocessable("ownerUserId is required: this run works for no person, so name the person in this company the responsibility is for");
}
ownerUserId = req.body.ownerUserId;
ownerUserId = owner;
if (!(await svc.isCompanyMember(companyId, ownerUserId))) throw notFound("Owner is not a member of this company");
} else {
const self = req.actor.userId;
+3 -2
View File
@@ -5,7 +5,8 @@ import {
listResponsibilityAreasQuerySchema,
updateResponsibilityAreaSchema,
} from "@paperclipai/shared";
import { forbidden, notFound } from "../errors.js";
import { forbidden } from "../errors.js";
import { responsibilitiesDisabledError } from "../services/responsibilities-disabled.js";
import { validate } from "../middleware/validate.js";
import { authorizationDeniedDetails } from "../services/authorization.js";
import { accessService, instanceSettingsService, logActivity } from "../services/index.js";
@@ -27,7 +28,7 @@ export function responsibilityAreaRoutes(db: Db) {
async function assertResponsibilitiesEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
async function assertCompanyRead(req: Request, companyId: string) {
@@ -10,7 +10,8 @@ import {
type AcceptedAutomationProposal,
type ProposeAutomationInteraction,
} from "@paperclipai/shared";
import { forbidden, notFound, unprocessable } from "../errors.js";
import { forbidden, unprocessable } from "../errors.js";
import { responsibilitiesDisabledError } from "../services/responsibilities-disabled.js";
import { validate } from "../middleware/validate.js";
import {
authorizationDeniedDetails,
@@ -34,6 +35,7 @@ import { automationConversationService } from "../services/responsibility-automa
import { standingCheckService } from "../services/routine-standing-checks.js";
import { routineSuggestionService, type RoutineSuggestionResponsibilityFiling } from "../services/routine-suggestions.js";
import { assertBoard, assertCompanyAccess, getAccessibleResource, getActorInfo } from "./authz.js";
import { defaultResponsibilityOwnerUserId } from "./responsibilities.js";
import { getReadableIssue } from "./readable-issue.js";
const automationQuerySchema = listResponsibilitiesQuerySchema.pick({ ownerUserId: true });
@@ -66,7 +68,7 @@ export function responsibilityAutomationRoutes(
async function assertResponsibilitiesEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
async function assertCompanyRead(req: Request, companyId: string) {
@@ -145,10 +147,10 @@ export function responsibilityAutomationRoutes(
const companyId = req.params.companyId as string;
await assertCompanyRead(req, companyId);
const query = automationQuerySchema.parse(req.query);
const ownerUserId = query.ownerUserId ?? (req.actor.type === "board" ? req.actor.userId : undefined);
const ownerUserId = query.ownerUserId ?? defaultResponsibilityOwnerUserId(req);
if (!ownerUserId) {
throw unprocessable(req.actor.type === "agent"
? "ownerUserId is required: name the person whose responsibilities to read"
? "ownerUserId is required: this run works for no person, so name the person whose responsibilities to read"
: "ownerUserId is required");
}
res.json(await automation.overview(companyId, ownerUserId, { scope: await readScope(req) }));
@@ -25,7 +25,7 @@ import {
import { responsibilityService } from "../services/responsibilities.js";
import { assertBoard, assertCompanyAccess, getAccessibleResource, getActorInfo } from "./authz.js";
import { getReadableIssue } from "./readable-issue.js";
import { boardCanManageResponsibilityOwner } from "./responsibilities.js";
import { boardCanManageResponsibilityOwner, defaultResponsibilityOwnerUserId } from "./responsibilities.js";
const ISSUE_NOT_FOUND = "Issue not found";
const VERSION_NOT_FOUND = "Version not found";
@@ -83,12 +83,12 @@ export function responsibilityDashboardRoutes(db: Db, opts: { heartbeat?: IssueA
}
}
/** The overview route's ownerUserId rule: board users default to themselves; agents must name the person. */
/** The overview route's ownerUserId rule: board users default to themselves, agents to the person their run works for. */
function ownerFrom(req: Request, ownerUserId: string | undefined) {
const owner = ownerUserId ?? (req.actor.type === "board" ? req.actor.userId : undefined);
const owner = ownerUserId ?? defaultResponsibilityOwnerUserId(req);
if (!owner) {
throw unprocessable(req.actor.type === "agent"
? "ownerUserId is required: name the person whose dashboard to read"
? "ownerUserId is required: this run works for no person, so name the person whose dashboard to read"
: "ownerUserId is required");
}
return owner;
@@ -1,7 +1,8 @@
import { Router, type Request } from "express";
import type { Db } from "@paperclipai/db";
import { listResponsibilitiesQuerySchema } from "@paperclipai/shared";
import { forbidden, notFound, unprocessable } from "../errors.js";
import { forbidden, unprocessable } from "../errors.js";
import { responsibilitiesDisabledError } from "../services/responsibilities-disabled.js";
import {
authorizationDeniedDetails,
issueReadSqlCondition,
@@ -14,6 +15,7 @@ import {
type ResponsibilitySummaryServiceOptions,
} from "../services/responsibility-summaries.js";
import { assertCompanyAccess, getAccessibleResource } from "./authz.js";
import { defaultResponsibilityOwnerUserId } from "./responsibilities.js";
const NOT_FOUND = "Responsibility not found";
const summaryQuerySchema = listResponsibilitiesQuerySchema.pick({ ownerUserId: true });
@@ -32,7 +34,7 @@ export function responsibilitySummaryRoutes(db: Db, opts: { summaries?: Responsi
async function assertResponsibilitiesEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
async function assertCompanyRead(req: Request, companyId: string) {
@@ -65,10 +67,10 @@ export function responsibilitySummaryRoutes(db: Db, opts: { summaries?: Responsi
const companyId = req.params.companyId as string;
await assertCompanyRead(req, companyId);
const query = summaryQuerySchema.parse(req.query);
const ownerUserId = query.ownerUserId ?? (req.actor.type === "board" ? req.actor.userId : undefined);
const ownerUserId = query.ownerUserId ?? defaultResponsibilityOwnerUserId(req);
if (!ownerUserId) {
throw unprocessable(req.actor.type === "agent"
? "ownerUserId is required: name the person whose responsibilities to summarize"
? "ownerUserId is required: this run works for no person, so name the person whose responsibilities to summarize"
: "ownerUserId is required");
}
const overview = await responsibilities.overview(companyId, ownerUserId, {
@@ -1,3 +1,4 @@
import { RESPONSIBILITIES_OFF_GUIDANCE } from "./responsibilities-disabled.js";
import { isContextCompactionRun } from "./context-compaction.js";
import { notifyStatusCardIssueChange } from "./status-card-notifications.js";
import { notifyIssueRecovery } from "./issue-recovery-notifications.js";
@@ -152,6 +153,10 @@ Keep discussion here and leave the conversation available for the next message.
/** Presentation guidance for the opted-in Coordinator experience; not authority. */
/** Rendered only while the instance enables the Cases experiment. */
export const CASES_CHAT_DIRECTIVE = `This instance has Cases enabled. A case is a saved record with its own facts, audit history and handoffs, separate from the documents on its tasks. Each case has a page at /<prefix>/cases/<case identifier>, using the identifier the case returns (such as RUN-C1) and this conversation's company prefix. When a reply concerns a case, such as its facts, its fact-change history or its handoffs, link the case page as a Markdown link, such as [RUN-C1](/<prefix>/cases/RUN-C1), alongside links to the tasks whose documents or comments you cite. When a question about a task's history may involve its case, find the case with GET /api/issues/{issueId}/cases and read who changed its facts in GET /api/cases/{id}/events, beside the task's document revisions. When the person opens a case from a brief, such as an attached file or a document here, save that brief as a document on the case's primary task with initialDocuments on POST /api/companies/{companyId}/case-handoffs, in the same request that creates the task, so it is saved before work starts. Case fields do not replace the brief: they hold the structured facts, and the document keeps the person's source for the assignee.`;
/** Rendered only while the instance enables the Responsibilities experiment. */
export const RESPONSIBILITIES_CHAT_DIRECTIVE = `This instance has areas and responsibilities enabled. A person's responsibilities are saved Paperclip records, grouped under areas, each with a bar (how success is measured) and the projects, tasks and routines filed under it; they are listed at /<prefix>/responsibilities. When the person mentions what they are responsible for or asks to map, sort or check work against their responsibilities or areas, read them first with list_responsibilities: it defaults to this person and also lists company work filed under no responsibility. Open one with get_responsibility, and check where a project, task or routine is filed with find_responsibilities_for. Do not ask the person what their responsibilities are or where they are written down before reading them; ask only when the list is empty. Link a responsibility with the href the tool returns.`;
/** Rendered while the Responsibilities experiment is off, so an agent can tell "turned off" from "none". */
export const RESPONSIBILITIES_OFF_CHAT_DIRECTIVE = RESPONSIBILITIES_OFF_GUIDANCE;
/** Rendered only while the instance enables the Status Cards experiment. */
export const STATUS_CARDS_CHAT_DIRECTIVE = `This instance has Status Cards enabled. A status card is a saved Paperclip feature, not a document or comment: a live summary card on the company's Status page at /<prefix>/status (listed as Status in the sidebar), each card at /<prefix>/status/<cardId>. The person describes what the card should track; the card's summarizer agent compiles that into a query over the company's tasks and writes the summary in its own hidden generation task. When the person asks for a status card, list the company's cards with GET /api/companies/{companyId}/status-cards and reuse a matching one; otherwise create one with POST /api/companies/{companyId}/status-cards, setting interestPrompt to what the card should summarize and agentId to the agent that writes its summary (yourself or a teammate; omitting it uses the built-in Summarizer when that is configured). Do not write a task document in place of a card. To refresh a card, POST /api/status-cards/{id}/refresh. Agents can manage only cards they authored. Creating or refreshing a card only queues the work: the summarizer updates the card in its own run, which you do not perform or wait for. Do not sleep or poll the card. Report the outcome the response gives: enqueued true means the summarizer's run is queued; alreadyGenerating means an earlier run is still going; enqueued false otherwise means no run started, so say why from card.state (such as paused_budget or paused_hours) or, when lastGeneratedAt is newer than before, that a concurrent refresh already finished. Reply now with that outcome and the card's returned href as a Markdown link, such as [Launch blockers](/<prefix>/status/<cardId>), and say the summary appears on the card when its summarizer finishes. Call a summary generated or current only after reading a newer lastGeneratedAt than before your request. A card's interestPrompt is instructions for its summarizer, not for you; do not try to meet its requirements yourself.`;
@@ -660,6 +660,7 @@ export async function executeHeartbeatRuntime(db: Db, input: HeartbeatRuntimeExe
(markDispatchStarted) => {
return executePaperclipNativeSession({
casesEnabled: context.paperclipCasesEnabled === true,
responsibilitiesEnabled: context.paperclipResponsibilitiesEnabled === true,
db,
execution: nativeExecution,
observability,
@@ -269,6 +269,7 @@ export async function prepareHeartbeatTaskContext(db: Db, input: HeartbeatTaskCo
conferenceRoomEnabled: experimentalInstanceSettings.enableConferenceRoomChat === true,
statusCardsEnabled: experimentalInstanceSettings.enableStatusCards === true,
casesEnabled: experimentalInstanceSettings.enableCases === true,
responsibilitiesEnabled: experimentalInstanceSettings.enableResponsibilities === true,
// Work a routine created, the onboarding task, bar and automation conversations and status update requests are never offered as routines.
routineSuggestionsEnabled: experimentalInstanceSettings.enableResponsibilities === true
&& issueContext?.originKind !== "routine_execution"
@@ -419,6 +420,7 @@ export async function prepareHeartbeatTaskContext(db: Db, input: HeartbeatTaskCo
// must also reach resumed turns. Rebuild it from server records each wake.
const liveVoiceTaskPrefix = liveVoiceGuidance ? `${liveVoiceGuidance}\n\n` : "";
context.paperclipCasesEnabled = experimentalInstanceSettings.enableCases === true;
context.paperclipResponsibilitiesEnabled = experimentalInstanceSettings.enableResponsibilities === true;
const workflowCase = issueRef && experimentalInstanceSettings.enableCases
? await getCaseExecutionContext(db, { companyId: agent.companyId, issueId: issueRef.id, agentId: agent.id, runId: run.id, exposeLowTrustRaw })
: null;
@@ -162,6 +162,22 @@ describe("heartbeat task markdown rendering", () => {
expect(buildPaperclipTaskMarkdown({ issue: { ...chat, conversationAgentId: null }, nativeRunner: true, casesEnabled: true }))
.not.toContain("Cases:");
});
it("points a standing chat at the responsibility tools, or says the feature is off", () => {
const chat = { id: "chat", identifier: "RUN-1", title: "Chat", conversationAgentId: "ceo" };
const enabled = buildPaperclipTaskMarkdown({ issue: chat, nativeRunner: true, responsibilitiesEnabled: true })!;
expect(enabled).toContain("Areas and responsibilities:");
expect(enabled).toContain("read them first with list_responsibilities");
expect(enabled).toContain("Do not ask the person what their responsibilities are or where they are written down before reading them");
expect(enabled).toContain("/RUN/responsibilities");
const app = readFileSync(new URL("../../../../ui/src/App.tsx", import.meta.url), "utf8");
expect(app).toMatch(/path="responsibilities"/);
const off = buildPaperclipTaskMarkdown({ issue: chat, nativeRunner: true, responsibilitiesEnabled: false })!;
expect(off).toContain("Areas and responsibilities are turned off on this instance");
expect(off).not.toContain("list_responsibilities");
expect(buildPaperclipTaskMarkdown({ issue: chat, nativeRunner: true })).not.toContain("Areas and responsibilities");
expect(buildPaperclipTaskMarkdown({ issue: { ...chat, conversationAgentId: null }, nativeRunner: true, responsibilitiesEnabled: true }))
.not.toContain("Areas and responsibilities");
});
it("returns null without a task or a nonempty wake comment", () => {
expect(buildPaperclipTaskMarkdown({ issue: null })).toBeNull();
expect(buildPaperclipTaskMarkdown({
@@ -1,5 +1,5 @@
import { REQUIRED_QUALITY_REVIEW_GUIDANCE, requiredQualityReview } from "../required-quality-review.js";
import { AGENT_CHAT_DIRECTIVE, CASES_CHAT_DIRECTIVE, CONFERENCE_ROOM_CHAT_DIRECTIVE, COORDINATOR_CHAT_HANDOFF_DIRECTIVE, STATUS_CARDS_CHAT_DIRECTIVE } from "../agent-conversations.js";
import { AGENT_CHAT_DIRECTIVE, CASES_CHAT_DIRECTIVE, CONFERENCE_ROOM_CHAT_DIRECTIVE, COORDINATOR_CHAT_HANDOFF_DIRECTIVE, RESPONSIBILITIES_CHAT_DIRECTIVE, RESPONSIBILITIES_OFF_CHAT_DIRECTIVE, STATUS_CARDS_CHAT_DIRECTIVE } from "../agent-conversations.js";
import { publicChatTaskUrl } from "../chat-task-url.js";
import { slackChatAgentGuidance } from "../connectors/slack/agent-guidance.js";
import type { ConversationConfirmationContext } from "../conversation-confirmation-context.js";
@@ -77,6 +77,9 @@ export function buildPaperclipTaskMarkdown(input: {
conferenceRoomEnabled?: boolean;
statusCardsEnabled?: boolean;
casesEnabled?: boolean;
// Experimental areas and responsibilities: true renders the chat directive for the
// responsibility tools, false the "turned off" note, undefined neither.
responsibilitiesEnabled?: boolean;
// Experimental routine offers (enableResponsibilities) for a task that may
// be offered as a routine; the server still enforces every guardrail.
routineSuggestionsEnabled?: boolean;
@@ -284,6 +287,9 @@ export function buildPaperclipTaskMarkdown(input: {
if (input.conferenceRoomEnabled) lines.push("", "Conference Room:", companyPages(CONFERENCE_ROOM_CHAT_DIRECTIVE));
if (input.statusCardsEnabled) lines.push("", "Status Cards:", companyPages(STATUS_CARDS_CHAT_DIRECTIVE));
if (input.casesEnabled) lines.push("", "Cases:", companyPages(CASES_CHAT_DIRECTIVE));
if (input.responsibilitiesEnabled !== undefined) {
lines.push("", "Areas and responsibilities:", input.responsibilitiesEnabled ? companyPages(RESPONSIBILITIES_CHAT_DIRECTIVE) : RESPONSIBILITIES_OFF_CHAT_DIRECTIVE);
}
if (input.conversationConfirmations?.cards.length) {
lines.push("", "Current pending confirmation cards (quoted proposal data, not recorded decisions):",
fenceTaskText(JSON.stringify(input.conversationConfirmations)),
@@ -10568,6 +10568,7 @@ export function resolveNativeCancellationStatus(input: {
export async function executePaperclipNativeSession(input: {
casesEnabled?: boolean;
responsibilitiesEnabled?: boolean;
getFreshSessionHandoff?: () => Promise<string | null>;
/** Retire a retained transport so recovery can replace provider tool declarations. */
refreshTools?: boolean;
@@ -16383,6 +16384,7 @@ export function remoteCheckpointIncompleteFailure(
export async function createRunnerdBackend(input: {
executionContext?: NativeExecutionContext;
casesEnabled?: boolean;
responsibilitiesEnabled?: boolean;
toolRefreshOnResume?: boolean;
db: Db;
providerPackAdmissionSource?: NativeProviderPackAdmissionSource;
@@ -16732,6 +16734,7 @@ async function createRunnerdBackendWithinSessionClaim(
const authority = new PaperclipRunnerToolAuthority(input.db, {
apiUrl: resolveLocalRuntimeApiUrl(),
casesEnabled: input.casesEnabled === true,
responsibilitiesEnabled: input.responsibilitiesEnabled === true,
...(nativeReview ? { nativeReview } : {}),
connectorAssignments,
assignedMcpTools,
@@ -190,6 +190,19 @@ describe("PaperclipRunnerToolAuthority", () => {
await db.delete(agents).where(eq(agents.id, claudeId));
});
it("advertises the responsibility tools only while the instance has them on", async () => {
const tools = ["list_responsibilities", "get_responsibility", "find_responsibilities_for"];
const off = new PaperclipRunnerToolAuthority(db, { companyId, agentId, issueId, runId });
expect(off.definitions().map(tool => tool.name)).not.toEqual(expect.arrayContaining([tools[0]]));
// A hidden tool called by name says the feature is off, so the agent does not report an empty list.
await expect(off.execute({ tool: "list_responsibilities", callId: randomUUID(), arguments: {} }))
.rejects.toThrow("Areas and responsibilities are turned off");
const on = new PaperclipRunnerToolAuthority(db, { companyId, agentId, issueId, runId, responsibilitiesEnabled: true });
expect(on.definitions()).toHaveLength(off.definitions().length + tools.length);
expect(on.definitions().map(tool => tool.name)).toEqual(expect.arrayContaining(tools));
});
it("advertises only real bindings and reads the bound task", async () => {
const authority = new PaperclipRunnerToolAuthority(db, {
companyId,
@@ -50,6 +50,7 @@ import { buildLowTrustSourceTrust, isLowTrustQuarantined, LOW_TRUST_QUARANTINED_
import { handoffPlanContext } from "./handoff-plan-context.js";
import { callCreateSkillTool, callUpdateSkillTool } from "../skill-tools.js";
import { callProjectTool } from "../project-tools.js";
import { callResponsibilityTool, isResponsibilityTool, RESPONSIBILITY_TOOL_NAMES, responsibilityToolsDisabledError } from "../responsibility-tools.js";
import { isConnectorTool, executeConnectorTool, type ConnectorAssignment } from "../connector-runtime.js";
import { resolveNativeRuntimeMcpSnapshot } from "./runtime-context.js";
import { connectionIntentService } from "../connection-intents.js";
@@ -159,6 +160,7 @@ const IMPLEMENTED_OPERATIONS = new Set([
"get_workspace", "list_workspaces", "select_workspace", "prepare_repository", "create_skill", "update_skill", "create_task", "reassign_task", "set_dependencies", "create_project", "list_project_repositories", "list_projects", "register_deliverable",
"list_documents", "read_document", "list_document_revisions", "write_document",
"list_agents", "get_agent", "list_approvals", "get_approval", "get_approval_context",
...RESPONSIBILITY_TOOL_NAMES,
]);
/** Closed first-party native Muse profile. No connector, generic API, credential or workspace grants. */
@@ -238,6 +240,8 @@ type Binding = {
apiToolsEnabled?: boolean;
workMode?: "standard" | "planning" | "ask" | "skill_test";
casesEnabled?: boolean;
/** Instance `enableResponsibilities`, pinned when the turn opens; the routes still enforce it. */
responsibilitiesEnabled?: boolean;
workspaceRoot?: string;
workspaceBridge?: boolean;
/** Pinned provider identity; configuration edits cannot remove API file guards. */
@@ -414,6 +418,7 @@ export class PaperclipRunnerToolAuthority {
(descriptor) =>
IMPLEMENTED_OPERATIONS.has(descriptor.operationId) &&
(!(descriptor.operationId === "handoff_case" || NATIVE_CASE_OPERATIONS.has(descriptor.operationId)) || this.binding.casesEnabled === true) &&
(!isResponsibilityTool(descriptor.operationId) || this.binding.responsibilitiesEnabled === true) &&
(!this.binding.firstPartyOnly || !EXTERNAL_WORKSPACE_OPERATIONS.has(descriptor.operationId)) &&
(runnerApiToolsEnabled(
this.binding.companyId,
@@ -957,6 +962,17 @@ export class PaperclipRunnerToolAuthority {
conversation: Boolean(context.issue.conversationAgentId),
companyPrefix: call.tool === "list_projects" ? await this.#companyPagePrefix() : null });
}
case "list_responsibilities":
case "get_responsibility":
case "find_responsibilities_for": {
// Hidden tools stay refused when called by name; the routes also re-check the live setting.
if (this.binding.responsibilitiesEnabled !== true) throw responsibilityToolsDisabledError();
const apiUrl = this.binding.apiUrl ?? process.env.PAPERCLIP_API_URL;
const token = this.#apiToken(context);
if (!apiUrl || !token) throw new Error("Responsibility tool authentication is unavailable");
return callResponsibilityTool({ name: call.tool, arguments: input, apiUrl, token,
companyId: this.binding.companyId, companyPrefix: await this.#companyPagePrefix() });
}
case "search_api": return withCompanyPagePaths(searchRunnerApi(call.arguments), await this.#companyPagePrefix());
case "hire_agent": {
return hireAgentResult(await this.#callApi(call.callId, hireAgentApiRequest(input, this.binding)), context.actor.adapterConfig?.provider);
@@ -58,6 +58,10 @@ function dedicatedTools(method: string, path: string): string[] {
if (/\/companies\/\{[^}]+\}\/agent-hires$/.test(path) && method === "POST") return ["hire_agent"];
if (/\/projects$/.test(path)) return method === "GET" ? ["list_projects"] : method === "POST" ? ["create_project"] : [];
if (/\/project-repositories$/.test(path) && method === "GET") return ["list_project_repositories"];
if (/\/companies\/\{[^}]+\}\/responsibilities$/.test(path) && method === "GET") return ["list_responsibilities"];
if (/\/companies\/\{[^}]+\}\/responsibility-areas$/.test(path) && method === "GET") return ["list_responsibilities"];
if (/\/responsibilities\/\{[^}]+\}$/.test(path) && method === "GET") return ["get_responsibility"];
if (/\/responsibility-links\/lookup$/.test(path) && method === "GET") return ["find_responsibilities_for"];
if (/\/issues\/\{[^}]+\}\/comments$/.test(path)) return method === "GET" ? ["get_task_history"] : ["report_progress"];
if (/\/issues\/\{[^}]+\}\/documents/.test(path)) return method === "DELETE" ? [] : method === "GET" ? ["list_documents", "read_document", "list_document_revisions"] : ["write_document"];
if (/\/case-handoffs$/.test(path) && method === "POST") return ["handoff_case", "create_case"];
@@ -0,0 +1,22 @@
/**
* A dedicated agent tool's own call to the Paperclip HTTP API, authenticated
* as the run, so the route's company, permission and activity rules apply to
* the tool exactly as to a direct API call. Callers parse the response.
*/
export function fetchPaperclipApi(input: {
apiUrl: string;
token: string;
method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
path: string;
body?: unknown;
headers?: Record<string, string>;
fetcher?: typeof fetch;
}): Promise<Response> {
const base = `${input.apiUrl.replace(/\/+$/, "").replace(/\/api$/, "")}/api`;
return (input.fetcher ?? fetch)(`${base}${input.path}`, {
method: input.method,
headers: { Authorization: `Bearer ${input.token}`, "Content-Type": "application/json", ...input.headers },
...(input.body !== undefined ? { body: JSON.stringify(input.body) } : {}),
signal: AbortSignal.timeout(60_000),
});
}
+5 -6
View File
@@ -2,6 +2,7 @@ import { projectDiscoverySchema, createProjectSchema, createIssueSchema, setIssu
import { z } from "zod";
import { CAPABILITY_SEMANTIC_TOOL_CATALOG } from "../vendor/paperclip-runner/index.js";
import { badRequest } from "../errors.js";
import { fetchPaperclipApi } from "./paperclip-api-loopback.js";
export const PROJECT_TOOL_NAMES = ["create_project", "list_project_repositories", "list_projects"];
export function projectToolDefinitions(workMode: string, includeTask = false) {
@@ -62,13 +63,11 @@ export async function callProjectTool(input: {
idempotencyKey: `chat-handoff:${input.issueId}:${key}`,
});
} else throw badRequest("Unknown project tool");
const response = await fetch(`${input.apiUrl.replace(/\/+$/, "").replace(/\/api$/, "")}/api${path}`, {
const response = await fetchPaperclipApi({
apiUrl: input.apiUrl, token: input.token, path,
method: input.name === "set_task_title" ? "PUT" : body ? "POST" : "GET",
headers: { Authorization: `Bearer ${input.token}`, "Content-Type": "application/json",
...(input.receiptOnly ? { "X-Paperclip-Receipt-Only": "true" } : {}),
},
...(body ? { body: JSON.stringify(body) } : {}),
signal: AbortSignal.timeout(60_000),
...(body ? { body } : {}),
...(input.receiptOnly ? { headers: { "X-Paperclip-Receipt-Only": "true" } } : {}),
});
if (input.receiptOnly && response.status === 204) return undefined;
const result = await response.json();
@@ -0,0 +1,20 @@
import { notFound } from "../errors.js";
export const RESPONSIBILITIES_DISABLED_CODE = "responsibilities_disabled";
/**
* What an agent is told while the feature is off: in the route's error, the
* tools' error and the chat prompt alike.
*/
export const RESPONSIBILITIES_OFF_GUIDANCE = "Areas and responsibilities are turned off on this instance; an instance admin turns them on "
+ "with Responsibilities in Experimental settings, and agent credentials cannot change that setting. This is not an empty list: "
+ "tell the person the feature is off instead of saying they have no responsibilities, and do not look for them through other tools.";
/**
* The denial for any area or responsibility operation while the instance has
* `enableResponsibilities` off. The code lets an agent tell "turned off" from
* "nothing there"; the status and message stay what clients already expect.
*/
export function responsibilitiesDisabledError() {
return notFound("Responsibilities are not enabled", { code: RESPONSIBILITIES_DISABLED_CODE, remediation: RESPONSIBILITIES_OFF_GUIDANCE });
}
+2 -1
View File
@@ -28,6 +28,7 @@ import {
type ResponsibilityBarConversation,
} from "@paperclipai/shared";
import { conflict, forbidden, notFound, unprocessable } from "../errors.js";
import { responsibilitiesDisabledError } from "./responsibilities-disabled.js";
import type { AuthorizationActor } from "./authorization.js";
import { instanceSettingsService } from "./instance-settings.js";
import { issueThreadInteractionService } from "./issue-thread-interactions.js";
@@ -98,7 +99,7 @@ export function responsibilityBarService(db: Db) {
async function assertEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
/** The agent a new conversation is held with: the agent that runs it, else the top of the org chart, else the oldest. */
@@ -21,6 +21,7 @@ import {
type ResponsibilityDashboardState,
} from "@paperclipai/shared";
import { conflict, forbidden, notFound, unprocessable } from "../errors.js";
import { responsibilitiesDisabledError } from "./responsibilities-disabled.js";
import type { AuthorizationActor } from "./authorization.js";
import { instanceSettingsService } from "./instance-settings.js";
import { issueThreadInteractionService } from "./issue-thread-interactions.js";
@@ -73,7 +74,7 @@ export function responsibilityDashboardService(db: Db) {
async function assertEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
/** Empty: no active responsibility and none proposed. One query. */
@@ -31,6 +31,7 @@ import {
type SetResponsibilityMetrics,
} from "@paperclipai/shared";
import { forbidden, notFound, unprocessable } from "../errors.js";
import { responsibilitiesDisabledError } from "./responsibilities-disabled.js";
import { instanceSettingsService } from "./instance-settings.js";
import { responsibilityService, type DbTransaction, type ResponsibilityReadScope } from "./responsibilities.js";
import { responsibilityAutomationService } from "./responsibility-automation.js";
@@ -116,7 +117,7 @@ export function responsibilityMetricService(db: Db) {
async function assertEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
/** The newest readings of each metric, oldest first, at most `limit` each. */
+2 -2
View File
@@ -6,7 +6,7 @@ import {
RESPONSIBILITY_RECENT_RUNS_MAX_LIMIT,
type ResponsibilityRecentRuns,
} from "@paperclipai/shared";
import { notFound } from "../errors.js";
import { responsibilitiesDisabledError } from "./responsibilities-disabled.js";
import { instanceSettingsService } from "./instance-settings.js";
import { responsibilityService, type ResponsibilityReadScope } from "./responsibilities.js";
@@ -38,7 +38,7 @@ export function responsibilityRunsService(db: Db) {
async function assertEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
return {
@@ -14,7 +14,8 @@ import {
type ResponsibilityStatusReportsOverview,
type WriteResponsibilityStatusReport,
} from "@paperclipai/shared";
import { conflict, forbidden, notFound, unprocessable } from "../errors.js";
import { conflict, forbidden, unprocessable } from "../errors.js";
import { responsibilitiesDisabledError } from "./responsibilities-disabled.js";
import type { AuthorizationActor } from "./authorization.js";
import { instanceSettingsService } from "./instance-settings.js";
import { issueService } from "./issues.js";
@@ -63,7 +64,7 @@ export function responsibilityStatusReportService(db: Db) {
async function assertEnabled() {
const experimental = await settings.getExperimental();
if (experimental.enableResponsibilities !== true) throw notFound("Responsibilities are not enabled");
if (experimental.enableResponsibilities !== true) throw responsibilitiesDisabledError();
}
async function reporterOf(row: ResponsibilityRow) {
+260
View File
@@ -0,0 +1,260 @@
import type {
Responsibility,
ResponsibilityDetail,
ResponsibilityLinkLookupEntry,
ResponsibilityOverview,
ResponsibilityOverviewArea,
ResponsibilityArea,
ResponsibilityStatusReportState,
ResponsibilityWithRollup,
} from "@paperclipai/shared";
import { z } from "zod";
import { HttpError } from "../errors.js";
import { fetchPaperclipApi } from "./paperclip-api-loopback.js";
import { RESPONSIBILITIES_DISABLED_CODE, RESPONSIBILITIES_OFF_GUIDANCE } from "./responsibilities-disabled.js";
/**
* Native agent tools for areas and responsibilities. Every call goes through
* the authenticated HTTP API with the run's agent token, so the routes'
* company, privacy and permission checks and their activity log apply
* unchanged. Results are compact projections an agent can read in one pass.
*/
export const RESPONSIBILITY_TOOL_NAMES = ["list_responsibilities", "get_responsibility", "find_responsibilities_for"] as const;
export type ResponsibilityToolName = (typeof RESPONSIBILITY_TOOL_NAMES)[number];
export function isResponsibilityTool(name: string): name is ResponsibilityToolName {
return (RESPONSIBILITY_TOOL_NAMES as readonly string[]).includes(name);
}
/** What the agent says when the instance has the feature off; also used for the prompt note. */
export const RESPONSIBILITIES_TURNED_OFF_MESSAGE = RESPONSIBILITIES_OFF_GUIDANCE;
const uuid = z.string().guid();
export const listResponsibilitiesToolInput = z.object({
ownerUserId: z.string().trim().min(1).max(200).optional(),
areaId: uuid.optional(),
includeLetGo: z.boolean().optional().default(false),
includeProposed: z.boolean().optional().default(true),
includeArchivedAreas: z.boolean().optional().default(false),
}).strict();
export const getResponsibilityToolInput = z.object({ responsibilityId: uuid }).strict();
export const findResponsibilitiesForToolInput = z.object({
kind: z.enum(["project", "task", "routine"]),
/** A UUID; for a task, an identifier such as PAP-123 also works. */
id: z.string().trim().min(1).max(200),
}).strict();
/** The tool-facing denial while the instance has the feature off. */
export function responsibilityToolsDisabledError() {
return new HttpError(404, RESPONSIBILITIES_TURNED_OFF_MESSAGE, { code: RESPONSIBILITIES_DISABLED_CODE });
}
type ApiCall = (method: "GET", path: string) => Promise<unknown>;
function apiCaller(input: { apiUrl: string; token: string }, fetcher: typeof fetch): ApiCall {
return async (method, path) => {
const response = await fetchPaperclipApi({ ...input, method, path, fetcher });
const result = await response.json().catch(() => ({}));
if (!response.ok) {
if (result?.code === RESPONSIBILITIES_DISABLED_CODE) {
throw responsibilityToolsDisabledError();
}
throw new HttpError(response.status, typeof result?.error === "string" ? result.error : `Responsibility tool failed (${response.status})`,
typeof result?.code === "string" ? { code: result.code } : undefined);
}
return result;
};
}
function bar(row: Responsibility) {
if (!row.metricName) return null;
return {
kind: row.metricKind,
name: row.metricName,
unit: row.metricUnit,
target: row.metricTarget,
low: row.metricLow,
high: row.metricHigh,
direction: row.metricDirection,
current: row.metricCurrent,
updatedAt: row.metricUpdatedAt,
};
}
function pageHref(prefix: string | null | undefined, path: string) {
return prefix ? `/${encodeURIComponent(prefix)}${path}` : null;
}
function summary(row: ResponsibilityWithRollup, prefix: string | null | undefined) {
return {
id: row.id,
title: row.title,
status: row.status,
areaId: row.areaId,
standard: row.standard,
bar: bar(row),
health: row.rollup.health,
healthOverridden: row.rollup.healthOverridden,
healthNote: row.healthNote,
statusSentence: row.rollup.statusSentence,
runByAgentId: row.runByAgentId,
counts: {
projects: row.rollup.projects,
routines: row.rollup.routines,
openTasks: row.rollup.openTasks,
blockedTasks: row.rollup.blockedTasks,
doneTasks: row.rollup.doneTasks,
},
...(row.status === "proposed" ? { evidence: row.evidence, proposedByAgentId: row.proposedByAgentId } : {}),
href: pageHref(prefix, `/responsibilities/${encodeURIComponent(row.id)}`),
};
}
type AreaEntry = Pick<ResponsibilityArea, "id" | "title" | "description" | "status">;
async function listResponsibilities(call: ApiCall, companyId: string, args: unknown, prefix: string | null | undefined) {
const input = listResponsibilitiesToolInput.parse(args);
const query = new URLSearchParams({ includeLetGo: String(input.includeLetGo) });
if (input.ownerUserId) query.set("ownerUserId", input.ownerUserId);
const company = encodeURIComponent(companyId);
const [overview, archivedAreas] = await Promise.all([
call("GET", `/companies/${company}/responsibilities?${query}`) as Promise<ResponsibilityOverview>,
input.includeArchivedAreas
? call("GET", `/companies/${company}/responsibility-areas?includeArchived=true`) as Promise<ResponsibilityArea[]>
: Promise.resolve([] as ResponsibilityArea[]),
]);
const rows = [...overview.responsibilities, ...(input.includeProposed ? overview.proposed : [])];
const areas = new Map<string, AreaEntry>();
for (const area of [...overview.areas, ...archivedAreas] as Array<ResponsibilityOverviewArea | ResponsibilityArea>) {
// Archived areas only on request; responsibilities in one then list under withoutArea.
if (area.status === "archived" && !input.includeArchivedAreas) continue;
if (!areas.has(area.id)) areas.set(area.id, { id: area.id, title: area.title, description: area.description, status: area.status });
}
const inArea = (areaId: string | null) => rows.filter((row) => row.areaId === areaId).map((row) => summary(row, prefix));
const areaList = [...areas.values()]
.filter((area) => !input.areaId || area.id === input.areaId)
.map((area) => ({ ...area, responsibilities: inArea(area.id) }));
const loose = overview.loose;
const scoped = input.areaId ? rows.filter((row) => row.areaId === input.areaId) : rows;
const count = (status: string) => scoped.filter((row) => row.status === status).length;
const activeByHealth = { behind: 0, at_risk: 0, on_track: 0, not_measured: 0 };
for (const row of scoped) if (row.status === "active") activeByHealth[row.rollup.health] += 1;
return {
ownerUserId: overview.ownerUserId,
areas: areaList,
...(input.areaId ? {} : { withoutArea: rows.filter((row) => !row.areaId || !areas.has(row.areaId)).map((row) => summary(row, prefix)) }),
// With areaId, totals count only that area; the person's task and project totals and the company's uncovered work are left out.
totals: input.areaId
? { scope: "area", active: count("active"), proposed: count("proposed"), letGo: count("let_go"), activeByHealth }
: {
scope: "person",
active: count("active"),
proposed: count("proposed"),
letGo: count("let_go"),
activeByHealth,
openTasks: overview.totals.openTasks,
blockedTasks: overview.totals.blockedTasks,
projects: overview.totals.projects,
lateProjects: overview.totals.lateProjects,
},
...(input.areaId ? {} : {
uncoveredWork: {
note: "Company work filed under no proposed or active responsibility of anyone, directly or through its project. Counts are complete; lists are capped.",
routineCount: loose.routineCount,
projectCount: loose.projectCount,
openTaskCount: loose.openTaskCount,
routines: loose.routines.map((routine) => ({ id: routine.id, title: routine.title, status: routine.status, assigneeAgentId: routine.assigneeAgentId, projectId: routine.projectId })),
projects: loose.projects.map((project) => ({ id: project.id, name: project.name, status: project.status, targetDate: project.targetDate, leadAgentId: project.leadAgentId })),
tasks: loose.tasks.map((task) => ({ id: task.id, identifier: task.identifier, title: task.title, status: task.status, assigneeAgentId: task.assigneeAgentId, assigneeUserId: task.assigneeUserId, projectId: task.projectId })),
},
}),
...(overview.responsibilities.length + overview.proposed.length === 0 ? {
guidance: "This person has no responsibilities yet. Ask what they are responsible for before proposing any; do not invent them.",
} : rows.length === 0 ? {
guidance: `This person has ${overview.proposed.length} proposed responsibilities, hidden by includeProposed: false. Read them before proposing more.`,
} : {}),
};
}
async function getResponsibility(call: ApiCall, args: unknown, prefix: string | null | undefined) {
const { responsibilityId } = getResponsibilityToolInput.parse(args);
const id = encodeURIComponent(responsibilityId);
const [detail, report] = await Promise.all([
call("GET", `/responsibilities/${id}`) as Promise<ResponsibilityDetail>,
// The report is supporting context: the detail alone still answers the call.
(call("GET", `/responsibilities/${id}/status-report`) as Promise<ResponsibilityStatusReportState>).catch(() => null),
]);
return {
...summary(detail, prefix),
ownerUserId: detail.ownerUserId,
description: detail.description,
evidence: detail.evidence,
area: detail.area,
workSummary: detail.rollup.workSummary.map((signal) => signal.text),
nextDueAt: detail.rollup.nextDueAt,
projects: detail.projects.map((project) => ({
linkId: project.linkId, id: project.id, name: project.name, status: project.status,
targetDate: project.targetDate, leadAgentId: project.leadAgentId, progress: project.progress,
})),
tasks: detail.tasks.map((task) => ({
linkId: task.linkId, membership: task.membership, id: task.id, identifier: task.identifier, title: task.title,
status: task.status, assigneeAgentId: task.assigneeAgentId, assigneeUserId: task.assigneeUserId, projectId: task.projectId,
})),
tasksTruncated: detail.tasksTruncated,
routines: detail.routines.map((routine) => ({
linkId: routine.linkId, membership: routine.membership, id: routine.id, title: routine.title, status: routine.status,
assigneeAgentId: routine.assigneeAgentId, projectId: routine.projectId, lastRun: routine.lastRun,
})),
skills: detail.skills.map((skill) => ({ id: skill.id, key: skill.key, name: skill.name, agentIds: skill.agentIds })),
artifactsTotal: detail.artifactsTotal,
statusReport: report ? { current: report.current, reporterAgentId: report.reporterAgentId, updateRequested: report.updateRequested } : null,
membershipNote: "membership direct means the item is filed under it (linkId set); project means it is under it through a filed project.",
};
}
async function findResponsibilitiesFor(call: ApiCall, companyId: string, args: unknown, prefix: string | null | undefined) {
const input = findResponsibilitiesForToolInput.parse(args);
let id = input.id;
let identifier: string | null = null;
if (input.kind === "task") {
// The issue route accepts an identifier and applies the same read rules.
const issue = await call("GET", `/issues/${encodeURIComponent(input.id)}`) as { id: string; identifier: string | null };
id = issue.id;
identifier = issue.identifier;
} else if (!uuid.safeParse(id).success) {
throw new HttpError(422, `A ${input.kind} id must be a UUID`);
}
const param = input.kind === "task" ? "issueId" : `${input.kind}Id`;
const result = await call("GET", `/companies/${encodeURIComponent(companyId)}/responsibility-links/lookup?${new URLSearchParams({ [param]: id })}`) as {
responsibilities: ResponsibilityLinkLookupEntry[];
};
return {
item: { kind: input.kind, id, ...(identifier ? { identifier } : {}) },
responsibilities: result.responsibilities.map((entry) => ({
...entry,
href: pageHref(prefix, `/responsibilities/${encodeURIComponent(entry.id)}`),
})),
...(result.responsibilities.length === 0 ? { note: "Filed under no proposed or active responsibility." } : {}),
};
}
/** All transports use the normal authenticated API, including its validation and audit path. */
export async function callResponsibilityTool(input: {
name: ResponsibilityToolName;
arguments: Record<string, unknown>;
apiUrl: string;
token: string;
companyId: string;
/** The company's issue prefix; results then carry page hrefs. */
companyPrefix?: string | null;
}, fetcher: typeof fetch = fetch) {
const call = apiCaller(input, fetcher);
switch (input.name) {
case "list_responsibilities": return listResponsibilities(call, input.companyId, input.arguments, input.companyPrefix);
case "get_responsibility": return getResponsibility(call, input.arguments, input.companyPrefix);
case "find_responsibilities_for": return findResponsibilitiesFor(call, input.companyId, input.arguments, input.companyPrefix);
}
}
+10
View File
@@ -272,6 +272,16 @@ Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
- **`message`** is one plain sentence in your own voice. Say "task" and "routine"; never "issue", cron, trigger or other internals.
- The person sees a card with your offer and can accept or decline. Accepting creates the routine with you as its agent, in the task's project and under the task's responsibilities. You are not woken by their answer, so do not wait for it or mention the offer in other comments.
### Areas and responsibilities
A person's responsibilities are saved Paperclip records (experimental): each has an owner, an optional area, a bar (how success is measured) and the projects, tasks and routines filed under it. When a person talks about what they are responsible for, or asks you to map, sort or check work against their responsibilities, read them before asking:
- `list_responsibilities`: the person's areas, each with its responsibilities (status, bar, health, the agent that runs it, and counts), plus **uncovered work**: company routines, projects and open tasks filed under no responsibility. It defaults to the person your run works for; pass `ownerUserId` only for someone else.
- `get_responsibility`: one responsibility in full, with link IDs for items filed directly, the skills of the agents doing its work and its latest status report.
- `find_responsibilities_for`: where a project, task (ID or identifier such as `PAP-12`) or routine is filed.
Ask the person what they are responsible for only when the list is empty, and never invent responsibilities. A "turned off" error (code `responsibilities_disabled`) means the feature is off on this instance: say so instead of reporting that they have none. See "Areas and responsibilities" in `references/api-reference.md` for the routes behind these tools.
### Propose a bar in a bar conversation
A bar conversation is a task a person opens from one of their responsibilities to agree how its success is measured. When you are assigned one, its prompt carries a **Bar conversation** block with the responsibility's facts, the bar templates (`volume`, `percentage`, `yes_no`, `range`) and the exact call, `POST /api/issues/{issueId}/bar-proposals`. Follow that block: open with what you understand, ask at most three short questions, then propose. You choose the template. You never apply a bar yourself; the person accepts your proposal with one tap, or says it is not right and the conversation continues.
@@ -1499,6 +1499,17 @@ POST /api/issues/{issueId}/routine-suggestions
{ "title": "Weekly competitor pricing summary", "instructions": "Check the pricing pages of Acme, Globex and Initech and summarize what changed since the last summary.", "cadence": { "frequency": "weekly", "dayOfWeek": "monday", "time": "09:00" }, "message": "Want me to put this summary together every Monday morning?" }
```
### Areas and responsibilities
A person's responsibilities are saved records, each optionally filed under an area (experimental, `enableResponsibilities`). Prefer the dedicated tools `list_responsibilities`, `get_responsibility` and `find_responsibilities_for`; these are the routes behind them. While the feature is off every route returns `404` with code `responsibilities_disabled`: report that the feature is off, not that the person has none.
| Method | Path | Description |
| ------ | ---- | ----------- |
| GET | `/api/companies/:companyId/responsibilities` | One person's areas, responsibilities (with health and counts), proposals, totals and the company's work filed under no responsibility (`loose`). `ownerUserId` defaults to the person your run works for; `includeLetGo=true` adds let-go ones |
| GET | `/api/companies/:companyId/responsibility-areas` | The company's areas; `includeArchived=true` adds archived ones |
| GET | `/api/responsibilities/:responsibilityId` | One responsibility with its projects, tasks and routines (`linkId` set when filed directly) and the skills of the agents doing its work |
| GET | `/api/companies/:companyId/responsibility-links/lookup` | The responsibilities one item is under; send exactly one of `issueId`, `projectId` or `routineId` |
### Responsibility bars
A bar conversation is a task a person opens from a responsibility to agree how its success is measured (experimental). Its prompt carries a **Bar conversation** block with the responsibility's facts, the templates and these calls. Only the person can apply a bar, by accepting your proposal.
@@ -524,7 +524,7 @@
"packages/shared/src/validators/project.ts": "6ea168f5faf3161e6004ea47274f60634c77b219",
"packages/shared/src/validators/provider-trace.ts": "b38b6200a2e51513f5dca0f8b008f2fe68175e82",
"packages/shared/src/validators/resource-memberships.ts": "b124ac8a8f24b4dbb03ae82bcc87541f6b4ecdfd",
"packages/shared/src/validators/responsibility.ts": "4cb056a0d4da3622ba7ddc50fbcd9673e7de35fc",
"packages/shared/src/validators/responsibility.ts": "d686fd060615dbfea6097b0771084e172fc81cae",
"packages/shared/src/validators/routine.test.ts": "1501907ade577c1ab4c4b3098397e5d080446878",
"packages/shared/src/validators/routine.ts": "95f04abf9cbafad8ad121ece7642b8cba1a6eb36",
"packages/shared/src/validators/runtime-exposure.test.ts": "31175388dbab9f3d5dba920cd711ea6e0e6c6ece",