This repository provides a reusable OpenCode workspace that consuming git
repositories mount as a .opencode submodule. It gives an LLM coding agent a
shared set of rules, commands, skills, helper scripts, and OpenCode runtime
configuration while leaving project-specific behavior in the consuming repo.
opencode.jsonloads every Markdown file directly under.opencode/rules/through the.opencode/rules/*.mdinstruction glob, plus MCP servers and filesystem permissions expected by OpenCode. This release README remains reference documentation and is not itself loaded as a global instruction.opencode.jsoncan load a repository-rootINDEX.mdowned by the consuming repository; the shared.opencodesubmodule does not ship that file. Keep project-specific index content outside.opencode/.opencode.jsonsetswebsearch: false, disabling OpenCode's built-in web search tool by default in every consuming workspace that loads this kit.rules/contains durable agent rules for command execution, commits, tests, documentation, task workflow, scripting, and related engineering practices.commands/contains reusable slash-command workflows such as/save,/commit,/learn,/git-sync,/rebase,/task,/update-index,/update-documentation,/verify-documentation, and/update-submodules.skills/contains targeted reusable workflows, currentlycommit-message-guard.ai-scripts/contains helper scripts used by the commands and skills, such ascommit-message-guard.sh.playwright-mcp.jsoncontains shared browser launch settings used by theplaywrightMCP server inopencode.json.LICENSEcarries the Zero-Clause BSD terms for Codegeist-owned material in this distribution.
The generated release branch is intentionally minimal. During release copy,
this source file is renamed from README_release.md to README.md. The release
branch should contain only runtime files needed by consuming repositories:
.gitignore, LICENSE, README.md, opencode.json, playwright-mcp.json,
ai-scripts/, commands/, rules/, and skills/.
- Disabled OpenCode's built-in web search in the shared
opencode.jsonwithwebsearch: false, so agent sessions no longer receive that tool by default. - Consumer action: update
.opencodeand run/reloadin OpenCode to load the shared setting. /task spec,impl, andcancelnow maintain a project-owneddocs/tasks/OVERVIEW.mdwith open tasks, short summaries, dependencies, and blockers, including nested tasks and blocked outcomes. Task files remain the source of truth;/task backlogdoes not update the overview.- Consumer action: update
.opencodeand restart OpenCode. The next task change creates or refreshes the overview locally; existing tasks withoutBlockersremain valid and missing details are shown asNot recorded. No bulk task migration is required; the project overview is not shipped in this bundle. - Removed the redundant
fetchMCP server. Use OpenCode's built-inwebfetchtool for webpage retrieval. Consumer action: update.opencodeand restart OpenCode; no configuration migration is required unless a local overlay independently configures the removed server. - Source contributors may work directly on source
mainor use an optional topic branch. Agents stay on the current source branch and create a new branch only on explicit user request. No consumer configuration change is required. - Added an explicit OpenCode read denial and watcher exclusion for
.codegeist/secrets.env, the optional devcontainer secret environment file. Consumer action: update.opencodeand restart OpenCode; no file migration is required. - Replaced individual shared-rule instruction entries with
.opencode/rules/*.md. All Markdown files directly inrules/now load, includingbash-scripts.md,semver.md, and therules/README.mdinventory. New shared rules no longer need individual config entries. - Consumer action: update
.opencodeand restart OpenCode to load the rule glob. The repository-rootINDEX.mdremains a separate instruction. No configuration migration is required; keep newly added shared rules directly underrules/. - Added a hard commit-authorization gate: agents may create commits in a
non-disposable repository only when the current user request invokes
/commit,/git-commit, or/save, or otherwise explicitly requests a commit. Implementation, task completion, submodule updates, push requests, and dirty worktrees do not imply authorization. - Direct
/saveinvocation is itself authorization for its documented commit, shared-submodule synchronization, rebase, and push workflow. Agents must not ask for a redundant commit confirmation after the command is invoked. - Direct invocation of this source repository's
/release-buildworkflow is itself authorization for the generated release commit and push plus the subsequent full/saveworkflow. Maintainers are not asked for another confirmation after starting that command. - Consolidated commit behavior into
command-execution.mdfor authorization andcommit.mdfor content and message requirements. Removed the redundantcommit-conventions.mdinstruction. A plain commit request now uses local-only/commit;/savestill requires its full commit, rebase, and push workflow to be explicit. - Reduced the globally loaded task workflow to stable invariants and kept the
detailed mirror, approval, linkage, and completion procedure in
/task, avoiding two active copies of the same operational contract. - Removed
.opencode/README.mdfrom theopencode.jsoninstruction list. The release README remains available as reference documentation without injecting its maintenance and publication examples into every agent task. - Changed
/task backlogto leave its focused backlog edit uncommitted and unpushed./add-agent-kitnow prepares and tests changes, then requires explicit authorization before source and release commits or pushes. - Consumer action: update
.opencodeand restart OpenCode so the shared instructions and commit gate take effect. Explicitly invoke/commitor/savewhen Git history should be written. Repo-local overlays that directly reference the removed.opencode/rules/commit-conventions.mdfile must switch to.opencode/rules/commit.md; otherwise no repository migration is required. - Added explicit OpenCode read denials and watcher exclusions for
.codegeist/.local.envand.codegeist/secrets/. The secret directory itself is also denied so OpenCode cannot list it through the read tool. - Consumer action: update
.opencodeand restart OpenCode so the new read permissions take effect. No file migration is required. - Update notes for coding agents: treat both paths as unavailable and do not try alternate tools to expose their contents. These rules govern OpenCode's read tool and watcher; operating-system access by separately authorized shell commands remains a separate security boundary.
- Removed the shared
docs/index.htmldeveloper-map convention and the automatic documentation refresh from/save./update-documentationand/verify-documentationremain available for general repository documentation. - Consumer action: updating
.opencodestops creating or maintaining a developer map. Existing project-owneddocs/index.htmlfiles are not part of the submodule and must be retained or removed by the consuming repository. - Added a shared temporary-storage rule for consuming repositories. New
disposable artifacts belong under the workspace
.tmp/link when available, or another operating-system temporary directory outside the repository; persistent non-test secrets belong under ignored.codegeist/secrets/. - Consumer action: devcontainer-kit workspaces create
.tmpand.codegeist/secrets/automatically after their runtime kit is updated. Other consumers should provide equivalent ignored paths when they adopt this convention. Existing temporary and secret paths are not migrated. - Made GitHub Issue tracking optional for
/task. New top-level and child tasks default toPublic Tracking: not requested, retain a random immutable Tracking Key, and can be specified, implemented, verified, and markedsolvedwithout GitHub access. A later/task specinvocation can request public tracking. - Prevented
/taskfrom inspecting project eligibility, GitHub mirrors, Tea,GH_TOKEN, or runningghfor an unlinked task unless the user explicitly requests public tracking. A full Issue URL still activates the binding linked Issue workflow. - Kept public-tracking selection separate from remote mutation approval. A new
Issue still requires explicit single-use approval of the exact repository,
title, and complete body preview. Declining or deferring creation records
Public Tracking: not requested (user declined GitHub Issue creation), restores the intended local status, and leaves implementation available. - Allowed existing unlinked tasks with pending Issue approval to proceed locally when the user explicitly chooses implementation without an Issue. A pending value alone no longer authorizes mirror discovery or GitHub access; other pending states remain blocked until uncertain remote results are reconciled.
- Kept the optional Tea
v0.12.0push-mirror discovery fallback for active public-tracking requests in eligible repositories without a mirror declaration or GitHub root remote. Unknown or inaccessible results block that request until the repository declaresGitHub Mirror: <URL|none>; Tea runs withoutGH_TOKENand never starts login setup or exposes the raw source-forge response. - Kept each local task file authoritative for scope, acceptance criteria, status,
files, and verification. A linked Issue contains only the Goal, canonical task
path, and source-of-truth notice.
/taskdoes not synchronize labels, projects, readiness, cancellation, or intermediate statuses. It closes a validated linked Issue as completed before persisting local statussolved; a task whose public tracking is inactive becomessolvedafter local verification. - Preserved existing Issue URLs across later eligibility and no-mirror results, preventing a linked task from bypassing completion closure. Existing Issues that are unmarked or incomplete require an approved linkage edit, newly supplied exact cross-author links require approval before storage, and pull requests are rejected.
- Consumer action: update
.opencodeand restart OpenCode to load the optional workflow. No OpenCode configuration or bulk task-file migration is required. Existing full Issue URLs remain binding. For an unlinked task pending Issue-creation approval, explicitly choose whether to resume public tracking or continue locally; other pending states require reconciliation. DeclareGitHub Mirror: <URL|none>only when public tracking is used and contributors cannot inspect configured push mirrors. - Update notes for coding agents: preserve every task's immutable Tracking Key,
do not access GitHub for unrequested tracking, do not create or edit Issues
without the applicable exact-preview approval, and never mark a linked task
solvedbefore completed closure is verified. - Replaced interactive GitHub CLI authentication with the
GH_TOKENenvironment variable and removed the sharedgh-authskill. Shared workflows no longer usegh auth login,gh auth status, stored GitHub CLI credentials, or any token environment variable other thanGH_TOKEN, and everyghinvocation forcesGH_HOST=github.com. - Consumer action: provide a valid
GH_TOKENto the OpenCode process before any workflow that runsgh, then restart OpenCode after updating.opencodeor changing its environment. The token needs repository metadata read access and permissions for the requested GitHub mutation; never commit it to the repo. - Removed the shared
/memory-bankand/update-chatcommands together with thechat.mdandmemory-bank.mdinstructions. Shared workflows no longer read or updatedocs/memory-bank/chat.md;/learncontinues to capture durable guidance in rule files. - Consumer action: after updating
.opencode, restart OpenCode so the removed instructions and commands leave the active configuration. Consumer-owned files underdocs/memory-bank/are not part of the submodule update and can be removed separately when no repo-local workflow still uses them. - Changed
/task implto record successfully verified work assolvedinstead ofimplemented, aligning generated task updates with the documented local task lifecycle. - Added the canonical
0BSDLICENSEto generated release bundles so the distributed Codegeist-owned runtime content carries its license. No consumer action is required beyond receiving a future submodule update. - Removed the shared
repomixMCP server while keeping the Repomix CLI available as a standalone analysis tool. - Consumer action: after updating
.opencode, restart OpenCode. Workflows that relied on Repomix MCP tools must use the CLI or a repo-local MCP configuration; standalone Repomix CLI usage is unchanged. - Expanded AI-ready source guidance so non-trivial modules, classes, functions, and blocks carry contract-level comments or docstrings and may link to focused repo-owned Markdown documentation for deeper context.
- Added operation-boundary logging guidance for scripts and source code, with stable structured events, separate diagnostic and payload streams, and explicit requirements for output evaluated by LLMs or automation.
- Consumer action: after updating
.opencode, restart OpenCode so coding agents load the new reviewability rules. No repository migration is required; apply the comment, documentation, and logging contract when creating or changing non-trivial behavior. - Moved Playwright MCP snapshots, console logs, screenshots, and related output
under the workspace-local ignored
.chrome/playwright-mcp/directory instead of creating.playwright-mcp/at the workspace root. - Removed the Graphify OpenCode plugin, instruction, and skill from the shared runtime bundle.
- Consumer action: after updating
.opencode, restart OpenCode. Consumers that relied on Graphify must move that behavior to a repo-local overlay or external tool; consumers that did not use Graphify require no migration. - Explicitly pass Playwright MCP's
--sandboxCLI override in addition to the browser launch option so current@playwright/mcp@latestreleases no longer add the unsupported--no-sandboxChrome argument during config merging. - Clarified
/savebranch behavior: when a local base branch is resolved, the workflow refreshes that local base branch from its configured upstream before using it as a rebase base. Base-branch saves can then push the base branch with a normal non-force push. - Clarified
/savefeature-branch behavior: the current branch is rebased over its own upstream when needed, then rebased onto the refreshed local base branch, and only the current branch is pushed. The feature-branch path must not merge, fast-forward, push, or force-push the local base branch. - Kept the narrow
/savesafety rule for rebased feature branches: use--force-with-leaseonly for the current non-base branch after fetching its upstream, and only when a rebase rewrote commits already present upstream. - Added a shared
playwrightMCP server that starts@playwright/mcp@latestthroughnpxand loads.opencode/playwright-mcp.jsonfor browser launch settings. - Added
.opencode/playwright-mcp.jsonto start visible Chrome through the/usr/local/bin/chromelauncher and suppress Playwright's unsupported--disable-blink-features=AutomationControlleddefault argument when the installed Chrome build warns about it. - Configured the shared Playwright MCP server with
PLAYWRIGHT_MCP_USER_DATA_DIR=.chromeso it uses the consuming repository's workspace-local ignored Chrome profile instead of the removed/mnt/codegeist/chrome-cdp-profilemount. - Updated
/add-agent-kitto acceptconfigas a shared upstream target for repo-agnostic OpenCode configuration changes such asopencode.jsonandplaywright-mcp.jsonupdates. - Updated
/add-agent-kitguidance to use a unique user-owned temporary source checkout path created withmktempinstead of the fixed/tmp/opencodepath, which can be root-owned and unwritable in shared devcontainer environments. - Consumer action: no repository migration is required for the new MCP server or
tool-access rule. After updating
.opencode, restart OpenCode so the updatedopencode.json,playwright-mcp.json, andrules/tools.mdare loaded. Playwright browser workflows requirenpxand achromelauncher at/usr/local/bin/chromein the runtime environment. No/mnt/codegeistmount is required; browser profile state is kept under.chrome/in the opened workspace and should stay ignored by Git. - Added
tools.mdto define Bash and system command access for coding agents: built-in OpenCode tools stay preferred for direct file and workflow operations, but agents may use any available Bash command, shell script, Python code, installed CLI, SSH/OpenSSH utility, or task-appropriate system tool without a per-command allowlist. Shell scripts are preferred for command orchestration when they fit, while Python is appropriate when it better matches the problem. - Update notes for coding agents: check for already-installed tools before
rebuilding equivalent logic; inside a devcontainer, missing packages may be
installed with
apt-getwithout asking first, while package installation outside a devcontainer requires user approval. - Added tool guidance for disposable test repositories and GitHub work: agents
may freely manipulate repositories or sandboxes created for the current test,
and may run task-scoped
gitandghcommands without asking merely because they touch Git or GitHub; direct GitHub state changes still require narrow task scope and careful target inspection. - Added the directory index pattern: agent-owned
INDEX.mdfiles can now be used as compact navigation maps for large directories, with rules for when to create, read, and refresh them. - Added
/update-indexto create or refresh a directoryINDEX.mdwith local search hints, key files, workflows, and update triggers. - Added support for a repository-root
INDEX.mdinstruction so consuming repositories can keep their agent navigation index outside the.opencodesubmodule. - Update notes for coding agents: use the uppercase filename
INDEX.mdfor this pattern, link related directory indexes when useful, and keep the root repositoryINDEX.mdlist current whenever directory indexes are added, moved, or removed. - Consumer action: keep any project-specific root index at
INDEX.mdin the consuming repository root, not inside.opencode/. After updating.opencode, restart OpenCode so the newINDEX.mdanddirectory-index.mdinstructions are loaded by the running agent session. - Release safety: the generated
.opencoderelease intentionally excludesINDEX.md. Do not add.opencode/INDEX.md;opencode.jsonshould keep the instruction path asINDEX.mdso it resolves to the consuming repository root. - Hardened the shared rules,
/update-index, release docs, and release smoke test so future changes keepINDEX.mdout of the generated.opencodesubmodule while still loading a consumer-owned repository-rootINDEX.md. - Replaced the separate task phase commands with one
/taskworkflow centered on repeatablespecandimplactions, with focusedcancelandbacklogactions for the remaining lifecycle operations. - Update notes for coding agents: use
/task spec "<title/context>"to create and collaboratively specify a focused task, then use/task impl <task-ref> [instructions]to implement it. If implementation finds missing specification, clarify with the user and update the same task before editing runtime files. - Added a
## Changelogsection to the released.opencode/README.mdso consumer-visible changes and upgrade notes are shipped with each release. - Removed the source-repository-only
.oc_local/rules/project-release-source.mdinstruction from the releasedopencode.json; release configuration now references only files expected to exist in consuming repositories. - Added local source-repo guidance for maintaining
README_release.mdand made the local release-build workflow require a changelog review before publishing. - Update notes for coding agents: before running the local release-build command, inspect the release-bundle diff, update this changelog with consumer-visible changes, and include migration notes when consuming projects need adjustments.
- Consumer action: after updating
.opencode, no project changes are required unless a consuming repository copied the removed.oc_localinstruction into its own OpenCode configuration; remove that local reference if present.
Add this repository as the .opencode submodule from its generated release
branch:
git submodule add -b release https://github.com/codegeist-ai/codegeist-agent-kit.git .opencode
git submodule update --init --recursiveAfter adding or updating the submodule, report the parent repository gitlink
change. Commit it together with the matching .gitmodules change only when the
current user request explicitly authorizes a commit.
Refresh the submodule to the latest configured release branch commit:
git submodule update --remote .opencode
git status --shortIf the parent repo also uses .devcontainer from the shared workspace family,
prefer the shared command when available:
/update-submodules
The command updates only .opencode and .devcontainer to the branches
configured in .gitmodules, verifies clean submodule states, and reports any
parent gitlink changes that need to be committed.
OpenCode should see this submodule at exactly .opencode/ in the consuming repo
root. The instruction paths in opencode.json intentionally use
.opencode/... prefixes and should not be rewritten to absolute paths.
Project-specific behavior belongs outside this shared submodule, typically in:
.oc_local/commands/*.md.oc_local/rules/*.md.oc_local/skills/*/SKILL.md- repo-owned docs such as
docs/tasks/
Do not add product-specific deployment steps, architecture assumptions, branch
names, or planning rules to the shared .opencode submodule unless they are
intended to apply across all consuming repositories.
This checkout is generated distribution content. Propose generic shared
OpenCode behavior in the
codegeist-agent-kit source repository
on source main or an optional topic branch based on it; agents stay on the
current source branch and create a new branch only on explicit user request.
Do not implement it on release or inside a consuming .opencode/ checkout.
Project-specific behavior belongs in
the consuming repository's .oc_local/ overlay.
Use the source repository's
contribution guide,
Issues,
local task guide,
and the Codegeist roadmap.
These links deliberately target source main; contributor docs and local task
specifications are not files in this generated release bundle.
The effective shared policies are the Codegeist
contribution policy,
Code of Conduct,
security policy,
and support guide.
The distributed files are licensed under 0BSD.
The canonical source check is:
task testIt validates a temporary release copy without publishing. Release publication is maintainer-only after source review and explicit authorization for its commits and pushes.
A consuming repository can ask its coding agent to add reusable shared behavior
to this agent kit instead of only creating local .oc_local/ overlays. The
intended command shape is:
/add-agent-kit command|rule|skill|config <description of the shared behavior>
/add-agent-kit move <explicit .oc_local command, rule, or skill path>
This is an upstream change workflow. Do not edit .opencode/ directly as the
implementation path; it is the generated release branch of
codegeist-agent-kit, mounted as a submodule. Shared changes belong in a source
checkout of https://github.com/codegeist-ai/codegeist-agent-kit.git on main.
README_release.md is the source file that becomes .opencode/README.md in
consuming repositories.
The agent may prepare and verify the upstream source change autonomously. Commit and publication steps require a separate explicit authorization in the current user request:
- Inspect the consuming repository state and verify that
.opencodeexists, is a Git submodule, and is configured to track thereleasebranch in.gitmodules. - Clone
https://github.com/codegeist-ai/codegeist-agent-kit.gitinto an explicit user-owned temporary directory outside the consuming repository, unless the user or local workflow provides a trusted source checkout. Prefer a unique directory created withmktemp -d "${TMPDIR:-/tmp}/opencode-agent-kit.XXXXXX"; do not rely on a fixed/tmp/opencodepath because shared environments may create it as root-owned and unwritable to the workspace user. - Implement the requested shared
command,rule,skill, orconfigin the source paths of that temporary checkout:commands/,rules/,skills/,ai-scripts/,opencode.json,playwright-mcp.json, andREADME_release.mdas applicable. Formove, start only from the explicitly selected.oc_local/commands/,.oc_local/rules/, or.oc_local/skills/overlays and rewrite them into repo-agnostic shared form before adding them upstream. Do not move whole.oc_local/directories or infer extra files that the user did not select. - Continue only when the change is generic across repositories with unrelated domains, products, architectures, and deployment models. Shared additions must not encode product-specific services, customer workflows, environment names, domain assumptions, branch policies, or repository layouts beyond the shared OpenCode workspace contract.
- If the behavior is specific to the current consuming repository, stop the upstream workflow and create or update a local overlay in the consuming repository instead. If generic applicability is unclear, ask one short clarification question before editing the source checkout.
- For
move, remove only the selected original.oc_local/overlays after the upstream source change is committed, the release branch is built,.opencodeis updated to the new release, and each replacement shared file is verified in the updated submodule. Leave all unselected local overlays in place. - Run the source repository verification, starting with
task test, and fix failures before continuing. - Before creating or publishing any commit, require the current user request to
authorize the source commit and push plus the generated release commit and
push. An
/add-agent-kitrequest alone does not grant commit authorization; ask one focused confirmation question and stop before the first commit when authorization is missing. - Commit the source repository change with a focused Conventional Commit message, then push the source branch when the remote is configured and the authenticated session has permission.
- Run
task release-buildin the source repository. This creates and pushes a normal commit on the generatedreleasebranch with only the runtime files that consuming repositories mount as.opencode, preserving release history so the copied changes remain reviewable. - Return to the consuming repository and update only the
.opencodesubmodule to the neworigin/releasecommit, using the same safety checks as/update-submodules: fetch the configured branch, rungit checkout -B release origin/releaseinside.opencode, verify thatHEADmatchesorigin/release, and verify that the submodule status is clean. - Report the new
.opencodecommit and the parent repository gitlink change. If the user requested a full save workflow, commit the parent gitlink update in the consuming repository through/saveor the repo's equivalent commit workflow.
Only use direct edits inside .opencode/ for temporary inspection or debugging;
do not leave them as the implementation path. The agent must not update
unrelated submodules, delete local files inside the consumer checkout, or commit
unrelated parent-repo changes as part of this workflow.
When working inside a consuming repository that uses this submodule:
- Read relevant shared rules under
.opencode/rules/and any local overlays under.oc_local/rules/. - Inspect the affected repository files directly before making assumptions.
- Prefer repo-local commands and overlays when they define a more specific workflow than the shared default.
- Treat
.opencodeas a submodule gitlink, not as ordinary parent-repo files.
/savelearns durable guidance, updates shared submodules, commits, rebases, and pushes the intended branch. On the local base branch it may push that base branch; on a feature branch it updates the base branch from upstream first, then pushes only the current branch. Invoking/saveauthorizes those documented side effects without another commit confirmation./commitcreates one local commit from the intended coherent change set and leaves unrelated files and unrequested pushes untouched./git-syncsynchronizes the current branch and local base branch without creating a commit./rebaserebases the current branch onto the local base branch./learncaptures durable workflow guidance in rule files./session-titlecreates a short session title from the current branch and recent result./taskmanages authoritative task files underdocs/tasks/withspec,impl,cancel, andbacklog. Tasks default to no public tracking and can be completed locally. When a user requests public tracking, one concise Issue can be created throughGH_TOKENonly after exact-preview approval. Verified implementation closes and confirms any linked Issue before the task becomessolved; backlog entries remain uncommitted local edits and do not use Issues./update-documentationrefreshes documentation affected by recent changes./verify-documentationaudits documentation and reports stale or broken references without editing them./update-indexcreates or refreshes an agent-owned directoryINDEX.mdfor local navigation and search hints./add-agent-kitadds reusable shared commands, rules, or skills upstream, or moves generic.oc_local/overlays into the shared agent kit, then builds a new release and updates the consuming repo's.opencodesubmodule.
Prefer these commands over reimplementing their documentation, shell, and git logic in chat, especially for documentation refreshes, commits, saves, submodule updates, and base-branch sync. This preference never authorizes a commit-producing command; the current user request must still pass the explicit commit gate.
- Treat
.opencode/rules/command-execution.mdas the canonical commit authorization policy and.opencode/rules/commit.mdas the canonical commit content and message policy./commitis local-only unless the current request separately asks for a push;/saveowns the explicit commit, rebase, and push workflow. - Use
.opencode/ai-scripts/commit-message-guard.shor thecommit-message-guardskill when creating commits through the shared workflow. - Keep commit subject and body as separate inputs and use real line breaks in
commit bodies. Do not pass literal
\nescape sequences. - Never commit secrets, unrelated files, or generated noise.
- Never use destructive git commands such as
git reset --hardunless the user explicitly asks for that exact action. - Do not amend commits unless the user explicitly requests it and the active safety rules allow it.
- When an explicitly authorized commit includes an intentional submodule change,
commit the submodule content on the intended branch before the parent gitlink
update. Synchronize or push the submodule only when the current request also
authorizes that operation or invokes
/save.
Every GitHub CLI workflow requires GH_TOKEN in the OpenCode process
environment. Check its presence and validity without printing it, and disable
interactive prompts:
test -n "${GH_TOKEN:-}" && \
GH_HOST=github.com GH_PROMPT_DISABLED=1 gh api user >/dev/nullGH_TOKEN is the only supported token environment variable. Do not use stored
GitHub CLI credentials, gh auth login, or a browser flow. Do not ask the user
to paste the token into chat or print, inspect, or persist its value. If
GH_TOKEN is missing or invalid, stop the GitHub operation and report the
non-secret failure.
- Keep durable repo-owned docs and comments in English. User conversations may use the user's preferred language, but committed project text stays English.
- Update docs in the same task when behavior changes.
- Use
/learnfor reusable guidance that should become a durable rule. - Prefer updating an existing rule over adding broad or duplicative guidance.
The source repository contains development-only files that are not part of the
release submodule. Maintainers and coding agents must make shared-kit changes in
the source repository on main, never directly in a consuming repository's
.opencode/ submodule checkout. Use the Taskfile instead of hand-building the
release branch.
Run the release smoke test:
task testWith explicit user authorization for the release commit and push, build and push the generated release branch:
task release-buildThe release-build task creates a temporary worktree, copies only the release
runtime paths, commits them on the release branch, updates the local release
ref, and pushes it without rewriting existing release history. The first release
for a new remote is bootstrapped as an orphan; later releases are normal commits
so maintainers can inspect which runtime changes were published. The working
branch and dirty worktree are left untouched except for the temporary release
worktree cleanup.
When using this repo's local release workflow, prefer
.oc_local/commands/release-build.md; it runs task release-build and then
delegates the single shared-submodule refresh plus final commit, rebase, and sync
work to /save. Invoking /release-build authorizes these documented side
effects without another confirmation.
- If OpenCode does not load shared rules, confirm the submodule path is exactly
.opencode/andopencode.jsonis present at.opencode/opencode.json. - If a shared command seems too generic, check for a consuming-repo overlay under
.oc_local/commands/before changing the shared command. - If submodule updates show a dirty parent repo, report the intentional gitlink update. Commit it only when the current user request explicitly authorizes a commit.
- If a release bundle is missing files, run
task testin this repository and inspectTaskfile.ymlRELEASE_PATHS, theREADME_release.mdtoREADME.mdrename step, andtests/release-copy.sh.