Skip to content

docs(promptguide): add the PromptGuide owner contract - #2159

Closed
eric8810 wants to merge 1 commit into
mainfrom
dim/2026-promptguide
Closed

eric8810 wants to merge 1 commit into
mainfrom
dim/2026-promptguide

Conversation

@eric8810

Copy link
Copy Markdown
Collaborator

Owner: PromptGuide
Batch: 1
Scan issue: #2026
Old PR: #2103
Contract: docs/design/plugins/PromptGuide.md
Base: origin/main 82a91e66a
Head: da04853cf

What

Adds the PromptGuide owner contract: the entries table, the order and scopes, the composition frame, register/compose/observe, the delivery revision and the entry lifetime. The contract replaces Prompt's compose/compose_system/changes readers and the Session-scoped side of Prompt.

Shared rows:

  • docs/design/plugins/README.md / zh: owner index row and By scope Session parts.
  • docs/architecture/rust-agent/plugins/Prompt.md: the design link.
  • docs/design/plugins/Prompt.md handoff via PromptAdoption (所有者扫描:分支轮次链路 #2027).

Dependencies

None in batch 1. PromptAdoption, PromptSources, Collaboration, EventHub and SummaryStrategy receive the named clauses; dim-goal's test helper reads compose and is named in the one-change row.

Supersedes

  • docs/design/plugins/Prompt.md §1–§8 guide rows and §3's lead (adoption rows remain PromptAdoption's).
  • docs/design/model-prompts.md §1/§3/§5/§6/§6.2/§9.1/§10 (en+zh) to PromptSources/PromptAdoption.
  • docs/design/plugins/Collaboration.md, EventHub.md, ContextCompaction.md, PromptSources.md and the README rows named in the table.

Design decisions

  • The entries table is Session-scoped; each entry's text is code by default, with factory exceptions for evaluation.
  • The order is the writer's number; scopes are the caller's to state, and the owner decides the meeting rule.
  • register is one atomic step under the table's lock; compose is synchronous and is on the public data face; observe starts one coalescing table-owned delivery task per subscription, aborted at shutdown.
  • closed is the framework's effect refusal at the calling row's subtree or root; a Dim Session close with an open row still takes effect and ends with that row.
  • compose returns the frame and the entries still registered; after unload it is terminal and must not be adopted.

Review record

  • Pre-review rounds 1-18: no open P1/P2; all P3s fixed.
  • yyhhyyyyyy-style mock review: 2 rounds plus 2 deltas, 无 P1/P2.
  • zerob13-style mock review: 2 rounds plus 2 deltas, 无 P1/P2.
  • No remaining P3.

Ready check

  • Every operation, error and caller next step defined.
  • §7.1/§7.2 and ADR 002 rows answered.
  • Dependencies match the batch table.
  • Pre-review and both mock reviews 无 P1/P2.
  • node scripts/adr-check.mjs --base origin/main, cargo run --locked -p xtask-check, git diff --check pass.
  • No maintainer question.

Refs #2026

@eric8810

Copy link
Copy Markdown
Collaborator Author

Closing as part of abandoning the owner-split experiment.

@eric8810 eric8810 closed this Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant