Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/context-engine/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: context-engine
description: Acquire fresh authorized maintainer context from ContextEngine for questions about this repository, its design decisions, implementation history, and private working corpus. Use when answering would benefit from the maintainer's real notes or repository corpus rather than only the checked-out files.
description: Acquire fresh authorized maintainer context from ContextEngine for questions about this repository, its design decisions, implementation history, and private working corpus. Use when answering would benefit from the maintainer's real notes or repository corpus rather than only the checked-out files. Not for reusing an earlier Package, bypassing a refusal, or replacing checked-out repository authority.
---

# Acquire ContextEngine context
Expand Down
4 changes: 2 additions & 2 deletions DESIGN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
version: alpha
version: "1.0.0"
name: ContextEngine Evidence Console
description: A flight-recorder evidence docket: exact, quiet, and built for inspection.
description: Define the exact, quiet flight-recorder visual language for the Evidence Console. Use when creating or reviewing its user-facing interface and components. Not for backend architecture, security authority, or non-UI documentation.
colors:
background: "oklch(0.985 0.004 225)"
foreground: "oklch(0.205 0.012 225)"
Expand Down
4 changes: 3 additions & 1 deletion docs/decisions/0002-bot-gateway-outside-engine.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.2.1"
description: >
Record the decision that IM bot answering lives in a separate trusted Bot
application containing the BotDelivery Module, not inside the engine and not
as another transport.
as another transport. Use when deciding where BotDelivery or an IM transport
belongs. Not for adding generation, planning, or channel effects to the
engine.
---

# 0002. BotDelivery lives outside the engine
Expand Down
4 changes: 3 additions & 1 deletion docs/decisions/0003-group-chat-intersection-authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.2.0"
description: >
Record the group-chat authorization semantics for IM bots: public replies are
authorized against the asker's scope intersected with all group members' scopes.
Use when designing or reviewing any bot reply path or audience decision.
Use when designing or reviewing any bot reply path or audience decision. Not
for asker-private replies or authorization computed from caller-supplied
group facts.
---

# 0003. Group-chat replies use asker ∩ all-members intersection
Expand Down
3 changes: 2 additions & 1 deletion docs/decisions/0004-wecom-only-weak-acl-degradation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description: >
Record that the WeChat connector targets WeCom (企业微信) only, personal WeChat is
out of scope, and the weak-ACL-source degradation semantics become a first-class
standard. Use when scoping any messaging-source connector or a source without
native ACLs.
native ACLs. Not for treating a failed stronger ACL check as Weak evidence or
supporting personal WeChat.
---

# 0004. WeCom only; weak-ACL degradation is a first-class standard
Expand Down
2 changes: 2 additions & 0 deletions docs/decisions/0005-python-stack.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: >
Record the language/stack decision: Python 3.13 + FastAPI/Pydantic +
SQLAlchemy/Alembic + PostgreSQL 17 + pgvector, with evidence-based revisit
triggers. Use when questioning the stack choice or proposing a replacement.
Not for changing one dependency without revisiting the accepted stack
boundary.
---

# 0005. Python 3.13 stack; revisit on falsifiable stack risk
Expand Down
2 changes: 2 additions & 0 deletions docs/decisions/0006-engine-delivers-context-not-answers.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ description: >
Record the engine boundary: the only online deliverable is the ContextPackage;
generation, planning, and write tools live in upper Agent Runtime applications.
Use when tempted to add answer generation or action execution to the engine.
Not for BotDelivery generation or ActionPlane effects that consume a Package
outside the engine.
---

# 0006. The engine delivers context, not answers
Expand Down
1 change: 1 addition & 0 deletions docs/decisions/0007-postgres-as-authorization-truth.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ description: >
Record that PostgreSQL 17 is the non-pluggable authorization truth store:
composite FKs to Organization, FORCE RLS, non-owner runtime role, fail closed
on missing tenant context. Use when reviewing schema, storage, or cache design.
Not for making index or cache filters authorization authorities.
---

# 0007. PostgreSQL is the authorization truth store
Expand Down
3 changes: 2 additions & 1 deletion docs/decisions/0008-modular-monolith-plus-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ description: >
Record the process topology: a modular-monolith engine API plus an independent
worker, and one justified Bot delivery application process from M2; no
premature engine microservice split. Use when proposing service extraction or
new processes.
new processes. Not for adding a process boundary without measured isolation or
performance evidence.
---

# 0008. Modular monolith + independent worker
Expand Down
4 changes: 3 additions & 1 deletion docs/decisions/0009-pgvector-first-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.1.0"
description: >
Record the V1 retrieval index choice: Postgres FTS + pgvector + deterministic
fusion, external index engines only when a real corpus violates latency or
recall SLOs. Use when proposing Elasticsearch/dedicated vector DBs.
recall SLOs. Use when proposing Elasticsearch/dedicated vector DBs. Not for
replacing authorization truth or adding an external index before measured SLO
evidence.
---

