@rudderhq/agent-runtime-codex-local 0.7.16 → 0.7.19-canary.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/app-server-chat.d.ts +1 -0
- package/dist/server/app-server-chat.d.ts.map +1 -1
- package/dist/server/app-server-chat.js +41 -0
- package/dist/server/app-server-chat.js.map +1 -1
- package/dist/server/app-server-chat.test.js +132 -0
- package/dist/server/app-server-chat.test.js.map +1 -1
- package/dist/server/execute.d.ts +1 -0
- package/dist/server/execute.d.ts.map +1 -1
- package/dist/server/execute.js +144 -7
- package/dist/server/execute.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/server/parse.d.ts +1 -0
- package/dist/server/parse.d.ts.map +1 -1
- package/dist/server/parse.js +13 -0
- package/dist/server/parse.js.map +1 -1
- package/dist/server/parse.test.js +12 -1
- package/dist/server/parse.test.js.map +1 -1
- package/dist/server/readiness-gate.d.ts +9 -0
- package/dist/server/readiness-gate.d.ts.map +1 -0
- package/dist/server/readiness-gate.js +91 -0
- package/dist/server/readiness-gate.js.map +1 -0
- package/dist/server/readiness-gate.test.d.ts +2 -0
- package/dist/server/readiness-gate.test.d.ts.map +1 -0
- package/dist/server/readiness-gate.test.js +79 -0
- package/dist/server/readiness-gate.test.js.map +1 -0
- package/package.json +3 -3
- package/skills/rudder-docs/SKILL.md +12 -12
- package/skills/rudder-docs/references/source-map.md +7 -31
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
+
import fs from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
const STATE_VERSION = 1;
|
|
5
|
+
const STATE_RELATIVE_DIRECTORY = path.join(".rudder", "provider-readiness", "codex");
|
|
6
|
+
function digestParts(parts) {
|
|
7
|
+
const hash = createHash("sha256");
|
|
8
|
+
for (const part of parts) {
|
|
9
|
+
const bytes = Buffer.isBuffer(part) ? part : Buffer.from(part, "utf8");
|
|
10
|
+
hash.update(String(bytes.length));
|
|
11
|
+
hash.update(":");
|
|
12
|
+
hash.update(bytes);
|
|
13
|
+
hash.update("\n");
|
|
14
|
+
}
|
|
15
|
+
return hash.digest("hex");
|
|
16
|
+
}
|
|
17
|
+
async function readFingerprintInput(candidate) {
|
|
18
|
+
return fs.readFile(candidate).catch(() => Buffer.from("missing", "utf8"));
|
|
19
|
+
}
|
|
20
|
+
export async function buildCodexReadinessFingerprint(input) {
|
|
21
|
+
const apiKey = input.env.OPENAI_API_KEY?.trim() ?? "";
|
|
22
|
+
const authSource = apiKey ? "api_key" : "subscription";
|
|
23
|
+
const authMaterial = apiKey
|
|
24
|
+
? Buffer.from(apiKey, "utf8")
|
|
25
|
+
: await readFingerprintInput(path.join(input.sharedCodexHome, "auth.json"));
|
|
26
|
+
const providerConfig = await readFingerprintInput(path.join(input.sharedCodexHome, "config.toml"));
|
|
27
|
+
return digestParts([
|
|
28
|
+
"rudder.codex.readiness.v1",
|
|
29
|
+
authSource,
|
|
30
|
+
authMaterial,
|
|
31
|
+
providerConfig,
|
|
32
|
+
input.env.OPENAI_BASE_URL?.trim() ?? "",
|
|
33
|
+
input.env.OPENAI_API_BASE?.trim() ?? "",
|
|
34
|
+
]);
|
|
35
|
+
}
|
|
36
|
+
function statePath(agentHome, fingerprint) {
|
|
37
|
+
return path.join(agentHome, STATE_RELATIVE_DIRECTORY, `${fingerprint}.json`);
|
|
38
|
+
}
|
|
39
|
+
async function readState(agentHome, fingerprint) {
|
|
40
|
+
const raw = await fs.readFile(statePath(agentHome, fingerprint), "utf8").catch(() => null);
|
|
41
|
+
if (!raw)
|
|
42
|
+
return null;
|
|
43
|
+
try {
|
|
44
|
+
const parsed = JSON.parse(raw);
|
|
45
|
+
if (parsed.version !== STATE_VERSION
|
|
46
|
+
|| typeof parsed.fingerprint !== "string"
|
|
47
|
+
|| parsed.classification !== "authentication"
|
|
48
|
+
|| parsed.errorCode !== "codex_provider_auth_required"
|
|
49
|
+
|| typeof parsed.failedAt !== "string") {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return parsed;
|
|
53
|
+
}
|
|
54
|
+
catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
export async function hasMatchingCodexAuthFailure(agentHome, fingerprint) {
|
|
59
|
+
const state = await readState(agentHome, fingerprint);
|
|
60
|
+
return state?.fingerprint === fingerprint;
|
|
61
|
+
}
|
|
62
|
+
export async function recordCodexAuthFailure(agentHome, fingerprint) {
|
|
63
|
+
const target = statePath(agentHome, fingerprint);
|
|
64
|
+
const directory = path.dirname(target);
|
|
65
|
+
await fs.mkdir(directory, { recursive: true });
|
|
66
|
+
const temporary = `${target}.${process.pid}.${randomUUID()}.tmp`;
|
|
67
|
+
const state = {
|
|
68
|
+
version: STATE_VERSION,
|
|
69
|
+
fingerprint,
|
|
70
|
+
classification: "authentication",
|
|
71
|
+
errorCode: "codex_provider_auth_required",
|
|
72
|
+
failedAt: new Date().toISOString(),
|
|
73
|
+
};
|
|
74
|
+
await fs.writeFile(temporary, `${JSON.stringify(state)}\n`, { encoding: "utf8", mode: 0o600 });
|
|
75
|
+
try {
|
|
76
|
+
await fs.link(temporary, target);
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
if (error.code !== "EEXIST")
|
|
80
|
+
throw error;
|
|
81
|
+
}
|
|
82
|
+
finally {
|
|
83
|
+
await fs.unlink(temporary).catch(() => undefined);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export async function clearMatchingCodexAuthFailure(agentHome, fingerprint) {
|
|
87
|
+
if (!(await hasMatchingCodexAuthFailure(agentHome, fingerprint)))
|
|
88
|
+
return;
|
|
89
|
+
await fs.unlink(statePath(agentHome, fingerprint)).catch(() => undefined);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=readiness-g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EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/F,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,MAAM,KAAK,CAAC;IACtE,CAAC;YAAS,CAAC;QACT,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,SAAiB,EACjB,WAAmB;IAEnB,IAAI,CAAC,CAAC,MAAM,2BAA2B,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAAE,OAAO;IACzE,MAAM,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AAC5E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness-gate.test.d.ts","sourceRoot":"","sources":["../../src/server/readiness-gate.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import os from "node:os";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { afterEach, describe, expect, it } from "vitest";
|
|
5
|
+
import { buildCodexReadinessFingerprint, clearMatchingCodexAuthFailure, hasMatchingCodexAuthFailure, recordCodexAuthFailure, } from "./readiness-gate.js";
|
|
6
|
+
let roots = [];
|
|
7
|
+
afterEach(async () => {
|
|
8
|
+
await Promise.all(roots.splice(0).map((root) => fs.rm(root, { recursive: true, force: true })));
|
|
9
|
+
});
|
|
10
|
+
async function createFixture() {
|
|
11
|
+
const root = await fs.mkdtemp(path.join(os.tmpdir(), "rudder-codex-readiness-"));
|
|
12
|
+
roots.push(root);
|
|
13
|
+
const agentHome = path.join(root, "agent");
|
|
14
|
+
const sharedCodexHome = path.join(root, "shared-codex");
|
|
15
|
+
await fs.mkdir(sharedCodexHome, { recursive: true });
|
|
16
|
+
await fs.writeFile(path.join(sharedCodexHome, "auth.json"), '{"token":"first"}\n', "utf8");
|
|
17
|
+
await fs.writeFile(path.join(sharedCodexHome, "config.toml"), 'model_provider = "custom"\n', "utf8");
|
|
18
|
+
return { root, agentHome, sharedCodexHome };
|
|
19
|
+
}
|
|
20
|
+
describe("Codex provider readiness gate", () => {
|
|
21
|
+
it("persists only an opaque fingerprint and blocks the same readiness state", async () => {
|
|
22
|
+
const { agentHome, sharedCodexHome } = await createFixture();
|
|
23
|
+
const fingerprint = await buildCodexReadinessFingerprint({
|
|
24
|
+
env: { OPENAI_BASE_URL: "https://provider.test/v1" },
|
|
25
|
+
sharedCodexHome,
|
|
26
|
+
model: "gpt-test",
|
|
27
|
+
});
|
|
28
|
+
await recordCodexAuthFailure(agentHome, fingerprint);
|
|
29
|
+
expect(await hasMatchingCodexAuthFailure(agentHome, fingerprint)).toBe(true);
|
|
30
|
+
const raw = await fs.readFile(path.join(agentHome, ".rudder", "provider-readiness", "codex", `${fingerprint}.json`), "utf8");
|
|
31
|
+
expect(raw).toContain(fingerprint);
|
|
32
|
+
expect(raw).not.toContain("first");
|
|
33
|
+
expect(raw).not.toContain("provider.test");
|
|
34
|
+
});
|
|
35
|
+
it("uses one provider and credential scope across model fallbacks", async () => {
|
|
36
|
+
const { sharedCodexHome } = await createFixture();
|
|
37
|
+
const primary = await buildCodexReadinessFingerprint({
|
|
38
|
+
env: { OPENAI_BASE_URL: "https://provider.test/v1" },
|
|
39
|
+
sharedCodexHome,
|
|
40
|
+
model: "gpt-primary",
|
|
41
|
+
});
|
|
42
|
+
const fallback = await buildCodexReadinessFingerprint({
|
|
43
|
+
env: { OPENAI_BASE_URL: "https://provider.test/v1" },
|
|
44
|
+
sharedCodexHome,
|
|
45
|
+
model: "gpt-fallback",
|
|
46
|
+
});
|
|
47
|
+
expect(fallback).toBe(primary);
|
|
48
|
+
});
|
|
49
|
+
it("publishes the first concurrent auth failure without overwriting it", async () => {
|
|
50
|
+
const { agentHome } = await createFixture();
|
|
51
|
+
await Promise.all([
|
|
52
|
+
recordCodexAuthFailure(agentHome, "same-scope"),
|
|
53
|
+
recordCodexAuthFailure(agentHome, "same-scope"),
|
|
54
|
+
]);
|
|
55
|
+
expect(await hasMatchingCodexAuthFailure(agentHome, "same-scope")).toBe(true);
|
|
56
|
+
});
|
|
57
|
+
it("allows a retry after credentials or provider configuration changes", async () => {
|
|
58
|
+
const { agentHome, sharedCodexHome } = await createFixture();
|
|
59
|
+
const input = { env: {}, sharedCodexHome, model: "gpt-test" };
|
|
60
|
+
const failedFingerprint = await buildCodexReadinessFingerprint(input);
|
|
61
|
+
await recordCodexAuthFailure(agentHome, failedFingerprint);
|
|
62
|
+
await fs.writeFile(path.join(sharedCodexHome, "auth.json"), '{"token":"second"}\n', "utf8");
|
|
63
|
+
const credentialFingerprint = await buildCodexReadinessFingerprint(input);
|
|
64
|
+
expect(credentialFingerprint).not.toBe(failedFingerprint);
|
|
65
|
+
expect(await hasMatchingCodexAuthFailure(agentHome, credentialFingerprint)).toBe(false);
|
|
66
|
+
await fs.writeFile(path.join(sharedCodexHome, "config.toml"), 'model_provider = "other"\n', "utf8");
|
|
67
|
+
const providerFingerprint = await buildCodexReadinessFingerprint(input);
|
|
68
|
+
expect(providerFingerprint).not.toBe(credentialFingerprint);
|
|
69
|
+
});
|
|
70
|
+
it("clears only the matching failure state", async () => {
|
|
71
|
+
const { agentHome } = await createFixture();
|
|
72
|
+
await recordCodexAuthFailure(agentHome, "failed-fingerprint");
|
|
73
|
+
await clearMatchingCodexAuthFailure(agentHome, "different-fingerprint");
|
|
74
|
+
expect(await hasMatchingCodexAuthFailure(agentHome, "failed-fingerprint")).toBe(true);
|
|
75
|
+
await clearMatchingCodexAuthFailure(agentHome, "failed-fingerprint");
|
|
76
|
+
expect(await hasMatchingCodexAuthFailure(agentHome, "failed-fingerprint")).toBe(false);
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=readiness-gate.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readiness-gate.test.js","sourceRoot":"","sources":["../../src/server/readiness-gate.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,EACL,8BAA8B,EAC9B,6BAA6B,EAC7B,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,IAAI,KAAK,GAAa,EAAE,CAAC;AAEzB,SAAS,CAAC,KAAK,IAAI,EAAE;IACnB,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAClG,CAAC,CAAC,CAAC;AAEH,KAAK,UAAU,aAAa;IAC1B,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,yBAAyB,CAAC,CAAC,CAAC;IACjF,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC3C,MAAM,eAAe,GAAG,IAAI,CAAC,IA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AC,SAAS,EAAE,oBAAoB,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzF,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rudderhq/agent-runtime-codex-local",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.19-canary.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"homepage": "https://github.com/Undertone0809/rudder",
|
|
6
6
|
"bugs": {
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"probe:quota": "pnpm exec tsx src/cli/quota-probe.ts --json"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@rudderhq/agent-runtime-utils": "0.7.
|
|
72
|
-
"@rudderhq/shared": "0.7.
|
|
71
|
+
"@rudderhq/agent-runtime-utils": "0.7.19-canary.0",
|
|
72
|
+
"@rudderhq/shared": "0.7.19-canary.0",
|
|
73
73
|
"picocolors": "^1.1.1"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
@@ -14,7 +14,7 @@ If this body is already present in the prompt but the current request does not n
|
|
|
14
14
|
|
|
15
15
|
Classify the Rudder question, consult the smallest authoritative source set,
|
|
16
16
|
and answer with clear provenance. Use current evidence instead of memory for
|
|
17
|
-
commands, interfaces, versioned behavior, and
|
|
17
|
+
commands, interfaces, versioned behavior, and design proposals.
|
|
18
18
|
|
|
19
19
|
This router does not make an ordinary hosted task into a Rudder workflow. It
|
|
20
20
|
does not provide a command catalog, replace runtime-owned execution rails, or
|
|
@@ -71,8 +71,8 @@ exact page. Do not crawl or load the whole site for a narrow question.
|
|
|
71
71
|
### Local Rudder Checkout
|
|
72
72
|
|
|
73
73
|
Follow the checkout's `AGENTS.md`, then use `doc/README.md` to choose the
|
|
74
|
-
documentation layer: `docs/` for public user guidance, `doc/
|
|
75
|
-
|
|
74
|
+
documentation layer: `docs/` for public user guidance, `doc/plans/` for design
|
|
75
|
+
proposals, `doc/engineering/` for contributor detail, and
|
|
76
76
|
source and tests for exact implementation. Search the owning area narrowly and
|
|
77
77
|
cite local paths and line numbers when supported.
|
|
78
78
|
|
|
@@ -92,7 +92,7 @@ limits. Missing evidence narrows the answer; it does not justify invention.
|
|
|
92
92
|
## Resolve Versions And Conflicts
|
|
93
93
|
|
|
94
94
|
Current callable or installed behavior wins for this environment.
|
|
95
|
-
|
|
95
|
+
Proposals record intended changes and rationale. Source and tests own exact implementation evidence. Public docs own published user guidance. An official
|
|
96
96
|
release or tag owns version-specific history.
|
|
97
97
|
|
|
98
98
|
Do not flatten disagreement:
|
|
@@ -101,10 +101,10 @@ Do not flatten disagreement:
|
|
|
101
101
|
documentation drift;
|
|
102
102
|
- installed help versus a bundled reference: use installed help here and label
|
|
103
103
|
the reference version-adjacent or stale;
|
|
104
|
-
- public docs versus
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
|
|
104
|
+
- public docs versus source or tests: report documentation drift and identify
|
|
105
|
+
both;
|
|
106
|
+
- proposal versus implementation: distinguish intended changes from shipped
|
|
107
|
+
behavior;
|
|
108
108
|
- default branch versus installed release: use the matching release tag for
|
|
109
109
|
installed behavior;
|
|
110
110
|
- verified evidence versus model memory: discard unsupported memory.
|
|
@@ -115,7 +115,7 @@ together or imply certainty that the evidence does not support.
|
|
|
115
115
|
## Evidence And Citations
|
|
116
116
|
|
|
117
117
|
- Attribute each material claim as current-environment behavior, public
|
|
118
|
-
guidance,
|
|
118
|
+
guidance, proposed design, implementation evidence, version history, or
|
|
119
119
|
inference.
|
|
120
120
|
- Cite or link the exact source near the claim when the host supports links.
|
|
121
121
|
For local files, include the path and a tight line reference when possible.
|
|
@@ -142,7 +142,7 @@ Read only the reference needed for the request:
|
|
|
142
142
|
6. [Organization skills](references/organization-skills.md) — discover,
|
|
143
143
|
import, inspect, enable, and synchronize organization or agent skills.
|
|
144
144
|
7. [Source map](references/source-map.md) — stable official documentation,
|
|
145
|
-
|
|
145
|
+
proposal, engineering, implementation, test, release, and search
|
|
146
146
|
routes.
|
|
147
147
|
|
|
148
148
|
## Security And Bounded Use
|
|
@@ -157,8 +157,8 @@ Read only the reference needed for the request:
|
|
|
157
157
|
releases and tags. Follow stricter host policy when it applies.
|
|
158
158
|
- Preserve organization and workspace boundaries. Do not use documentation
|
|
159
159
|
lookup to expose private resources or cross organization scope.
|
|
160
|
-
-
|
|
161
|
-
|
|
160
|
+
- Code and tests establish current behavior. Proposals record design decisions;
|
|
161
|
+
the retired `doc/product/` registry is historical reference, not an approval gate.
|
|
162
162
|
- A docs-only question does not authorize mutations. If the user also asks for
|
|
163
163
|
an action, apply the normal authorization and safety rules to that action.
|
|
164
164
|
|
|
@@ -7,7 +7,7 @@ directories rather than an exhaustive page list. Follow the current checkout's
|
|
|
7
7
|
## Section Map
|
|
8
8
|
|
|
9
9
|
- [Official public documentation](#official-public-documentation)
|
|
10
|
-
- [
|
|
10
|
+
- [Design proposals](#design-proposals)
|
|
11
11
|
- [Contributor and engineering documentation](#contributor-and-engineering-documentation)
|
|
12
12
|
- [Implementation and tests](#implementation-and-tests)
|
|
13
13
|
- [Official remote source and version history](#official-remote-source-and-version-history)
|
|
@@ -51,36 +51,12 @@ Other lookup pages are similarly narrow:
|
|
|
51
51
|
| Windows Desktop release signing policy | `https://docs.rudderhq.dev/reference/code-signing-policy` | `https://docs.rudderhq.dev/zh/reference/code-signing-policy` |
|
|
52
52
|
| Local data and optional service privacy | `https://docs.rudderhq.dev/reference/privacy` | `https://docs.rudderhq.dev/zh/reference/privacy` |
|
|
53
53
|
|
|
54
|
-
##
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- Surface-to-contract maps: `doc/product/surfaces/`
|
|
61
|
-
|
|
62
|
-
Use Product Logic for intended product semantics and invariants. Start at the
|
|
63
|
-
registry entry point and select the owning domain rather than scanning all
|
|
64
|
-
contracts. Reading these guarded files does not authorize editing them.
|
|
65
|
-
|
|
66
|
-
Common domain routes include:
|
|
67
|
-
|
|
68
|
-
- agents, skills, and inbox: `doc/product/domains/agents/`
|
|
69
|
-
- issues and issue-visible state: `doc/product/domains/issues/`
|
|
70
|
-
- assignment, checkout, review routing: `doc/product/domains/work-routing/`
|
|
71
|
-
- runs, execution, transcripts, workspaces: `doc/product/domains/execution/`
|
|
72
|
-
- organizations, goals, and projects:
|
|
73
|
-
`doc/product/domains/organizations-and-goals/`
|
|
74
|
-
- Library, resources, and runtime context:
|
|
75
|
-
`doc/product/domains/library-and-context/`
|
|
76
|
-
- Chat, Messenger, comments, and integrations:
|
|
77
|
-
`doc/product/domains/collaboration/`
|
|
78
|
-
- approvals, budgets, costs, and activity:
|
|
79
|
-
`doc/product/domains/governance-and-visibility/`
|
|
80
|
-
- reviews, feedback, and learning:
|
|
81
|
-
`doc/product/domains/review-feedback-learning/`
|
|
82
|
-
- automations: `doc/product/domains/automations/`
|
|
83
|
-
- plugins: `doc/product/domains/plugins/`
|
|
54
|
+
## Design Proposals
|
|
55
|
+
|
|
56
|
+
Use `doc/plans/` for proposed designs and decision history. Verify current
|
|
57
|
+
behavior against implementation and tests; a proposal is not evidence that a
|
|
58
|
+
feature shipped. The old `doc/product/` registry, domains, workflows, and surface
|
|
59
|
+
maps are historical reference only. They require no synchronization or approval.
|
|
84
60
|
|
|
85
61
|
## Contributor And Engineering Documentation
|
|
86
62
|
|