Files
Agent-System/.doc/system-design/module-boundaries.yaml
T
weichenandCursor 9ddc673eb8 feat(doccontent): extract shared markdown canonicalization and SHA
docgov saves content hashes through the new leaf module so it no longer
imports docrevision. Existing docrevision exports stay as thin wrappers.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-15 10:24:24 +00:00

553 lines
12 KiB
YAML

# U1 architecture baseline. Import allowlist is a 2026-09-14 production go list snapshot.
# SQL write / path / event rules apply only to production Go (not Goose, *_test.go, or fixtures).
# Existing debt lives in exceptions with owner + milestone + expiry. New findings block immediately.
imports:
agent:
- config
auth:
- config
authz:
- docduty
bizdev:
- authz
- config
- ctxmgr
- db
- docduty
- docgov
- docrevision
- freedoc
- kb
- projectcontext
- projectworkflow
- quote
- squad
- storage
- stream
- workflowdef
chat:
- app/chatflow
- bizdev
- coordinator
- ctxmgr
- docgov
- intent
- projectinstance
- replyexport
- squad
- stream
- taskrun
config: []
coordinator:
- agent
- bizdev
- ctxmgr
- docgov
- intent
- kb
- projectinstance
- squad
- stream
ctxmgr:
- app/uow
- docgov
- replyexport
- storage
db: []
docduty: []
app:
- agent
- app/chatflow
- app/docadvance
- app/docflow
- app/docnotify
- app/docproject
- app/stageflow
- app/uow
- artifactvault
- auth
- authz
- bizdev
- config
- coordinator
- docgov
- events
- intent
- notification
- observability
- projectinstance
- projectworkflow
- taskrun
- workflowdef
- workspace
app/chatflow:
- bizdev
- coordinator
- ctxmgr
- projectinstance
app/docnotify:
- docgov
- docrevision
- notification
- events
app/docadvance:
- docgov
- events
- notification
- projectinstance
- projectworkflow
app/docproject:
- docgov
- events
app/docflow:
- app/uow
- docgov
- docquery
- docrevision
- events
app/uow: []
app/stageflow:
- bizdev
docquery:
- docgov
- docrevision
docgov:
- app/uow
- doccontent
- docduty
- fsutil
docrevision:
- app/uow
- doccontent
- fsutil
doccontent: []
freedoc:
- app/uow
- ctxmgr
- docrevision
- replyexport
fsutil: []
intent:
- bizdev
kb:
- config
notification: []
observability: []
projectcontext:
- squad
projectinstance:
- docduty
- docgov
- projectworkflow
- workflowdef
projectworkflow:
- auth
quote: []
replyexport: []
server:
- agent
- app
- app/chatflow
- app/docflow
- app/stageflow
- app/uow
- auth
- authz
- bizdev
- chat
- config
- coordinator
- ctxmgr
- docduty
- docgov
- docquery
- docrevision
- events
- freedoc
- intent
- notification
- observability
- projectinstance
- projectworkflow
- replyexport
- squad
- stream
- stream/transport
- taskrun
- upload
- workflowdef
- workspace
- artifactvault
squad:
- agent
- config
- quote
- stream
- template
- workspace
storage: []
stream: []
stream/transport:
- stream
taskrun:
- app/uow
- artifactvault
- bizdev
- ctxmgr
- events
- projectworkflow
- stream
- workspace
template: []
upload: []
workflow: []
workflow/runtime:
- projectinstance
- workflowdef
workflowdef:
- projectworkflow
- storage
- upload
- workflow
workspace:
- app/uow
events:
- app/uow
artifactvault:
- app/uow
- fsutil
dataset:
- artifactvault
- app/uow
table_owners:
document_records:
- docgov
chat_messages:
- ctxmgr
chat_turns:
- ctxmgr
freeform_documents:
- freedoc
task_runs:
- taskrun
task_run_manifests:
- taskrun
document_versions:
- docrevision
document_snapshots:
- docrevision
document_change_events:
- docrevision
event_envelopes:
- events
event_deliveries:
- events
event_dead_letters:
- events
event_inventory_decisions:
- events
event_repair_audit:
- events
event_replay_plans:
- events
event_service_principals:
- events
event_delivery_attempts:
- events
event_consumer_modes:
- events
event_consumer_checkpoints:
- events
event_reconciliations:
- events
event_projection_outcomes:
- app/docproject
notifications:
- notification
stage_advance_requests:
- notification
final_artifacts:
- artifactvault
artifact_payload_staging:
- artifactvault
artifact_blob_references:
- artifactvault
artifact_publication_attempts:
- artifactvault
artifact_deletion_ledger:
- artifactvault
artifact_quarantine:
- artifactvault
artifact_backfill_exclusions:
- artifactvault
dataset_registry:
- dataset
dataset_backfill_jobs:
- dataset
dataset_backfill_checkpoints:
- dataset
dataset_backfill_queue:
- dataset
dataset_destroy_requests:
- dataset
path_owners:
output.md:
- squad
- workspace
data/dev:
- config
- workspace
- artifactvault
workspaces/:
- squad
- workspace
event_producers:
outbox.notify:
- docrevision
- app/docflow
document.agent_candidate_ready:
- docrevision
- app/docflow
- events
document.agent_version_committed:
- docrevision
- app/docflow
- events
- app/docproject
document.downstream_impact_detected:
- docrevision
- app/docflow
- events
document.change_report_degraded:
- docrevision
- app/docflow
- events
document.approved:
- app/docflow
- events
- app/docadvance
taskrun.completed:
- taskrun
taskrun.cancelled:
- taskrun
fav.artifact_staged:
- app/docflow
event_consumers:
outbox.notify:
- app/docnotify
- notification
document.agent_candidate_ready:
- notify
document.agent_version_committed:
- projection
- notify
document.downstream_impact_detected:
- notify
document.change_report_degraded:
- notify
document.approved:
- workflow_advance
- notify
taskrun.completed:
- notify
taskrun.cancelled:
- notify
fav.artifact_staged:
- fav
unwrap_owners:
- docgov
- docrevision
- taskrun
- freedoc
- events
- artifactvault
- ctxmgr
exceptions:
- kind: sql_write
package: docduty
file: internal/docduty/revoke.go
symbol: document_records
owner: docduty
reason: duty slot revoke still writes reviewer/approver columns directly; fold into docgov repository during U3
milestone: U3
expires: "2026-09-28"
- kind: sql_write
package: docduty
file: internal/docduty/store.go
symbol: document_records
owner: docduty
reason: heal/store updates duty columns on document_records; move behind docgov repository in U3
milestone: U3
expires: "2026-09-28"
- kind: sql_write
package: docrevision
file: internal/docrevision/pg_store.go
symbol: document_records
owner: docrevision
reason: projectRootPointersTX updates controlled root pointers; U3 must keep this inside the shared UnitOfWork
milestone: U3
expires: "2026-09-28"
- kind: sql_write
package: docrevision
file: internal/docrevision/pg_store.go
symbol: freeform_documents
owner: docrevision
reason: projectRootPointersTX also projects freeform heads; keep atomic in U3 then hand write ownership back
milestone: U3
expires: "2026-09-28"
- kind: sql_write
package: projectinstance
file: internal/projectinstance/store.go
symbol: task_runs
owner: projectinstance
reason: workflow terminate cancels task_runs; U8 owns run finalization in the same UoW
milestone: U8
expires: "2026-10-26"
- kind: path
package: agent
file: internal/agent/cursor.go
symbol: output.md
owner: agent
reason: runner still names the deliverable file; U5 replaces this with WorkspaceRef
milestone: U5
expires: "2026-10-12"
- kind: path
package: agent
file: internal/agent/piagent.go
symbol: output.md
owner: agent
reason: PI runner contract still uses output.md; U5 capability must hide the literal
milestone: U5
expires: "2026-10-12"
- kind: path
package: bizdev
file: internal/bizdev/service.go
symbol: data/dev
owner: bizdev
reason: default data-root example string; U5 resolver owns environment roots
milestone: U5
expires: "2026-10-12"
- kind: path
package: bizdev
file: internal/bizdev/service.go
symbol: output.md
owner: bizdev
reason: orchestration still joins workspace output.md; U5 removes Root/OutputDir
milestone: U5
expires: "2026-10-12"
- kind: path
package: coordinator
file: internal/coordinator/context.go
symbol: output.md
owner: coordinator
reason: coordinator reads projection path; U4/U5 must go through workspace capability
milestone: U5
expires: "2026-10-12"
- kind: path
package: coordinator
file: internal/coordinator/dialogue_llm.go
symbol: data/dev
owner: coordinator
reason: prompt example embeds data/dev; U5 must not leak runtime roots
milestone: U5
expires: "2026-10-12"
- kind: path
package: coordinator
file: internal/coordinator/document_summary.go
symbol: data/dev
owner: coordinator
reason: summary prompt embeds data/dev; U5 must not leak runtime roots
milestone: U5
expires: "2026-10-12"
- kind: path
package: coordinator
file: internal/coordinator/engine.go
symbol: output.md
owner: coordinator
reason: engine joins deliverable path; U5 WorkspaceRef
milestone: U5
expires: "2026-10-12"
- kind: path
package: docgov
file: internal/docgov/lease.go
symbol: output.md
owner: docgov
reason: SaveDocumentContent still writes projection files; U5 capability + U4 ledger-first read
milestone: U5
expires: "2026-10-12"
- kind: path
package: docgov
file: internal/docgov/project_docs.go
symbol: output.md
owner: docgov
reason: project doc helpers still construct output.md; U5
milestone: U5
expires: "2026-10-12"
- kind: path
package: docrevision
file: internal/docrevision/projection.go
symbol: output.md
owner: docrevision
reason: InspectProjection reads workspace file; U4 treats this as optional cache only
milestone: U4
expires: "2026-09-28"
- kind: path
package: docrevision
file: internal/docrevision/reconcile.go
symbol: output.md
owner: docrevision
reason: reconcile still repairs projection files; U5
milestone: U5
expires: "2026-10-12"
- kind: path
package: server
file: internal/server/document_revision_access.go
symbol: output.md
owner: server
reason: handler still reads workspace files; U4 must use docquery ledger
milestone: U4
expires: "2026-09-28"
- kind: path
package: server
file: internal/server/document_revision_handlers.go
symbol: output.md
owner: server
reason: handler error text mentions output.md; U4/U5 remove path leakage
milestone: U4
expires: "2026-09-28"
- kind: path
package: server
file: internal/server/server.go
symbol: workspaces/
owner: server
reason: server still concatenates workspaces/ roots; U5
milestone: U5
expires: "2026-10-12"
- kind: path
package: storage
file: internal/storage/cas.go
symbol: data/dev
owner: storage
reason: CAS default example path; U5 resolver
milestone: U5
expires: "2026-10-12"
baseline_counts:
import: 0
sql_write: 5
path: 16
event: 0
# U12: kinds already at zero production findings fail --mode block.
# sql_write/path keep dated exceptions until their owner milestones clear them.
block_kinds:
- import
- event