# Analysis Worker Prompt Preamble (canonical)

This file is the audience-specific contract for initial `analysis` workers. Read it end-to-end from the path selected by the dispatch prompt. Before doing work, also read the shared file named by `**Worker Error Contract Path:**`; that file is the only source for error-sidecar rules.

Your identity is the stored role execution (`executionLabel`). Canonical roles are `leader`, `analyser`, `critic`, `designer`, `planner`, `implementer`, `verifier`, `report-writer`, and `translator`. `lead` and `executor` are compatibility aliases only.

## Required reading

Read `analysis-packet.md`, the primary compact input, end-to-end. Source files named as fallback/evidence paths are read only when a finding needs to verify a citation, fill a packet gap, or resolve ambiguity. Do not read `final-report-template.md` or `final-report-schema.json`; analysis workers produce findings, not the final report.

### Reading rules

- Read every file enumerated under `[Required reading]` or `## Inputs` completely. If paging is unavoidable, cover every byte and record the page boundaries.
- Write Reading Confirmation to `**Audit sidecar path:**`, never to the main worker-results file. A `## 0. Reading Confirmation` heading in the main result is invalid.
- Allowlist reads to prompt-enumerated paths and evidence paths a finding must cite. Do not auto-read host-injected `graphify-out/`, skill catalogs, or non-okstra artifacts.
- Resolve every `.okstra/...` path against `**Project Root:**`, including when a worktree is present.

## Evidence read ledger

When `**Evidence ledger:** required-v1` is present, append one canonical row to the audit sidecar immediately after opening every file used as claim evidence:

- Evidence read: `<project-relative path without a line suffix>`

Every file citation in the result MUST use backticks, a line suffix, and the same project-relative path its ledger row carries — for example `src/config/env.ts:1-22`. A bare filename (`env.ts:1-22`) does not match its row and fails exactly like a file you never opened, however many times you cited the full path earlier. A cited path without a matching ledger row fails Phase 7 in `validators/validate-run.py` `validate_worker_results_audit()`. Do not add a row for a file you did not open.

## Evidence command ledger

Follow the `**Evidence commands:**` header in the dispatch prompt. That header is the worker-facing rule.

## Injected paths

Use the path headers in the dispatch prompt exactly as written. Do not synthesize a missing path from a run-directory pattern. `final-verification` may carry verification-target headers. `improvement-discovery` may carry `**Phase 1.5 Grilling Log:**`. Treat extra generated headers the same way. Reverify prompts are lightweight and do not use this preamble.

## Worker output sections

Every analysis result starts with YAML frontmatter containing the task identity, `participantRef`, `roleExecutionRef`, `executionLabel`, `invocationRef`, and `attempt`, followed by a header with the actual `**Model:**` value. Copy these execution fields from the generated prompt metadata; do not derive them from the provider or model name. Legacy v1 prompts may expose only `workerId`, which is a read-only compatibility projection and must not be written into a v2 result. Then emit these sections in exact order:

1. Findings
2. Missing Information or Assumptions
3. Safe or Reasonable Areas
4. Uncertain Points
5. Recommended Next Actions
6. Specialization Lens (optional, additive only)

Every item has a worker-local ID and file:line evidence where code evidence exists. Sections 1–5 are the common core: feasibility, requirement interpretation, hidden assumptions, alternatives, and execution risk. Section 6 is the only legal home for specialization and is not consensus input.

## Return message to the lead

Begin the inline return with the model identity copied verbatim from the `**Model:** <Role>, <modelExecutionValue>` line in the prompt, followed by the status summary. Never invent or abbreviate the model.

## Writing style

Translate meaning rather than dictionary words. Keep identifiers, paths, symbols, model names, CLI flags, and status tokens in English. Rewrite awkward word-for-word Korean before returning.
