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
- command families: `src/commands/interaction-command-contracts.ts`, `src/commands/batch-command-contract.ts`, with other typed client contracts in `src/commands/client-command-contracts.ts`
74
-
- CLI positional/flag grammar and daemon request projection: `src/commands/cli-grammar.ts` and `src/commands/cli-grammar/*`
74
+
- CLI positional/flag grammar: `src/commands/cli-grammar.ts` and `src/commands/cli-grammar/*`
75
+
- typed input to daemon request projection: `src/commands/command-projection.ts`
- Do not reintroduce CLI-shaped command adapters or schemas as a second source of truth. CLI, Node.js, and MCP should project from command contracts.
77
78
- Keep `src/daemon/request-router.ts` as request orchestration: auth, diagnostics scope, request admission, locking, handler chain, and fallback dispatch.
@@ -130,12 +131,13 @@ Single-context repo. Read `CONTEXT.md` for domain language and testing/architect
130
131
A new snapshot/command flag touches only the layers that need to understand it. Follow this checklist in order:
131
132
132
133
1.`src/utils/cli-flags.ts`: add to `CliFlags`, `FLAG_DEFINITIONS`, and the relevant exported flag group (e.g. `SNAPSHOT_FLAGS`). Add the flag to `CLI_COMMAND_OVERRIDES` in `src/utils/cli-command-overrides.ts` for each command that supports it; command names/descriptions come from command contracts unless CLI help needs a specific override.
133
-
2.`src/commands/cli-grammar/*`: read the CLI flag into command input and write it into the daemon request only if the flag affects daemon execution.
134
-
3.`src/commands/*-command-contracts.ts`: add or update the command input schema only if the option should be available through Node.js or MCP as structured input.
135
-
4.`src/client-types.ts`: update the public typed client option only when the Node.js interface exposes the option.
136
-
5.`src/client-normalizers.ts`: update daemon flag normalization only when the request still needs a public-to-internal option translation.
137
-
6.`src/daemon/context.ts` and `src/core/dispatch-context.ts`: add the field only when it flows into platform dispatch.
138
-
7. Handler/platform modules: thread the option only after the command surface and grammar prove it belongs there.
134
+
2.`src/commands/cli-grammar/*`: read the CLI flag into command input when the CLI accepts it.
135
+
3.`src/commands/command-projection.ts` and command-family projection helpers: write the input into the daemon request only if the flag affects daemon execution.
136
+
4.`src/commands/*-command-contracts.ts`: add or update the command input schema only if the option should be available through Node.js or MCP as structured input.
137
+
5.`src/client-types.ts`: update the public typed client option only when the Node.js interface exposes the option.
138
+
6.`src/client-normalizers.ts`: update daemon flag normalization only when the request still needs a public-to-internal option translation.
139
+
7.`src/daemon/context.ts` and `src/core/dispatch-context.ts`: add the field only when it flows into platform dispatch.
140
+
8. Handler/platform modules: thread the option only after the command surface, grammar, and projection prove it belongs there.
139
141
140
142
Command-only flags (like `find --first`) that do not flow to the platform layer usually stop at steps 1-3.
141
143
@@ -274,7 +276,8 @@ Command-only flags (like `find --first`) that do not flow to the platform layer
0 commit comments