// engine/universal-rules/rules/planu-sdd-model-routing.ts — Universal rule: model routing + context continuity
function buildBody() {
    return `# Planu SDD Model Routing and Context Guarantee

Auto-generated by \`init_project\`. Do not edit manually.

## Required Model Tiers

- Analysis/spec phase (\`facilitate\`, \`create_spec\`, \`challenge_spec\`, \`check_readiness\`): use the strongest available model, such as Opus, GPT-5.5, Gemini Pro/Ultra, or equivalent.
- Implementation phase: use a lower/intermediate implementation model only after the approved spec and handoff package are complete.
- Review phase: use a reviewer-grade model/agent.
- Arbitration/close phase: use the strongest available model or an explicit arbiter.

## Phase Gates

- \`update_status(approved)\` must include max-model evidence: \`modelTierUsed=max\` or a frontier \`modelId\`.
- \`update_status(implementing)\` must include \`modelTierUsed=implementation\`, \`contextHash\`, and \`handoffPath\` or \`handoffArtifactId\`.
- \`update_status(done)\` must include validate evidence, \`reviewedBy\`, \`arbitratedBy\`, \`contextHash\`, and the handoff reference.
- If implementation changes architecture or scope, move the spec back to \`review\` and run \`reconcile_spec\`.

## Context Contract

\`package_handoff\` is the operating contract for the implementer. It must include:

- objective
- BDD acceptance criteria
- files to modify/create
- ownership
- test plan
- risks
- out-of-scope
- current state
- next action

The package must be persisted outside chat history. Do not rely on memory from the current conversation.

## Force Policy

Forcing a blocked phase is allowed only with an audited reason of at least 100 characters. The reason must state which gate was bypassed and what follow-up is required.
`;
}
export const planuSddModelRoutingRule = {
    id: 'planu-sdd-model-routing',
    name: 'Planu SDD Model Routing',
    description: 'Requires correct model tiers and reconstructible context across SDD phases.',
    category: 'safety',
    applicableHosts: ['all'],
    defaultEnabled: true,
    buildContent: (_host) => buildBody(),
};
//# sourceMappingURL=planu-sdd-model-routing.js.map