Boosting Open Playbook (BOP)
v0.5 Product Requirements Document
1. Executive Summary
Boosting Open Playbook (BOP) is a grounded workflow orchestration and reasoning system designed to operationalize reusable concepts across technical, analytical, and decision-making workflows.
BOP combines:
- reusable conceptual knowledge
- retrieval-grounded reasoning
- deterministic workflow orchestration
- specialized agents
- explicit provenance tracking
- human-in-the-loop approvals
The system is intentionally designed to avoid:
- uncontrolled autonomy
- hallucination cascades
- hidden state
- opaque reasoning
- speculative outputs presented as fact
BOP is fundamentally:
- a reasoning infrastructure layer
- a workflow execution framework
- a reusable decision-support system
- a personal operational memory platform
It is NOT intended to function as:
- a self-directed AGI system
- an autonomous employee
- an unrestricted recursive agent swarm
2. Product Vision
Vision Statement
Create a trusted cognitive operating system that:
- accumulates reusable operational knowledge
- applies concepts consistently across workflows
- operationalizes reasoning through orchestrated agents
- minimizes repeated reasoning and prompting
- remains grounded, inspectable, and auditable
The long-term goal is to create:
- reusable reasoning primitives
- operationalized workflows
- grounded task execution
- high-trust orchestration
- persistent decision infrastructure
3. Core Architectural Philosophy
3.1 Canonical State Principle
All persistent operational knowledge must exist in explicit system state.
Canonical state includes:
- Playbook
- workflow state
- task records
- logs
- provenance records
- generated artifacts
- approval records
Agents may not maintain hidden operational memory.
The system should avoid:
- hidden context
- transient untracked state
- implicit memory
- stateful agent behavior
3.2 Provenance-First Design
Every meaningful output must be traceable.
All recommendations, conclusions, and generated artifacts should reference:
- source concepts
- retrieved evidence
- upstream agent outputs
- user inputs
- external sources
The system prioritizes:
- inspectability
- traceability
- auditability
- reproducibility
over convenience or autonomy.
3.3 Grounded Reasoning Only
Agents may only reason from:
- retrieved Playbook concepts
- explicit user inputs
- approved external sources
- attributed upstream outputs
Agents may NOT:
- fabricate facts
- silently infer unsupported conclusions
- invent experiences
- invent metrics
- convert assumptions into facts
Unsupported information must be labeled explicitly.
3.4 Explicit Uncertainty Principle
The system must explicitly distinguish between:
- FACTS
- ASSUMPTIONS
- INFERENCES
- RECOMMENDATIONS
- OPEN QUESTIONS
When evidence is insufficient, the system should:
- ask clarifying questions
- downgrade confidence
- explicitly state uncertainty
The system should never fabricate certainty.
3.5 Human Augmentation Principle
BOP exists to augment human cognition and workflows.
The system should:
- improve consistency
- reduce repeated reasoning
- operationalize concepts
- assist decision-making
- improve workflow quality
The system should NOT:
- replace human judgment
- conceal uncertainty
- autonomously mutate persistent state
- operate indefinitely without oversight
3.6 Constrained Orchestration Principle
Structured workflows are preferred over unrestricted autonomy.
The system should favor:
- deterministic execution
- explicit orchestration
- inspectable workflows
- constrained responsibilities
- bounded agent scopes
The system should avoid:
- uncontrolled recursion
- unrestricted self-directed behavior
- hidden workflow mutation
- emergent opaque execution chains
3.7 Retrieval Quality Over Model Sophistication
System quality depends more on:
- concept quality
- retrieval quality
- provenance quality
- workflow clarity
- evidence integrity
than on:
- model size
- model autonomy
- raw generative capability
The system should prioritize:
- concept hygiene
- deduplication
- retrieval ranking
- provenance integrity
- evidence quality
before increasing orchestration complexity.
3.8 Token Efficiency Principle
BOP should use LLM tokens efficiently while preserving:
- grounding quality
- provenance integrity
- inspectability
- correctness
- hallucination mitigation guarantees
Token efficiency is important but subordinate to:
- correctness
- explicit reasoning
- evidence integrity
- trustworthiness
The system should minimize unnecessary token usage through:
- targeted retrieval
- ranking and filtering
- structured intermediate outputs
- compact workflow state
- incremental context loading
- selective provenance inclusion
- context summarization with attribution
- domain-aware retrieval windows
The system should avoid:
- loading excessive concepts
- large irrelevant contexts
- repeated retrievals
- duplicated workflow state
- uncontrolled context expansion
Token optimization must never:
- conceal assumptions
- omit required provenance
- suppress uncertainty
- degrade inspectability
- increase hallucination risk
3.9 Operationalization Principle
System quality depends more on:
- concept quality
- retrieval quality
- provenance quality
- workflow clarity
- evidence integrity
than on:
- model size
- model autonomy
- raw generative capability
The system should prioritize:
- concept hygiene
- deduplication
- retrieval ranking
- provenance integrity
- evidence quality
before increasing orchestration complexity.
4. System Goals
4.1 Primary Goals
- Reuse accumulated concepts across workflows
- Reduce repeated prompting and reasoning
- Improve consistency of outputs
- Ground outputs in evidence
- Create reusable workflow infrastructure
- Improve productivity in coding and analysis tasks
- Minimize hallucinations and unsupported claims
4.2 Secondary Goals
- Surface reusable concepts from ongoing work
- Build a reusable reasoning graph
- Improve long-term decision quality
- Create portable workflow intelligence
4.3 Non-Goals
BOP is NOT intended to:
- become fully autonomous
- recursively self-improve
- replace human judgment
- operate indefinitely without supervision
- optimize for maximal automation at the expense of trust
5. LLM-Agnostic Architecture
5.1 Architectural Principle
Agents must remain provider-neutral.
An agent is defined by:
- role
- responsibilities
- tools
- grounding rules
- workflow behavior
- input schema
- output schema
An agent is NOT defined by:
- a specific model provider
- provider APIs
- provider-specific tool syntax
- provider-specific response structures
Model selection is an implementation detail handled by the Model Adapter Layer.
5.2 Model Adapter Layer
The Model Adapter Layer abstracts provider-specific APIs.
Initial provider:
- OpenAI
Future providers may include:
- Anthropic
- local models
- future hosted providers
Responsibilities:
- normalize model invocation
- normalize tool calling
- normalize structured outputs
- validate schemas
- retry malformed outputs
- log provider usage
- expose provider capabilities
Suggested interface:
model.generate(
messages=messages,
response_schema=schema,
tools=allowed_tools
)
5.3 Provider Capability Registry
The system should explicitly track provider capabilities.
Example:
providers:
openai:
supports_tools: true
supports_json_schema: true
supports_file_search: true
local_model:
supports_tools: false
supports_json_schema: weak
supports_file_search: false
The runtime should route tasks appropriately.
5.4 Standard Agent Specification
All agents should use provider-neutral specifications.
Suggested structure:
id: retrieval_agent
role: Retrieve relevant Playbook concepts.
responsibilities:
- retrieve concepts
- return evidence
- avoid unsupported inference
inputs:
- task
- workflow_context
- domain_filters
outputs:
- retrieved_concepts
- evidence
- confidence
rules:
- Do not infer beyond retrieved sources.
- Return "No supporting evidence found" if retrieval fails.
allowed_tools:
- retrieve_concepts
5.5 Standard Input Schema
All agents should receive a standardized task envelope.
{
"task_id": "...",
"agent_id": "ux_analyzer",
"user_request": "...",
"context": {},
"artifacts": [],
"retrieved_concepts": [],
"constraints": [],
"prior_outputs": []
}
5.6 Standard Output Schema
All agents should return structured outputs.
{
"facts": [],
"assumptions": [],
"inferences": [],
"recommendations": [],
"open_questions": [],
"evidence": [],
"confidence": "LOW|MEDIUM|HIGH",
"next_actions": []
}
This schema is central to hallucination mitigation.
6. Workflow Orchestration Architecture
6.0 Workflow Lifecycle State Machine
All workflows should follow an explicit lifecycle state machine.
Suggested lifecycle:
DRAFT
↓
PLANNED
↓
AWAITING_APPROVAL
↓
RUNNING
↓
BLOCKED
↓
AWAITING_USER_INPUT
↓
AWAITING_APPROVAL
↓
COMPLETED
↓
ARCHIVED
Failure states:
FAILED
CANCELLED
INVALID
The workflow lifecycle should remain:
- inspectable
- resumable
- serializable
- replayable
Workflow state transitions should be explicitly logged.
6.1 Supervisor Philosophy
The Supervisor should function primarily as:
- workflow orchestrator
- dependency coordinator
- context manager
- synthesis layer
The Supervisor should NOT function as:
- unrestricted autonomous intelligence
- speculative reasoning engine
- hidden state container
The Supervisor should:
- explicitly route subtasks
- explicitly manage dependencies
- explicitly track assumptions
- explicitly validate downstream outputs
- explicitly maintain provenance
6.1b Supervisor Execution Semantics
The Supervisor should follow an explicit orchestration procedure.
Suggested execution sequence:
Interpret request
↓
Classify workflow complexity
↓
Estimate token budget
↓
Determine required evidence
↓
Determine required agents
↓
Construct workflow DAG
↓
Validate constraints
↓
Present workflow plan
↓
Await user approval
↓
Execute subtasks
↓
Validate outputs
↓
Resolve or escalate conflicts
↓
Synthesize final output
↓
Propose storage opportunities
↓
Finalize workflow
The Supervisor should remain:
- deterministic
- inspectable
- orchestration-focused
The Supervisor should avoid:
- hidden planning
- implicit orchestration
- speculative reasoning
- silent workflow mutation
6.2 Supervisor Planning and Approval Rule
In v0.2, the Supervisor must always show its execution plan before starting a workflow.
The Supervisor must wait for user approval before invoking agents or executing the workflow.
This approval-first behavior is intentional. It prioritizes:
- trust
- transparency
- inspectability
- early correction
- user confidence
Future versions may relax this requirement once the system proves reliability through repeated successful workflows.
The plan should include:
- interpreted user goal
- proposed workflow mode
- agents to be used
- planned subtasks
- expected inputs and outputs
- grounding strategy
- estimated token usage
- approval gates
- known assumptions
- open questions
6.2b Workflow Complexity Classification
Before constructing a workflow DAG, the Supervisor should classify workflow complexity.
Suggested workflow modes:
Direct Response
Use when:
- simple response sufficient
- minimal retrieval required
- no persistent mutations
- low orchestration complexity
Characteristics:
- minimal agent usage
- minimal retrieval
- low token cost
Retrieval-Augmented Workflow
Use when:
- Playbook concepts materially improve quality
- retrieval grounding required
- moderate reasoning complexity
Characteristics:
- retrieval required
- limited orchestration
- moderate token cost
Orchestrated Workflow
Use when:
- multiple agents required
- artifact analysis required
- workflow decomposition beneficial
- synthesis across subtasks required
Characteristics:
- DAG execution
- multiple agents
- explicit orchestration
- higher token cost
Mutation Workflow
Use when:
- persistent state changes requested
- code modifications requested
- concept storage requested
- repository mutation required
Characteristics:
- approvals required
- provenance requirements elevated
- mutation tracking required
The Supervisor should prefer the lowest-complexity workflow capable of safely accomplishing the user goal.
6.3 Token Budget Management
The Supervisor should estimate token usage before workflow execution.
The estimate should include:
- retrieval budget
- analysis budget
- synthesis budget
- reserve for final response
- expected total budget
The Supervisor should manage token usage automatically unless the user provides a hard cap.
Token budget estimates should remain visible to the user in the workflow plan.
The system should record actual token usage after workflow execution so that future estimates can improve.
6.3a Supervisor Execution Loop (v0.5)
A minimal, deterministic loop for planning, approval, and execution:
PLAN → SHOW PLAN → AWAIT APPROVAL → EXECUTE SUBTASKS → VALIDATE → SYNTHESIZE
Pseudo-flow:
plan = supervisor.plan(user_request)
show(plan)
approved = await_user_approval()
if not approved: abort
state = init_state(plan)
for subtask in plan.subtasks:
result = execute(subtask, state)
state = update(state, result)
if result.status == 'FAILED': handle_failure(state)
final = supervisor.synthesize(state)
return final
All steps must be logged and inspectable.
6.3b Workflow Modes (Decision Heuristics)
The Supervisor must choose the simplest viable mode:
- Direct Response
- Retrieval-Augmented
- Orchestrated
- Mutation
Heuristics (initial):
If no artifacts and low ambiguity → Direct
If concepts likely improve answer → Retrieval-Augmented
If multiple artifacts/steps needed → Orchestrated
If persistent changes requested → Mutation
The Supervisor should estimate token usage before workflow execution.
The estimate should include:
- retrieval budget
- analysis budget
- synthesis budget
- reserve for final response
- expected total budget
The Supervisor should manage token usage automatically unless the user provides a hard cap.
Token budget estimates should remain visible to the user in the workflow plan.
The system should record actual token usage after workflow execution so that future estimates can improve.
The token estimation model should eventually learn from:
- workflow type
- number of agents used
- retrieved concept count
- artifact size
- agent output size
- actual token usage
- estimate error
Token optimization remains subordinate to:
- correctness
- provenance
- hallucination avoidance
- inspectability
6.4 Agent Registry Constraint
In v0.2, the Supervisor may only assign tasks to predefined agents in the agent registry.
The Supervisor may NOT create ad hoc one-off agents during normal workflow execution.
However, the Supervisor may suggest that a new reusable agent should be created when repeated workflow needs indicate that one would be useful.
At the user’s explicit direction, the system may help define a new reusable agent specification.
New reusable agents should be added through an explicit design/update workflow, not created silently during execution.
6.5 Conflict Handling
In v0.2, material conflicts must be shown to the user.
The Supervisor should not silently resolve material disagreements between:
- agents
- retrieved concepts
- evidence sources
- user-provided context
- generated recommendations
When a material conflict is detected, the Supervisor should present:
- conflicting claims
- supporting evidence for each claim
- affected workflow outputs
- confidence level
- possible resolution paths
The Supervisor should then ask the user how to proceed.
Future versions may introduce a more formal conflict-resolution framework that allows the Supervisor to resolve low-risk conflicts automatically.
6.5b Subtask Contract Model
All subtasks should follow an explicit contract structure.
Suggested structure:
subtask:
id:
purpose:
assigned_agent:
dependencies:
inputs:
expected_outputs:
token_budget:
evidence_required:
approval_required:
retry_policy:
timeout_policy:
status:
Subtasks should remain:
- inspectable
- resumable
- dependency-aware
- independently evaluable
Subtasks should not mutate global workflow state directly.
Global state mutation should occur through controlled orchestration transitions.
6.5c Retry and Degradation Model
The system should support graceful degradation when workflows encounter failures.
Potential failure categories:
- retrieval failure
- malformed model output
- token budget exhaustion
- agent timeout
- unresolved conflict
- insufficient evidence
- schema validation failure
Suggested retry/degradation sequence:
Failure detected
↓
Retry if retry policy allows
↓
Attempt fallback strategy
↓
Request clarification if needed
↓
Escalate to user
↓
Gracefully terminate workflow if unresolved
The system should avoid:
- infinite retries
- silent degradation
- hidden failure recovery
- speculative fallback reasoning
Fallback behavior should remain visible and logged.
6.6 Workflow Logging Format
In v0.2, workflows should be logged as YAML.
YAML is preferred initially because it is:
- human-readable
- easy to inspect
- easy to edit
- suitable for structured workflow state
- compatible with Git-based review
Workflow logs should capture:
- user request
- interpreted goal
- plan shown to user
- user approval
- workflow DAG
- agents invoked
- retrieved concepts
- assumptions
- evidence
- conflicts
- outputs
- token estimates
- actual token usage
- approval events
- final synthesis
Future versions may convert workflow logs to JSON or another structured representation if needed for performance, tooling, or interoperability.
6.7 Specialized Agent Philosophy
Agents should remain narrowly scoped and domain-specific.
Examples:
- Job Description Analyzer
- Resume Alignment Agent
- Code Analyzer
- UX Analyzer
- Architecture Analyzer
- Product Strategy Analyzer
The system should avoid generalized mega-agents.
Specialized agents improve:
- reliability
- inspectability
- debugging
- determinism
- grounding quality
6.8 Workflow-Centric Design
The system should prioritize workflows over isolated prompts.
Workflows should:
- produce actionable outputs
- maintain provenance
- expose dependencies
- remain inspectable
- remain resumable
The workflow DAG should be treated as a first-class system object.
6.9 Human-in-the-Loop Design
Human oversight is considered a core architectural feature.
The system should:
- surface uncertainty
- request clarification when needed
- require approval for persistent mutations
- allow workflow interruption and correction
6.10 Trust Accrual Principle
System trust depends on:
- consistency
- transparency
- traceability
- low hallucination rates
- predictable behavior
Trust should be treated as a primary system asset.
The system should prioritize preserving trust over maximizing autonomy.
7. High-Level System Components
7.1 Supervisor Agent
Responsibilities:
- task interpretation
- task decomposition
- workflow planning
- orchestration
- dependency management
- workflow state management
- token budget estimation
- agent routing
- conflict surfacing
- synthesis
- clarification management
The Supervisor is the only agent with visibility into:
- workflow DAG
- global workflow state
- active subtasks
- orchestration context
- agent registry
- token budget state
The Supervisor should remain lightweight and orchestration-focused.
The Supervisor must operate within strict rules:
- show plan before execution in v0.2
- wait for user approval before workflow execution
- use predefined agents only
- avoid unsupported factual claims
- expose assumptions
- surface material conflicts
- maintain token budget visibility
- preserve provenance
7.2 Retrieval Agent
Responsibilities:
- semantic retrieval
- source filtering
- concept lookup
- evidence extraction
- provenance packaging
The Retrieval Agent must remain retrieval-only.
It should never perform speculative reasoning.
7.3 Analysis Agents
Examples:
- JD Analyzer
- Resume Alignment Analyzer
- Code Analyzer
- UX Analyzer
- Architecture Analyzer
Responsibilities:
- domain-specific interpretation
- issue identification
- evidence-backed analysis
- structured findings generation
Outputs must include:
- findings
- assumptions
- confidence
- evidence references
- open questions
7.4 Generation Agents
Examples:
- Resume Generator
- Code Refactor Agent
- UX Recommendation Generator
- Architecture Recommendation Generator
Outputs must:
- cite supporting concepts
- identify assumptions
- identify inferred content
7.5 Storage Agent
Responsibilities:
- concept extraction
- deduplication
- concept classification
- Markdown concept generation
- approval request generation
The Storage Agent must NEVER auto-store concepts.
All persistent mutations require explicit approval.
8. Shared Infrastructure
8.0 Interaction Layer Philosophy
BOP should remain interface-flexible.
The orchestration and reasoning layers should remain decoupled from the user interface layer.
Potential interaction surfaces include:
- CLI
- ChatGPT
- Codex
- IDE integrations
- future web interfaces
- future desktop interfaces
The system should expose stable orchestration primitives independent of interface.
The UX layer should:
- visualize workflows
- surface provenance
- expose assumptions
- manage approvals
- present confidence and evidence
The core orchestration architecture should not depend on any specific LLM chat interface.
8.1 Playbook Repository
Canonical knowledge store.
Technology:
- GitHub repository
- Markdown concept files
8.1a Concept Deduplication (v0.5)
On storage:
- check embedding similarity (>0.9 → duplicate)
- check normalized summary equality
Decisions:
- duplicate → reject
- near-duplicate → suggest merge
- distinct → store
User confirmation required for merge decisions
8.2 Vector Store
Semantic retrieval layer.
Responsibilities:
- embedding concepts
- semantic search
- relevance scoring
The vector store is NOT the source of truth.
It is a retrieval acceleration layer only.
8.2b Retrieval Ranking Strategy
[existing content preserved]
8.2c Retrieval Stopping Rule (v0.5)
Simple bounded retrieval:
- MAX_CONCEPTS: 5
- MIN_SCORE: 0.75
- DELTA_THRESHOLD: 0.05
Algorithm:
- sort by score desc
- include until any of:
- max concepts reached
- score < MIN_SCORE
- marginal drop > DELTA_THRESHOLD
- deduplicate semantically similar items
8.2d Context Packing Strategy (v0.5)
- include top 3 concepts in full
- include remaining as summaries
- enforce hard token cap
- drop lowest-ranked items first
- never drop highest-ranked or conflicting concepts
Context structure:
context:
full_concepts: []
summary_concepts: []
Domain Relevance
Boost concepts matching:
- workflow domain
- active agent type
- task category
Example:
A UX workflow should strongly prefer UX concepts over generic development concepts.
Provenance Confidence
Boost concepts with:
- repeated successful reuse
- explicit user approval
- high historical usefulness
- low correction frequency
Concept Freshness
Moderately boost:
- recently updated concepts
- recently validated concepts
while avoiding excessive recency bias.
Concept Specificity
Prefer concepts that are:
- operationally actionable
- concrete
- implementation-relevant
over vague conceptual guidance.
Workflow Context Matching
Boost concepts matching:
- current workflow stage
- current artifact type
- active subtask
- currently analyzed files/components
Historical Reuse Performance
Track:
- retrieval acceptance rate
- downstream usefulness
- approval rates
- correction frequency
- workflow completion impact
This creates a continuously improving retrieval layer.
Retrieval Budgeting
The retrieval system should optimize for:
- maximal relevance density
- minimal token footprint
The system should:
- retrieve fewer high-quality concepts
- avoid broad indiscriminate retrieval
- dynamically adjust retrieval depth based on workflow complexity
Suggested Ranking Formula
Conceptually:
FinalScore =
SemanticSimilarity
+ DomainWeight
+ WorkflowContextWeight
+ ProvenanceWeight
+ HistoricalPerformanceWeight
+ FreshnessWeight
+ SpecificityWeight
Weights should remain configurable and observable.
Retrieval Explainability
The retrieval layer should expose WHY concepts were retrieved.
Example:
- semantic similarity match
- same workflow domain
- previously useful in UX review workflows
- recently approved concept
This improves:
- inspectability
- trust
- debugging
- ranking iteration quality
Semantic retrieval layer.
Responsibilities:
- embedding concepts
- semantic search
- relevance scoring
The vector store is NOT the source of truth.
It is a retrieval acceleration layer only.
8.3 Runtime Layer
The Runtime Layer should:
- load agent specs
- build prompts
- invoke model adapters
- validate outputs
- execute approved tool calls
- track workflow state
- persist logs
The Runtime Layer should remain deterministic and inspectable.
8.4 Validation Layer
Raw model outputs should never be trusted directly.
The Validation Layer should validate:
- JSON structure
- required fields
- allowed enums
- schema conformance
- provenance requirements
- confidence values
8.4a Validation + Repair Loop (v0.5)
On failure:
- detect error (invalid JSON, missing fields, missing evidence)
- attempt repair (max 2 retries)
- revalidate
- if still failing → escalate or fail subtask
Repair constraints:
- do not introduce new facts
- do not change meaning
- fix structure only
8.5 Logging and Audit Trail
The system should log:
- user requests
- supervisor plans
- prompts
- retrieved concepts
- agent invocations
- tool calls
- outputs
- assumptions
- provider/model used
- approval actions
This is required for:
- debugging
- hallucination analysis
- workflow inspection
- evaluation
9. Hallucination Mitigation Framework
9.1 Grounding Rules
Agents may only use:
- retrieved concepts
- explicit user input
- approved external sources
- attributed upstream outputs
Any unsupported claim must be labeled.
9.2 Provenance Requirements
Every meaningful claim should identify:
- source concept
- source document
- retrieval result
- external source
9.3 Assumption Tracking
Assumptions must:
- remain explicit
- remain isolated from facts
- never silently propagate downstream
9.4 Supervisor Validation
The Supervisor should validate:
- unsupported claims
- missing evidence
- assumption leakage
- inconsistent outputs
before synthesis.
9.5 Human Escalation
When evidence quality is insufficient:
- ask clarifying questions
- downgrade confidence
- explicitly state uncertainty
The system should never fabricate certainty.
10. Example Workflows
10.1 UX Review of iOS App (PRD + Code) — v0.5 Canonical Workflow
Goal
Evaluate an iOS app’s UX by comparing PRD intent with actual code behavior, grounded in Playbook concepts, and produce actionable recommendations and optional follow-up actions.
Workflow Mode
- Orchestrated Workflow (with optional Mutation follow-ups)
Inputs
- PRD document (text or link)
- Codebase (files or repo)
- Optional: simulator access, test builds
Outputs
- UX findings (fact/assumption/inference separated)
- Evidence and provenance for each finding
- Mapped gaps (PRD intent vs. code behavior)
- Actionable recommendations (with targets)
- Confidence levels
- Proposed new/revised Playbook concepts (optional)
- Next-step options for user (store/apply/debug)
Agent Set (v0.5)
- PRD_Analyzer
- Code_Analyzer (iOS-aware)
- UX_Analyzer
- Retrieval_Agent
- Synthesis_Agent (may be Supervisor)
- Storage_Agent (proposal-only)
Optional (future / gated):
- Simulator_Controller
- Simulator_Driver
- Runtime_Observer
High-Level DAG
parse_prd ─┐
├─> retrieve_ux_concepts ─┐
parse_code ─┘ ├─> ux_analysis ──> synthesize_results
└─> gap_analysis ─┘
Optional branch:
build_and_run_simulator → observe_runtime → ux_runtime_analysis
Subtasks (Canonical Contracts)
1) parse_prd
- agent: PRD_Analyzer
- purpose: extract UX intent, flows, constraints, success criteria
- outputs: {ux_requirements, flows, constraints, ambiguities}
2) parse_code
- agent: Code_Analyzer
- purpose: extract UI structure, navigation, state handling, UX-relevant logic
- outputs: {components, flows, state_models, ui_patterns, entry_points}
3) retrieve_ux_concepts
- agent: Retrieval_Agent
- inputs: {ux_requirements, flows}
- outputs: {concepts[], evidence[]}
- uses: retrieval stopping + ranking strategy
4) gap_analysis
- agent: UX_Analyzer
- inputs: {ux_requirements, code_flows}
- outputs: {gaps[], mismatches[], assumptions[]}
5) ux_analysis
- agent: UX_Analyzer
- inputs: {code_patterns, concepts}
- outputs: { findings[], violations[], recommendations[], evidence[], confidence }
6) (optional) runtime branch
- build_and_run_simulator (gated)
- observe_runtime → collect interactions, states, errors
- ux_runtime_analysis → compare observed behavior vs expectations
7) synthesize_results
- agent: Supervisor (or Synthesis_Agent)
- inputs: all prior outputs
- outputs:
- consolidated findings
- prioritized recommendations
- conflicts (if any)
- open questions
- next-step options
8) propose_concepts (optional)
- agent: Storage_Agent
- purpose: suggest reusable concepts derived from findings
- outputs: {proposed_concepts[], dedupe_results, merge_suggestions}
- requires: user approval to store
Token Budget (Example Heuristic)
- retrieval: 15–25%
- analysis (PRD + code + UX): 50–60%
- synthesis: 20–25%
- reserve: 5–10%
Validation & Repair
- each agent output validated against schema
- up to 2 repair attempts
- missing evidence → flagged and downgraded confidence
Conflict Handling
If conflicts detected (e.g., PRD vs runtime vs concepts):
- present conflicting claims
- show evidence per claim
- ask user for resolution (v0.5)
Next-Step Options (Post-Synthesis)
Supervisor should present explicit options:
- store approved concepts
- generate code fixes (diffs/patches)
- apply fixes (mutation workflow; approval required)
- run targeted debug workflow
- re-run analysis with refined scope
Logging (YAML)
Capture:
- plan + approval
- subtasks + statuses
- retrieved concepts + scores
- assumptions + evidence
- conflicts
- outputs
- token estimate vs actual
Notes / Constraints
- default to non-simulator path first (token-efficient)
- simulator branch is optional and gated
- avoid over-orchestration for small scopes (prefer retrieval-augmented mode)
11. Initial Technical Architecture
Initial Stack
Language:
- Python
Storage:
- GitHub Markdown repository
Retrieval:
- OpenAI vector store
Execution:
- Codex
- local scripts
LLM:
- GPT-family models initially
Initial Execution Model
Initial orchestration should remain:
- sequential
- explicit
- inspectable
Avoid parallelization initially.
Correctness and observability matter more than speed.
12. Suggested Repository Structure
playbook/
- README.md
- settings.yaml
- index.yaml
- concepts/
- inbox/
- archive/
- scripts/
- workflows/
- prompts/
- agents/
- logs/
- schemas/
- model_adapters/
Suggested workflow log location:
workflows/logs/\
Suggested reusable agent specification location:
agents/\
13. Success Metrics
Reliability
Metrics:
- unsupported claim rate
- hallucination incidence
- assumption leakage rate
Reuse
Metrics:
- concepts reused per workflow
- retrieval usefulness
Efficiency
Metrics:
- reduced repeated prompting
- reduced editing time
- reduced iteration count
Trust
Metrics:
- user trust rating
- approval acceptance rate
- correction frequency
14. Risks
14.1 Over-Orchestration
Too many agents create:
- complexity
- hidden state
- difficult debugging
Mitigation:
- narrow agent scopes
- deterministic workflows
- explicit orchestration
14.2 Hallucination Cascades
Speculative outputs propagating downstream.
Mitigation:
- provenance tracking
- assumption labeling
- supervisor validation
14.3 Knowledge Pollution
Low-quality concepts degrading retrieval quality.
Mitigation:
- approval gates
- concept review
- deduplication
- ranking systems
14.4 Context Explosion
Too many retrieved concepts reducing signal quality.
Mitigation:
- ranking
- filtering
- retrieval limits
- domain-aware retrieval
15. Roadmap
v0.5
Goals:
- formalize workflow lifecycle
- formalize supervisor execution semantics
- implement workflow complexity classification
- formalize subtask contracts
- implement retry/degradation philosophy
- improve workflow inspectability
- improve orchestration determinism
v0.6
Goals:
- establish architecture
- implement retrieval layer
- establish storage workflow
- define schemas
- define orchestration model
v0.3
Goals:
- implement Supervisor runtime
- implement structured outputs
- implement workflow state
- implement provenance tracking
v0.4
Goals:
- implement apply_concepts.py
- implement workflow DAG execution
- implement approval system
v0.5
Goals:
- implement deduplication
- improve retrieval ranking
- implement concept graph relationships
16. Gap Analysis — What Prevents This From Being v1.0
16.0 Supervisor Maturity Gap
Current weakness:
The Supervisor is still primarily described at the conceptual orchestration level.
Needed for v1.0:
- formal planning schema
- formal approval flow
- better automatic conflict resolution
- trust-based reduction of approval friction
- learned token estimation
- reusable agent creation workflow
- supervisor evaluation tests
The v0.2 Supervisor should intentionally remain conservative:
- always show plan
- wait for approval
- surface conflicts
- use predefined agents only
v1.0 should relax these constraints only after reliability is demonstrated.
16.1 Missing Formal Workflow State Model
Current weakness:
Workflow state is described conceptually but not formally specified.
Needed for v1.0:
- formal task schema
- subtask schema
- DAG representation
- resumable workflow state
- workflow persistence model
This is one of the biggest missing architectural pieces.
16.2 Missing Provenance Data Model
Current weakness:
Provenance requirements exist philosophically but not structurally.
Needed for v1.0:
- evidence schema
- provenance graph
- source lineage model
- claim attribution model
Without this, provenance becomes inconsistent.
16.3 Missing Retrieval Ranking Strategy
Current weakness:
Retrieval exists but ranking quality is unspecified.
Needed for v1.0:
- hybrid retrieval strategy
- ranking heuristics
- concept freshness scoring
- domain-aware ranking
- retrieval evaluation metrics
Poor retrieval quality will eventually dominate system quality.
16.4 Missing Concept Lifecycle Management
Current weakness:
Concepts are stored but not managed over time.
Needed for v1.0:
- versioning
- archival rules
- duplicate handling
- stale concept detection
- concept merging workflows
- concept confidence scoring
16.5 Missing Agent Evaluation Framework
Current weakness:
No formal mechanism exists to measure agent quality.
Needed for v1.0:
- benchmark tasks
- hallucination tests
- regression suites
- evaluation datasets
- workflow replay testing
16.6 Missing Tool Governance Model
Current weakness:
Tool usage is insufficiently constrained.
Needed for v1.0:
- tool capability declarations
- tool risk levels
- execution policies
- timeout/retry policies
- workflow-aware tool constraints
Current weakness:
Tool usage is insufficiently constrained.
Needed for v1.0:
- tool capability declarations
- tool risk levels
- approval classes
- execution policies
- timeout/retry policies
16.8 Missing Observability Infrastructure
Current weakness:
Logging exists conceptually but observability is incomplete.
Needed for v1.0:
- tracing
- workflow replay
- execution visualization
- DAG inspection
- failure inspection tools
16.9 Missing Prompt Governance
Current weakness:
Prompt construction and lifecycle management are underspecified.
Without governance, prompts risk becoming:
- inconsistent
- duplicated
- hidden
- difficult to debug
- operationally untrustworthy
Prompt drift can create:
- hallucination regressions
- inconsistent grounding behavior
- provenance failures
- conflicting agent assumptions
- hidden workflow behavior changes
Needed for v1.0:
Centralized Prompt Repository
Prompts should exist as explicit versioned assets.
Suggested structure:
prompts/
shared/
grounding_rules.md
provenance_rules.md
output_schema.md
agents/
retrieval_agent.md
ux_analyzer.md
supervisor.md
workflows/
resume_workflow.md
ux_review_workflow.md
Prompt Layering Model
Prompt composition should follow explicit hierarchy.
Suggested layering:
SYSTEM LAYER
↓
WORKFLOW LAYER
↓
AGENT LAYER
↓
TASK LAYER
↓
USER INPUT
Higher layers should constrain lower layers.
Shared Grounding Rules
Core hallucination mitigation rules should be centralized.
Examples:
- provenance requirements
- assumption labeling
- uncertainty handling
- retrieval-only reasoning constraints
Agents should inherit these rules consistently.
Prompt Versioning
Prompts should support:
- version tracking
- diffs
- rollback
- evaluation
- reproducibility
Prompt changes should be treated similarly to:
- code changes
- schema changes
- workflow changes
Prompt Testing
The system should support:
- regression testing
- hallucination testing
- workflow replay testing
- assumption leakage testing
- output schema validation
Prompt Observability
The system should log:
- prompts used
- retrieved concepts injected
- workflow context injected
- active grounding rules
- model/provider used
This is required for:
- debugging
- provenance analysis
- trustworthiness
- workflow inspection
Prompt Injection Resistance
The architecture should eventually support:
- trusted instruction layers
- constrained tool access
- protected grounding rules
- prompt boundary enforcement
This becomes increasingly important as workflows grow more complex.
16.10 Missing Scalability Philosophy
Current weakness:
The system assumes small-scale sequential execution.
Needed for v1.0:
- concurrency strategy
- queueing model
- async orchestration
- workflow scheduling
- caching strategy
16.11 Missing UX Philosophy for Human Interaction
Current weakness:
Human interaction model is underdefined.
Needed for v1.0:
- approval UX
- workflow visualization
- confidence presentation
- provenance display
- correction flows
17. Final Philosophy
BOP should prioritize:
- correctness over autonomy
- transparency over cleverness
- grounded reasoning over speculation
- workflow reliability over novelty
- operationalization over raw generation
The system should behave more like:
- an orchestration framework
- a reasoning infrastructure layer
- a workflow operating system
- a grounded execution engine
and less like:
- an autonomous AI employee
- a recursive agent swarm
- an unrestricted autonomous intelligence system
The long-term value of BOP will depend primarily on:
- concept quality
- retrieval quality
- provenance integrity
- orchestration clarity
- trustworthiness
- operational consistency