Documentation index | Agent protocol | Architecture
Praector uses role-based runtime profiles rather than mythology/persona names. Every profile inherits a mandatory global engineering contract from internal/assets/prompts/global.md, has a mandatory role-specific operating contract under internal/assets/prompts/, and receives the durable Task Envelope generated by internal/praector/envelope.go.
You can inspect the installed contracts directly:
praector profile list
praector profile show coordinator
praector profile show explore
praector profile show critic
praector profile show plan_review
praector profile show advisepraector profile show <profile> prints the inherited global engineering contract first and the selected role-specific contract second.
The built-in prompt files are:
internal/assets/prompts/global.md
internal/assets/prompts/coordinator.md
internal/assets/prompts/critic.md
internal/assets/prompts/plan_review.md
internal/assets/prompts/research.md
internal/assets/prompts/implement.md
internal/assets/prompts/review.md
internal/assets/prompts/advise.md
The global contract and role contracts are intentionally separate. The Envelope carries durable task/context/delegation mechanics and injects the global contract into every fresh attempt; the profile prompt supplies the specialized reasoning stance. This means delegated, retried, and resumed work inherits the same engineering rules without copying generic prose into each task objective.
The global contract applies to all profiles and establishes repository-wide execution discipline:
- after substantive repository writes, inspect relevant
README.mdandAGENTS.mdfiles and update them when durable knowledge would otherwise be lost; - prefer the smallest coherent code change that satisfies the objective;
- consider callers/callees, variables/shared state, control flow, configuration, tests, and other surrounding assumptions when changing code;
- inspect parent/child/sibling/consumer relationships for inheritance, interfaces, protocols, composition, or related classes;
- surface worthwhile adjacent work as recommendations/risks/questions rather than silently expanding scope;
- favor simple direct changes over unnecessary abstraction;
- match surrounding style and avoid sweeping syntax/formatting churn;
- use docstrings or the repository's equivalent documentation convention when they add durable understanding;
- preserve these rules when creating plans or durable tasks for another worker.
Role prompts reinforce these rules rather than duplicating them. The coordinator translates them into task-specific contracts; the critic and plan reviewer look for missing impact/scope analysis; the implementation worker performs the impact/documentation checks; and the implementation reviewer verifies adherence without failing for merely optional deferred improvements.
| Praector profile | Purpose | Capability | Rough OMO analogue |
|---|---|---|---|
explore |
Evidence-grounded map of the current repository/system surface before implementation planning | read-only | repository discovery / context mapper |
coordinator |
decision-complete planning plus durable graph authority | read-only, graph-authority | Prometheus planner plus part of Atlas orchestration |
critic |
pre-plan gap analysis, hidden intent, scope/QA hazards | read-only | Metis / plan-consultant |
plan_review |
practical executability review of the proposed task graph | read-only | Momus / plan-reviewer |
advise |
deep technical/architecture recommendation | read-only | Oracle / architect consult lane |
research |
bounded fresh/authoritative evidence gathering with source, claim, version/date, and oracle provenance | read-only | Librarian / external-evidence lane |
implement |
bounded code/file execution and self-verification | write | Sisyphus-Junior / implementation worker concept |
review |
independent verification of integrated implementation | read-only | post-implementation QA/gate reviewer, not Momus |
The mapping is conceptual, not a dependency. Praector does not import or invoke Oh My OpenAgent.
Browser (CDP) access is a default-off project capability ([capabilities] browser) granted only to research and implement attempts, decided by the single named BrowserProfiles predicate and applied together at the scheduler environment, the HARNESS browser_cdp audit header, and the inline chrome-devtools-mcp config entry. A granted attempt gets PRAECTOR_CDP_URL and PRAECTOR_ARTIFACT_DIR (evidence outside the worktree, so the read-only Git-mutation check stays green); every other profile stays byte-identical to a capability-off run with both variables stripped. The prompt contracts add only static, env-conditional evidence guidance (conditional visual-claim/artifact rules, never unconditional mandates, and artifacts only to PRAECTOR_ARTIFACT_DIR): implement references screenshot/probe artifacts and exposes a probe hook, research describe-screenshot-stores UI evidence, and review flags missing re-capturable visual evidence unconditionally while the "re-capture browser evidence yourself" half applies only when the reviewer itself is granted. Browser access is unauthenticated drift-proofing for models, not a security boundary (see docs/OPERATIONS.md). The contracts also require motion, not just placement: a browser-granted implement attempt is told (env-conditionally) that an animation/motion claim needs a tick-stepped frame sequence spanning at least one animation cycle plus a per-tick state trace captured through the page's own probe hook (a single frame proves placement, never motion), to prefer checks that fail numerically, and to render-screenshot-inspect-fix its own UI change within the same attempt before claiming completion; review flags a motion claim resting on a single frame as a finding via a browser-free artifact-shape check gated on the implementation's own motion claim and browser access. All tick/frame control stays attributed to the page's probe hook — no frame-step API, no motion classifier or flag. When browser work is expected, operators may map the implement/review profiles to a vision-capable model via the existing [models] mapping; this is documentation guidance only, and Praector enforces no vision-model predicate.
This distinction matters:
plan_reviewasks whether the proposed graph is executable before write work runs.reviewasks whether completed integrated implementation actually satisfies its objective.
A plan can be executable and still produce a buggy implementation; both gates solve different failure modes.
The coordinator owns the work graph, not product implementation. Its prompt requires it to:
- classify the dominant work intent before decomposing;
- inspect project evidence before assuming;
- use the smallest safe graph rather than delegating ceremonially;
- request
criticfor materially ambiguous/high-risk work; - request
advisefor architecture/tradeoff decisions that materially affect the design; - make non-trivial write tasks depend on a
plan_reviewgate when useful; - make task objectives decision-complete with DELIVERABLE / SCOPE / MUST HAVE / MUST NOT / VERIFY context;
- submit its result and exit instead of waiting for workers.
Every implementation Collection receives deterministic read-only repository exploration before its initial/revision coordinator plans material work. Purely local implementation follows explore -> critic. When policy classifies current external evidence as material, explore and fresh research run independently and the critic depends on both, giving it local reality plus current external truth before coordination. Beyond that preflight, a coordinator facing a cross-cutting objective may itself fan out a small number (2-4) of additional explore tasks with disjoint scopes, which the scheduler already runs in parallel. Clearly trivial documentation-only work may still skip final plan_review; non-trivial implementation retains the deterministic plan_review floor. advise remains conditional on architecture/tradeoff needs. The explorer contract goes beyond a surface checklist: for removal/rename/retire objectives it traces what depends ON the target across every medium and classifies each hit; a negative finding counts only with the exact command, pattern, and scope establishing it; aliveness/duplication/legacy questions check version-control co-change recency; a multi-class objective reports per-class sweep coverage; and a discovered must-preserve invariant is captured as a machine-checkable anchor in evidence.
Freshness classification is also usable outside implementation: current-news/events/pricing/availability/support objectives can receive deterministic research while skipping repository exploration, implementation critic, and write-work gates that do not apply.
Unlike an interactive planning agent, Praector does not let managed workers ask the operator live questions. If evidence, critic, and advice still leave a requirement-defining ambiguity with no safe reversible default, the coordinator should block/fail planning with the exact unresolved choice rather than inventing an answer. A future durable operator-input gate can add interview-style clarification without making session continuity part of correctness.
The critic is deliberately pre-planning. It does not judge code quality or implement solutions. It classifies the request and looks for the few issues that would change the plan:
- hidden requirements or contradictions;
- requirement-defining ambiguity;
- scope inflation / adjacent cleanup / premature abstraction;
- missing compatibility, migration, rollback, or integration constraints;
- architecture decisions lacking real constraints;
- research without exit criteria;
- vague or human-only acceptance/QA.
It returns actionable planner directives and clearly separates observed facts, assumptions, and unresolved choices. When the change touches shared state, a schema/column, a durable event emitter, a state transition, or a widely-called contract, the critic should emit a sibling-effect sweep as a planner directive (name the effect to enumerate and require per-site dispositions with the enumeration method). Every planner directive, QA directive, and risk mitigation becomes an inherited directive with a stable id that downstream reviews and plan reviews must disposition, so directives are phrased as checkable obligations; non-directive commentary belongs in unresolved.
For required-critic collections, the initial critic is a preflight, not a permanent approval. Praector seals it to the first critic-informed material plan at final plan-review handoff. Later changes to implementation/research/advice contracts or their meaningful dependencies require a revalidation critic. A fresh coordinator consumes that revalidation; if incorporation changes the material plan again, another critic round is required before plan review. Completed fresh-research result digests are part of the material fingerprint, so materially refreshed external evidence can stale that seal as well.
Whether the critic (and the external-conformance / threat-model gates that also feed plan_review) is mandatory is decided by the deterministic planning policy from the objective's detected risk category, not from the verb used to phrase it, so an integration- or security-sensitive objective in noun or passive form still mandates the critic rather than slipping through on wording. This is forward-scoped by the collection created_at against GateCoherenceCutoff; collections created before the cutoff keep the prior verb-ANDed gates so already-dispatched work is not re-gated. See docs/OPERATIONS.md.
The plan reviewer is approval-biased and blocker-focused. It asks whether a capable worker can execute the current graph without getting stuck. It checks:
- references and assumptions are grounded;
- each task has a usable starting point and bounded deliverable;
- dependencies are coherent and non-contradictory;
- verification is executable;
- scope boundaries prevent obvious overreach;
- executing the graph exactly as written can satisfy all Collection MUST/MUST NOT and acceptance requirements without knowingly relying on a later repair for a defect already visible in the plan.
It does not reject for style or because it prefers another architecture. A known acceptance violation is a true blocker; Praector has no implicit fault-injection exception. A failed verdict stays blocking and causes Praector to wake a coordinator for graph repair; after that coordinator completes, the same durable plan-review Task runs again in a fresh Attempt. A non-failed nonterminal final plan-review gate is single-flight: later coordinators reuse that gate rather than creating a parallel final-review generation. When inherited_directives are present, a passing verdict additionally requires directive_dispositions covering every inherited directive (satisfied/deferred/explicit_exception with evidence; deferred/exception require a durable decision id): a graph that leaves an inherited directive unchecked in every downstream contract is not executable.
The advisor is the deep judgment lane. Its prompt emphasizes:
- pragmatic minimalism;
- reuse of existing patterns/components;
- one primary recommendation rather than an indecisive option dump;
- explicit tradeoffs and material uncertainty;
- concrete evidence;
- a trigger for when the recommendation should be revisited.
It also signals confidence and coarse implementation investment when those factors affect the decision, and identifies the condition that would justify revisiting the recommendation. It advises; it does not implement. Its recommendations and risk mitigation entries become inherited directives that downstream reviews and plan reviews must disposition, so they are phrased as concrete checkable obligations; tradeoffs, revisit triggers, and unresolved items remain context and are not harvested as directives.
The researcher answers one bounded evidence question and distinguishes observed fact from inference. For deterministic fresh research it must use current retrieval rather than model memory and return machine-checkable provenance: an as_of date; source ids/authority/references; material claims with normative level and derived directive; confidence; and classified verification oracles. Sources are prioritized toward current official specifications/standards, first-party release notes and SDK/reference implementations. A directive may preserve or strengthen a normative claim, or cite a durable exception decision; it may not silently weaken the evidence.
Oracle kinds distinguish internal_test, black_box_test, independent_implementation, official_reference_oracle, and live_provider_oracle. Out-of-process does not automatically mean authoritative. For external-conformance work, a passing final review must actually exercise an independent_implementation, official_reference_oracle, or live_provider_oracle, unless a durable exception decision records why none is practical. Research claims are also projected into each downstream Task Envelope as inherited_research_constraints; these canonical directives remain authoritative even when a critic adds local guidance. Research consumers must include research_consistency with one disposition per stable claim (preserved, strengthened, or explicit_exception), repeat the exact inherited directive, and cite an actual durable Collection decision for any exception. Claim ids that collide across research tasks are referenced as <research-task-id>:<claim-id>. When current external evidence is unavailable but required, critic/plan-review/review/advise may submit RESEARCH_REQUIRED and resume after bounded research rather than guessing. When the decisive gap is answerable from the repository itself rather than from outside it, the same specialists may submit EXPLORE_REQUIRED and resume after a bounded read-only exploration; the internal hatch has no capability gate, and only one of research/explore is used for a given uncertainty.
The implementation worker treats its Task and completed dependencies as the contract. It should make the smallest coherent change, inspect the meaningful surrounding impact surface, avoid adjacent scope growth, match local code style, inspect relevant README/AGENTS files after writes, run relevant verification, and never claim a command passed when it was not executed. Completed implementation results should also include a concise reviewer-facing pr_summary and 3–8 concrete changes bullets; these are durable delivery metadata used directly by praector collection pr, while verification commands remain in evidence.
An implement attempt cannot silently succeed by writing nothing. If it exits 0 without a structured result and with zero new commits versus its durable base_commit (measured by commit reachability, not a working-tree diff), the scheduler treats it as an execution/protocol failure — a phantom completion — rather than a completion: it returns the same Task to READY for a fresh attempt within the budget (recording IMPLEMENT_PHANTOM_COMPLETION_REJECTED and resetting the candidate worktree to base so leftovers cannot leak), and fails with coordinator attention on budget exhaustion. This mechanical floor never overrides an honest worker: a structured completion is exempt even at zero commits, so dishonesty remains the reviewer's job to catch. Separately, any profile whose exit-0 fallback completion stores only final response text is marked result_json.fallback_text_result = true with a RESULT_FALLBACK_TEXT event, so a transcript-style result is mechanically distrustable downstream.
The implementation reviewer re-reads the integrated candidate rather than trusting the implementer result. It independently inspects the diff and meaningful impact surface, reruns appropriate tests, verifies relevant durable documentation when applicable, reproduces important behavior when practical, and submits verdict: pass|fail with evidence. It records optional adjacent improvements as non-blocking recommendations/risks rather than failing for preference. A passing review must also record the sibling-effect sweep in impact_enumeration: the enumeration method and an affected/unaffected disposition with evidence for every site performing the same effect (same column/state write, event emitter, state transition, or contract caller). This makes the sweep auditable and falsifiable by a human, not provably complete. Configuration keys/flags introduced by the change must name their reader path — an introduced-but-never-read knob is a blocking defect, not a style preference — while everything the change did not introduce keeps the ordinary style-is-non-blocking discipline. When inherited_directives are present, each must be dispositioned in directive_dispositions with evidence. On a post-repair review, the previously failed review is a carried dependency: the reviewer re-checks or explicitly refutes each carried finding and says which, without treating the earlier verdict as authoritative. When the diff touches a claim/readiness/artifact-floor predicate or a generation-identity resolver, the reviewer extends the sibling-effect sweep to role-identity: it enumerates every query/function answering a role-identity question (which coordinator owns a generation, latest plan_review, active attempt) and flags any whose semantics changed without the others, and it executes at least one forever-hold scenario through the authoritative ClaimTask seam. All role-identity queries are expected to route through the single named generation-identity helper (isGenerationCoordinatorTitle / generationCoordinatorTitlePredicate), keeping the stricter generation-coordinator variant separate; a divergent inline identity lookup is a blocker.
At runtime the model receives:
common PRAECTOR TASK ENVELOPE
+ mandatory internal/assets/prompts/global.md engineering contract
+ profile purpose / OWN / ASK / DELEGATE boundary
+ mandatory internal/assets/prompts/<profile>.md operating contract
+ durable context JSON
For coordinator, critic, and plan-review profiles, the durable context also includes a snapshot of the current Collection graph so planning roles can reason about the actual task/edge state rather than reconstructing it from prose.
Dependency summaries preserve role-relevant fields such as verdict, recommendation, confidence, planner directives, QA directives, assumptions, evidence, risks, and unresolved items.
Praector currently keeps one role contract per profile rather than maintaining separate Claude/GPT prompt bodies. This is intentional for now: the durable orchestration contract should remain stable across local models. Model-per-profile selection is configurable in .praector/project.toml.
A future prompt-calibration layer may add model-family framing without changing the role semantics or authority boundaries.
For work involving shared mutable state, the critic must identify concurrency, atomicity, synchronization, and process-boundary hazards. plan_review must challenge those independently rather than merely confirm that critic directives were copied into an implementation task.
The implementation review profile must fail when observed behavior violates an explicit objective, MUST HAVE, acceptance criterion, security/data-integrity invariant, or stated numeric limit. Merely documenting the limitation does not waive the requirement. For shared mutable state, review independently checks thread/task/process concurrency and atomicity rather than assuming a single process serializes requests.
The coordinator defines implementation contracts first and then requests plan_review as its final blocking planning handoff. Creating that review atomically gates existing implementation tasks. If the review passes, Praector finalizes the waiting coordinator automatically; the coordinator does not receive another ordinary attempt. If the review fails, explicit coordinator-repair work is created and the reviewer remains blocking until the repaired graph passes.