Skip to content

Commit 1d989bd

Browse files
authored
[codex] governed action integration dx refresh (#25)
* feat(examples): hosted replay for claude-code capture (post-cloud) Adds an optional HostedDelivery mode to the capture harness (default stays fully isolated) and a post-cloud script mirroring the governance POC's env contract, so a dev/demo tenant gains realistic agent-session and code-change evidence through the real hook binary and hosted ingest. * governed action integration dx refresh * fix(ci): refresh root bun lockfile * chore(release): prepare 0.4.0 packages
1 parent 149ee4f commit 1d989bd

91 files changed

Lines changed: 2241 additions & 354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/veritio-implement-feature/SKILL.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,17 @@ Use this when working in the Veritio repository on actionable implementation tas
1515
4. Keep `spec/` as the language-neutral source of truth.
1616
5. Keep TypeScript, Python, and Go SDKs semantically aligned.
1717
6. Keep adapters thin and injected.
18-
7. Run the strongest feasible check, usually `bun run verify`.
18+
7. For server-side entity mutations, prefer the governed-action helper
19+
(`createGovernedActionDraft` / `create_governed_action_draft` /
20+
`CreateGovernedActionDraft`) over hand-wiring change/activity IDs,
21+
changed paths, and idempotency hashes.
22+
8. Run the strongest feasible check, usually `bun run verify`.
1923

2024
## Guardrails
2125

2226
- No legal-compliance guarantees in product copy.
2327
- No raw secrets or unnecessary personal data in event metadata.
2428
- No framework-specific fields in the core event protocol.
2529
- No hosted-provider requirement for OSS SDK usage.
30+
- Record governed actions at the host application's server mutation boundary,
31+
not in browser form state or framework adapters.

.agents/skills/veritio-protocol-change/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@ Protocol work must preserve cross-language clarity.
1111
## Checklist
1212

1313
1. Start at `spec/event.schema.json` or the relevant spec file.
14-
2. Update TypeScript, Python, and Go SDKs together when the core event contract changes.
14+
2. Update TypeScript, Python, and Go SDKs together when the core event contract
15+
or governed-action draft behavior changes.
1516
3. Add equivalent tests in each affected SDK.
16-
4. Update docs that show event examples.
17+
4. Update docs that show event, governed-action, or integration examples.
1718
5. Run `bun run verify`.
1819

1920
## Guardrails

.agents/skills/veritio-protocol-review/SKILL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ Use this for reviews or changes involving:
1212
- `sdks/python/**`
1313
- `sdks/go/**`
1414
- event metadata, redaction, hashing, or retention semantics
15+
- governed-action draft helpers, changed paths, idempotency hashes, or
16+
revision evidence
1517

1618
## Review Focus
1719

1820
- SDK field names match the JSON schema.
1921
- Redaction behavior is deterministic.
2022
- Hash-chain inputs are explicit and tested.
2123
- TypeScript, Python, and Go stay aligned.
24+
- Governed action helpers derive the same IDs, changed paths, idempotency hash,
25+
and outbox shape across languages.
2226
- Examples avoid raw emails, secrets, tokens, and credentials unless demonstrating redaction.
2327

2428
## Verification

.agents/skills/veritio-review-diff/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Use this before handoff on non-trivial diffs.
1313
1. Inspect `git diff --stat`, `git diff`, and `git diff --cached`.
1414
2. Route checks:
1515
- `spec/**` or SDK event types: protocol compatibility.
16-
- `sdks/**`: SDK parity.
17-
- `adapters/**` or `server/**`: adapter/server boundary.
16+
- `sdks/**`: SDK parity, including governed-action helper parity.
17+
- `adapters/**` or `server/**`: adapter/server boundary; governed CRUD
18+
belongs in host mutation code, not adapters.
1819
- docs/product copy: compliance claim safety.
1920
3. Lead with findings ordered by severity and include file/line evidence.
2021
4. If clean, say so and list remaining test gaps.

.claude/agents/adapter-boundary-reviewer.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@ You review changes under:
1717

1818
1. Adapters translate framework context into Veritio events; they do not redefine protocol semantics.
1919
2. Adapters receive configured recorders/clients from host apps.
20-
3. Server-only credentials do not enter browser code or examples.
21-
4. Hosted-provider code remains optional.
22-
5. Peer dependencies are optional unless a package cannot function without them.
23-
6. Examples are honest about placeholder versus working behavior.
20+
3. Governed CRUD actions call the SDK governed-action helper from host
21+
server-side mutation code, not from browser UI state or adapter internals.
22+
4. Server-only credentials do not enter browser code or examples.
23+
5. Hosted-provider code remains optional.
24+
6. Peer dependencies are optional unless a package cannot function without them.
25+
7. Examples are honest about placeholder versus working behavior.
2426

2527
If clean: `OK - adapter/server boundaries intact.`

.claude/agents/privacy-redaction-reviewer.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,13 @@ You enforce Veritio's privacy/security boundary.
1313

1414
1. No raw secrets, passwords, API keys, bearer tokens, authorization headers, database URLs, or connector credentials are recorded.
1515
2. Metadata redaction is deterministic and tested.
16-
3. Examples prefer stable IDs over emails or display names.
17-
4. Product copy says Veritio supports compliance evidence; it does not guarantee legal compliance.
18-
5. Browser/client packages do not receive server credentials.
19-
6. DSAR, consent, and retention docs do not overclaim legal completeness.
16+
3. Governed-action drafts do not leak raw idempotency keys, keyed-digest
17+
secrets, raw emails, or omitted governed fields in events, edges, revision
18+
evidence, or outbox entries.
19+
4. Examples prefer stable IDs over emails or display names.
20+
5. Product copy says Veritio supports compliance evidence; it does not guarantee legal compliance.
21+
6. Browser/client packages do not receive server credentials.
22+
7. DSAR, consent, and retention docs do not overclaim legal completeness.
2023

2124
## Output
2225

.claude/agents/protocol-compat-reviewer.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,18 @@ Inspect changed files from:
1919
- `sdks/typescript/src/**`
2020
- `sdks/python/src/**`
2121
- `sdks/go/**`
22-
- docs that describe event shape or hashing
22+
- docs that describe event shape, hashing, or governed-action draft behavior
2323

2424
## Checks
2525

2626
1. Field names in SDKs match `spec/event.schema.json`.
2727
2. TypeScript, Python, and Go use equivalent meanings for actor, action, target, scope, metadata, previous hash, and event hash.
2828
3. Canonical JSON remains deterministic.
2929
4. Hash input changes are explicit in docs and tests.
30-
5. Required fields are not weakened without a documented migration plan.
30+
5. Governed-action helpers preserve the cross-language fixture for derived IDs,
31+
changed paths, idempotency hash, event actions, edge relations, and outbox
32+
shape without adding framework-owned protocol semantics.
33+
6. Required fields are not weakened without a documented migration plan.
3134

3235
## Output
3336

.claude/agents/sdk-parity-reviewer.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ You review SDK parity across:
2020
3. Redaction rules match across languages.
2121
4. Date/time normalization is consistent enough for cross-language evidence.
2222
5. Optional fields are omitted consistently.
23-
6. Any intentional language-specific behavior is documented.
23+
6. Governed-action helpers derive the same change/activity IDs,
24+
tenant-scoped idempotency hash, changed paths, revision evidence, event
25+
actions, edge relations, and outbox shape.
26+
7. Any intentional language-specific behavior is documented.
2427

2528
## Useful Commands
2629

.claude/claude-security-guidance.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ Redaction must run before persistence/transport and must be provable.
5353
boundary entry modules in `server/`/`cli/` may read env).
5454
- SDK core stays framework-agnostic. Flag React/Vue/Svelte or server-framework imports in
5555
`sdks/**`.
56+
- Governed-action helpers must keep raw idempotency keys at the capture
57+
boundary and emit only the tenant-scoped idempotency hash. Flag any
58+
`outboxEntry`, event metadata, edge metadata, or revision evidence that leaks
59+
raw idempotency keys or keyed-digest secrets.
5660

