agentleFS
GenKerenskyGenKerensky/pi-cartographer/skills/model-config/SKILL.md

model-config

Skill0 starsChanged 6 months agoMITView on GitHub

Interactive Cartographer model routing setup workflow for user-scope provider/model settings, fallback chains, and orchestrator recommendations.

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 11 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈11

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

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

    Use this skill when Cartographer detects missing or partial model-routing configuration in ~/.pi/agent/settings.json, or when the user asks …

    line 12
  2. Very specific:

    Do not edit ~/.pi/agent/settings.json free-form.

    line 16
  3. Distinctive:

    Use Pi model/provider metadata when available.

    line 40
  4. Distinctive:

    Keep provider/model IDs exact.

    line 41
  5. Distinctive:

    Do not invent model IDs.

    line 42
  6. Distinctive:

    Ask the user which providers Cartographer may use.

    line 46
  7. Very specific:

    If a subscription/free fallback exists, such as OpenCode Zen opencode/big-pickle, suggest it as a final fallback for suitable agents.

    line 48
  8. Distinctive:

    Ask for confirmation before writing.

    line 86
  9. Very specific:

    Use --force only when the user explicitly approves overwriting existing values.

    line 95
  10. Distinctive:

    Do not silently mutate user settings.

    line 113
  11. Distinctive:

    Do not write settings during runtime fallback.

    line 114
  12. Distinctive:

    Do not use direct LLM edits for JSON settings.

    line 115
  13. Distinctive:

    Do not recommend paid/cross-provider fallback without a clear cost warning.

    line 116
  14. Distinctive:

    Do not recommend non-Codex redactor fallback without a privacy/safety caveat.

    line 117
  15. Very specific:

    Do not use xhigh as a default.

    line 118
  16. Distinctive:

    Before considering setup complete:

    line 122

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Pi Cartographer Model Config Setup

When to Use

Use this skill when Cartographer detects missing or partial model-routing configuration in ~/.pi/agent/settings.json, or when the user asks to configure Cartographer models, reasoning levels, providers, or fallback chains.

This skill is invoked by the main agent. It is an interactive setup workflow: the main agent explains provider/model tradeoffs, asks the user to choose which providers Cartographer may use, previews the resulting settings, then delegates writes to the deterministic settings writer script.

Do not edit ~/.pi/agent/settings.json free-form. All settings writes must go through skills/plan/scripts/model_config.ts.

Inputs

  • Current user settings path: ~/.pi/agent/settings.json
  • Available Pi providers/models for the current user/session
  • Existing subagents.agentOverrides and cartographer settings when present
  • User provider preferences and cross-provider approval preference

Outputs

  • Preview of proposed user settings changes
  • Optional write to ~/.pi/agent/settings.json, performed by model_config.ts apply
  • Warnings for missing fallbacks, paid/cross-provider fallback, privacy-sensitive fallback, and unavailable models

Workflow

  1. Detect missing or partial config
    • Missing settings file.
    • Missing subagents.agentOverrides for Cartographer agents.
    • Missing cartographer.parentFallbackModels.
    • Empty fallbackModels for any Cartographer agent.
  2. Inspect available providers/models
    • Use Pi model/provider metadata when available.
    • Keep provider/model IDs exact.
    • Do not invent model IDs.
    • Capture model capabilities when available: thinking/reasoning support, input modality, context window, cost/subscription class, and speed/latency class.
  3. Ask provider menu
    • Ask the user which providers Cartographer may use.
    • Recommend Codex subscription models when available for the default route.
    • If a subscription/free fallback exists, such as OpenCode Zen opencode/big-pickle, suggest it as a final fallback for suitable agents.
    • Mark API-key providers or direct-token providers as possible paid usage.
    • For privacy-sensitive flows, especially cartographer-redactor, warn before recommending non-Codex/free-provider fallback.
  4. Recommend role-specific models

    RoleRecommendation criteria
    Main orchestratorBest available reasoning and tool reliability at balanced thinking. Recommend openai-codex/gpt-5.5 with medium thinking when Codex is selected.
    cartographer-drafterFastest low-cost text coding model with adequate context. Recommend openai-codex/gpt-5.3-codex-spark when available.
    cartographer-archivistLower-cost model suitable for research compression. Recommend openai-codex/gpt-5.4-mini when available.
    cartographer-auditorStrong reasoning model. Recommend openai-codex/gpt-5.5 with medium; escalate to high only with justification.
    cartographer-compassStrong reasoning model for decisions. Recommend openai-codex/gpt-5.5 with medium.
    cartographer-redactorPrioritize privacy/safety reliability over cost. Recommend openai-codex/gpt-5.5 with medium; require explicit caveat for non-Codex fallback.
  5. Recommend main orchestrator model
    • Recommend a thinking-capable model for the user to select as the main Pi orchestrator.
    • For OpenAI Codex subscription, recommend openai-codex/gpt-5.5 with medium thinking.
    • Explain that this does not automatically hot-swap Pi's active model; the user must select it in Pi when desired.
  6. Warn on no fallback
    • Warn if parent fallback chain is absent or empty.
    • Warn if any Cartographer agent has no fallback enabled.
    • Suggest a final fallback such as opencode/big-pickle when available and suitable.
  7. Preview settings
    • Generate a structured proposal JSON.
    • Run:
      node --experimental-strip-types skills/plan/scripts/model_config.ts preview \
        --settings "$HOME/.pi/agent/settings.json" \
        --proposal <proposal-json-file> \
        --models <available-models-json-file> \
        --json
    • Show the diff/preview and warnings to the user.
  8. Confirm and apply
    • Ask for confirmation before writing.
    • If approved, run:
      node --experimental-strip-types skills/plan/scripts/model_config.ts apply \
        --settings "$HOME/.pi/agent/settings.json" \
        --proposal <proposal-json-file> \
        --models <available-models-json-file> \
        --json
    • Use --force only when the user explicitly approves overwriting existing values.

Deterministic Writer Contract

The setup workflow must use skills/plan/scripts/model_config.ts for settings writes. The script validates:

  • proposed config shape;
  • model IDs against the available Pi model list;
  • thinking levels against model capabilities;
  • modality constraints, including Spark not being used for image/vision-required roles;
  • fallback model compatibility with required inputs;
  • no xhigh defaults;
  • missing or empty fallback chains.

The script preserves unrelated settings, writes atomically, and emits machine-readable JSON output. It should be tested with temp settings paths only.

Safety Rules

  • Do not silently mutate user settings.
  • Do not write settings during runtime fallback.
  • Do not use direct LLM edits for JSON settings.
  • Do not recommend paid/cross-provider fallback without a clear cost warning.
  • Do not recommend non-Codex redactor fallback without a privacy/safety caveat.
  • Do not use xhigh as a default.

Verification Checklist

Before considering setup complete:

  • Provider choices were shown to the user.
  • Role-specific recommendations were shown.
  • Main orchestrator model/thinking recommendation was shown.
  • No-fallback warnings were shown when applicable.
  • Free/subscription final fallback suggestions were shown when available.
  • Preview was validated by model_config.ts preview.
  • User confirmed before model_config.ts apply.
  • The apply command succeeded or the workflow stopped with a clear error.

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.