You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- keep this list aligned with `lua/opencode/services/AGENTS.md`
45
+
- remove an item only after code + tests pass
46
+
25
47
## Editing Rules
26
48
27
49
- Prefer consolidation over introducing new layers
@@ -46,12 +68,14 @@ This directory owns domain actions and command definitions.
46
68
- Is `command_defs` declarative and minimal?
47
69
- Are aliases grouped and obvious?
48
70
- Did we avoid reintroducing duplicate argument validation paths?
71
+
- Did we add any new direct `session/api` requires in handlers?
49
72
50
73
## Reject Conditions
51
74
52
75
- Any direct call to `dispatch.execute` from handlers
53
76
- Any parse/hook routing logic added to handlers
54
77
- Any new entry-style wrapper added in handlers
78
+
- Any new direct `require('opencode.session')` or `require('opencode.api')` in handlers without exception note
55
79
56
80
## Minimal Regression Commands
57
81
@@ -63,6 +87,6 @@ This directory owns domain actions and command definitions.
63
87
## Entry Notes For New Agents
64
88
65
89
- Start from the domain file you are touching (`window/session/diff/workflow/surface/agent/permission`), then verify invariants against `commands/dispatch.lua`.
66
-
- Treat handlers as **domain behavior + command definition only**.
90
+
- Treat handlers as **command adaptation + command definition only**.
67
91
- If you feel the need to touch parse/dispatch from handlers, stop and move that change to the command infrastructure layer.
68
92
- Keep compatibility aliases explicit, local, and justified inline.
0 commit comments