agentleFS
zanuartrizanuartri/zanuar-stack/skills/setup-zanuar-stack/SKILL.md

setup-zanuar-stack

Skill2 starsChanged 8 days agoMITView on GitHub

Set up machine defaults even before any repos exist. Rerun for each new repo to record its roles, autonomy, landing policy and integration branch.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 2 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run python3 init_db.py from this skill's directory to initialize the db, then python3 init_db.py show to list the current settings.

    line 28
  2. Very specific:

    Run python3 init_db.py detect to find harness binaries on PATH and list existing user skills directories, including ~/.claude/skills, …

    line 30
  3. Distinctive:

    Check which harnesses the session adapter can launch on the execution host.

    line 31
  4. Distinctive:

    Never guess a model id: Read it from the harness, and show the owner a short list:

    line 46
  5. Very specific:

    If the list command fails, say so and ask the owner for the id.

    line 57
  6. Very specific:

    Before saving, use the adapter to verify launch-time model and effort for managed roles.

    line 59
  7. Very specific:

    Run python3 init_db.py show (or pass the repo path after show) and read the rows back to the owner.

    line 91
  8. Very specific:

    Start with the orchestrator skill for a new project or work across repos.

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Setup zanuar-stack

Gets the shared state ready that the orchestrator, manager, worker and reviewer skills (this pack's, not look-alikes such as rig-manager) assume:

  • the ticket db at ~/.orca/tickets/tickets.db, built from schema.sql
  • repo_config sets machine-wide (repo='*') and repo defaults for each role. Managers record owner-approved ticket overrides in tickets.roles.

Explore, show what you found, ask, then write. Safe to re-run: the schema is idempotent and rows are replaced, not duplicated.

Choose a mode

Ask for full (ticket db, default) or lite (briefs and status in chat). In lite, skip DB initialization and use the launch and base settings agreed in chat. Carry the explicit choice in every role's prompt, even if a DB already exists. Without an explicit choice, role sessions use full if the configured DB exists (ZANUAR_DB or the default path above), otherwise lite.

Python

Use python3 with the scripts next to this file. They use only the standard library. Re-running init_db.py also migrates an older db. On Windows use python or py -3 if python3 is unavailable. Use - for an unset model or effort. For multiline SQL or parameters, use tq.py --file query.sql --params-file params.json.

On Windows, set $env:PYTHONIOENCODING = 'utf-8'. Write files with Python and explicit UTF-8 encoding. Avoid PowerShell pipelines that add a BOM.

1. Explore

  • Run python3 init_db.py from this skill's directory to initialize the db, then python3 init_db.py show to list the current settings.
  • For machine setup, use * even if there are zero repos. Skip the integration branch step. When a repo is added later, rerun for its absolute git root and leave machine defaults in place. If scope is unclear inside a repo, ask which scope applies.
  • Run python3 init_db.py detect to find harness binaries on PATH and list existing user skills directories, including ~/.claude/skills, ~/.codex/skills, ~/.omp/agent/skills, ~/.commandcode/skills and ~/.agents/skills. Offer only harnesses with binaries on PATH. On macOS a Homebrew-installed harness is detected when its bin directory is on PATH.
  • Check which harnesses the session adapter can launch on the execution host. Record them in the setup summary.

2. Ask, one role at a time

Roles in order: manager, worker, reviewer. For each, ask four things, leading with a recommendation the owner can accept in one word:

Recommend a stronger model for manager that can reliably follow the full dispatch, review, and PR protocol. Recommend cheaper models for worker and reviewer. S-4's Haiku/Flash-class models did well in those roles, but as managers they skipped review and pushed directly to base.

fieldaskdefault
harnessone of the detected harnessesthe one running this setup
modelan id from that harness's own list (below)the harness's current default
effortwhat that harness accepts (e.g. low/medium/high)high for reviewer, medium otherwise
modemanaged session or headless (one-shot run in a worktree)managed session for manager and worker, headless for reviewer

Never guess a model id. Read it from the harness, and show the owner a short list:

harnesslist models
ompomp models (or omp models find <pattern>)
codexcodex debug models (JSON; use the slug values)
commandcodecommandcode --list-models
pipi --list-models [search]
opencodeopencode models
claudeno list command: offer the aliases opus, sonnet, haiku, or a full id the owner reads from /model

If the list command fails, say so and ask the owner for the id. When Orca cannot set the requested model or effort, use headless for that configuration. Use - only when the owner approves leaving the setting unset.

Before saving, use the adapter to verify launch-time model and effort for managed roles. Save the effective mode in repo_config. Use headless for a worker or reviewer whose settings need it. The manager needs a launchable session.

Then ask for autonomy once for the same scope:

fieldaskdefault
autonomyask (confirm after each ticket), review (agents loop alone, ask before merge), merge (merge when review, verify and PR checks are green)review

Set land=pr for machine defaults and hosted repos. For a repo the owner chose to keep local, set land=local for reviewed branch handoff.

Tell the owner that merge permits automatic merges into the repo's non-production integration branch. The GitHub default branch and main/master always require explicit approval.

Integration branch

Use the base already agreed for a new repo, including a local-only repo. If the repo has a saved base, keep it unless the owner changes it. Otherwise detect the hosted default and look for develop, staging or dev among the remote branches. If there is an alternative, ask once with a recommendation first and the hosted default among the options. With no alternative, use the hosted default. For a local repo with no agreed base, check its branches and ask which to use. Save the branch name.

3. Write

From this skill's directory, replace the example values and run one call per role. Quote '*' when setting the machine default.

python3 init_db.py set '*' worker codex - - headless

and one for the settings:

python3 init_db.py settings '*' review pr

Save a repo's integration branch choice with python3 init_db.py base <repo> <branch>.

Run python3 init_db.py show (or pass the repo path after show) and read the rows back to the owner.

4. Done

Start with the orchestrator skill for a new project or work across repos. Use the manager skill for one configured repo. Managers read the saved rows.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.