@toolu/opencode 6.8.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/generated/GENERATED-NOTES.md +16 -0
- package/generated/agents/toolu--architect.md +52 -0
- package/generated/agents/toolu--deep-explore.md +65 -0
- package/generated/agents/toolu--implementer.md +50 -0
- package/generated/agents/toolu--quick-task.md +54 -0
- package/generated/agents/toolu--research-agent.md +101 -0
- package/generated/commands/toolu--commit.md +8 -0
- package/generated/commands/toolu--review-and-commit.md +8 -0
- package/generated/opencode.toolu.json +116 -0
- package/generated/skills/toolu--brainstorm/SKILL.md +57 -0
- package/generated/skills/toolu--brainstorm/references/design-questions.md +36 -0
- package/generated/skills/toolu--commit--skill/SKILL.md +11 -0
- package/generated/skills/toolu--debug/SKILL.md +54 -0
- package/generated/skills/toolu--deep-research/SKILL.md +51 -0
- package/generated/skills/toolu--execution/SKILL.md +77 -0
- package/generated/skills/toolu--orchestrator/SKILL.md +145 -0
- package/generated/skills/toolu--orchestrator/references/delegation-cost.md +104 -0
- package/generated/skills/toolu--orchestrator/references/model-routing.md +112 -0
- package/generated/skills/toolu--plan/SKILL.md +56 -0
- package/generated/skills/toolu--plan/references/ledger.md +18 -0
- package/generated/skills/toolu--plan-review/SKILL.md +48 -0
- package/generated/skills/toolu--review-and-commit--skill/SKILL.md +10 -0
- package/generated/skills/toolu--setup/SKILL.md +24 -0
- package/generated/skills/toolu--setup/scripts/setup.sh +206 -0
- package/generated/skills/toolu--spec/SKILL.md +67 -0
- package/generated/skills/toolu--spec-review/SKILL.md +50 -0
- package/generated/skills/toolu--test/SKILL.md +49 -0
- package/package.json +51 -0
- package/plugins/agent-browser/.claude-plugin/plugin.json +18 -0
- package/plugins/agent-browser/.codex-plugin/plugin.json +7 -0
- package/plugins/agent-browser/README.md +18 -0
- package/plugins/agent-browser/hooks/hooks.json +15 -0
- package/plugins/agent-browser/hooks/session-start.sh +42 -0
- package/plugins/agent-browser/skills/agent-browser/SKILL.md +77 -0
- package/plugins/agent-browser/skills/agent-browser/scripts/agent-browser.sh +80 -0
- package/plugins/ast-grep/.claude-plugin/plugin.json +18 -0
- package/plugins/ast-grep/.codex-plugin/plugin.json +7 -0
- package/plugins/ast-grep/README.md +21 -0
- package/plugins/ast-grep/hooks/hooks.json +15 -0
- package/plugins/ast-grep/hooks/post-tools.d/byte-savings.sh +67 -0
- package/plugins/ast-grep/hooks/pre-tools.d/search-nudge.sh +170 -0
- package/plugins/ast-grep/hooks/register.sh +68 -0
- package/plugins/ast-grep/scripts/byte-savings-report.sh +28 -0
- package/plugins/ast-grep/skills/ast-grep/SKILL.md +127 -0
- package/plugins/ast-grep/skills/ast-grep/references/ast-grep-advanced.md +44 -0
- package/plugins/ast-grep/skills/ast-grep/scripts/ast-grep.sh +103 -0
- package/plugins/context7/.claude-plugin/plugin.json +18 -0
- package/plugins/context7/.codex-plugin/plugin.json +7 -0
- package/plugins/context7/README.md +19 -0
- package/plugins/context7/hooks/hooks.json +15 -0
- package/plugins/context7/hooks/session-start.sh +42 -0
- package/plugins/context7/skills/context7/SKILL.md +64 -0
- package/plugins/context7/skills/context7/scripts/search.sh +151 -0
- package/plugins/exa-search/.claude-plugin/plugin.json +18 -0
- package/plugins/exa-search/.codex-plugin/plugin.json +7 -0
- package/plugins/exa-search/README.md +19 -0
- package/plugins/exa-search/hooks/hooks.json +15 -0
- package/plugins/exa-search/hooks/session-start.sh +34 -0
- package/plugins/exa-search/skills/exa-search/SKILL.md +91 -0
- package/plugins/exa-search/skills/exa-search/scripts/search.sh +221 -0
- package/plugins/jev/.claude-plugin/plugin.json +19 -0
- package/plugins/jev/.codex-plugin/plugin.json +7 -0
- package/plugins/jev/README.md +61 -0
- package/plugins/jev/hooks/hooks.json +25 -0
- package/plugins/jev/hooks/lib/common.sh +49 -0
- package/plugins/jev/hooks/session-start.sh +45 -0
- package/plugins/jev/hooks/user-prompt-submit.sh +41 -0
- package/plugins/jev/skills/jev/SKILL.md +81 -0
- package/plugins/jev/skills/jev/evals/README.md +98 -0
- package/plugins/jev/skills/jev/references/problem-solving.md +198 -0
- package/plugins/jev/skills/jev/scripts/jev.sh +405 -0
- package/plugins/jira/.claude-plugin/plugin.json +18 -0
- package/plugins/jira/.codex-plugin/plugin.json +7 -0
- package/plugins/jira/README.md +42 -0
- package/plugins/jira/hooks/hooks.json +15 -0
- package/plugins/jira/hooks/session-start.sh +34 -0
- package/plugins/jira/skills/jira/SKILL.md +123 -0
- package/plugins/jira/skills/jira/scripts/jira.sh +70 -0
- package/plugins/jira/skills/jira/scripts/lib/adf.sh +17 -0
- package/plugins/jira/skills/jira/scripts/lib/attachment.sh +94 -0
- package/plugins/jira/skills/jira/scripts/lib/board.sh +58 -0
- package/plugins/jira/skills/jira/scripts/lib/http.sh +184 -0
- package/plugins/jira/skills/jira/scripts/lib/issue.sh +159 -0
- package/plugins/jira/skills/jira/scripts/lib/paginate.sh +45 -0
- package/plugins/jira/skills/jira/scripts/lib/plan-parse.sh +70 -0
- package/plugins/jira/skills/jira/scripts/lib/plan-run.sh +115 -0
- package/plugins/jira/skills/jira/scripts/lib/plan-store.sh +168 -0
- package/plugins/jira/skills/jira/scripts/lib/plan.sh +108 -0
- package/plugins/jira/skills/jira/scripts/lib/project.sh +42 -0
- package/plugins/jira/skills/jira/scripts/lib/raw.sh +15 -0
- package/plugins/jira/skills/jira/scripts/lib/search.sh +41 -0
- package/plugins/jira/skills/jira/scripts/lib/sprint.sh +88 -0
- package/plugins/jira/skills/jira/scripts/lib/user.sh +45 -0
- package/plugins/jira/skills/jira/scripts/lib/worklog.sh +56 -0
- package/plugins/pr-babysit/.claude-plugin/plugin.json +25 -0
- package/plugins/pr-babysit/.codex-plugin/plugin.json +7 -0
- package/plugins/pr-babysit/README.md +38 -0
- package/plugins/pr-babysit/commands/babysit.md +13 -0
- package/plugins/pr-babysit/hooks/check-toolu.sh +20 -0
- package/plugins/pr-babysit/hooks/hooks.json +15 -0
- package/plugins/pr-babysit/scripts/babysit-tick.sh +133 -0
- package/plugins/pr-babysit/scripts/collect-pr.sh +224 -0
- package/plugins/pr-babysit/scripts/lib/common.sh +146 -0
- package/plugins/pr-babysit/scripts/lib/gh.sh +150 -0
- package/plugins/pr-babysit/scripts/lib/lock.sh +84 -0
- package/plugins/pr-babysit/scripts/lib/normalize.sh +98 -0
- package/plugins/pr-babysit/scripts/lib/state.sh +37 -0
- package/plugins/pr-babysit/scripts/parse-verdict.sh +171 -0
- package/plugins/pr-babysit/scripts/record.sh +69 -0
- package/plugins/pr-babysit/scripts/reduce-state.sh +245 -0
- package/plugins/pr-babysit/scripts/reply-thread.sh +90 -0
- package/plugins/pr-babysit/scripts/resolve-thread.sh +71 -0
- package/plugins/pr-babysit/skills/babysit/SKILL.md +31 -0
- package/plugins/pr-babysit/skills/babysit/references/helper.md +209 -0
- package/plugins/pr-babysit/workflows/babysit.md +722 -0
- package/plugins/python-quality/.claude-plugin/plugin.json +24 -0
- package/plugins/python-quality/.codex-plugin/plugin.json +6 -0
- package/plugins/python-quality/README.md +23 -0
- package/plugins/python-quality/hooks/check-toolu.sh +20 -0
- package/plugins/python-quality/hooks/concerns/00-preamble.sh +85 -0
- package/plugins/python-quality/hooks/concerns/10-size-file.sh +6 -0
- package/plugins/python-quality/hooks/concerns/20-tests.sh +37 -0
- package/plugins/python-quality/hooks/concerns/30-suppression.sh +33 -0
- package/plugins/python-quality/hooks/concerns/50-size-fn.sh +49 -0
- package/plugins/python-quality/hooks/concerns/70-no-mocks.sh +76 -0
- package/plugins/python-quality/hooks/concerns/90-docs.sh +52 -0
- package/plugins/python-quality/hooks/concerns/99-finalize.sh +36 -0
- package/plugins/python-quality/hooks/hooks.json +19 -0
- package/plugins/python-quality/hooks/register.sh +65 -0
- package/plugins/rust-quality/.claude-plugin/plugin.json +24 -0
- package/plugins/rust-quality/.codex-plugin/plugin.json +6 -0
- package/plugins/rust-quality/README.md +24 -0
- package/plugins/rust-quality/hooks/check-toolu.sh +20 -0
- package/plugins/rust-quality/hooks/concerns/00-preamble.sh +93 -0
- package/plugins/rust-quality/hooks/concerns/10-size-file.sh +10 -0
- package/plugins/rust-quality/hooks/concerns/20-tests.sh +84 -0
- package/plugins/rust-quality/hooks/concerns/30-suppression.sh +26 -0
- package/plugins/rust-quality/hooks/concerns/40-unsafe.sh +39 -0
- package/plugins/rust-quality/hooks/concerns/50-size-fn.sh +38 -0
- package/plugins/rust-quality/hooks/concerns/55-size-impl.sh +28 -0
- package/plugins/rust-quality/hooks/concerns/60-error-handling.sh +149 -0
- package/plugins/rust-quality/hooks/concerns/70-no-mocks.sh +139 -0
- package/plugins/rust-quality/hooks/concerns/90-docs.sh +32 -0
- package/plugins/rust-quality/hooks/concerns/99-finalize.sh +36 -0
- package/plugins/rust-quality/hooks/hooks.json +19 -0
- package/plugins/rust-quality/hooks/register.sh +65 -0
- package/plugins/statusline/.claude-plugin/plugin.json +19 -0
- package/plugins/statusline/.codex-plugin/plugin.json +7 -0
- package/plugins/statusline/README.md +108 -0
- package/plugins/statusline/commands/setup.md +30 -0
- package/plugins/statusline/hooks/hooks.json +15 -0
- package/plugins/statusline/hooks/session-start.sh +45 -0
- package/plugins/statusline/scripts/collect-status.sh +147 -0
- package/plugins/statusline/scripts/setup.sh +93 -0
- package/plugins/statusline/scripts/status.sh +55 -0
- package/plugins/statusline/skills/status/SKILL.md +13 -0
- package/plugins/statusline/statusline.sh +177 -0
- package/plugins/toolu/.claude-plugin/plugin.json +19 -0
- package/plugins/toolu/.codex-plugin/plugin.json +7 -0
- package/plugins/toolu/README.md +35 -0
- package/plugins/toolu/agents/.gitkeep +0 -0
- package/plugins/toolu/agents/architect.md +52 -0
- package/plugins/toolu/agents/deep-explore.md +65 -0
- package/plugins/toolu/agents/implementer.md +50 -0
- package/plugins/toolu/agents/quick-task.md +54 -0
- package/plugins/toolu/agents/research-agent.md +107 -0
- package/plugins/toolu/assets/agents/architect.toml +9 -0
- package/plugins/toolu/assets/agents/deep-explore.toml +9 -0
- package/plugins/toolu/assets/agents/implementer.toml +9 -0
- package/plugins/toolu/assets/agents/quick-task.toml +9 -0
- package/plugins/toolu/assets/agents/research-agent.toml +9 -0
- package/plugins/toolu/commands/.gitkeep +0 -0
- package/plugins/toolu/commands/commit.md +5 -0
- package/plugins/toolu/commands/review-and-commit.md +5 -0
- package/plugins/toolu/hooks/docs/gates.md +157 -0
- package/plugins/toolu/hooks/docs/model-routing.md +14 -0
- package/plugins/toolu/hooks/docs/post-compaction.md +3 -0
- package/plugins/toolu/hooks/docs/push-review.md +123 -0
- package/plugins/toolu/hooks/docs/session-start-python.md +3 -0
- package/plugins/toolu/hooks/docs/session-start-rust.md +4 -0
- package/plugins/toolu/hooks/docs/session-start-ts.md +3 -0
- package/plugins/toolu/hooks/docs/session-start.md +16 -0
- package/plugins/toolu/hooks/hooks.json +76 -0
- package/plugins/toolu/hooks/lib/config.sh +355 -0
- package/plugins/toolu/hooks/lib/detect.sh +929 -0
- package/plugins/toolu/hooks/lib/diff-sha.sh +32 -0
- package/plugins/toolu/hooks/lib/dispatch.sh +365 -0
- package/plugins/toolu/hooks/lib/docs-sync-config.sh +81 -0
- package/plugins/toolu/hooks/lib/edit-records.sh +157 -0
- package/plugins/toolu/hooks/lib/gate-file.sh +201 -0
- package/plugins/toolu/hooks/lib/gate-mode.sh +244 -0
- package/plugins/toolu/hooks/lib/host.sh +205 -0
- package/plugins/toolu/hooks/lib/permissions.sh +125 -0
- package/plugins/toolu/hooks/lib/plan-ledger-parse.sh +219 -0
- package/plugins/toolu/hooks/lib/plan-ledger-preflight.sh +137 -0
- package/plugins/toolu/hooks/lib/plan-ledger.sh +749 -0
- package/plugins/toolu/hooks/lib/push-waiver.sh +116 -0
- package/plugins/toolu/hooks/lib/quality-config.sh +184 -0
- package/plugins/toolu/hooks/lib/registry.sh +72 -0
- package/plugins/toolu/hooks/lib/state-sweeper.sh +194 -0
- package/plugins/toolu/hooks/lib/telemetry.sh +94 -0
- package/plugins/toolu/hooks/lib/verdict.sh +477 -0
- package/plugins/toolu/hooks/post-tools/mod.sh +42 -0
- package/plugins/toolu/hooks/post-tools/modules/gate-status.sh +140 -0
- package/plugins/toolu/hooks/post-tools/modules/push-waiver.sh +97 -0
- package/plugins/toolu/hooks/pre-compact.sh +18 -0
- package/plugins/toolu/hooks/pre-tools/agent-tier.sh +111 -0
- package/plugins/toolu/hooks/pre-tools/mod.sh +37 -0
- package/plugins/toolu/hooks/pre-tools/modules/bash-commands.sh +187 -0
- package/plugins/toolu/hooks/pre-tools/modules/code-edit-rules.sh +78 -0
- package/plugins/toolu/hooks/pre-tools/modules/commit-gate.sh +70 -0
- package/plugins/toolu/hooks/pre-tools/modules/docs-sync.sh +137 -0
- package/plugins/toolu/hooks/pre-tools/modules/mcp-blocker.sh +151 -0
- package/plugins/toolu/hooks/pre-tools/modules/plan-ledger.sh +201 -0
- package/plugins/toolu/hooks/pre-tools/modules/protected-files.sh +177 -0
- package/plugins/toolu/hooks/pre-tools/modules/push-review.sh +273 -0
- package/plugins/toolu/hooks/pre-tools/modules/quality-gate.sh +87 -0
- package/plugins/toolu/hooks/session-start.sh +379 -0
- package/plugins/toolu/hooks/user-prompt-submit.sh +197 -0
- package/plugins/toolu/scripts/context-budget.sh +111 -0
- package/plugins/toolu/scripts/debug-log.sh +98 -0
- package/plugins/toolu/scripts/debug-stack.sh +108 -0
- package/plugins/toolu/scripts/debug-testfail.sh +97 -0
- package/plugins/toolu/settings/.gitkeep +0 -0
- package/plugins/toolu/settings/README.md +127 -0
- package/plugins/toolu/settings/bash-allowlist.txt +12 -0
- package/plugins/toolu/settings/bash-denylist.txt +25 -0
- package/plugins/toolu/settings/code-edit-rules.json +67 -0
- package/plugins/toolu/settings/commit-prefixes.txt +12 -0
- package/plugins/toolu/settings/mcp-blocklist.txt +8 -0
- package/plugins/toolu/settings/permissions.fragment.json +36 -0
- package/plugins/toolu/settings/protected-files.txt +30 -0
- package/plugins/toolu/settings/rust-unsafe-exemptions.txt +5 -0
- package/plugins/toolu/settings/toolu.config.example.json +130 -0
- package/plugins/toolu/skills/.gitkeep +0 -0
- package/plugins/toolu/skills/brainstorm/SKILL.md +57 -0
- package/plugins/toolu/skills/brainstorm/references/design-questions.md +36 -0
- package/plugins/toolu/skills/commit/SKILL.md +11 -0
- package/plugins/toolu/skills/debug/SKILL.md +54 -0
- package/plugins/toolu/skills/debug/evals/README.md +17 -0
- package/plugins/toolu/skills/debug/evals/cases.json +24 -0
- package/plugins/toolu/skills/debug/evals/results.json +34 -0
- package/plugins/toolu/skills/deep-research/SKILL.md +51 -0
- package/plugins/toolu/skills/execution/SKILL.md +77 -0
- package/plugins/toolu/skills/orchestrator/SKILL.md +145 -0
- package/plugins/toolu/skills/orchestrator/references/delegation-cost.md +104 -0
- package/plugins/toolu/skills/orchestrator/references/model-routing.md +112 -0
- package/plugins/toolu/skills/plan/SKILL.md +56 -0
- package/plugins/toolu/skills/plan/references/ledger.md +18 -0
- package/plugins/toolu/skills/plan-review/SKILL.md +48 -0
- package/plugins/toolu/skills/review-and-commit/SKILL.md +10 -0
- package/plugins/toolu/skills/setup/SKILL.md +24 -0
- package/plugins/toolu/skills/setup/scripts/setup.sh +206 -0
- package/plugins/toolu/skills/spec/SKILL.md +67 -0
- package/plugins/toolu/skills/spec-review/SKILL.md +50 -0
- package/plugins/toolu/skills/test/SKILL.md +49 -0
- package/plugins/toolu/workflows/commit.md +21 -0
- package/plugins/toolu/workflows/host-mapping.md +22 -0
- package/plugins/toolu/workflows/review-and-commit.md +54 -0
- package/plugins/toolu/workflows/semantic-judgments.md +35 -0
- package/plugins/toolu-review/.claude-plugin/plugin.json +18 -0
- package/plugins/toolu-review/.codex-plugin/plugin.json +7 -0
- package/plugins/toolu-review/README.md +17 -0
- package/plugins/toolu-review/hooks/hooks.json +15 -0
- package/plugins/toolu-review/hooks/session-start.sh +34 -0
- package/plugins/toolu-review/skills/review/SKILL.md +90 -0
- package/plugins/toolu-review/skills/review/scripts/write-state.sh +189 -0
- package/plugins/ts-quality/.claude-plugin/plugin.json +24 -0
- package/plugins/ts-quality/.codex-plugin/plugin.json +6 -0
- package/plugins/ts-quality/README.md +24 -0
- package/plugins/ts-quality/hooks/check-toolu.sh +20 -0
- package/plugins/ts-quality/hooks/concerns/00-preamble.sh +123 -0
- package/plugins/ts-quality/hooks/concerns/10-imports.sh +33 -0
- package/plugins/ts-quality/hooks/concerns/15-type-as.sh +9 -0
- package/plugins/ts-quality/hooks/concerns/20-tests.sh +26 -0
- package/plugins/ts-quality/hooks/concerns/25-size-file.sh +40 -0
- package/plugins/ts-quality/hooks/concerns/30-size-fn.sh +53 -0
- package/plugins/ts-quality/hooks/concerns/35-react-hooks.sh +7 -0
- package/plugins/ts-quality/hooks/concerns/40-factory.sh +5 -0
- package/plugins/ts-quality/hooks/concerns/45-typeguard.sh +6 -0
- package/plugins/ts-quality/hooks/concerns/50-type-dup.sh +16 -0
- package/plugins/ts-quality/hooks/concerns/55-naming.sh +11 -0
- package/plugins/ts-quality/hooks/concerns/60-console.sh +6 -0
- package/plugins/ts-quality/hooks/concerns/65-suppression.sh +12 -0
- package/plugins/ts-quality/hooks/concerns/70-ui-confirm.sh +8 -0
- package/plugins/ts-quality/hooks/concerns/72-ui-radix.sh +12 -0
- package/plugins/ts-quality/hooks/concerns/74-react-props.sh +6 -0
- package/plugins/ts-quality/hooks/concerns/76-toast.sh +10 -0
- package/plugins/ts-quality/hooks/concerns/78-error-ast.sh +242 -0
- package/plugins/ts-quality/hooks/concerns/80-throw-literal.sh +23 -0
- package/plugins/ts-quality/hooks/concerns/85-no-mocks.sh +109 -0
- package/plugins/ts-quality/hooks/concerns/90-duplication.sh +30 -0
- package/plugins/ts-quality/hooks/concerns/92-docs.sh +36 -0
- package/plugins/ts-quality/hooks/concerns/94-handler.sh +15 -0
- package/plugins/ts-quality/hooks/concerns/99-finalize.sh +46 -0
- package/plugins/ts-quality/hooks/hooks.json +19 -0
- package/plugins/ts-quality/hooks/register.sh +65 -0
- package/src/adapter/__tests__/evaluate.test.ts +82 -0
- package/src/adapter/__tests__/permission-map.test.ts +91 -0
- package/src/adapter/evaluate.ts +54 -0
- package/src/adapter/permission-map.ts +177 -0
- package/src/bootstrap/__tests__/bootstrap.test.ts +148 -0
- package/src/bootstrap/entrypoint.ts +18 -0
- package/src/bootstrap/index.ts +5 -0
- package/src/bootstrap/readiness.ts +59 -0
- package/src/bootstrap/result.ts +21 -0
- package/src/bootstrap/runtime.ts +99 -0
- package/src/bootstrap/test-helpers.ts +25 -0
- package/src/host/__tests__/host.test.ts +37 -0
- package/src/host/detect.ts +46 -0
- package/src/host/index.ts +10 -0
- package/src/host/roots.ts +59 -0
- package/src/host/types.ts +14 -0
- package/src/inventory/__tests__/inventory.test.ts +69 -0
- package/src/inventory/index.ts +9 -0
- package/src/inventory/manifest.ts +46 -0
- package/src/inventory/scan.ts +66 -0
- package/src/inventory/selection.ts +92 -0
- package/src/inventory/types.ts +22 -0
- package/src/lifecycle/__tests__/lifecycle.test.ts +7 -0
- package/src/lifecycle/index.ts +2 -0
- package/src/lifecycle/table.ts +42 -0
- package/src/plugin/__tests__/plugin-stub.test.ts +6 -0
- package/src/plugin/plugin-stub.ts +7 -0
- package/src/plugin/toolu.ts +142 -0
- package/src/preflight/__tests__/preflight.test.ts +20 -0
- package/src/preflight/check.ts +75 -0
- package/src/preflight/index.ts +2 -0
- package/src/select/__tests__/select.test.ts +52 -0
- package/src/select/index.ts +2 -0
- package/src/select/resolve.ts +87 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Install toolu's Codex custom-agent profiles without clobbering user files.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
|
|
5
|
+
SELF_DIR=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
|
|
6
|
+
PLUGIN_ROOT=$(cd "$SELF_DIR/../../.." && pwd)
|
|
7
|
+
TEMPLATE_DIR="${TOOLU_AGENT_TEMPLATE_DIR:-$PLUGIN_ROOT/assets/agents}"
|
|
8
|
+
CODEX_ROOT="${CODEX_HOME:-${HOME:+$HOME/.codex}}"
|
|
9
|
+
AGENTS_DIR="${CODEX_ROOT:+$CODEX_ROOT/agents}"
|
|
10
|
+
MANAGED_MARKER='# Managed by toolu. Install and update with $toolu:setup.'
|
|
11
|
+
NAMES=(quick-task deep-explore research-agent implementer architect)
|
|
12
|
+
MODELS=(gpt-5.6-luna gpt-5.6-terra gpt-5.6-terra gpt-5.6-terra gpt-5.6-sol)
|
|
13
|
+
EFFORTS=(medium medium medium medium high)
|
|
14
|
+
SANDBOXES=(read-only read-only read-only workspace-write read-only)
|
|
15
|
+
|
|
16
|
+
usage() {
|
|
17
|
+
printf '%s\n' 'Usage: setup.sh preview | install [--force] | remove --yes [--force]'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
fail() {
|
|
21
|
+
printf 'toolu setup: %s\n' "$*" >&2
|
|
22
|
+
exit 1
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
validate_template() {
|
|
26
|
+
local index="$1" name file
|
|
27
|
+
name="${NAMES[$index]}"
|
|
28
|
+
file="$TEMPLATE_DIR/$name.toml"
|
|
29
|
+
[ -f "$file" ] || return 1
|
|
30
|
+
[ "$(grep -Fxc "$MANAGED_MARKER" "$file" || true)" -eq 1 ] || return 1
|
|
31
|
+
[ "$(grep -Fxc "name = \"$name\"" "$file" || true)" -eq 1 ] || return 1
|
|
32
|
+
[ "$(grep -Ec '^description = "[^"].*"$' "$file" || true)" -eq 1 ] || return 1
|
|
33
|
+
[ "$(grep -Fxc "model = \"${MODELS[$index]}\"" "$file" || true)" -eq 1 ] || return 1
|
|
34
|
+
[ "$(grep -Fxc "model_reasoning_effort = \"${EFFORTS[$index]}\"" "$file" || true)" -eq 1 ] || return 1
|
|
35
|
+
[ "$(grep -Fxc "sandbox_mode = \"${SANDBOXES[$index]}\"" "$file" || true)" -eq 1 ] || return 1
|
|
36
|
+
[ "$(grep -Fxc 'developer_instructions = """' "$file" || true)" -eq 1 ] || return 1
|
|
37
|
+
[ "$(grep -Fxc '"""' "$file" || true)" -eq 1 ] || return 1
|
|
38
|
+
awk '
|
|
39
|
+
BEGIN { block=0; assignments=0; starts=0; closes=0; invalid=0 }
|
|
40
|
+
/^#[[:space:]]*/ || /^[[:space:]]*$/ { next }
|
|
41
|
+
block {
|
|
42
|
+
if ($0 == "\"\"\"") { block=0; closes++; next }
|
|
43
|
+
next
|
|
44
|
+
}
|
|
45
|
+
$0 == "developer_instructions = \"\"\"" { block=1; starts++; next }
|
|
46
|
+
/^(name|description|model|model_reasoning_effort|sandbox_mode) = "[^"\\]*(\\.[^"\\]*)*"$/ {
|
|
47
|
+
assignments++; next
|
|
48
|
+
}
|
|
49
|
+
{ invalid=1 }
|
|
50
|
+
END { exit(invalid || block || assignments != 5 || starts != 1 || closes != 1) }
|
|
51
|
+
' "$file" || return 1
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
classify_install() {
|
|
55
|
+
local name="$1" source="$TEMPLATE_DIR/$1.toml" target="$AGENTS_DIR/$1.toml"
|
|
56
|
+
if [ ! -e "$target" ]; then
|
|
57
|
+
printf 'install'
|
|
58
|
+
elif cmp -s "$source" "$target"; then
|
|
59
|
+
printf 'unchanged'
|
|
60
|
+
elif grep -Fqx "$MANAGED_MARKER" "$target" 2>/dev/null; then
|
|
61
|
+
printf 'update'
|
|
62
|
+
else
|
|
63
|
+
printf 'conflict'
|
|
64
|
+
fi
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
classify_remove() {
|
|
68
|
+
local target="$AGENTS_DIR/$1.toml"
|
|
69
|
+
if [ ! -e "$target" ]; then
|
|
70
|
+
printf 'absent'
|
|
71
|
+
elif grep -Fqx "$MANAGED_MARKER" "$target" 2>/dev/null; then
|
|
72
|
+
printf 'remove'
|
|
73
|
+
else
|
|
74
|
+
printf 'conflict'
|
|
75
|
+
fi
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
backup_stamp() {
|
|
79
|
+
local stamp="${TOOLU_TIMESTAMP:-$(date -u +%Y%m%dT%H%M%SZ)}"
|
|
80
|
+
case "$stamp" in
|
|
81
|
+
*[!0-9TZ]*|'') fail "invalid backup timestamp: $stamp" ;;
|
|
82
|
+
esac
|
|
83
|
+
printf '%s' "$stamp"
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
command_name="${1:-}"
|
|
87
|
+
shift 2>/dev/null || true
|
|
88
|
+
force=0
|
|
89
|
+
confirmed=0
|
|
90
|
+
for arg in "$@"; do
|
|
91
|
+
case "$arg" in
|
|
92
|
+
--force) force=1 ;;
|
|
93
|
+
--yes) confirmed=1 ;;
|
|
94
|
+
*) usage >&2; exit 2 ;;
|
|
95
|
+
esac
|
|
96
|
+
done
|
|
97
|
+
|
|
98
|
+
case "$command_name" in
|
|
99
|
+
preview|install|remove) ;;
|
|
100
|
+
*) usage >&2; exit 2 ;;
|
|
101
|
+
esac
|
|
102
|
+
[ -n "$AGENTS_DIR" ] || fail 'CODEX_HOME and HOME are both unset'
|
|
103
|
+
|
|
104
|
+
for index in 0 1 2 3 4; do
|
|
105
|
+
validate_template "$index" || fail "invalid agent template: $TEMPLATE_DIR/${NAMES[$index]}.toml"
|
|
106
|
+
done
|
|
107
|
+
|
|
108
|
+
printf 'TARGET %s\n' "$AGENTS_DIR"
|
|
109
|
+
actions=()
|
|
110
|
+
conflicts=0
|
|
111
|
+
for name in "${NAMES[@]}"; do
|
|
112
|
+
if [ "$command_name" = remove ]; then
|
|
113
|
+
action=$(classify_remove "$name")
|
|
114
|
+
else
|
|
115
|
+
action=$(classify_install "$name")
|
|
116
|
+
fi
|
|
117
|
+
actions+=("$action")
|
|
118
|
+
printf 'PLAN %s %s\n' "$name" "$action"
|
|
119
|
+
[ "$action" != conflict ] || conflicts=$((conflicts + 1))
|
|
120
|
+
done
|
|
121
|
+
|
|
122
|
+
if [ "$command_name" = preview ]; then
|
|
123
|
+
[ "$conflicts" -eq 0 ] || printf 'NOTICE use install --force only after confirming each conflict\n'
|
|
124
|
+
exit 0
|
|
125
|
+
fi
|
|
126
|
+
|
|
127
|
+
if [ "$command_name" = remove ] && [ "$confirmed" -ne 1 ]; then
|
|
128
|
+
printf '%s\n' 'REFUSED removal requires --yes after explicit user confirmation' >&2
|
|
129
|
+
exit 2
|
|
130
|
+
fi
|
|
131
|
+
if [ "$conflicts" -gt 0 ] && [ "$force" -ne 1 ]; then
|
|
132
|
+
printf '%s\n' 'REFUSED unmanaged profile conflict; preview it and confirm install/remove --force' >&2
|
|
133
|
+
exit 2
|
|
134
|
+
fi
|
|
135
|
+
|
|
136
|
+
stamp=""
|
|
137
|
+
backup_dir=""
|
|
138
|
+
needs_backup=0
|
|
139
|
+
for action in "${actions[@]}"; do
|
|
140
|
+
case "$action" in update|remove|conflict) needs_backup=1 ;; esac
|
|
141
|
+
done
|
|
142
|
+
if [ "$needs_backup" -eq 1 ]; then
|
|
143
|
+
stamp=$(backup_stamp)
|
|
144
|
+
backup_dir="$AGENTS_DIR/.toolu-backups/$stamp"
|
|
145
|
+
for index in 0 1 2 3 4; do
|
|
146
|
+
action="${actions[$index]}"
|
|
147
|
+
case "$action" in
|
|
148
|
+
update|remove|conflict)
|
|
149
|
+
[ ! -e "$backup_dir/${NAMES[$index]}.toml" ] || fail "backup already exists: $backup_dir/${NAMES[$index]}.toml"
|
|
150
|
+
;;
|
|
151
|
+
esac
|
|
152
|
+
done
|
|
153
|
+
fi
|
|
154
|
+
|
|
155
|
+
mkdir -p "$AGENTS_DIR"
|
|
156
|
+
[ "$needs_backup" -eq 0 ] || mkdir -p "$backup_dir"
|
|
157
|
+
|
|
158
|
+
if [ "$command_name" = install ]; then
|
|
159
|
+
installed=0
|
|
160
|
+
updated=0
|
|
161
|
+
unchanged=0
|
|
162
|
+
for index in 0 1 2 3 4; do
|
|
163
|
+
name="${NAMES[$index]}"
|
|
164
|
+
action="${actions[$index]}"
|
|
165
|
+
source="$TEMPLATE_DIR/$name.toml"
|
|
166
|
+
target="$AGENTS_DIR/$name.toml"
|
|
167
|
+
case "$action" in
|
|
168
|
+
unchanged)
|
|
169
|
+
unchanged=$((unchanged + 1))
|
|
170
|
+
;;
|
|
171
|
+
update|conflict)
|
|
172
|
+
cp -p "$target" "$backup_dir/$name.toml"
|
|
173
|
+
tmp="$AGENTS_DIR/.$name.toml.toolu.$$"
|
|
174
|
+
cp "$source" "$tmp"
|
|
175
|
+
mv "$tmp" "$target"
|
|
176
|
+
updated=$((updated + 1))
|
|
177
|
+
;;
|
|
178
|
+
install)
|
|
179
|
+
tmp="$AGENTS_DIR/.$name.toml.toolu.$$"
|
|
180
|
+
cp "$source" "$tmp"
|
|
181
|
+
mv "$tmp" "$target"
|
|
182
|
+
installed=$((installed + 1))
|
|
183
|
+
;;
|
|
184
|
+
esac
|
|
185
|
+
done
|
|
186
|
+
printf 'INSTALLED %d UPDATED %d UNCHANGED %d\n' "$installed" "$updated" "$unchanged"
|
|
187
|
+
else
|
|
188
|
+
removed=0
|
|
189
|
+
absent=0
|
|
190
|
+
for index in 0 1 2 3 4; do
|
|
191
|
+
name="${NAMES[$index]}"
|
|
192
|
+
action="${actions[$index]}"
|
|
193
|
+
target="$AGENTS_DIR/$name.toml"
|
|
194
|
+
case "$action" in
|
|
195
|
+
absent) absent=$((absent + 1)) ;;
|
|
196
|
+
remove|conflict)
|
|
197
|
+
mv "$target" "$backup_dir/$name.toml"
|
|
198
|
+
removed=$((removed + 1))
|
|
199
|
+
;;
|
|
200
|
+
esac
|
|
201
|
+
done
|
|
202
|
+
printf 'REMOVED %d ABSENT %d\n' "$removed" "$absent"
|
|
203
|
+
fi
|
|
204
|
+
|
|
205
|
+
[ -z "$backup_dir" ] || printf 'BACKUP %s\n' "$backup_dir"
|
|
206
|
+
printf '%s\n' 'Restart Codex to reload custom agent profiles.'
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec
|
|
3
|
+
description: "Use to write the spec or document the design before planning a new system, cross-cutting feature, public interface, or other durable contract. Clear requirements may enter directly; brainstorm is optional upstream triage."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec
|
|
7
|
+
|
|
8
|
+
Write a spec when the cost of ambiguity is high. It is the durable contract for
|
|
9
|
+
`plan`, `execution`, and `test`, not a transcript of brainstorming. Start from
|
|
10
|
+
an agreed brainstorm decision when one helped resolve the shape; clear,
|
|
11
|
+
complete requirements may enter here directly. Return to `brainstorm` only when
|
|
12
|
+
a material design choice remains undecided.
|
|
13
|
+
|
|
14
|
+
Use the mandatory [Jev workflow](../../workflows/semantic-judgments.md) for
|
|
15
|
+
requirement ambiguity and observable outcomes. Agent owns the contract and feasibility.
|
|
16
|
+
|
|
17
|
+
Write `docs/toolu/specs/<YYYY-MM-DD>-<slug>-design.md`. Keep every section
|
|
18
|
+
short and concrete:
|
|
19
|
+
|
|
20
|
+
```markdown
|
|
21
|
+
# <Title> — Design
|
|
22
|
+
|
|
23
|
+
**Date:** <YYYY-MM-DD> **Status:** Draft **Author:** <name> **Topic:** <one line>
|
|
24
|
+
|
|
25
|
+
## Problem
|
|
26
|
+
The user pain and why it matters now.
|
|
27
|
+
|
|
28
|
+
## Non-Goals
|
|
29
|
+
Explicit, numbered scope boundaries.
|
|
30
|
+
|
|
31
|
+
## Architecture
|
|
32
|
+
Chosen approach, the decisive trade-off, and existing paths/utilities to reuse.
|
|
33
|
+
|
|
34
|
+
## Interfaces / Schema
|
|
35
|
+
Concrete signatures, types, JSON shapes, paths, or config keys.
|
|
36
|
+
|
|
37
|
+
## Failure modes and edge cases
|
|
38
|
+
Bad, empty, absent, partial, concurrent, or otherwise boundary inputs; state
|
|
39
|
+
the observable behavior and whether failure propagates, is converted, or is
|
|
40
|
+
recovered.
|
|
41
|
+
|
|
42
|
+
## Acceptance criteria
|
|
43
|
+
- **AC-1:** A testable outcome stated against a real input and observable result.
|
|
44
|
+
|
|
45
|
+
## Acceptance evidence
|
|
46
|
+
For every AC, name the representative real input or fixture, expected observable
|
|
47
|
+
result, applicable boundary/failure case, and runnable check that will prove it.
|
|
48
|
+
|
|
49
|
+
## Documentation impact
|
|
50
|
+
State the affected README, `docs/`, `SKILL.md`, command/config, or release-note
|
|
51
|
+
surface; say `None — <reason>` only when no user-facing documentation changes.
|
|
52
|
+
|
|
53
|
+
## Open Questions
|
|
54
|
+
Unresolved decisions, owner, and whether each question blocks implementation.
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Acceptance-criterion ids use stable bold prefixes (`**AC-<n>:**`). They are
|
|
58
|
+
labels rather than indices: gaps are fine, but never reuse an id. Each criterion
|
|
59
|
+
must describe an observable real-data outcome — “given input X, produces Y” —
|
|
60
|
+
so a ledger step can cite it through `ac_refs` and `test` can demonstrate it.
|
|
61
|
+
|
|
62
|
+
## What done means
|
|
63
|
+
|
|
64
|
+
Every authored section is filled; acceptance evidence covers every AC; failure
|
|
65
|
+
behavior and documentation impact are explicit; and each open question is
|
|
66
|
+
resolved, owned, or clearly non-blocking. Keep `Status: Draft` and hand off to
|
|
67
|
+
`spec-review`.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spec-review
|
|
3
|
+
description: "Use to review the spec or poke holes in this spec before planning or building. Validates authored contract sections, real-data acceptance evidence, scope, and blocking open questions."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Spec Review
|
|
7
|
+
|
|
8
|
+
Review the spec adversarially before it becomes a plan. Judge whether a
|
|
9
|
+
competent builder could proceed without guessing; do not add replacement design
|
|
10
|
+
work or praise.
|
|
11
|
+
|
|
12
|
+
Use the mandatory [Jev workflow](../../workflows/semantic-judgments.md) for
|
|
13
|
+
requirement/evidence alignment. Verify findings against sources; retain this checklist.
|
|
14
|
+
|
|
15
|
+
## Checklist
|
|
16
|
+
|
|
17
|
+
Validate exactly the sections authored by `spec`:
|
|
18
|
+
|
|
19
|
+
- **Problem / Non-Goals** — the user pain and boundary are concrete.
|
|
20
|
+
- **Architecture / Interfaces / Schema** — one decided approach, its trade-off,
|
|
21
|
+
and buildable contracts/paths are present.
|
|
22
|
+
- **Failure modes and edge cases** — bad, empty, absent, partial, concurrent,
|
|
23
|
+
and boundary behavior is stated, including failure propagation or recovery.
|
|
24
|
+
- **Acceptance criteria** — every `**AC-<n>:**` names an observable real-data
|
|
25
|
+
outcome, rather than an implementation activity or “works correctly.”
|
|
26
|
+
- **Acceptance evidence** — every AC has a representative real input or
|
|
27
|
+
fixture, expected observable result, applicable boundary/failure case, and a
|
|
28
|
+
runnable check. No mock substitute may stand in for the data under test.
|
|
29
|
+
- **Documentation impact** — affected user-facing documentation is named, or a
|
|
30
|
+
justified `None` is explicit.
|
|
31
|
+
- **Open Questions** — each has an owner and is explicitly non-blocking; an
|
|
32
|
+
unanswered question that changes scope, interface, behavior, safety, or a
|
|
33
|
+
required check is a blocker, not merely owned.
|
|
34
|
+
|
|
35
|
+
Also reject unstated scope expansion, missing real-data evidence, or an
|
|
36
|
+
architecture that cannot meet the documented size/layout constraints.
|
|
37
|
+
|
|
38
|
+
## Output
|
|
39
|
+
|
|
40
|
+
Write one finding per line, with location, severity, problem, and fix:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
<section>: 🔴 blocker: <problem>. <fix>.
|
|
44
|
+
<section>: 🟡 should-fix: <gap>. <fix>.
|
|
45
|
+
<section>: 🔵 consider: <minor>. <fix>.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Stamp `**Status:** Approved` only when all authored sections and every AC's
|
|
49
|
+
evidence are sufficient for planning. Otherwise stamp `**Status:** Needs
|
|
50
|
+
changes`, list blockers, and return the spec for revision.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test
|
|
3
|
+
description: "Use while executing any feature, fix, refactor, or regression to design high-signal, real-data tests. Enforces test-first discipline and colocated layout; it is a reusable method, not a terminal workflow phase."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test
|
|
7
|
+
|
|
8
|
+
`test` is a **reusable execution-time method**: use it in every behavior step
|
|
9
|
+
and again when reproducing regressions. Tests are written with the change,
|
|
10
|
+
through red → green → refactor, never saved for a terminal phase.
|
|
11
|
+
|
|
12
|
+
Use the mandatory [Jev workflow](../../workflows/semantic-judgments.md) for
|
|
13
|
+
semantic boundaries in supplied examples. Derive expected outputs and verdicts from contracts and execution.
|
|
14
|
+
|
|
15
|
+
## Non-negotiables
|
|
16
|
+
|
|
17
|
+
- Exercise real inputs and real code paths. Do not use mocked or fabricated
|
|
18
|
+
data as a mock-substitute for the behavior under test. A controlled external
|
|
19
|
+
failure may be stubbed only to prove failure propagation.
|
|
20
|
+
- Colocate tests: TS/TSX in sibling `__tests__/`, Rust in module-sibling
|
|
21
|
+
`tests/` (or crate-root integration `tests/`), and Python `test_<module>.py`
|
|
22
|
+
beside its module. Use the project runner and existing no-mock gates.
|
|
23
|
+
|
|
24
|
+
## Behavior-to-evidence map
|
|
25
|
+
|
|
26
|
+
Before writing each test, record a compact map containing:
|
|
27
|
+
|
|
28
|
+
- relevant AC or risk;
|
|
29
|
+
- representative real input or fixture;
|
|
30
|
+
- observable expected result;
|
|
31
|
+
- boundary or failure case when applicable; and
|
|
32
|
+
- runner command.
|
|
33
|
+
|
|
34
|
+
Prioritize changed behavior, invalid/boundary input, failure propagation, and
|
|
35
|
+
reproduced regressions. Reject duplicate tests, implementation-detail tests,
|
|
36
|
+
mock-substitute tests, and happy-path-only tests.
|
|
37
|
+
|
|
38
|
+
## Test-first loop
|
|
39
|
+
|
|
40
|
+
1. **Red** — add a focused failing test that demonstrates the intended behavior
|
|
41
|
+
or reproduces the regression; run it and observe the expected failure.
|
|
42
|
+
2. **Green** — make the smallest production change that passes with the real
|
|
43
|
+
input.
|
|
44
|
+
3. **Refactor** — improve structure without changing behavior; keep the runner
|
|
45
|
+
green.
|
|
46
|
+
|
|
47
|
+
One test demonstrates one behavior and names that behavior. A red test is a
|
|
48
|
+
finding: report its output and never claim the execution step complete until
|
|
49
|
+
the mapped runner is green.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Commit all changes
|
|
2
|
+
|
|
3
|
+
Commit the current working tree without broad re-exploration.
|
|
4
|
+
|
|
5
|
+
1. Delegate this bounded workflow to the configured `quick-task` mechanical
|
|
6
|
+
agent when that agent is available. Otherwise execute it in the current
|
|
7
|
+
thread. Use the active host mapping in `workflows/host-mapping.md`.
|
|
8
|
+
2. Run only `git status` and `git diff --stat` to establish scope. Explore more
|
|
9
|
+
only to fix a reported failure.
|
|
10
|
+
3. Stage all changes with `git add -A`; staged checks depend on index state.
|
|
11
|
+
4. Run the project's prescribed check, lint, and test command when one exists
|
|
12
|
+
in repository instructions, package scripts, a Makefile, or toolchain
|
|
13
|
+
configuration. If none exists, record that and continue.
|
|
14
|
+
5. On failure, fix only the reported issue, re-stage, and rerun every required
|
|
15
|
+
gate until green.
|
|
16
|
+
6. Commit with a concise Conventional Commit subject of at most 72 characters.
|
|
17
|
+
Group a body by package only when it adds useful context.
|
|
18
|
+
7. If commit hooks fail, fix only their findings, re-stage, and retry. Stop
|
|
19
|
+
after three failed commit attempts and report the evidence.
|
|
20
|
+
|
|
21
|
+
Do not bypass hooks. Completion requires a created commit and green gates.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Host mapping
|
|
2
|
+
|
|
3
|
+
Use the host-native interface for the same workflow concept:
|
|
4
|
+
|
|
5
|
+
| Concept | Claude Code | Codex |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| Invoke a plugin workflow | `/plugin:name` | `$plugin:name` |
|
|
8
|
+
| Delegate bounded work | `Agent` / `Task` with an explicit tier | `spawn_agent` with the matching custom agent when installed |
|
|
9
|
+
| Ask a structured user choice | `AskUserQuestion` | `request_user_input` when available; otherwise ask one concise question |
|
|
10
|
+
| Inspect or steer delegated work | the host's agent controls | Codex subagent thread controls (`/agent` in CLI) |
|
|
11
|
+
| Isolate a write-heavy task | `EnterWorktree` / `ExitWorktree` | native `git worktree` commands with an exact, validated path |
|
|
12
|
+
| Current external information | `WebSearch` / `WebFetch` or installed research plugins | Codex web access or installed research plugins |
|
|
13
|
+
|
|
14
|
+
Never name or call a host interface that is unavailable in the active host. A
|
|
15
|
+
missing optional interface is a reason to use the mapped fallback, not to
|
|
16
|
+
fabricate a tool call.
|
|
17
|
+
|
|
18
|
+
Workflow skills default-and-proceed according to materiality triage. Use the
|
|
19
|
+
structured question row only for one question (2–3 options) when prompt and
|
|
20
|
+
repository evidence cannot settle a goal-defining or hard-to-reverse fork. If
|
|
21
|
+
several qualify, ask the highest-blast-radius choice and record defaults and
|
|
22
|
+
risks for the rest; otherwise state the recommended default and proceed.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Review, fix, and commit completed work
|
|
2
|
+
|
|
3
|
+
Run this only after implementation is complete. Review the current branch, fix
|
|
4
|
+
real findings, and commit. Do not merge or push.
|
|
5
|
+
|
|
6
|
+
## 1. Establish scope
|
|
7
|
+
|
|
8
|
+
- Resolve the current branch with `git rev-parse --abbrev-ref HEAD`.
|
|
9
|
+
- Resolve the default base through `refs/remotes/origin/HEAD`, falling back to
|
|
10
|
+
`main` only when the remote default is unavailable.
|
|
11
|
+
- Inspect committed scope with `git log <base>..HEAD --oneline` and
|
|
12
|
+
`git diff <base>...HEAD --stat`.
|
|
13
|
+
- Inspect uncommitted scope with `git status --short` and
|
|
14
|
+
`git diff --stat HEAD`.
|
|
15
|
+
- Stop with `nothing to review` if both scopes are empty. Otherwise group
|
|
16
|
+
changed files by package or crate.
|
|
17
|
+
|
|
18
|
+
## 2. Review each package
|
|
19
|
+
|
|
20
|
+
Use the host mapping in `workflows/host-mapping.md`. Independent packages may
|
|
21
|
+
be reviewed concurrently; within one package, passes are sequential so every
|
|
22
|
+
reviewer sees the latest diff.
|
|
23
|
+
|
|
24
|
+
Prefer the installed toolu reviewer (`toolu-review:review` in the active host's
|
|
25
|
+
invocation syntax). An installed repository-specific reviewer may be used when
|
|
26
|
+
it writes a compatible push-review attestation. Optional clarity/simplification
|
|
27
|
+
passes run before correctness review, never concurrently with it.
|
|
28
|
+
|
|
29
|
+
Review correctness, security, boundary error handling, regressions, missing
|
|
30
|
+
tests, dead code, unnecessary abstraction, unclear naming, and tests that mock
|
|
31
|
+
the integration instead of using real data. Every finding must cite a file and
|
|
32
|
+
line; discard vague feedback.
|
|
33
|
+
|
|
34
|
+
## 3. Fix findings
|
|
35
|
+
|
|
36
|
+
- Verify each finding against the code before changing it.
|
|
37
|
+
- Apply every valid finding and rerun relevant tests after each batch.
|
|
38
|
+
- Fix existing errors or warnings in touched files.
|
|
39
|
+
- If the same approach fails twice, stop and change the hypothesis.
|
|
40
|
+
|
|
41
|
+
## 4. Run full gates
|
|
42
|
+
|
|
43
|
+
Run the project's full check, lint, typecheck, and test commands as defined by
|
|
44
|
+
repository instructions and toolchain configuration. If none exist, say so.
|
|
45
|
+
Fix failures and rerun all required gates until green.
|
|
46
|
+
|
|
47
|
+
## 5. Commit intentionally
|
|
48
|
+
|
|
49
|
+
Stage only files belonging to each logical commit. Use Conventional Commit
|
|
50
|
+
messages and split unrelated changes. Never use `--no-verify`; fix hook
|
|
51
|
+
failures instead.
|
|
52
|
+
|
|
53
|
+
Report reviewed scope, fixes, final gate results, and produced commit hashes.
|
|
54
|
+
Completion requires green gates and a clean working tree.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Jev workflow
|
|
2
|
+
|
|
3
|
+
**Mandatory for semantic decisions when available.** Explore → gather evidence →
|
|
4
|
+
call Jev before the informed decision → act. Reassess after new evidence, failed
|
|
5
|
+
hypotheses, or changed requirements. Batch independent questions over shared
|
|
6
|
+
state; reuse results while evidence, questions, and criteria are unchanged.
|
|
7
|
+
Dependent questions wait for their inputs. No quotas or ceremonial calls.
|
|
8
|
+
|
|
9
|
+
No semantic decision → say so once. Unavailable → state limitation once/task;
|
|
10
|
+
continue from explicit evidence/reasoning. Do not install tools to satisfy this
|
|
11
|
+
rule or invent results.
|
|
12
|
+
|
|
13
|
+
## Judgment opportunities
|
|
14
|
+
|
|
15
|
+
| Stage | Ask about supplied evidence |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| Brainstorm | Compare concrete alternatives per user preference. |
|
|
18
|
+
| Spec | Requirement ambiguity; one observable outcome. |
|
|
19
|
+
| Spec review | Requirement/evidence alignment. |
|
|
20
|
+
| Plan | Classification that changes a step's handling. |
|
|
21
|
+
| Plan review | Step outcome vs. linked requirement. |
|
|
22
|
+
| Search/research | Excerpt relevance, answer existence, claim/source support. |
|
|
23
|
+
| Debug | Hypothesis fit; next experiment; reassess after results. |
|
|
24
|
+
| Execution/review | Finding triage; expected vs. observed behavior. |
|
|
25
|
+
| Test design | Semantic boundaries in supplied examples. |
|
|
26
|
+
|
|
27
|
+
Use relevant rows, not a stage checklist. Agent/tools own architecture,
|
|
28
|
+
feasibility, exact checks, arithmetic, reproduction, tests, correctness, and
|
|
29
|
+
approval. Jev never waives verification or authorization.
|
|
30
|
+
|
|
31
|
+
Read the installed `jev` skill for host path, CLI, question contract, and
|
|
32
|
+
uncertainty handling. Load only the needed section of its linked
|
|
33
|
+
`references/problem-solving.md`. Keep state to named, relevant excerpts and
|
|
34
|
+
candidates. Record useful evidence → question → answer → next action; retain
|
|
35
|
+
model/usage with `--raw` during evaluation.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "toolu-review",
|
|
3
|
+
"version": "6.8.0",
|
|
4
|
+
"description": "Project-tuned pre-push code review mirroring CI falconiere/toolu-ghactions/code-review@v8 (Jev-enabled), writing the toolu push-review state so the gate passes. Standalone.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Falconiere Barbosa",
|
|
7
|
+
"email": "hello@falconiere.io"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/falconiere/toolu",
|
|
10
|
+
"repository": "https://github.com/falconiere/toolu.git",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"claude-code",
|
|
14
|
+
"toolu-review",
|
|
15
|
+
"push-review",
|
|
16
|
+
"quality"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "toolu-review",
|
|
3
|
+
"version": "6.8.0",
|
|
4
|
+
"description": "Project-tuned pre-push code review mirroring CI falconiere/toolu-ghactions/code-review@v8 (Jev-enabled), writing the toolu push-review state so the gate passes. Standalone.",
|
|
5
|
+
"skills": "./skills/",
|
|
6
|
+
"hooks": "./hooks/hooks.json"
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# toolu-review
|
|
2
|
+
|
|
3
|
+
Project-tuned pre-push code review mirroring this repo's CI Toolu Code Review action (`falconiere/toolu-ghactions/code-review@v8`, with Jev assessment enabled), writing the toolu `push-review` state so the gate passes.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
/plugin install toolu-review@toolu
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Standalone, no dependencies.
|
|
12
|
+
|
|
13
|
+
## What it provides
|
|
14
|
+
|
|
15
|
+
- **`toolu-review:review` skill** — reviews the branch diff against what the CI Toolu Code Review action (`github-actions[bot]` verdict comment, optionally App-branded) flags, so the first-push verdict is clean instead of bouncing low/nit findings back as rework. It also records a clean `push-review` state, satisfying toolu's `push-review` gate.
|
|
16
|
+
|
|
17
|
+
Explicit — it does not auto-fire on edits. Run it before pushing a feature branch, or when `pr-babysit` needs a reviewer.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# SessionStart hook — publish the toolu-review write-state helper at a STABLE,
|
|
3
|
+
# env-independent path. See context7's session-start.sh for the same fix
|
|
4
|
+
# rationale: ${CLAUDE_PLUGIN_ROOT} is exported to hook subprocesses only —
|
|
5
|
+
# NOT to the agent's Bash tool subshell — so a SKILL.md path of
|
|
6
|
+
# "${CLAUDE_PLUGIN_ROOT}/skills/review/scripts/write-state.sh" expands to
|
|
7
|
+
# "/skills/.../write-state.sh: No such file" when an agent pastes it.
|
|
8
|
+
# Mirror the statusline plugin: symlink the helper to
|
|
9
|
+
# ${CLAUDE_CONFIG_DIR:-$HOME/.claude}/toolu-review/write-state.sh
|
|
10
|
+
# Refreshed every session; silent on success; every step non-fatal.
|
|
11
|
+
|
|
12
|
+
# Consume stdin so Claude Code's hook IPC never stalls.
|
|
13
|
+
cat > /dev/null 2>&1 || true
|
|
14
|
+
|
|
15
|
+
plugin_dir="$(cd "$(dirname "$0")/.." 2>/dev/null && pwd)"
|
|
16
|
+
src="${plugin_dir:+$plugin_dir/skills/review/scripts/write-state.sh}"
|
|
17
|
+
[ -n "$src" ] && [ -f "$src" ] || exit 0
|
|
18
|
+
|
|
19
|
+
if [ -n "${TOOLU_CONFIG_DIR:-}" ]; then
|
|
20
|
+
config_root="$TOOLU_CONFIG_DIR"
|
|
21
|
+
elif [ "${TOOLU_HOST_OVERRIDE:-}" = codex ] || { [ -z "${TOOLU_HOST_OVERRIDE:-}" ] && [ -n "${PLUGIN_ROOT:-}" ]; }; then
|
|
22
|
+
config_root="${CODEX_HOME:-$HOME/.codex}"
|
|
23
|
+
else
|
|
24
|
+
config_root="${CLAUDE_CONFIG_DIR:-$HOME/.claude}"
|
|
25
|
+
fi
|
|
26
|
+
reg_root="$config_root/toolu-review"
|
|
27
|
+
mkdir -p "$reg_root" 2>/dev/null || { echo "toolu-review: cannot create $reg_root — helper not published" >&2; exit 0; }
|
|
28
|
+
|
|
29
|
+
dst="$reg_root/write-state.sh"
|
|
30
|
+
if [ -L "$dst" ] || [ ! -e "$dst" ]; then
|
|
31
|
+
ln -sf "$src" "$dst" 2>/dev/null || true
|
|
32
|
+
fi
|
|
33
|
+
|
|
34
|
+
exit 0
|