# 0009. pgvector-first retrieval index
Expand Down
3 changes: 2 additions & 1 deletion docs/decisions/0010-policy-epoch-revocation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ version: "1.1.0"
description: >
Record the revocation mechanism: synchronous Policy Epoch bump invalidates the
next request immediately; index/cache/blob cleanup is asynchronous. Use when
designing any permission change, offboarding, or cache invalidation path.
designing any permission change, offboarding, or cache invalidation path. Not
for delaying revocation until asynchronous cleanup completes.
---

# 0010. Revocation = synchronous epoch bump, asynchronous cleanup
Expand Down
3 changes: 2 additions & 1 deletion docs/decisions/0011-read-write-plane-separation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ version: "1.2.1"
description: >
Record the separation of context reads from action writes: ContextAccessTicket
and ActionTicket share an identity chain but different audiences and are never
interchangeable. Use when adding any side-effectful capability.
interchangeable. Use when adding any side-effectful capability. Not for using
read authority or a ContextAccessTicket to perform an effect.
---

# 0011. Context read / Action write plane separation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.0.2"
description: >
Seal Runtime ordering so content-free CandidateRef values become
AuthorizedProjection values before content-bearing relevance, assembly, or
model work.
model work. Use when modifying candidate discovery, authorization,
projection, reranking, or assembly. Not for bypassing the Kernel or exposing
content to a pre-authorization stage.
---

# 0012. Seal authorization and projection before content-bearing relevance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0013-trusted-delivery-egress-and-capability-taxonomy
version: "1.0.1"
description: >
Put group audience facts, egress, citation, continuation, and write effects
into explicit trusted types and deep delivery/action Modules.
into explicit trusted types and deep delivery/action Modules. Use when
defining trusted delivery inputs, egress, citations, continuation, or effects.
Not for caller-manufactured trust facts or collapsed capability types.
---

# 0013. Trusted delivery context, egress grants, and distinct capabilities
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0014-curation-snapshot-and-release-ownership
version: "1.0.1"
description: >
Publish post-Revision curation through its own immutable snapshot and give
ReleaseManifest promotion one Module owner.
ReleaseManifest promotion one Module owner. Use when changing curation
snapshots or ReleaseManifest publication ownership. Not for letting Control,
evaluators, or Curation publish a release.
---

# 0014. Curation has an independent snapshot and release owner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0015-rls-transaction-context-and-schema-manifest
version: "1.0.0"
description: >
Define transaction-local tenant context, runtime role constraints, and an
all-table schema security manifest for PostgreSQL RLS.
all-table schema security manifest for PostgreSQL RLS. Use when adding tables,
RLS policies, roles, or transaction-scoped actor context. Not for
Organization-only access or owner-role isolation tests.
Comment on lines +6 to +8

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Keep owner-role isolation tests in scope.

This ADR separates schema-owner roles from runtime and worker roles. It also requires PostgreSQL evidence for RLS and role isolation. The Not for owner-role isolation tests clause routes those tests away from the ADR that governs them.

Exclude only organization-only slices or tests unrelated to RLS role isolation.

