Skip to content

Commit fb8dfaa

Browse files
fix: align public design docs with private locked versions, fix subagent subject_key pattern
1 parent 1738ae0 commit fb8dfaa

3 files changed

Lines changed: 28 additions & 15 deletions

File tree

‎docs/adapter-designs/DESIGN-01.md‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ means no observed violation. It does not mean no violation occurred.
350350
| Surface | Value | Notes |
351351
|---|---|---|
352352
| contextInjectionSurface | `rules_file` + `agents_md` | .cursor/rules/*.mdc + AGENTS.md |
353-
| eventSurface | `hook_rich` | 18 hook events including subagentStart/Stop |
353+
| eventSurface | `hook_rich` | ~21 hook events including subagentStart/Stop; includes Tab hooks and workspaceOpen |
354354
| controlSurface | `tool_level` | failClosed: true blocks on hook failure |
355355
| approvalSurface | `pre_tool` + `pre_session` | AWF intake gate + per-tool via hooks |
356356
| artifactSurface | `git_diff` + `pr_url` + `test_results` + `handoff_note` | Cloud agent REST API artifacts |
@@ -361,15 +361,21 @@ means no observed violation. It does not mean no violation occurred.
361361
| sandboxSurface | `sandbox_mode` + `worktree` | --sandbox + --worktree flags |
362362
| trustSubjectType | `agent` | .cursor/agents/ definitions |
363363
| enforcementDepth | `tool_level` | Event-rich, comparable to Claude Code |
364-
| currentEvidenceStrength | E1 | Artifact level until hooks wired to AWF |
365-
| targetEvidenceStrength | E3 | Local hooks / E2 cloud agents (SSE) |
364+
| currentEvidenceStrength | per-mode (see below) | Mode A local: E1 until hooks wired. Mode B cloud: E1 before adapter / E2 after Gate 2 SSE verification. Mode C self-hosted: E1. Mode D human: E1. |
365+
| targetEvidenceStrength | per-mode (see below) | Mode A local: E3 (conditions in DESIGN-06 §8). Mode B cloud: E2 hard ceiling. Mode C self-hosted: E3 pending worker hook test. Mode D human: E3-observed not E3-enforced. |
366366
| requiresRuntimeHookInstall | true | AWF hooks deployed to .cursor/hooks.json |
367-
| supportsFailClosed | true | failClosed: true blocks on hook failure |
367+
| supportsFailClosed | true — requires failClosed: true per blocking hook entry. Default is fail-open. E3 claims require Cursor build >= 2026-05-14 patched release. | See DESIGN-06 §8 |
368368

369369
**Notes:**
370370
- Cloud agent outbound webhooks: "coming soon." Use SSE stream as substitute.
371371
- Cursor is classified event-rich/controlled. Closer to Claude Code than Codex.
372372

373+
**Known gaps:**
374+
- Fail-closed requires explicit per-hook opt-in; default is fail-open.
375+
- E3 claims require Cursor build >= 2026-05-14 patch.
376+
- SDK has no canUseTool-equivalent; hooks are the only synchronous enforcement path.
377+
- Enterprise audit log is admin-action only, not a tool-call audit surface.
378+
373379
---
374380

375381
### Devin

‎docs/adapter-designs/DESIGN-02.md‎

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ OpenClaw (sub-agents via ACP)
7979

8080
**subject_key pattern:**
8181
```
82-
{runtime}::subagent::{parent_agent_id}::{task_class}::{session_id}
82+
{runtime}::subagent::{parent_agent_id}::{task_class}::{workspace}::{repo}::{session_id}
8383
```
8484

8585
**Examples:**
@@ -148,7 +148,7 @@ No internal agent decomposition is visible to AWF.
148148

149149
**subject_key pattern:**
150150
```
151-
{runtime}::session::{workspace}::{task_type}::{playbook_or_config}
151+
{runtime}::session::{workspace}::{repo}::{task_type}::{playbook_or_config}
152152
```
153153

154154
**Examples:**
@@ -215,7 +215,7 @@ not an autonomous agent's behavior.
215215

216216
**subject_key pattern:**
217217
```
218-
{runtime}::human::{human_actor_id}::{workspace}::{task_type}
218+
{runtime}::human::{human_actor_id}::{workspace}::{repo}::{task_type}
219219
```
220220

221221
**Examples:**
@@ -348,11 +348,11 @@ the same subject_key.
348348
| Trust type | Stable components | Unstable (exclude) |
349349
|---|---|---|
350350
| agent | runtime, "agent", agent_name, workspace | session_id, run_id |
351-
| subagent | runtime, "subagent", parent_agent_id, task_class, session_id | run_id |
352-
| role_profile | runtime, role, workspace, task_type, risk_lane, sandbox_mode, skill_set | session_id |
353-
| session | runtime, "session", workspace, task_type, playbook | session_id, run_id |
351+
| subagent | runtime, "subagent", parent_agent_id, task_class, workspace, repo, session_id | run_id |
352+
| role_profile | runtime, role, workspace, repo, task_type, risk_lane, sandbox_mode, skill_set | session_id |
353+
| session | runtime, "session", workspace, repo, task_type, playbook | session_id, run_id |
354354
| graph_node | "langgraph", graph_id, node_name, workspace | invocation_id |
355-
| human_runtime | runtime, "human", human_actor_id, workspace, task_type | session_id |
355+
| human_runtime | runtime, "human", human_actor_id, workspace, repo, task_type | session_id |
356356
| task | runtime, "task", workspace, task_class, work_item_id | run_id |
357357

358358
---
@@ -409,7 +409,7 @@ confidence in a STANDARD tier (not enough sessions to be certain).
409409
An agent-srv with HIGH trust on Claude Code starts PROVISIONAL on Codex.
410410

411411
2. **Trust subjects are runtime-scoped.**
412-
`claude_code::agent::agent-srv::ruvoni` and `codex::worker::ruvoni::backend::medium-risk::workspace-write`
412+
`claude_code::agent::agent-srv::ruvoni::family-trip-ai` and `codex::worker::ruvoni::family-trip-ai::backend::medium-risk::workspace-write::backend-skill`
413413
are different trust subjects even if they represent the same "backend agent concept."
414414

415415
3. **Workspace isolation is enforced.**
@@ -433,6 +433,11 @@ confidence in a STANDARD tier (not enough sessions to be certain).
433433
trust subject was created. It covers agent instruction files, role TOML configs,
434434
Devin playbook content and skill_set composition.
435435

436+
config_hash covers agent/role/playbook definition, allowed tools, skill set,
437+
sandbox mode, and governance-relevant runtime config. Changing allowed tools
438+
or sandbox mode resets the confidence band even if the prompt definition is
439+
unchanged.
440+
436441
**When config_hash changes:**
437442
- The trust_subject_id remains the same (history is preserved)
438443
- confidence_band resets to LOW unless the change is verified cosmetic
@@ -449,8 +454,10 @@ Devin playbook content and skill_set composition.
449454

450455
## Open Questions
451456

452-
1. Should subagent trust_subject_id accumulate across sessions for named subagents in Claude Code?
453-
Currently specified as session-scoped. Needs decision.
457+
1. OQ-1 RESOLVED: Subagent trust remains session-scoped by default. If a runtime exposes
458+
persistent named subagents with stable definitions and reliable lifecycle events, AWF may
459+
promote them to agent trust subjects in a future adapter version. Until then, subagents are
460+
contributing subjects only, not long-lived primary trust subjects.
454461
2. For Codex role_profile subjects, if the .codex/agents/*.toml file is modified mid-sprint,
455462
should config_hash check fire before or after session start?
456463
3. LangGraph: should graph_node trust_subject_id be per-graph version or per-graph-name?

‎schemas/v1/trust-subject.schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"type": "string",
5050
"pattern": "^[a-z0-9_-]+(::[a-z0-9_-]+)+$",
5151
"maxLength": 200,
52-
"description": "Stable, deterministic identity string for this subject. Same runtime + same config MUST produce the same subject_key. Construction rules: (1) all lowercase; (2) components separated by '::'; (3) no spaces — use hyphens within a component; (4) include only components stable across sessions for this subject_type; (5) maximum 200 characters. Patterns by subject_type — agent: {runtime}::agent::{agent_name}::{workspace}::{repo}; subagent: {runtime}::subagent::{parent_agent_id}::{task_class}::{session_id}; role_profile: codex::{role}::{workspace}::{repo}::{task_type}::{risk_lane}::{sandbox_mode}::{skill_set}; session: {runtime}::session::{workspace}::{task_type}::{playbook_or_config}; graph_node: langgraph::{graph_id}::{node_name}::{workspace}; human_runtime: {runtime}::human::{human_actor_id}::{workspace}::{task_type}; task: {runtime}::task::{workspace}::{task_class}::{work_item_id}. Unique per (workspace_id, runtime_provider, subject_key)."
52+
"description": "Stable, deterministic identity string for this subject. Same runtime + same config MUST produce the same subject_key. Construction rules: (1) all lowercase; (2) components separated by '::'; (3) no spaces — use hyphens within a component; (4) include only components stable across sessions for this subject_type; (5) maximum 200 characters. Patterns by subject_type — agent: {runtime}::agent::{agent_name}::{workspace}::{repo}; subagent: {runtime}::subagent::{parent_agent_id}::{task_class}::{workspace}::{repo}::{session_id}; role_profile: codex::{role}::{workspace}::{repo}::{task_type}::{risk_lane}::{sandbox_mode}::{skill_set}; session: {runtime}::session::{workspace}::{task_type}::{playbook_or_config}; graph_node: langgraph::{graph_id}::{node_name}::{workspace}; human_runtime: {runtime}::human::{human_actor_id}::{workspace}::{task_type}; task: {runtime}::task::{workspace}::{task_class}::{work_item_id}. Unique per (workspace_id, runtime_provider, subject_key)."
5353
},
5454
"workspace_id": {
5555
"type": "string",

0 commit comments

Comments
 (0)