@agimon-ai/po-model-guidance

Per-model system prompt guidance for Pi agents, layered across global and repository scope.

Packages

Package details

extension

Install @agimon-ai/po-model-guidance from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@agimon-ai/po-model-guidance
Package
@agimon-ai/po-model-guidance
Version
0.0.0-alpha.232
Published
Dec 6, 2026
Downloads
28.3K/mo · 6,093/wk
Author
agiflow-ai
License
FSL-1.1-MIT
Types
extension
Size
62.6 KB
Dependencies
3 dependencies · 1 peer

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@agimon-ai/po-model-guidance

Per-model system-prompt guidance, selected through Po's optional llm layer. Guidance is keyed by the exact model ID reported by the host, so a new model's adjustments do not change older models' prompts.

Enable

Add @agimon-ai/po-model-guidance to a layer selected by your preset in .po/presets.yaml, then run po sync. Listing it in default.packages enables it for every preset. Preserve the other package entries.

The built-in preset currently supplies guidance for gpt-6-astra to continue agreed plans and scoped tasks without repeated confirmation of minor decisions. It does not remove security or approval requirements.

Configure

Custom guidance lives in ~/.po/model-guidance.yaml and <repository>/.po/model-guidance.yaml:

modelGuidance:
  claude-opus-5: |
    Keep the task focused. Never go off rails.
  gpt-6-astra: |
    Prefer fewer, larger tool batches.

Model IDs match exactly. Use the ID shown by /model; a newly versioned ID needs its own entry.

The built-in preset applies first, then the home file, then the repository file. Each later entry replaces the earlier text for that model only. Models without an entry receive no guidance. A malformed or unreadable file warns on stderr and falls back to the built-in preset rather than ending the session.

The native before_agent_start hook reads the files for each turn and appends the selected guidance to the system prompt. An edit therefore applies on the next turn without a restart. This package publishes poServer and session-scoped poMcp entries, not a standalone Pi extension.

Development

pnpm exec nx run-many -t lint typecheck build test -p @agimon-ai/po-model-guidance

Verify: Run the package’s test target above. Expect the matching-model hook test to append guidance and the reload test to pick up an edited file on the next turn. Provider turns are not verified live.

The hook lives under src/extensions; matching and merging live in src/services/modelGuidance, and layered file reads in src/services/modelGuidanceStore.

License

Functional Source License 1.1, MIT Future License (FSL-1.1-MIT): free for any purpose except a Competing Use; each version converts to MIT two years after release. See LICENSE.