Skip to content

docs: WP-13b slice 0 — D-93..D-98, response/ai/notify contracts, data model, stories, specs - #84

Merged
kiennt048 merged 6 commits into
mainfrom
docs/response-13b-0
Nov 9, 2026
Merged

kiennt048 merged 6 commits into
mainfrom
docs/response-13b-0

Conversation

@kiennt048

Copy link
Copy Markdown
Collaborator

Slice 13b-0 of WP-13b (response part 2): the docs come first. This PR changes no code.

Decisions

  • D-93: connections and their secrets live in core.
    • Storage: core/conn, core_connection, core_connection_tool. Endpoints: /core/connections*. GUI: Settings → Connections.
    • They work with ai off (D-44).
    • Connection targets may be public addresses when an admin declares them. This is a new PRIVACY flow 12, "Connections you add". Its PRIVACY row, the Settings → Privacy row and the 11 → 12 flow contract change land with the GUI in 13b-1.
    • References: Tines, n8n, Cortex XSOAR, Splunk SOAR, Home Assistant.
  • D-94: device transports are generic, with no vendor code. HTTPS with a TOFU certificate pin, SSH with a TOFU host key, and MCP over streamable HTTP. The address policy, size and time caps are fixed, and there are no redirects and no proxy.
  • D-95: check-before and read-back are data. They are the catalog fields precheck and precheck_refuse, and expect on the template.
  • D-96: approval channels. notify owns the transports and the platform authenticity checks; response owns identity, the risk-per-channel policy and every gate. There is a channel × risk matrix, and a refused decision does not burn the token.
  • D-97: the AI agent is an in-process service identity (ai:response). POST /response/ai/proposals answers 404 in the real build.
  • D-98: step-up check core/auth.(*Service).VerifyTwoStep.

D-92 is in #82, which is still in flight. Once it merges I'll merge main here and keep D-92 before D-93.

Contracts

  • response: INV-3/4/9/13/15/16 updated; new INV-21 (secrets in core) and INV-22 (executor port and budgets); FORBID-5/9; open questions 1, 3, 4, 5 and 7 answered; a map of which slice implements what.
  • ai (Emily): INV-11 moves to core; proposals go through the Go Propose port; ai_connectors dropped.
  • notify (Emily):
    • PRE-4 gains Channels (empty means send nothing) and InAppOnly.
    • PRE-7 is VerifyApprovalLink, which never creates the key.
    • PRE-8 is the Config.Decisions port and RecordReplyCode.
    • notify subscribes to response.decision.made.

Other docs

  • DATA_MODEL: core_connection, core_connection_tool, resp_tokens v2, resp_catalog gains precheck/precheck_refuse/expect, resp_hints.
  • USER_STORIES: criteria for S-AI-7, S-RESP-2 (approval matrix) and S-RESP-4.
  • approval-tokens.md: §7.1 reply-code hash with a test vector; §14 answers.
  • action-templates.md: §12.1 data fixes.
  • Deferred file: .ai/deferred/feat-response-13b.md.
  • Not touched here: modules/core/* (connection invariants come in 13b-4) and PRIVACY.md (flow 12 comes in 13b-1).

For Emily (D-65)

@kiennt049 this changes your ai and notify contracts. Read the plan's interfaces in modules/notify/CONTRACT.md, PRE-4, PRE-7 and PRE-8. Under D-65 I may write the notify parts (1) and (2) myself when slice 13b-7 comes, and I'll tell you first. Nothing changes in your current work.

Local checks

Docs only: make check runs nothing. Every URL cited in D-93..D-98 was opened and checked.

🤖 Generated with Claude Code

kiennt048 and others added 2 commits November 9, 2026 22:20
…93..D-98)

Six decisions after D-91 (D-92 is left for PR #82): connections and their
secrets move to core (D-93, admin-declared public targets allowed, PRIVACY
flow 12 lands with the GUI in 13b-1), generic device transports (D-94),
check-before and read-back as template data (D-95), approval channels split
between notify and response (D-96), the AI agent as an in-process service
identity (D-97) and a per-approval step-up check in core/auth (D-98).

response CONTRACT/IMPACT: INV-3/4/9/13/15/16 updated, INV-21 (connection
secrets live in core), INV-22 (executor port and budgets), FORBID-5 adds the
proposals route, FORBID-9, open questions 1/3/4/5/7 answered, slice map.
ai and notify contracts: minimal factual changes (INV-11 moves to core;
channel filter, VerifyApprovalLink, Decisions port, RecordReplyCode).
DATA_MODEL, stories S-RESP-2/4 and S-AI-7, approval-tokens 7.1 reply-code
hash with a test vector and 14 answers, action-templates 12.1 data fixes,
and the deferred list for WP-13b. No code, no modules/core change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kiennt048
kiennt048 requested a review from kiennt049 as a code owner November 9, 2026 15:22
kiennt048 and others added 2 commits November 9, 2026 22:41
…rifyTwoStep

D-98 gains: the code bound to one request (purpose response.approve.<id>), a server-built summary mailed through a
separate StepUpMailer (never the sign-in text), a separate step-up send budget, and a re-read of the user when the
check commits. INV-16: VerifyTwoStep errors pass through unchanged (400 code_required/invalid_code/..., 403
twofa_required, 429 with Retry-After, 503), not 403 invalid_code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kiennt048
kiennt048 merged commit 0064c88 into main Nov 9, 2026
2 checks passed
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