Imported from metyatech/ghws (
AGENTS.md). Install upstream withnpx skills add metyatech/ghws. Copyright stays with the author.
Tool Rules (compose-agentsmd)
compose-agentsmdintentionally regeneratesAGENTS.md; any resultingAGENTS.mddiff is expected and must not be treated as an unexpected external change.- If
compose-agentsmdis not available, run it vianpx compose-agentsmd. Ifnpxis unavailable or cannot fetch the package, install it via npm with an environment-appropriate method such asnpm install -g compose-agentsmdwhen global installs are permitted, or a user-local npm prefix when global installs are not permitted. - To update shared/global rules, use
compose-agentsmd edit-rulesto locate the writable rules workspace, make changes only in that workspace, then runcompose-agentsmd apply-rules(do not manually clone or edit the rules source repo outside this workflow). - If you find an existing clone of the rules source repo elsewhere, do not assume it is the correct rules workspace; always treat
compose-agentsmd edit-rulesoutput as the source of truth. compose-agentsmd apply-rulespushes each GitHub source workspace when its workspace is clean, then regenerates instruction files with refreshed rules.- Do not edit
AGENTS.mddirectly; update the source rules and regenerate. tools/tool-rules.mdis the shared rule source for all repositories that use compose-agentsmd.- Before applying any rule updates, present the planned changes first with an ANSI-colored diff-style preview, ask for explicit approval, then make the edits.
- These tool rules live in tools/tool-rules.md in the compose-agentsmd repository; do not duplicate them in other rule modules.
Source: github:metyatech/agent-rules@HEAD/rules/domains/workspace/ghws-workspace.md
GHWS Workspace Management
- Apply these rules only when the repository path is under the
ghwsworkspace root. - All folders in the
ghwsworkspace, except rules-local folders, are Git repositories connected to GitHub. - Some repositories are not owned by the user, but the user can commit and push to them.
- If the target repository already exists under the current
ghwsworkspace, edit it in place. - If the target repository is not present under the current
ghwsworkspace, clone it from GitHub with--recursiveand then work in the cloned folder. - When adding a new repository, create it under the
ghwsworkspace first and then push it to GitHub. - For account-wide requests, treat all user-owned repositories as in scope.
- Repository creation, splitting, and deletion are allowed only when the user explicitly requests or approves them.
- Never clone repositories that are not managed by the user into the
ghwsworkspace. - Repository-local OpenCode workflows MUST live in
.opencode/commands/. - The canonical verification command MUST be the same command used for local validation before delivery.
- When no canonical verification command is configured, stop and report the missing bootstrap requirement instead of inventing a partial substitute.
- Bug fixes MUST add or strengthen a regression check before concluding.
- Irreversible operations such as destructive deletion, publish, release, force-push, or external side effects MUST remain approval-gated.