@cluesmith/codev 3.2.0 → 3.2.2
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/dashboard-dist/assets/{index-DM7OU-EI.js → index-BZ1x7x1X.js} +34 -34
- package/dashboard-dist/assets/index-BZ1x7x1X.js.map +1 -0
- package/dashboard-dist/index.html +1 -1
- package/dist/agent-farm/cli.d.ts.map +1 -1
- package/dist/agent-farm/cli.js +17 -0
- package/dist/agent-farm/cli.js.map +1 -1
- package/dist/agent-farm/commands/architect.d.ts.map +1 -1
- package/dist/agent-farm/commands/architect.js +6 -17
- package/dist/agent-farm/commands/architect.js.map +1 -1
- package/dist/agent-farm/commands/cleanup.js +3 -2
- package/dist/agent-farm/commands/cleanup.js.map +1 -1
- package/dist/agent-farm/commands/db.d.ts +10 -0
- package/dist/agent-farm/commands/db.d.ts.map +1 -1
- package/dist/agent-farm/commands/db.js +77 -0
- package/dist/agent-farm/commands/db.js.map +1 -1
- package/dist/agent-farm/commands/send.d.ts +40 -12
- package/dist/agent-farm/commands/send.d.ts.map +1 -1
- package/dist/agent-farm/commands/send.js +101 -34
- package/dist/agent-farm/commands/send.js.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.d.ts +12 -7
- package/dist/agent-farm/commands/spawn-worktree.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn-worktree.js +40 -19
- package/dist/agent-farm/commands/spawn-worktree.js.map +1 -1
- package/dist/agent-farm/commands/spawn.d.ts +15 -6
- package/dist/agent-farm/commands/spawn.d.ts.map +1 -1
- package/dist/agent-farm/commands/spawn.js +24 -17
- package/dist/agent-farm/commands/spawn.js.map +1 -1
- package/dist/agent-farm/commands/stop.js +2 -2
- package/dist/agent-farm/commands/stop.js.map +1 -1
- package/dist/agent-farm/commands/tower.d.ts +1 -0
- package/dist/agent-farm/commands/tower.d.ts.map +1 -1
- package/dist/agent-farm/commands/tower.js +50 -0
- package/dist/agent-farm/commands/tower.js.map +1 -1
- package/dist/agent-farm/db/consolidate.d.ts +66 -0
- package/dist/agent-farm/db/consolidate.d.ts.map +1 -0
- package/dist/agent-farm/db/consolidate.js +406 -0
- package/dist/agent-farm/db/consolidate.js.map +1 -0
- package/dist/agent-farm/db/index.d.ts +13 -4
- package/dist/agent-farm/db/index.d.ts.map +1 -1
- package/dist/agent-farm/db/index.js +100 -470
- package/dist/agent-farm/db/index.js.map +1 -1
- package/dist/agent-farm/db/schema.d.ts +11 -4
- package/dist/agent-farm/db/schema.d.ts.map +1 -1
- package/dist/agent-farm/db/schema.js +91 -2
- package/dist/agent-farm/db/schema.js.map +1 -1
- package/dist/agent-farm/db/types.d.ts +2 -0
- package/dist/agent-farm/db/types.d.ts.map +1 -1
- package/dist/agent-farm/db/types.js +1 -0
- package/dist/agent-farm/db/types.js.map +1 -1
- package/dist/agent-farm/lib/builder-lookup.d.ts.map +1 -1
- package/dist/agent-farm/lib/builder-lookup.js +9 -3
- package/dist/agent-farm/lib/builder-lookup.js.map +1 -1
- package/dist/agent-farm/servers/codev-config-watcher.d.ts +37 -0
- package/dist/agent-farm/servers/codev-config-watcher.d.ts.map +1 -0
- package/dist/agent-farm/servers/{worktree-config-watcher.js → codev-config-watcher.js} +15 -14
- package/dist/agent-farm/servers/codev-config-watcher.js.map +1 -0
- package/dist/agent-farm/servers/command-relay.d.ts +54 -0
- package/dist/agent-farm/servers/command-relay.d.ts.map +1 -0
- package/dist/agent-farm/servers/command-relay.js +94 -0
- package/dist/agent-farm/servers/command-relay.js.map +1 -0
- package/dist/agent-farm/servers/overview.d.ts.map +1 -1
- package/dist/agent-farm/servers/overview.js +12 -6
- package/dist/agent-farm/servers/overview.js.map +1 -1
- package/dist/agent-farm/servers/tower-instances.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-instances.js +65 -55
- package/dist/agent-farm/servers/tower-instances.js.map +1 -1
- package/dist/agent-farm/servers/tower-messages.d.ts +9 -0
- package/dist/agent-farm/servers/tower-messages.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-messages.js +24 -0
- package/dist/agent-farm/servers/tower-messages.js.map +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts +1 -1
- package/dist/agent-farm/servers/tower-routes.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-routes.js +111 -35
- package/dist/agent-farm/servers/tower-routes.js.map +1 -1
- package/dist/agent-farm/servers/tower-server.js +41 -27
- package/dist/agent-farm/servers/tower-server.js.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-terminals.js +22 -5
- package/dist/agent-farm/servers/tower-terminals.js.map +1 -1
- package/dist/agent-farm/servers/tower-types.d.ts +2 -0
- package/dist/agent-farm/servers/tower-types.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.d.ts +50 -5
- package/dist/agent-farm/servers/tower-utils.d.ts.map +1 -1
- package/dist/agent-farm/servers/tower-utils.js +64 -14
- package/dist/agent-farm/servers/tower-utils.js.map +1 -1
- package/dist/agent-farm/state.d.ts +34 -21
- package/dist/agent-farm/state.d.ts.map +1 -1
- package/dist/agent-farm/state.js +125 -79
- package/dist/agent-farm/state.js.map +1 -1
- package/dist/agent-farm/types.d.ts +14 -0
- package/dist/agent-farm/types.d.ts.map +1 -1
- package/dist/agent-farm/utils/architect-name.d.ts +6 -33
- package/dist/agent-farm/utils/architect-name.d.ts.map +1 -1
- package/dist/agent-farm/utils/architect-name.js +7 -62
- package/dist/agent-farm/utils/architect-name.js.map +1 -1
- package/dist/agent-farm/utils/config.d.ts +24 -1
- package/dist/agent-farm/utils/config.d.ts.map +1 -1
- package/dist/agent-farm/utils/config.js +59 -3
- package/dist/agent-farm/utils/config.js.map +1 -1
- package/dist/agent-farm/utils/harness.d.ts +45 -2
- package/dist/agent-farm/utils/harness.d.ts.map +1 -1
- package/dist/agent-farm/utils/harness.js +21 -0
- package/dist/agent-farm/utils/harness.js.map +1 -1
- package/dist/agent-farm/utils/workspace-path.d.ts +16 -0
- package/dist/agent-farm/utils/workspace-path.d.ts.map +1 -0
- package/dist/agent-farm/utils/workspace-path.js +26 -0
- package/dist/agent-farm/utils/workspace-path.js.map +1 -0
- package/dist/agent-farm/utils/worktree-write-guard.d.ts +56 -0
- package/dist/agent-farm/utils/worktree-write-guard.d.ts.map +1 -0
- package/dist/agent-farm/utils/worktree-write-guard.js +222 -0
- package/dist/agent-farm/utils/worktree-write-guard.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/consult/index.d.ts +50 -2
- package/dist/commands/consult/index.d.ts.map +1 -1
- package/dist/commands/consult/index.js +125 -7
- package/dist/commands/consult/index.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +25 -3
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/porch/verdict.js +2 -2
- package/dist/commands/porch/verdict.js.map +1 -1
- package/dist/lib/config.d.ts +10 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/forge-contracts.d.ts +8 -0
- package/dist/lib/forge-contracts.d.ts.map +1 -1
- package/dist/lib/forge-contracts.js.map +1 -1
- package/dist/lib/managed-block.d.ts +8 -2
- package/dist/lib/managed-block.d.ts.map +1 -1
- package/dist/lib/managed-block.js +32 -7
- package/dist/lib/managed-block.js.map +1 -1
- package/package.json +3 -3
- package/scripts/forge/gitea/issue-view.sh +4 -1
- package/scripts/forge/github/issue-view.sh +2 -2
- package/scripts/forge/gitlab/issue-view.sh +4 -1
- package/scripts/forge/linear/issue-view.sh +3 -2
- package/skeleton/resources/commands/consult.md +14 -0
- package/skeleton/roles/builder.md +21 -0
- package/skeleton/templates/AGENTS.md +16 -0
- package/skeleton/templates/CLAUDE.md +16 -0
- package/dashboard-dist/assets/index-DM7OU-EI.js.map +0 -1
- package/dist/agent-farm/db/migrate.d.ts +0 -20
- package/dist/agent-farm/db/migrate.d.ts.map +0 -1
- package/dist/agent-farm/db/migrate.js +0 -107
- package/dist/agent-farm/db/migrate.js.map +0 -1
- package/dist/agent-farm/servers/worktree-config-watcher.d.ts +0 -36
- package/dist/agent-farm/servers/worktree-config-watcher.d.ts.map +0 -1
- package/dist/agent-farm/servers/worktree-config-watcher.js.map +0 -1
|
@@ -39,25 +39,50 @@ export function readHotTierFiles(workspaceRoot) {
|
|
|
39
39
|
return parts;
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
42
|
+
* Hot files surfaced into the interactive root docs as Claude Code `@import` lines.
|
|
43
|
+
* `diskRelPath` is the literal on-disk location (relative to the importing doc's dir
|
|
44
|
+
* = workspace root); `importLine` is the `@`-prefixed path Claude Code expands into
|
|
45
|
+
* context at session launch. `copyHotTierDefaults` materializes each file at
|
|
46
|
+
* codev/resources/ on init/adopt/update, so the import target is present there.
|
|
47
|
+
*
|
|
48
|
+
* The emit predicate is a literal existence check at `diskRelPath`, NOT the four-tier
|
|
49
|
+
* resolver: an `@import` is a concrete path Claude Code reads from disk relative to
|
|
50
|
+
* the doc, so a skeleton-only (tier-4) fallback would produce a dangling import that
|
|
51
|
+
* never resolves. We emit a line only when the file truly sits at codev/resources/.
|
|
52
|
+
*/
|
|
53
|
+
const HOT_IMPORTS = [
|
|
54
|
+
{ diskRelPath: 'codev/resources/arch-critical.md', importLine: '@codev/resources/arch-critical.md' },
|
|
55
|
+
{ diskRelPath: 'codev/resources/lessons-critical.md', importLine: '@codev/resources/lessons-critical.md' },
|
|
56
|
+
];
|
|
57
|
+
/**
|
|
58
|
+
* Render the managed block (markers + intro + `@import` lines), or '' if neither
|
|
59
|
+
* hot file is present (in which case callers leave the doc untouched).
|
|
60
|
+
*
|
|
61
|
+
* Spec 987 originally inlined a verbatim copy of the hot files here; #1119 replaced
|
|
62
|
+
* that with Claude Code `@import` lines so the hot files stay the single source of
|
|
63
|
+
* truth — no copy to drift. Claude Code expands `@path` imports into context at
|
|
64
|
+
* session launch (always-on, transcluded — not lazy), giving the same guarantee as
|
|
65
|
+
* inlining minus the drift footgun. A line is emitted only if its hot file is on disk.
|
|
44
66
|
*/
|
|
45
67
|
export function renderHotContextBlock(workspaceRoot) {
|
|
46
|
-
const
|
|
47
|
-
|
|
68
|
+
const imports = HOT_IMPORTS
|
|
69
|
+
.filter((h) => fs.existsSync(path.join(workspaceRoot, h.diskRelPath)))
|
|
70
|
+
.map((h) => h.importLine);
|
|
71
|
+
if (imports.length === 0)
|
|
48
72
|
return '';
|
|
49
73
|
return [
|
|
50
74
|
HOT_BLOCK_BEGIN,
|
|
51
75
|
'',
|
|
52
|
-
'<!-- Generated
|
|
53
|
-
'
|
|
76
|
+
'<!-- Generated by `codev init` / `codev update` from the hot files',
|
|
77
|
+
' (codev/resources/{arch,lessons}-critical.md). Do not edit here — edit the hot',
|
|
78
|
+
' files. The @import lines below are expanded into context at session launch. -->',
|
|
54
79
|
'',
|
|
55
80
|
'# Always-On Engineering Context (hot tier)',
|
|
56
81
|
'',
|
|
57
82
|
'Curated, always-on guidance — consult before deciding. Use each "consult when…"',
|
|
58
83
|
'map to open the full arch.md / lessons-learned.md when relevant.',
|
|
59
84
|
'',
|
|
60
|
-
|
|
85
|
+
...imports,
|
|
61
86
|
'',
|
|
62
87
|
HOT_BLOCK_END,
|
|
63
88
|
].join('\n');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"managed-block.js","sourceRoot":"","sources":["../../src/lib/managed-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,MAAM,CAAC,MAAM,eAAe,GAAG,4DAA4D,CAAC;AAC5F,MAAM,CAAC,MAAM,aAAa,GAAG,gCAAgC,CAAC;AAE9D,kFAAkF;AAClF,MAAM,CAAC,MAA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AAK,GAAG,qBAAqB,CAAC,aAAa,CAAC,CAAC;IACnD,IAAI,KAAK,KAAK,EAAE;QAAE,OAAO,EAAE,CAAC;IAE5B,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;QAC7B,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;QACrC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAAE,SAAS;QAChC,MAAM,MAAM,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;QAC3C,MAAM,KAAK,GAAG,qBAAqB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACnD,IAAI,KAAK,KAAK,MAAM,EAAE,CAAC;YACrB,EAAE,CAAC,aAAa,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YAC3B,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cluesmith/codev",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "Codev CLI - AI-assisted software development framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"open": "^10.1.0",
|
|
34
34
|
"tree-kill": "^1.2.2",
|
|
35
35
|
"ws": "^8.18.0",
|
|
36
|
-
"@cluesmith/codev-core": "3.2.
|
|
36
|
+
"@cluesmith/codev-core": "3.2.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@playwright/test": "^1.58.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"tsx": "^4.19.2",
|
|
49
49
|
"typescript": "^5.7.2",
|
|
50
50
|
"vitest": "^4.0.15",
|
|
51
|
-
"@cluesmith/codev-types": "3.2.
|
|
51
|
+
"@cluesmith/codev-types": "3.2.2",
|
|
52
52
|
"@cluesmith/codev-dashboard": "0.0.0"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# Forge concept: issue-view (Gitea via tea CLI)
|
|
3
|
-
|
|
3
|
+
# Sets `url` to the issue's browser page (`html_url`). Gitea's own `url` field is
|
|
4
|
+
# the API endpoint (would render raw JSON in a browser), so we prefer `html_url`
|
|
5
|
+
# and fall back to the existing `url` only if `html_url` is absent.
|
|
6
|
+
tea issues view "$CODEV_ISSUE_ID" --output json | jq '.url = (.html_url // .url)'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# Forge concept: issue-view (GitHub via gh CLI)
|
|
3
3
|
# Input: CODEV_ISSUE_ID
|
|
4
|
-
# Output: JSON {title, body, state, comments[]}
|
|
5
|
-
exec gh issue view "$CODEV_ISSUE_ID" --json title,body,state,comments
|
|
4
|
+
# Output: JSON {title, body, state, url, comments[]}
|
|
5
|
+
exec gh issue view "$CODEV_ISSUE_ID" --json title,body,state,url,comments
|
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# Forge concept: issue-view (GitLab via glab CLI)
|
|
3
|
-
|
|
3
|
+
# Adds a `url` field mapped from GitLab's `web_url` (the issue's browser page);
|
|
4
|
+
# all other fields glab emits are passed through unchanged. `. + {url: …}` is
|
|
5
|
+
# non-destructive — if `web_url` is absent, `url` is null (optional by contract).
|
|
6
|
+
glab issue view "$CODEV_ISSUE_ID" --output json | jq '. + {url: .web_url}'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# Forge concept: issue-view (Linear via GraphQL API)
|
|
3
3
|
# Input: CODEV_ISSUE_ID (e.g. "ENG-123")
|
|
4
|
-
# Output: JSON {title, body, state, comments[]}
|
|
4
|
+
# Output: JSON {title, body, state, url, comments[]}
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
7
|
if [ -z "$LINEAR_API_KEY" ]; then
|
|
@@ -18,7 +18,7 @@ curl -sf -X POST https://api.linear.app/graphql \
|
|
|
18
18
|
-H "Content-Type: application/json" \
|
|
19
19
|
-H "Authorization: $LINEAR_API_KEY" \
|
|
20
20
|
-d "$(jq -n --arg id "$CODEV_ISSUE_ID" '{
|
|
21
|
-
query: "query($id: String!) { issueVcsByFilter: issues(filter: { identifier: { eq: $id } }) { nodes { title description state { name } comments { nodes { body createdAt user { displayName } } } } } }",
|
|
21
|
+
query: "query($id: String!) { issueVcsByFilter: issues(filter: { identifier: { eq: $id } }) { nodes { title url description state { name } comments { nodes { body createdAt user { displayName } } } } } }",
|
|
22
22
|
variables: { id: $id }
|
|
23
23
|
}')" \
|
|
24
24
|
| jq 'if (.data.issueVcsByFilter.nodes | length) == 0 then
|
|
@@ -26,6 +26,7 @@ curl -sf -X POST https://api.linear.app/graphql \
|
|
|
26
26
|
else
|
|
27
27
|
.data.issueVcsByFilter.nodes[0] | {
|
|
28
28
|
title: .title,
|
|
29
|
+
url: .url,
|
|
29
30
|
body: (.description // ""),
|
|
30
31
|
state: .state.name,
|
|
31
32
|
comments: [.comments.nodes[] | {
|
|
@@ -66,12 +66,26 @@ consult -m codex --protocol spir --type phase
|
|
|
66
66
|
|
|
67
67
|
# Integration review
|
|
68
68
|
consult -m gemini --type integration
|
|
69
|
+
|
|
70
|
+
# Integration review anchored on a long-lived integration branch (#1113)
|
|
71
|
+
consult -m codex --type integration --issue 42 --base ci
|
|
69
72
|
```
|
|
70
73
|
|
|
71
74
|
**Options:**
|
|
72
75
|
- `--protocol <name>` — Protocol: spir, aspir, air, bugfix, maintain
|
|
73
76
|
- `-t, --type <type>` — Review type: spec, plan, impl, pr, phase, integration
|
|
74
77
|
- `--issue <number>` — Issue number (required from architect context)
|
|
78
|
+
- `--base <ref>` — **`--type integration` only.** Anchor the diff on this base branch (e.g. `ci`), computed locally as `git diff origin/<base>...origin/<head>` (three-dot, merge-base anchored). Use in repos with a long-lived integration branch ahead of the default branch so the review sees only the PR's actual change, not the whole integration-over-trunk delta. Unresolvable refs fail loudly with a `git fetch` hint (no silent fallback to the local checkout). Defaults to config `consult.integrationBranch`; with neither set, the integration review uses the PR's host-recorded base (`gh pr diff`), unchanged.
|
|
79
|
+
|
|
80
|
+
**Config (`.codev/config.json`):**
|
|
81
|
+
```jsonc
|
|
82
|
+
{
|
|
83
|
+
"consult": {
|
|
84
|
+
// Repo-wide default base for `--type integration` (overridden by --base).
|
|
85
|
+
"integrationBranch": "ci"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
```
|
|
75
89
|
|
|
76
90
|
**Context resolution:**
|
|
77
91
|
- **Builder context** (cwd inside `.builders/`): auto-detects project ID, spec, plan, and PR from porch state
|
|
@@ -200,6 +200,27 @@ Builders may submit multiple sequential PRs within a single worktree session. Th
|
|
|
200
200
|
- **Worktree cleanup is architect-driven** -- the architect decides when to run `afx cleanup`, not the builder
|
|
201
201
|
- If a builder session is interrupted, use `afx spawn XXXX --resume` to reconnect to the existing worktree
|
|
202
202
|
|
|
203
|
+
## Worktree isolation: filesystem path discipline
|
|
204
|
+
|
|
205
|
+
Your worktree (`.builders/<id>/`) is **nested inside the main checkout**, and at the
|
|
206
|
+
branch base the two trees are **byte-identical**. This creates a silent failure mode:
|
|
207
|
+
|
|
208
|
+
- The `Write`/`Edit` tools require **absolute** paths. If you synthesize one rooted
|
|
209
|
+
at the canonical repo root instead of your worktree, you drop the `.builders/<id>/`
|
|
210
|
+
segment and write into the **main checkout** — a real, writable directory. The
|
|
211
|
+
write *succeeds silently* and pollutes `main`; you only notice later when a
|
|
212
|
+
`git add` in your worktree fails with a pathspec error.
|
|
213
|
+
- Wrong-rooted **reads** also succeed silently (identical trees), so nothing
|
|
214
|
+
corrects the mistake until that first failed write.
|
|
215
|
+
|
|
216
|
+
Rules:
|
|
217
|
+
- **Absolute paths for Write/Edit must be rooted at your worktree.** A deterministic
|
|
218
|
+
PreToolUse guard now blocks out-of-worktree writes (allowing only temp dirs and
|
|
219
|
+
`~/.claude`); if you see that denial, re-root the path under your worktree.
|
|
220
|
+
- **Bash `cwd` is your worktree — prefer relative paths there.** A relative path
|
|
221
|
+
cannot be anchored to the wrong root, which closes the Bash write surface
|
|
222
|
+
(`>`, `cp`, `tee`, `sed -i`) the Write/Edit guard does not cover.
|
|
223
|
+
|
|
203
224
|
## Constraints
|
|
204
225
|
|
|
205
226
|
- **Stay in scope** - Only implement what's in the spec
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# {{PROJECT_NAME}} - AI Agent Instructions
|
|
2
2
|
|
|
3
|
+
<!-- BEGIN CODEV HOT CONTEXT (generated — do not edit) -->
|
|
4
|
+
|
|
5
|
+
<!-- Generated by `codev init` / `codev update` from the hot files
|
|
6
|
+
(codev/resources/{arch,lessons}-critical.md). Do not edit here — edit the hot
|
|
7
|
+
files. The @import lines below are expanded into context at session launch. -->
|
|
8
|
+
|
|
9
|
+
# Always-On Engineering Context (hot tier)
|
|
10
|
+
|
|
11
|
+
Curated, always-on guidance — consult before deciding. Use each "consult when…"
|
|
12
|
+
map to open the full arch.md / lessons-learned.md when relevant.
|
|
13
|
+
|
|
14
|
+
@codev/resources/arch-critical.md
|
|
15
|
+
@codev/resources/lessons-critical.md
|
|
16
|
+
|
|
17
|
+
<!-- END CODEV HOT CONTEXT -->
|
|
18
|
+
|
|
3
19
|
> **Note**: This file follows the [AGENTS.md standard](https://agents.md/) for cross-tool compatibility with Cursor, GitHub Copilot, and other AI coding assistants. A Claude Code-specific version is maintained in `CLAUDE.md`.
|
|
4
20
|
|
|
5
21
|
## Project Overview
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# {{PROJECT_NAME}} - Claude Code Instructions
|
|
2
2
|
|
|
3
|
+
<!-- BEGIN CODEV HOT CONTEXT (generated — do not edit) -->
|
|
4
|
+
|
|
5
|
+
<!-- Generated by `codev init` / `codev update` from the hot files
|
|
6
|
+
(codev/resources/{arch,lessons}-critical.md). Do not edit here — edit the hot
|
|
7
|
+
files. The @import lines below are expanded into context at session launch. -->
|
|
8
|
+
|
|
9
|
+
# Always-On Engineering Context (hot tier)
|
|
10
|
+
|
|
11
|
+
Curated, always-on guidance — consult before deciding. Use each "consult when…"
|
|
12
|
+
map to open the full arch.md / lessons-learned.md when relevant.
|
|
13
|
+
|
|
14
|
+
@codev/resources/arch-critical.md
|
|
15
|
+
@codev/resources/lessons-critical.md
|
|
16
|
+
|
|
17
|
+
<!-- END CODEV HOT CONTEXT -->
|
|
18
|
+
|
|
3
19
|
## Project Overview
|
|
4
20
|
|
|
5
21
|
This project uses **Codev** for AI-assisted development.
|