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
Copy file name to clipboardExpand all lines: AGENTS.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ Only proceed with the commit if it passes. If it fails, fix the issues first.
10
10
11
11
`just pre-commit` intentionally runs generation and formatting steps that may modify files you did not edit directly (including markdown). Treat these diffs as expected outputs of the check pipeline.
12
12
13
+
`just pre-commit` also runs `just check-opencode-guardrails-autofix`, which may auto-sync fork-boundary manifest drift in `packages/opencode/docs/upstream-sync/fork-boundary-manifest.json` when drift is the only issue.
14
+
13
15
If those diffs are mechanical (generation/format/lint output only), they should be committed with the related change. Do not treat them as noise and do not leave them uncommitted.
14
16
15
17
Common expected examples (non-exhaustive):
@@ -79,7 +81,7 @@ Setup reference:
79
81
This repo uses git hooks (wired via `git config core.hooksPath .githooks`, set up by `just setup`):
80
82
81
83
-**pre-commit** — Syncs README to npm packages, guards against unpublished submodule pins, runs cfn-lint on CloudFormation changes.
82
-
-**pre-push** — Validates the opencode submodule commit is published.
84
+
-**pre-push** — Validates the opencode submodule commit is published. When outgoing commits update the `packages/opencode` gitlink, it also runs strict opencode guardrails (`just check-opencode-guardrails`) before push.
83
85
-**post-merge** — After every `git pull`, automatically syncs the submodule and runs `bun install`. No manual action needed.
84
86
85
87
## README Badge Sync
@@ -159,6 +161,16 @@ The submodule should always be detached at the superproject-pinned commit. If `g
159
161
git submodule update --recursive
160
162
```
161
163
164
+
### Fork Boundary Checks in Detached Submodules
165
+
166
+
`packages/opencode/script/check-fork-boundary.ts` and `packages/opencode/script/sync-fork-boundary-manifest.ts` resolve target refs as:
This branch-or-HEAD behavior prevents false passes from stale local `dev` refs in detached submodule states.
173
+
162
174
### Fixing stale `core.worktree` errors
163
175
164
176
If you see errors like "cannot be used without a working tree" or submodule commands fail mysteriously, the submodule's `core.worktree` config is pointing to a wrong or deleted worktree path. Fix from the affected worktree:
Copy file name to clipboardExpand all lines: CLAUDE.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@ Only proceed with the commit if it passes. If it fails, fix the issues first.
10
10
11
11
`just pre-commit` intentionally runs generation and formatting steps that may modify files you did not edit directly (including markdown). Treat these diffs as expected outputs of the check pipeline.
12
12
13
+
`just pre-commit` also runs `just check-opencode-guardrails-autofix`, which may auto-sync fork-boundary manifest drift in `packages/opencode/docs/upstream-sync/fork-boundary-manifest.json` when drift is the only issue.
14
+
13
15
If those diffs are mechanical (generation/format/lint output only), they should be committed with the related change. Do not treat them as noise and do not leave them uncommitted.
14
16
15
17
Common expected examples (non-exhaustive):
@@ -79,7 +81,7 @@ Setup reference:
79
81
This repo uses git hooks (wired via `git config core.hooksPath .githooks`, set up by `just setup`):
80
82
81
83
-**pre-commit** — Syncs README to npm packages, guards against unpublished submodule pins, runs cfn-lint on CloudFormation changes.
82
-
-**pre-push** — Validates the opencode submodule commit is published.
84
+
-**pre-push** — Validates the opencode submodule commit is published. When outgoing commits update the `packages/opencode` gitlink, it also runs strict opencode guardrails (`just check-opencode-guardrails`) before push.
83
85
-**post-merge** — After every `git pull`, automatically syncs the submodule and runs `bun install`. No manual action needed.
84
86
85
87
## README Badge Sync
@@ -159,6 +161,16 @@ The submodule should always be detached at the superproject-pinned commit. If `g
159
161
git submodule update --recursive
160
162
```
161
163
164
+
### Fork Boundary Checks in Detached Submodules
165
+
166
+
`packages/opencode/script/check-fork-boundary.ts` and `packages/opencode/script/sync-fork-boundary-manifest.ts` resolve target refs as:
This branch-or-HEAD behavior prevents false passes from stale local `dev` refs in detached submodule states.
173
+
162
174
### Fixing stale `core.worktree` errors
163
175
164
176
If you see errors like "cannot be used without a working tree" or submodule commands fail mysteriously, the submodule's `core.worktree` config is pointing to a wrong or deleted worktree path. Fix from the affected worktree:
0 commit comments