Proposed fix
-  all-table schema security manifest for PostgreSQL RLS. Use when adding tables,
-  RLS policies, roles, or transaction-scoped actor context. Not for
-  Organization-only access or owner-role isolation tests.
+  all-table schema security manifest for PostgreSQL RLS. Use when adding tables,
+  RLS policies, roles, or transaction-scoped actor context. Not for
+  organization-only access slices covered by ADR-0020 or tests unrelated to RLS
+  role isolation.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
all-table schema security manifest for PostgreSQL RLS. Use when adding tables,
RLS policies, roles, or transaction-scoped actor context. Not for
Organization-only access or owner-role isolation tests.
all-table schema security manifest for PostgreSQL RLS. Use when adding tables,
RLS policies, roles, or transaction-scoped actor context. Not for
organization-only access slices covered by ADR-0020 or tests unrelated to RLS
role isolation.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/decisions/0015-rls-transaction-context-and-schema-manifest.md` around
lines 6 - 8, Update the scope statement in the ADR introduction to keep
owner-role isolation tests included, while continuing to exclude only
organization-only access and tests unrelated to RLS role isolation. Remove the
“Not for owner-role isolation tests” exclusion without changing the ADR’s
coverage of PostgreSQL RLS, schema-owner/runtime/worker roles, or
transaction-scoped actor context.

---

# 0015. RLS uses transaction-local context and an all-table security manifest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0016-implementation-authority-and-vertical-slice-roadmap
version: "1.1.0"
description: >
Make the concise current implementation design authoritative and deliver the
program as testable vertical slices with a separate launch gate.
program as testable vertical slices with a separate launch gate. Use when
selecting implementation authority or ordering delivery slices. Not for
silently replacing accepted design or merging launch gates into build work.
---

# 0016. One implementation authority and a tracer-bullet roadmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0017-trusted-invocation-and-closed-runtime-access
version: "1.0.0"
description: >
Fix trusted invocation construction and the closed HTTP, generated SDK, and
optionally activated MCP access set over one Runtime contract.
optionally activated MCP access set over one Runtime contract. Use when
adding Runtime ingress or constructing trusted invocation facts. Not for
direct Runtime access or caller-authored identity, ACL, or audience facts.
---

# 0017. Trusted invocation and closed Runtime access surfaces
Expand Down
4 changes: 3 additions & 1 deletion docs/decisions/0018-immutable-revision-publication.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0018-immutable-revision-publication
version: "1.0.0"
description: >
Fix the ContextResource to immutable ContextRevision to ContextFragment model
and atomic active-pointer publication semantics.
and atomic active-pointer publication semantics. Use when publishing content
or changing Revision and Fragment lineage. Not for in-place content mutation
or cleanup-defined visibility.
---

# 0018. Publish immutable ContextRevisions through one atomic active pointer
Expand Down
4 changes: 3 additions & 1 deletion docs/decisions/0019-security-catalog-normalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0019-security-catalog-normalization
version: "1.0.0"
description: >
Normalize the release security catalog to fifteen stable invariant IDs and
distinguish canonical acceptance scenarios from derived evidence cases.
distinguish canonical acceptance scenarios from derived evidence cases. Use
when adding release invariants or executable security evidence. Not for
aliases, aggregate security scores, or inflated scenario counts.
---

# 0019. Normalize the release security catalog to fifteen stable IDs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0020-stage-organization-rls-before-actor-context
version: "1.0.0"
description: >
Bound the first Organization RLS proof without activating an incomplete
request or worker ActorContext protocol.
request or worker ActorContext protocol. Use when proving the initial
Organization RLS slice before actor semantics exist. Not for activating an
incomplete request or worker identity model.
---

# 0020. Stage the Organization RLS proof before ActorContext activation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0021-stage-http-authentication-before-provider-selection
version: "1.0.0"
description: >
Automate the HTTP trusted-invocation boundary without selecting or implying
a production identity provider or activating Runtime delivery.
a production identity provider or activating Runtime delivery. Use when
wiring the staged HTTP authentication boundary. Not for choosing a production
identity provider or treating test authentication as production trust.
---

# 0021. Stage HTTP authentication before identity-provider selection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0022-stage-tenant-safe-empty-context-package
version: "1.1.0"
description: >
Activate the first evidence-free Runtime outcome without manufacturing later
Membership, policy-epoch, release, audit, or egress authority.
Membership, policy-epoch, release, audit, or egress authority. Use when
implementing the first tenant-safe empty Package. Not for adding Evidence or
fabricating deferred policy, release, audit, or egress lineage.
---

# 0022. Stage the tenant-safe empty ContextPackage
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.0.0"
description: >
Bind online Runtime Acquire to one current Membership, a complete
transaction-local UserActor, and a nominal proof that remains live through
ContextPackage construction.
ContextPackage construction. Use when binding Runtime work to a current
Membership and UserActor transaction. Not for Organization-only access,
default Memberships, or proof reuse outside the authority transaction.
---

# 0023. Bind Runtime to a current Membership-backed UserActor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.0.0"
description: >
Activate the first EffectiveScope oracle as a finite intersection over typed
Organization/Source/Resource targets, with seven required trusted operands
and optional RequestNarrowing as an explicit identity-or-filter input.
and optional RequestNarrowing as an explicit identity-or-filter input. Use
when changing EffectiveScope operands or RequestNarrowing. Not for treating a
missing operand as unrestricted or caller input as a trusted grant.
---

# 0024. Model the first EffectiveScope as finite target intersection
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0025-current-transaction-materialized-projection
version: "1.0.0"
description: >
Bind the first exact-authorized PostgreSQL Fragment projection to the current
UserActor transaction and keep content behind the sealed Kernel.
UserActor transaction and keep content behind the sealed Kernel. Use when
materializing an authorized candidate into Evidence. Not for second hydration
transactions or any body read before exact authorization.
---

# 0025. Bind materialized projection to the current Runtime transaction
Expand Down
4 changes: 3 additions & 1 deletion docs/decisions/0026-normalize-no-authorized-evidence.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0026-normalize-no-authorized-evidence
version: "1.2.0"
description: >
Make denied, cross-Organization, and nonexistent Acquire candidates share one
externally indistinguishable no-authorized-Evidence outcome.
externally indistinguishable no-authorized-Evidence outcome. Use when handling
a candidate that yields no authorized Evidence. Not for existence-specific
responses, denied counts, or unproven timing-equivalence claims.
---

# 0026. Normalize every no-authorized-Evidence Acquire outcome
Expand Down
2 changes: 2 additions & 0 deletions docs/decisions/0027-organization-policy-epoch.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ version: "1.2.0"
description: >
Select an Organization-level Policy Epoch for the first Acquire revocation
slice and freeze its atomic mutation and final-delivery validation boundary.
Use when implementing Organization-wide revocation or final delivery checks.
Not for cleanup-defined revocation or caller-authored epochs.
---

# 0027. Organization Policy Epoch is the V0 revocation boundary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0028-fail-closed-unavailable-runtime-capabilities
version: "1.0.0"
description: >
Close the Runtime request union and activate deterministic M0 refusals for
declared operations whose real production carriers do not yet exist.
declared operations whose real production carriers do not yet exist. Use when
declaring or handling an unavailable Runtime operation. Not for fake empty
success or caller-authored capability plans.
---

# 0028. Unavailable Runtime capabilities fail closed before content I/O
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ version: "1.0.0"
description: >
Activate the first signed one-shot WorkerLease only for a persistent no-op
durable job while preserving the complete Supply lease carrier as deferred.
Use when exercising the first persistent WorkerLease boundary. Not for ambient
worker identity or claiming the full Supply carrier is active.
---

# 0029. Bound the first WorkerLease to persistent no-op jobs
Expand Down
4 changes: 3 additions & 1 deletion docs/decisions/0030-bound-ticket-audiences.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.0.0"
description: >
Activate distinct signed ContextAccessTicket and ActionTicket protocol
boundaries only for one synthetic Provider read and one synthetic channel
no-op while preserving the production carriers as deferred.
no-op while preserving the production carriers as deferred. Use when defining
read-versus-action ticket audiences. Not for cross-plane ticket reuse or
treating the synthetic operations as production carriers.
---

# 0030. Bound the first ticket audiences to synthetic effects
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0031-persist-authorized-context-run-lineage
version: "1.0.0"
description: >
Persist one final authorized-only ContextRun and a separately restricted,
redacted audit category before returning each successful Acquire Package.
redacted audit category before returning each successful Acquire Package. Use
when persisting Runtime delivery lineage or denial audit categories. Not for
retaining raw queries, Packages, denied identifiers, or denied counts.
---

# 0031. Persist authorized-only ContextRun lineage before delivery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0032-membership-field-projection-rights
version: "1.0.0"
description: >
Intersect exact Resource authorization with current Membership/version field
rights before structured Fragment values leave PostgreSQL.
rights before structured Fragment values leave PostgreSQL. Use when projecting
structured fields after exact Resource authorization. Not for caller-selected
fields or Python-side filtering of private values.
---

# 0032. Bind materialized fields to current Membership projection rights
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: adr-0033-organization-release-promotion-owner
version: "1.0.0"
description: >
Make Organization-owned immutable release lineage and one generation-bound
ContextLearning promotion transaction the only release publication path.
ContextLearning promotion transaction the only release publication path. Use
when activating, promoting, or rolling back an Organization release. Not for
direct application DML or publication by Control, Curation, or evaluators.
---

# 0033. Promote Organization releases through one Learning owner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.0.0"
description: >
Join the frozen security authority to exact executable evidence, live RLS
inventory, and provenance-bearing release artifacts without inventing
product behavior or aggregate scoring.
product behavior or aggregate scoring. Use when registering or executing M0
release-gate security evidence. Not for security scoring or inventing product
semantics to satisfy a gate.
---

# 0034. Execute the M0 security veto from registered evidence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ version: "1.0.0"
description: >
Register one Organization-owned File ContextSource and immutable first
SourceVersion through a trusted ContextControl call without activating File
acquisition or a new wire API.
acquisition or a new wire API. Use when creating the first trusted File Source
registration. Not for acquiring File content or introducing another public
transport.
---

# 0035. Register File sources through one trusted ContextControl transaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ version: "1.0.0"
description: >
Fix the first pure Markdown compiler to one heading-plus-paragraph shape,
canonical normalized text, end-exclusive positions, and versioned digests.
Use when implementing or testing the first narrow Markdown compiler. Not for
rich Markdown structures or inferred source positions.
---

# 0036. Compile the first Markdown shape from canonical bytes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ version: "1.0.0"
description: >
Activate one trusted Markdown File import through an exact durable WorkerLease,
atomic immutable publication, and a content-free exact-phrase CandidateIndex.
Use when executing the first leased Markdown File import. Not for ambient
worker identity, broad ingestion, or content-bearing candidate discovery.
---

# 0037. Publish the first File through an exact WorkerLease
Expand Down
Loading
Loading