opencode-orchestrator 0.9.20 → 0.9.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agents/prompts/common/anti-hallucination.d.ts +1 -0
- package/dist/agents/prompts/common/environment-discovery.d.ts +1 -0
- package/dist/agents/prompts/planner/research.d.ts +2 -0
- package/dist/agents/prompts/reviewer/verification.d.ts +2 -0
- package/dist/agents/prompts/worker/quality.d.ts +2 -0
- package/dist/agents/prompts/worker/workflow.d.ts +2 -0
- package/dist/index.js +300 -119
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -12979,76 +12979,162 @@ tool.schema = external_exports;
|
|
|
12979
12979
|
|
|
12980
12980
|
// src/agents/prompts/common/environment-discovery.ts
|
|
12981
12981
|
var ENVIRONMENT_DISCOVERY = `${PROMPT_TAGS.ENVIRONMENT_DISCOVERY.open}
|
|
12982
|
-
MANDATORY FIRST STEP - Before any planning or coding:
|
|
12983
|
-
|
|
12984
|
-
## 1. Project Structure
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
-
|
|
12988
|
-
|
|
12989
|
-
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
|
|
12994
|
-
|
|
12995
|
-
|
|
12996
|
-
|
|
12997
|
-
|
|
12998
|
-
|
|
12999
|
-
|
|
13000
|
-
|
|
13001
|
-
|
|
13002
|
-
|
|
13003
|
-
|
|
12982
|
+
\u26A0\uFE0F MANDATORY FIRST STEP - Before any planning or coding:
|
|
12983
|
+
|
|
12984
|
+
## 1. Project Structure Discovery
|
|
12985
|
+
Explore the project root to understand its organization:
|
|
12986
|
+
\`\`\`bash
|
|
12987
|
+
ls -la # Root contents
|
|
12988
|
+
find . -maxdepth 2 -type d | head -30 # Directory structure
|
|
12989
|
+
find . -maxdepth 1 -type f # Root files
|
|
12990
|
+
\`\`\`
|
|
12991
|
+
|
|
12992
|
+
**Look for patterns, NOT specific files:**
|
|
12993
|
+
- Source directories (src/, lib/, app/, pkg/, internal/, cmd/)
|
|
12994
|
+
- Test directories (tests/, test/, spec/, __tests__/, *_test/)
|
|
12995
|
+
- Build artifacts (dist/, build/, target/, out/, bin/)
|
|
12996
|
+
- Documentation (docs/, doc/, README*, CONTRIBUTING*, CHANGELOG*)
|
|
12997
|
+
- Configuration (hidden files, *.config.*, *.json, *.yaml, *.toml)
|
|
12998
|
+
|
|
12999
|
+
## 2. Environment Detection (Adaptive)
|
|
13000
|
+
**DO NOT assume technology stack. DETECT it:**
|
|
13001
|
+
|
|
13002
|
+
| Indicator Files | Likely Environment |
|
|
13003
|
+
|----------------|-------------------|
|
|
13004
|
+
| package.json, tsconfig.json | Node.js / TypeScript |
|
|
13005
|
+
| Cargo.toml, Cargo.lock | Rust |
|
|
13006
|
+
| go.mod, go.sum | Go |
|
|
13007
|
+
| requirements.txt, pyproject.toml, setup.py | Python |
|
|
13008
|
+
| pom.xml, build.gradle | Java / JVM |
|
|
13009
|
+
| Gemfile, *.rb | Ruby |
|
|
13010
|
+
| composer.json | PHP |
|
|
13011
|
+
| CMakeLists.txt, Makefile | C/C++ |
|
|
13012
|
+
| *.csproj, *.sln | .NET / C# |
|
|
13013
|
+
| pubspec.yaml | Dart / Flutter |
|
|
13014
|
+
|
|
13015
|
+
**For each detected config file, read it to find:**
|
|
13016
|
+
- Build commands
|
|
13017
|
+
- Test commands
|
|
13018
|
+
- Entry points
|
|
13019
|
+
- Dependencies
|
|
13020
|
+
|
|
13021
|
+
## 3. Infrastructure Detection
|
|
13022
|
+
\`\`\`bash
|
|
13023
|
+
# Container/orchestration
|
|
13024
|
+
ls Dockerfile* docker-compose* 2>/dev/null
|
|
13025
|
+
ls kubernetes/ k8s/ helm/ 2>/dev/null
|
|
13026
|
+
|
|
13027
|
+
# CI/CD
|
|
13028
|
+
ls .github/workflows/ .gitlab-ci.yml .circleci/ Jenkinsfile 2>/dev/null
|
|
13029
|
+
|
|
13030
|
+
# Cloud/IaC
|
|
13031
|
+
ls terraform/ cloudformation/ pulumi/ 2>/dev/null
|
|
13032
|
+
ls serverless.yml sam.yaml 2>/dev/null
|
|
13033
|
+
\`\`\`
|
|
13034
|
+
|
|
13035
|
+
## 4. Existing Context Check
|
|
13036
|
+
\`\`\`bash
|
|
13037
|
+
ls -la ${PATHS.OPENCODE}/ 2>/dev/null || echo "No existing context"
|
|
13038
|
+
\`\`\`
|
|
13039
|
+
- If ${PATHS.OPENCODE}/ exists \u2192 ASK user to continue or start fresh
|
|
13040
|
+
- If not \u2192 Create fresh context
|
|
13041
|
+
|
|
13042
|
+
## 5. Context Summary (SAVE TO ${PATHS.CONTEXT})
|
|
13004
13043
|
\`\`\`markdown
|
|
13005
13044
|
# Project Context
|
|
13045
|
+
|
|
13006
13046
|
## Environment
|
|
13007
|
-
-
|
|
13008
|
-
-
|
|
13009
|
-
-
|
|
13047
|
+
- Language: [DETECTED from files]
|
|
13048
|
+
- Runtime: [DETECTED version if available]
|
|
13049
|
+
- Build: [DETECTED build command]
|
|
13050
|
+
- Test: [DETECTED test command]
|
|
13051
|
+
- Package Manager: [DETECTED from lockfiles]
|
|
13052
|
+
|
|
13053
|
+
## Project Type
|
|
13054
|
+
- [ ] Library/Package
|
|
13055
|
+
- [ ] Application (CLI/Web/Mobile/Desktop)
|
|
13056
|
+
- [ ] Microservice
|
|
13057
|
+
- [ ] Monorepo
|
|
13058
|
+
- [ ] Other: [describe]
|
|
13059
|
+
|
|
13060
|
+
## Infrastructure
|
|
13061
|
+
- Container: [None / Docker / Podman]
|
|
13062
|
+
- Orchestration: [None / K8s / Docker Compose]
|
|
13063
|
+
- CI/CD: [DETECTED from config files]
|
|
13064
|
+
- Cloud: [DETECTED or None]
|
|
13010
13065
|
|
|
13011
13066
|
## Structure
|
|
13012
|
-
- Source:
|
|
13013
|
-
- Tests:
|
|
13014
|
-
- Docs:
|
|
13015
|
-
|
|
13016
|
-
|
|
13017
|
-
|
|
13018
|
-
-
|
|
13019
|
-
|
|
13020
|
-
|
|
13021
|
-
- [
|
|
13067
|
+
- Source: [DETECTED path]
|
|
13068
|
+
- Tests: [DETECTED path]
|
|
13069
|
+
- Docs: [DETECTED path]
|
|
13070
|
+
- Entry: [DETECTED main file]
|
|
13071
|
+
|
|
13072
|
+
## Conventions (OBSERVE from existing code)
|
|
13073
|
+
- Naming: [camelCase / snake_case / PascalCase]
|
|
13074
|
+
- Imports: [relative / absolute / aliases]
|
|
13075
|
+
- Error handling: [exceptions / Result type / error codes]
|
|
13076
|
+
- Testing: [unit / integration / e2e patterns]
|
|
13077
|
+
|
|
13078
|
+
## Notes
|
|
13079
|
+
- [Any unique patterns or requirements observed]
|
|
13022
13080
|
\`\`\`
|
|
13023
13081
|
|
|
13024
|
-
|
|
13082
|
+
## \u26A0\uFE0F CRITICAL RULES:
|
|
13083
|
+
1. NEVER assume - always VERIFY by reading files
|
|
13084
|
+
2. ADAPT to what you find, don't force expectations
|
|
13085
|
+
3. If uncertain, ASK the user for clarification
|
|
13086
|
+
4. Document EVERYTHING you discover
|
|
13025
13087
|
${PROMPT_TAGS.ENVIRONMENT_DISCOVERY.close}`;
|
|
13026
13088
|
|
|
13027
13089
|
// src/agents/prompts/common/anti-hallucination.ts
|
|
13028
13090
|
var ANTI_HALLUCINATION_CORE = `${PROMPT_TAGS.ANTI_HALLUCINATION.open}
|
|
13029
|
-
ZERO TOLERANCE FOR GUESSING
|
|
13030
|
-
|
|
13031
|
-
|
|
13032
|
-
|
|
13033
|
-
|
|
13034
|
-
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
-
|
|
13044
|
-
-
|
|
13091
|
+
\u{1F6AB} ZERO TOLERANCE FOR GUESSING
|
|
13092
|
+
|
|
13093
|
+
## The Golden Rule
|
|
13094
|
+
> If you're not 100% sure, **SEARCH** before you claim.
|
|
13095
|
+
> If you can't find it, **SAY** you can't find it.
|
|
13096
|
+
|
|
13097
|
+
## Before ANY Implementation:
|
|
13098
|
+
|
|
13099
|
+
### Step 1: Check Local Cache
|
|
13100
|
+
\`\`\`bash
|
|
13101
|
+
ls ${PATHS.DOCS}/ # What do we already have?
|
|
13102
|
+
\`\`\`
|
|
13103
|
+
|
|
13104
|
+
### Step 2: If Not Found \u2192 Research
|
|
13105
|
+
- Search for OFFICIAL documentation
|
|
13106
|
+
- Prefer version-specific docs matching project
|
|
13107
|
+
- Cache findings to ${PATHS.DOCS}/
|
|
13108
|
+
|
|
13109
|
+
### Step 3: Verify Before Using
|
|
13110
|
+
- Is this the RIGHT version for THIS project?
|
|
13111
|
+
- Does the syntax match current APIs?
|
|
13112
|
+
- Are there breaking changes to consider?
|
|
13113
|
+
|
|
13114
|
+
## Source Hierarchy (Most to Least Trusted):
|
|
13115
|
+
1. \u{1F7E2} **Official docs** - docs.*, *.dev, readthedocs
|
|
13116
|
+
2. \u{1F7E2} **GitHub source** - actual source code, README
|
|
13117
|
+
3. \u{1F7E1} **Package registries** - npm, PyPI, crates.io, Maven
|
|
13118
|
+
4. \u{1F7E1} **GitHub issues** - real-world usage patterns
|
|
13119
|
+
5. \u{1F534} **Blogs/tutorials** - may be outdated, verify independently
|
|
13120
|
+
|
|
13121
|
+
## \u26D4 ABSOLUTELY FORBIDDEN:
|
|
13122
|
+
- Inventing function signatures from memory
|
|
13123
|
+
- Assuming API compatibility between versions
|
|
13045
13124
|
- Guessing version-specific syntax
|
|
13046
|
-
- Using
|
|
13125
|
+
- Using knowledge without verification
|
|
13126
|
+
- Mixing syntax from different versions
|
|
13047
13127
|
|
|
13048
|
-
REQUIRED:
|
|
13049
|
-
- Source URL for every claim
|
|
13128
|
+
## \u2705 ALWAYS REQUIRED:
|
|
13129
|
+
- Source URL for every technical claim
|
|
13050
13130
|
- Confidence level: ${WORK_STATUS.CONFIDENCE.HIGH} (official) / ${WORK_STATUS.CONFIDENCE.MEDIUM} (github) / ${WORK_STATUS.CONFIDENCE.LOW} (blog)
|
|
13051
|
-
- Say "
|
|
13131
|
+
- Say "I need to research this" if unsure
|
|
13132
|
+
- Say "NOT FOUND in official docs" if documentation unavailable
|
|
13133
|
+
|
|
13134
|
+
## Self-Check Questions:
|
|
13135
|
+
1. Did I VERIFY this, or am I REMEMBERING it?
|
|
13136
|
+
2. Is my source CURRENT for this project's version?
|
|
13137
|
+
3. Am I CERTAIN, or am I HOPING?
|
|
13052
13138
|
${PROMPT_TAGS.ANTI_HALLUCINATION.close}`;
|
|
13053
13139
|
|
|
13054
13140
|
// src/agents/prompts/common/todo-rules.ts
|
|
@@ -13104,10 +13190,10 @@ ${PROMPT_TAGS.TODO_RULES.close}`;
|
|
|
13104
13190
|
|
|
13105
13191
|
// src/agents/prompts/common/shared-workspace.ts
|
|
13106
13192
|
var SHARED_WORKSPACE = `${PROMPT_TAGS.SHARED_WORKSPACE.open}
|
|
13107
|
-
.
|
|
13193
|
+
\u{1F4C2} ${PATHS.OPENCODE}/ - Shared Context Directory (Real-time State)
|
|
13108
13194
|
|
|
13109
13195
|
\`\`\`
|
|
13110
|
-
.
|
|
13196
|
+
${PATHS.OPENCODE}/
|
|
13111
13197
|
\u251C\u2500\u2500 todo.md - Master task list (single source of truth)
|
|
13112
13198
|
\u251C\u2500\u2500 context.md - Project context summary (<150 lines)
|
|
13113
13199
|
\u251C\u2500\u2500 work-log.md - \u{1F504} REAL-TIME work status (ALL agents read/write)
|
|
@@ -13132,7 +13218,7 @@ var SHARED_WORKSPACE = `${PROMPT_TAGS.SHARED_WORKSPACE.open}
|
|
|
13132
13218
|
- Status: ${WORK_STATUS.STATUS.PENDING} | ${WORK_STATUS.STATUS.IN_PROGRESS} | ${WORK_STATUS.STATUS.DONE}
|
|
13133
13219
|
- Test: ${WORK_STATUS.TEST_RESULT.PASS} | ${WORK_STATUS.TEST_RESULT.FAIL}
|
|
13134
13220
|
|
|
13135
|
-
##
|
|
13221
|
+
## ${PATHS.WORK_LOG} FORMAT:
|
|
13136
13222
|
\`\`\`markdown
|
|
13137
13223
|
# Work Log
|
|
13138
13224
|
|
|
@@ -13155,11 +13241,11 @@ var SHARED_WORKSPACE = `${PROMPT_TAGS.SHARED_WORKSPACE.open}
|
|
|
13155
13241
|
- Use path.normalize() or similar when comparing paths programmatically
|
|
13156
13242
|
|
|
13157
13243
|
RULES:
|
|
13158
|
-
- ALL agents MUST read
|
|
13159
|
-
- Worker updates
|
|
13160
|
-
- Reviewer monitors
|
|
13161
|
-
- Commander reads
|
|
13162
|
-
-
|
|
13244
|
+
- ALL agents MUST read ${PATHS.WORK_LOG} before starting
|
|
13245
|
+
- Worker updates ${PATHS.WORK_LOG} when starting/completing file work
|
|
13246
|
+
- Reviewer monitors ${PATHS.WORK_LOG} for completed units
|
|
13247
|
+
- Commander reads ${PATHS.WORK_LOG} in each loop iteration
|
|
13248
|
+
- ${PATHS.SYNC_ISSUES} = Reviewer writes issues for next iteration
|
|
13163
13249
|
${PROMPT_TAGS.SHARED_WORKSPACE.close}`;
|
|
13164
13250
|
|
|
13165
13251
|
// src/agents/prompts/common/mission-seal.ts
|
|
@@ -13190,11 +13276,11 @@ var VERIFICATION_REQUIREMENTS = `${PROMPT_TAGS.VERIFICATION.open}
|
|
|
13190
13276
|
VERIFICATION CHECKLIST
|
|
13191
13277
|
|
|
13192
13278
|
## Code Verification
|
|
13193
|
-
\u25A1 lsp_diagnostics clean (no errors)
|
|
13194
|
-
\u25A1 Build passes (
|
|
13195
|
-
\u25A1 Tests pass (
|
|
13196
|
-
\u25A1 No
|
|
13197
|
-
\u25A1 No console.log
|
|
13279
|
+
\u25A1 lsp_diagnostics clean (no errors/warnings)
|
|
13280
|
+
\u25A1 Build passes (use project's build command from ${PATHS.CONTEXT})
|
|
13281
|
+
\u25A1 Tests pass (use project's test command from ${PATHS.CONTEXT})
|
|
13282
|
+
\u25A1 No untyped variables (language-appropriate)
|
|
13283
|
+
\u25A1 No debug logging left (console.log, print, etc.)
|
|
13198
13284
|
|
|
13199
13285
|
## Documentation Verification
|
|
13200
13286
|
\u25A1 Implementation matches ${PATHS.DOCS}/
|
|
@@ -13202,9 +13288,9 @@ var VERIFICATION_REQUIREMENTS = `${PROMPT_TAGS.VERIFICATION.open}
|
|
|
13202
13288
|
\u25A1 Version compatibility confirmed
|
|
13203
13289
|
|
|
13204
13290
|
## Security Verification
|
|
13205
|
-
\u25A1 No hardcoded secrets/passwords
|
|
13291
|
+
\u25A1 No hardcoded secrets/passwords/API keys
|
|
13206
13292
|
\u25A1 Input validation present
|
|
13207
|
-
\u25A1 Error messages don't leak info
|
|
13293
|
+
\u25A1 Error messages don't leak sensitive info
|
|
13208
13294
|
|
|
13209
13295
|
ONLY mark complete after ALL checks pass!
|
|
13210
13296
|
${PROMPT_TAGS.VERIFICATION.close}`;
|
|
@@ -13691,22 +13777,51 @@ ${PROMPT_TAGS.PLANNING_FORMAT.close}`;
|
|
|
13691
13777
|
|
|
13692
13778
|
// src/agents/prompts/planner/research.ts
|
|
13693
13779
|
var PLANNER_RESEARCH = `${PROMPT_TAGS.RESEARCH_WORKFLOW.open}
|
|
13694
|
-
|
|
13695
|
-
|
|
13696
|
-
|
|
13697
|
-
|
|
13780
|
+
\u{1F52C} ADAPTIVE RESEARCH WORKFLOW
|
|
13781
|
+
|
|
13782
|
+
## Step 1: Identify What to Research
|
|
13783
|
+
- What technology/library/API is needed?
|
|
13784
|
+
- What version is the project using? (check ${PATHS.CONTEXT})
|
|
13785
|
+
- What specific syntax/pattern is unclear?
|
|
13786
|
+
|
|
13787
|
+
## Step 2: Prioritize Sources (in order)
|
|
13788
|
+
1. **Project's own docs** - Check ${PATHS.DOCS}/ first
|
|
13789
|
+
2. **Official documentation** - [framework].dev, docs.[library].com
|
|
13790
|
+
3. **GitHub repo** - README, examples, source code
|
|
13791
|
+
4. **Package registry** - npm, PyPI, crates.io
|
|
13792
|
+
5. **Community** - Stack Overflow, Discord (lowest priority)
|
|
13793
|
+
|
|
13794
|
+
## Step 3: Search Strategy
|
|
13795
|
+
\`\`\`
|
|
13796
|
+
websearch "[topic] official documentation [detected version]"
|
|
13797
|
+
websearch "[topic] [language] example"
|
|
13798
|
+
\`\`\`
|
|
13799
|
+
|
|
13800
|
+
## Step 4: Validate & Extract
|
|
13801
|
+
- Is this the CORRECT version for this project?
|
|
13802
|
+
- Extract EXACT syntax (never paraphrase)
|
|
13803
|
+
- Note any version-specific differences
|
|
13804
|
+
|
|
13805
|
+
## Step 5: Cache Research
|
|
13806
|
+
Save to ${PATHS.DOCS}/[topic].md:
|
|
13698
13807
|
|
|
13699
|
-
OUTPUT:
|
|
13700
13808
|
\`\`\`markdown
|
|
13701
13809
|
# Research: [topic]
|
|
13810
|
+
Date: [timestamp]
|
|
13702
13811
|
Source: [official URL]
|
|
13703
13812
|
Confidence: ${WORK_STATUS.CONFIDENCE.HIGH}/${WORK_STATUS.CONFIDENCE.MEDIUM}/${WORK_STATUS.CONFIDENCE.LOW}
|
|
13704
|
-
Version: [version]
|
|
13813
|
+
Version: [detected version from project]
|
|
13814
|
+
|
|
13815
|
+
## Context
|
|
13816
|
+
Why this is needed: [brief explanation]
|
|
13705
13817
|
|
|
13706
13818
|
## Exact Syntax
|
|
13707
|
-
\`\`\`[
|
|
13708
|
-
[code from official docs]
|
|
13819
|
+
\`\`\`[detected language]
|
|
13820
|
+
[code from official docs - VERBATIM]
|
|
13709
13821
|
\`\`\`
|
|
13822
|
+
|
|
13823
|
+
## Usage Notes
|
|
13824
|
+
- [any gotchas or important details]
|
|
13710
13825
|
\`\`\`
|
|
13711
13826
|
${PROMPT_TAGS.RESEARCH_WORKFLOW.close}`;
|
|
13712
13827
|
|
|
@@ -13879,36 +13994,83 @@ ${PROMPT_TAGS.REQUIRED_ACTIONS.close}`;
|
|
|
13879
13994
|
|
|
13880
13995
|
// src/agents/prompts/worker/workflow.ts
|
|
13881
13996
|
var WORKER_WORKFLOW = `${PROMPT_TAGS.WORKFLOW.open}
|
|
13882
|
-
|
|
13883
|
-
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13889
|
-
|
|
13890
|
-
|
|
13891
|
-
|
|
13997
|
+
\u{1F504} ADAPTIVE IMPLEMENTATION WORKFLOW
|
|
13998
|
+
|
|
13999
|
+
## Phase 1: UNDERSTAND (Before writing ANY code)
|
|
14000
|
+
1. Read ${PATHS.CONTEXT} \u2192 Get project environment, build/test commands
|
|
14001
|
+
2. Read ${PATHS.TODO} \u2192 Understand assigned task and acceptance criteria
|
|
14002
|
+
3. Read ${PATHS.DOCS}/ \u2192 Check for cached API docs, syntax references
|
|
14003
|
+
|
|
14004
|
+
## Phase 2: OBSERVE (Learn from existing codebase)
|
|
14005
|
+
4. Find SIMILAR code in the project
|
|
14006
|
+
\`\`\`bash
|
|
14007
|
+
# Find related files
|
|
14008
|
+
find . -name "*.ts" -o -name "*.py" -o -name "*.go" | head -20
|
|
14009
|
+
\`\`\`
|
|
14010
|
+
5. Study existing PATTERNS:
|
|
14011
|
+
- How are errors handled?
|
|
14012
|
+
- How are tests structured?
|
|
14013
|
+
- What naming conventions are used?
|
|
14014
|
+
- How is logging done?
|
|
14015
|
+
|
|
14016
|
+
## Phase 3: RESEARCH (If needed)
|
|
14017
|
+
6. If docs missing in ${PATHS.DOCS}/:
|
|
14018
|
+
- Search for official documentation
|
|
14019
|
+
- Cache findings to ${PATHS.DOCS}/
|
|
14020
|
+
|
|
14021
|
+
## Phase 4: IMPLEMENT (Following discoveries)
|
|
14022
|
+
7. Write code following OBSERVED patterns
|
|
14023
|
+
8. Handle edge cases like existing code does
|
|
14024
|
+
9. Add tests matching project's test style
|
|
14025
|
+
|
|
14026
|
+
## Phase 5: VERIFY (Before reporting)
|
|
14027
|
+
10. Run lsp_diagnostics \u2192 Must be clean
|
|
14028
|
+
11. Run BUILD command from ${PATHS.CONTEXT}
|
|
14029
|
+
12. Run TEST command from ${PATHS.CONTEXT}
|
|
14030
|
+
13. Report completion WITH evidence
|
|
14031
|
+
|
|
14032
|
+
\u26A0\uFE0F Do NOT mark [x] in ${PATHS.TODO} - that's ${AGENT_NAMES.REVIEWER}'s job!
|
|
13892
14033
|
${PROMPT_TAGS.WORKFLOW.close}`;
|
|
13893
14034
|
|
|
13894
14035
|
// src/agents/prompts/worker/quality.ts
|
|
13895
14036
|
var WORKER_QUALITY = `${PROMPT_TAGS.QUALITY_CHECKLIST.open}
|
|
13896
|
-
|
|
13897
|
-
|
|
13898
|
-
|
|
13899
|
-
|
|
13900
|
-
|
|
13901
|
-
-
|
|
13902
|
-
-
|
|
13903
|
-
|
|
13904
|
-
|
|
13905
|
-
|
|
13906
|
-
|
|
14037
|
+
\u{1F4CB} QUALITY CHECKLIST (Adaptive)
|
|
14038
|
+
|
|
14039
|
+
Before reporting complete, verify against PROJECT-SPECIFIC standards:
|
|
14040
|
+
|
|
14041
|
+
## 1. Static Analysis
|
|
14042
|
+
- lsp_diagnostics shows NO errors
|
|
14043
|
+
- Follow linting rules discovered in project (if any)
|
|
14044
|
+
|
|
14045
|
+
## 2. Build Verification
|
|
14046
|
+
- Run the BUILD command from ${PATHS.CONTEXT}
|
|
14047
|
+
- Must complete without errors
|
|
14048
|
+
|
|
14049
|
+
## 3. Test Verification
|
|
14050
|
+
- Tests written for new/changed code
|
|
14051
|
+
- Run the TEST command from ${PATHS.CONTEXT}
|
|
14052
|
+
- All tests must pass
|
|
14053
|
+
|
|
14054
|
+
## 4. Code Quality (OBSERVE existing patterns)
|
|
14055
|
+
- Match naming conventions found in codebase
|
|
14056
|
+
- Match error handling patterns found in codebase
|
|
14057
|
+
- No debug logging left (console.log, print, logger.debug, etc.)
|
|
14058
|
+
- No hardcoded values that should be config
|
|
14059
|
+
|
|
14060
|
+
## 5. Documentation Compliance
|
|
14061
|
+
- Implementation matches ${PATHS.DOCS}/ patterns
|
|
14062
|
+
- API usage matches official documentation
|
|
14063
|
+
|
|
14064
|
+
## OUTPUT FORMAT:
|
|
14065
|
+
\`\`\`
|
|
13907
14066
|
TASK: T[N]
|
|
13908
14067
|
CHANGED: [files] ([lines])
|
|
13909
|
-
|
|
14068
|
+
BUILD: [command used] \u2192 [result]
|
|
14069
|
+
TEST: [command used] \u2192 [result]
|
|
14070
|
+
PATTERNS_FOLLOWED: [list observed conventions]
|
|
13910
14071
|
DOCS_USED: ${PATHS.DOCS}/[file]
|
|
13911
14072
|
Ready for ${AGENT_NAMES.REVIEWER} verification
|
|
14073
|
+
\`\`\`
|
|
13912
14074
|
${PROMPT_TAGS.QUALITY_CHECKLIST.close}`;
|
|
13913
14075
|
|
|
13914
14076
|
// src/agents/prompts/worker/tdd-workflow.ts
|
|
@@ -14175,8 +14337,8 @@ var REVIEWER_REQUIRED = `${PROMPT_TAGS.REQUIRED_ACTIONS.open}
|
|
|
14175
14337
|
- Am I verifying THOROUGHLY or just going through motions?
|
|
14176
14338
|
|
|
14177
14339
|
ALWAYS run lsp_diagnostics
|
|
14178
|
-
ALWAYS run
|
|
14179
|
-
ALWAYS run
|
|
14340
|
+
ALWAYS run project's BUILD command (from ${PATHS.CONTEXT})
|
|
14341
|
+
ALWAYS run project's TEST command (from ${PATHS.CONTEXT})
|
|
14180
14342
|
ALWAYS check implementation matches ${PATHS.DOCS}/
|
|
14181
14343
|
ALWAYS update ${PATHS.TODO} checkboxes ONLY after verification
|
|
14182
14344
|
ALWAYS provide ${WORK_STATUS.TEST_RESULT.PASS}/${WORK_STATUS.TEST_RESULT.FAIL} with evidence
|
|
@@ -14186,25 +14348,44 @@ ${PROMPT_TAGS.REQUIRED_ACTIONS.close}`;
|
|
|
14186
14348
|
|
|
14187
14349
|
// src/agents/prompts/reviewer/verification.ts
|
|
14188
14350
|
var REVIEWER_VERIFICATION = `${PROMPT_TAGS.VERIFICATION_PROCESS.open}
|
|
14189
|
-
|
|
14190
|
-
lsp_diagnostics - Must show no errors
|
|
14191
|
-
|
|
14192
|
-
## Step 2: Build Check
|
|
14193
|
-
npm run build - Must pass
|
|
14194
|
-
|
|
14195
|
-
## Step 3: Test Check
|
|
14196
|
-
npm test - Must pass
|
|
14197
|
-
Tests must exist for new code
|
|
14351
|
+
\u{1F50D} ADAPTIVE VERIFICATION PROCESS
|
|
14198
14352
|
|
|
14199
|
-
## Step
|
|
14200
|
-
|
|
14201
|
-
|
|
14202
|
-
|
|
14203
|
-
|
|
14353
|
+
## Step 1: Read Project Context
|
|
14354
|
+
\`\`\`bash
|
|
14355
|
+
cat ${PATHS.CONTEXT} # Get build/test commands
|
|
14356
|
+
\`\`\`
|
|
14357
|
+
- Identify the BUILD command for this project
|
|
14358
|
+
- Identify the TEST command for this project
|
|
14359
|
+
- Note any project-specific verification requirements
|
|
14360
|
+
|
|
14361
|
+
## Step 2: Static Analysis
|
|
14362
|
+
lsp_diagnostics - Must show NO errors or warnings
|
|
14363
|
+
|
|
14364
|
+
## Step 3: Build Verification
|
|
14365
|
+
- Run the project's BUILD command (from ${PATHS.CONTEXT})
|
|
14366
|
+
- Must pass without errors
|
|
14367
|
+
- Watch for deprecation warnings
|
|
14368
|
+
|
|
14369
|
+
## Step 4: Test Verification
|
|
14370
|
+
- Run the project's TEST command (from ${PATHS.CONTEXT})
|
|
14371
|
+
- ALL tests must pass
|
|
14372
|
+
- New code MUST have corresponding tests
|
|
14373
|
+
|
|
14374
|
+
## Step 5: Documentation Compliance
|
|
14375
|
+
- Compare implementation with ${PATHS.DOCS}/
|
|
14376
|
+
- API usage must match official documentation
|
|
14377
|
+
- Check for breaking changes
|
|
14378
|
+
|
|
14379
|
+
## Step 6: Pattern Verification
|
|
14380
|
+
- Does the code follow EXISTING patterns in codebase?
|
|
14381
|
+
- Naming conventions consistent?
|
|
14382
|
+
- Error handling consistent?
|
|
14383
|
+
|
|
14384
|
+
## Step 7: Mark Complete (ONLY after ALL pass)
|
|
14204
14385
|
In ${PATHS.TODO}:
|
|
14205
|
-
- [x] T1: [task] | verified | evidence:
|
|
14386
|
+
- [x] T1: [task] | verified | evidence: [build/test results]
|
|
14206
14387
|
|
|
14207
|
-
|
|
14388
|
+
\u26A0\uFE0F NEVER mark [x] without running ACTUAL verification commands!
|
|
14208
14389
|
${PROMPT_TAGS.VERIFICATION_PROCESS.close}`;
|
|
14209
14390
|
|
|
14210
14391
|
// src/agents/prompts/reviewer/todo-update.ts
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.21",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|