5761
## 5. Storage & adapter boundaries
5862

@@ -62,6 +66,10 @@ Redaction must run before persistence/transport and must be provable.
6266
- Adapters are translators, not protocol owners. They receive configured recorders/clients
6367
from the host app. Flag adapters that re-implement hashing, canonical JSON, or redaction
6468
instead of calling an SDK.
69+
- Governed create/update/delete evidence must be recorded from the host
70+
application's server-side mutation boundary with the SDK governed-action
71+
helper. Flag browser form state or framework adapters that compute changed
72+
paths, idempotency hashes, revision IDs, or storage writes themselves.
6573
- Hosted-provider code must remain optional and must not block self-hosted OSS usage.
6674

6775
## 6. Compliance-claim safety

.claude/rules/02-sdk-parity.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
languages, pinned by `spec/conformance` fixtures
1313
- `security.risk` assertion builders, with `hashAssertionRecord` parity with
1414
`hashAuditRecord`
15+
- governed-action draft helpers: `createGovernedActionDraft`,
16+
`create_governed_action_draft`, and `CreateGovernedActionDraft` must derive
17+
the same change/activity IDs, tenant-scoped idempotency hash, changed paths,
18+
revision evidence, event actions, edge relations, and outbox shape, pinned
19+
by `spec/conformance/governed-action-draft.json`
1520
- If a feature lands in one SDK only, document it as experimental or add parity tasks before handoff.
1621
- Prefer standard libraries in core SDKs.
1722
- Do not read environment variables in SDK core.

0 commit comments

Comments
 (0)