opencode-vibe-spec-plugin 1.0.4
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/README.md +264 -0
- package/dist/agents/ask.d.ts +4 -0
- package/dist/agents/ask.d.ts.map +1 -0
- package/dist/agents/quality-gate.d.ts +55 -0
- package/dist/agents/quality-gate.d.ts.map +1 -0
- package/dist/agents/spec.d.ts +4 -0
- package/dist/agents/spec.d.ts.map +1 -0
- package/dist/agents/vibe.d.ts +4 -0
- package/dist/agents/vibe.d.ts.map +1 -0
- package/dist/config/agent-configs.d.ts +5 -0
- package/dist/config/agent-configs.d.ts.map +1 -0
- package/dist/config/constants.d.ts +136 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/types.d.ts +1799 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/hooks/message-completed.d.ts +10 -0
- package/dist/hooks/message-completed.d.ts.map +1 -0
- package/dist/hooks/message-updated.d.ts +2 -0
- package/dist/hooks/message-updated.d.ts.map +1 -0
- package/dist/hooks/session-end.d.ts +9 -0
- package/dist/hooks/session-end.d.ts.map +1 -0
- package/dist/hooks/session-start.d.ts +9 -0
- package/dist/hooks/session-start.d.ts.map +1 -0
- package/dist/hooks/spec-lifecycle.d.ts +17 -0
- package/dist/hooks/spec-lifecycle.d.ts.map +1 -0
- package/dist/hooks/stop-requested.d.ts +9 -0
- package/dist/hooks/stop-requested.d.ts.map +1 -0
- package/dist/hooks/tool-execute-before.d.ts +8 -0
- package/dist/hooks/tool-execute-before.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2690 -0
- package/dist/quality/code-analyzer.d.ts +17 -0
- package/dist/quality/code-analyzer.d.ts.map +1 -0
- package/dist/quality/engine.d.ts +8 -0
- package/dist/quality/engine.d.ts.map +1 -0
- package/dist/quality/gate-controller.d.ts +52 -0
- package/dist/quality/gate-controller.d.ts.map +1 -0
- package/dist/quality/negative-indicators.d.ts +10 -0
- package/dist/quality/negative-indicators.d.ts.map +1 -0
- package/dist/quality/security-scanner.d.ts +12 -0
- package/dist/quality/security-scanner.d.ts.map +1 -0
- package/dist/spec/ears-parser.d.ts +96 -0
- package/dist/spec/ears-parser.d.ts.map +1 -0
- package/dist/spec/index.d.ts +17 -0
- package/dist/spec/index.d.ts.map +1 -0
- package/dist/spec/phase-gate.d.ts +45 -0
- package/dist/spec/phase-gate.d.ts.map +1 -0
- package/dist/spec/spec-manager.d.ts +111 -0
- package/dist/spec/spec-manager.d.ts.map +1 -0
- package/dist/spec/spec-templates.d.ts +35 -0
- package/dist/spec/spec-templates.d.ts.map +1 -0
- package/dist/spec/steering-integration.d.ts +42 -0
- package/dist/spec/steering-integration.d.ts.map +1 -0
- package/dist/spec/task-traceability.d.ts +49 -0
- package/dist/spec/task-traceability.d.ts.map +1 -0
- package/dist/store/session-store.d.ts +12 -0
- package/dist/store/session-store.d.ts.map +1 -0
- package/dist/subagents/shared/architect.d.ts +4 -0
- package/dist/subagents/shared/architect.d.ts.map +1 -0
- package/dist/subagents/shared/librarian.d.ts +4 -0
- package/dist/subagents/shared/librarian.d.ts.map +1 -0
- package/dist/subagents/shared/oracle.d.ts +4 -0
- package/dist/subagents/shared/oracle.d.ts.map +1 -0
- package/dist/subagents/shared/quality-analyzer.d.ts +4 -0
- package/dist/subagents/shared/quality-analyzer.d.ts.map +1 -0
- package/dist/subagents/shared/quality-metrics.d.ts +4 -0
- package/dist/subagents/shared/quality-metrics.d.ts.map +1 -0
- package/dist/subagents/shared/quality-reporter.d.ts +4 -0
- package/dist/subagents/shared/quality-reporter.d.ts.map +1 -0
- package/dist/subagents/shared/quality-reviewer.d.ts +4 -0
- package/dist/subagents/shared/quality-reviewer.d.ts.map +1 -0
- package/dist/subagents/spec/planner.d.ts +4 -0
- package/dist/subagents/spec/planner.d.ts.map +1 -0
- package/dist/subagents/spec/reviewer.d.ts +4 -0
- package/dist/subagents/spec/reviewer.d.ts.map +1 -0
- package/dist/subagents/vibe/explorer.d.ts +4 -0
- package/dist/subagents/vibe/explorer.d.ts.map +1 -0
- package/dist/subagents/vibe/inspirer.d.ts +4 -0
- package/dist/subagents/vibe/inspirer.d.ts.map +1 -0
- package/dist/utils/modeSwitcher.d.ts +8 -0
- package/dist/utils/modeSwitcher.d.ts.map +1 -0
- package/dist/utils/modelResolver.d.ts +9 -0
- package/dist/utils/modelResolver.d.ts.map +1 -0
- package/dist/utils/modelRouter.d.ts +6 -0
- package/dist/utils/modelRouter.d.ts.map +1 -0
- package/dist/utils/steeringLoader.d.ts +7 -0
- package/dist/utils/steeringLoader.d.ts.map +1 -0
- package/dist/utils/todoParser.d.ts +13 -0
- package/dist/utils/todoParser.d.ts.map +1 -0
- package/docs/spec.md +147 -0
- package/package.json +67 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-metrics.d.ts","sourceRoot":"","sources":["../../../src/subagents/shared/quality-metrics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,oBAAoB,EAAE,WAclC,CAAC;AAEF,eAAO,MAAM,oBAAoB,+xHA0HH,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from '../../config/types';
|
|
2
|
+
export declare const qualityReporterConfig: AgentConfig;
|
|
3
|
+
export declare const qualityReporterPrompt = "You are QUALITY REPORTER - a specialized subagent for generating quality reports and insights.\n\nYOUR MISSION:\nGenerate comprehensive quality reports, provide insights, and suggest improvements based on quality metrics.\n\nWORKFLOW:\n\n### Step 1: Data Collection\n1. **Gather Metrics**: Collect quality metrics from assessments\n2. **Analyze Trends**: Identify patterns and changes\n3. **Compile Data**: Organize data for reporting\n\n### Step 2: Report Generation\n4. **Generate Summary**: Create executive summary\n5. **Detail Findings**: Provide detailed analysis\n6. **Visualize Data**: Create charts and graphs\n\n### Step 3: Insights and Recommendations\n7. **Provide Insights**: Offer data-driven observations\n8. **Suggest Improvements**: Recommend specific actions\n9. **Predict Trends**: Forecast future quality trends\n\nREPORT TYPES:\n\n### Assessment Report\n- **Individual Assessment**: Detailed analysis of single assessment\n- **Comparative Assessment**: Compare multiple assessments\n- **Trend Assessment**: Quality changes over time\n\n### Summary Report\n- **Daily Summary**: Daily quality overview\n- **Weekly Summary**: Weekly quality trends\n- **Monthly Summary**: Monthly quality analysis\n\n### Improvement Report\n- **Issue Analysis**: Detailed issue breakdown\n- **Recommendation Report**: Specific improvement actions\n- **Progress Report**: Improvement tracking\n\nOUTPUT FORMAT:\n# Quality Report\n\n## Executive Summary\n**Report Period**: [start] - [end]\n**Total Assessments**: [count]\n**Average Quality Score**: [score]\n**Quality Trend**: [improving/stable/declining]\n\n## Key Findings\n### Strengths\n1. [Strength 1]\n2. [Strength 2]\n3. [Strength 3]\n\n### Areas for Improvement\n1. [Area 1]\n2. [Area 2]\n3. [Area 3]\n\n## Detailed Analysis\n### Quality Scores\n[Chart: Quality scores over time]\n\n### Issue Distribution\n[Chart: Issues by severity]\n\n### Performance Metrics\n[Chart: Execution time and token usage]\n\n## Insights\n### Quality Insights\n1. [Insight 1]\n2. [Insight 2]\n3. [Insight 3]\n\n### Performance Insights\n1. [Insight 1]\n2. [Insight 2]\n3. [Insight 3]\n\n## Recommendations\n### Immediate Actions\n1. [Action 1]\n2. [Action 2]\n3. [Action 3]\n\n### Long-term Improvements\n1. [Improvement 1]\n2. [Improvement 2]\n3. [Improvement 3]\n\n## Predictions\n### Quality Forecast\n- **Next 7 Days**: [prediction]\n- **Next 30 Days**: [prediction]\n- **Next Quarter**: [prediction]\n\n### Trend Analysis\n- **Improving Areas**: [list]\n- **Stable Areas**: [list]\n- **Declining Areas**: [list]\n\n## Appendix\n### Data Sources\n- [Source 1]\n- [Source 2]\n- [Source 3]\n\n### Methodology\n- [Methodology 1]\n- [Methodology 2]\n- [Methodology 3]\n\nREPORT RULES:\n1. **Comprehensive**: Cover all relevant aspects\n2. **Data-Driven**: Base reports on concrete metrics\n3. **Visual**: Use charts and graphs for clarity\n4. **Actionable**: Provide specific recommendations\n5. **Timely**: Generate reports in real-time\n\nREPORT FORMATS:\n- **Markdown**: For documentation\n- **JSON**: For data exchange\n- **HTML**: For web display\n- **PDF**: For printing\n\n=== REPORT PATTERN ===\n\n**Collect**: Gather quality data\n**Analyze**: Identify patterns and insights\n**Visualize**: Create charts and graphs\n**Report**: Generate comprehensive reports\n**Recommend**: Provide actionable suggestions\n\n=== RULES ===\n- Ensure accuracy in data presentation\n- Use clear and concise language\n- Provide actionable recommendations\n- Visualize data effectively\n- Update reports in real-time";
|
|
4
|
+
//# sourceMappingURL=quality-reporter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-reporter.d.ts","sourceRoot":"","sources":["../../../src/subagents/shared/quality-reporter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,qBAAqB,EAAE,WAcnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,49GA2IJ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from '../../config/types';
|
|
2
|
+
export declare const qualityReviewerConfig: AgentConfig;
|
|
3
|
+
export declare const qualityReviewerPrompt = "You are QUALITY REVIEWER - a specialized subagent for quality review and validation of agent outputs.\n\nYOUR MISSION:\nReview agent outputs, validate quality scores, verify compliance with standards, and approve or reject outputs.\n\nWORKFLOW:\n\n### Step 1: Review Preparation\n1. **Load Standards**: Apply project-specific quality standards\n2. **Review Analysis**: Examine quality analysis from Quality Analyzer\n3. **Verify Context**: Check agent context and requirements\n\n### Step 2: Quality Validation\n4. **Validate Scores**: Verify quality scores are accurate\n5. **Check Compliance**: Ensure output meets quality standards\n6. **Identify Gaps**: Find missing quality elements\n\n### Step 3: Decision Making\n7. **Make Decision**: Approve or reject the output\n8. **Justify Decision**: Provide clear rationale\n9. **Generate Feedback**: Create actionable improvement suggestions\n\nREVIEW DIMENSIONS:\n\n### Standard Compliance\n- **Naming Conventions**: Verify proper naming patterns\n- **Code Structure**: Check organization and readability\n- **Documentation**: Validate comments and docs\n- **Testing**: Ensure test coverage considerations\n\n### Quality Validation\n- **Accuracy**: Verify information correctness\n- **Completeness**: Check requirement coverage\n- **Consistency**: Ensure logical coherence\n- **Feasibility**: Validate technical viability\n\n### Risk Assessment\n- **Technical Risks**: Identify potential issues\n- **Security Risks**: Check for vulnerabilities\n- **Performance Risks**: Assess optimization opportunities\n- **Maintainability Risks**: Evaluate long-term viability\n\nOUTPUT FORMAT:\n# Quality Review Report\n\n## Review Summary\n**Output Under Review**: [Agent output summary]\n**Reviewer**: Quality Reviewer\n**Timestamp**: [timestamp]\n\n## Compliance Check\n### Naming Conventions\n- [x] Functions use camelCase\n- [x] Classes use PascalCase\n- [ ] Constants use UPPER_SNAKE_CASE\n\n### Code Structure\n- [x] Proper indentation\n- [x] Logical organization\n- [ ] Clear separation of concerns\n\n### Documentation\n- [x] JSDoc comments\n- [x] Inline comments\n- [ ] README documentation\n\n## Quality Validation\n### Accuracy\n- **Score**: [1-10]\n- **Issues**: [list]\n\n### Completeness\n- **Score**: [1-10]\n- **Issues**: [list]\n\n### Consistency\n- **Score**: [1-10]\n- **Issues**: [list]\n\n### Feasibility\n- **Score**: [1-10]\n- **Issues**: [list]\n\n## Risk Assessment\n### Technical Risks\n- [Risk 1]: [Mitigation]\n- [Risk 2]: [Mitigation]\n\n### Security Risks\n- [Risk 1]: [Mitigation]\n- [Risk 2]: [Mitigation]\n\n## Review Decision\n**Decision**: [APPROVED|REJECTED|REVISION_REQUIRED]\n**Rationale**: [Explanation]\n\n## Improvement Suggestions\n1. [Suggestion 1]\n2. [Suggestion 2]\n3. [Suggestion 3]\n\n## Compliance Report\n- **Standards Met**: [X/Y]\n- **Issues Found**: [count]\n- **Risk Level**: [Low/Medium/High]\n\nREVIEW RULES:\n1. **Thorough**: Review all aspects of the output\n2. **Objective**: Base decisions on evidence\n3. **Constructive**: Provide helpful feedback\n4. **Consistent**: Apply standards uniformly\n5. **Transparent**: Explain decisions clearly\n\nDECISION CRITERIA:\n- **APPROVED**: Meets all quality standards\n- **REJECTED**: Fails critical quality requirements\n- **REVISION_REQUIRED**: Needs improvements before approval\n\nRISK LEVELS:\n- **Low**: Minor issues, can proceed\n- **Medium**: Some concerns, should address\n- **High**: Significant risks, must address\n\n=== REVIEW PATTERN ===\n\n**Prepare**: Load standards and context\n**Validate**: Check scores and compliance\n**Decide**: Make approval decision\n**Feedback**: Provide improvement suggestions\n\n=== RULES ===\n- Be thorough and meticulous\n- Base decisions on concrete evidence\n- Provide constructive feedback\n- Apply standards consistently\n- Explain decisions clearly";
|
|
4
|
+
//# sourceMappingURL=quality-reviewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quality-reviewer.d.ts","sourceRoot":"","sources":["../../../src/subagents/shared/quality-reviewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,qBAAqB,EAAE,WAcnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,mwHAuIN,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from '../../config/types';
|
|
2
|
+
export declare const plannerConfig: AgentConfig;
|
|
3
|
+
export declare const plannerPrompt = "You are PLANNER - a requirements analysis and planning specialist.\n\nYOUR EXPERTISE:\n- Requirements gathering and analysis\n- Task decomposition\n- Timeline estimation\n- Dependency identification\n\nWORKFLOW:\n1. Analyze user requirements\n2. Create structured specification document\n3. Break down implementation tasks\n4. Estimate time and identify dependencies\n\nOUTPUT FORMAT:\n# \uD83D\uDCCB Planning Report\n\n## Requirements Analysis\n### Functional Requirements\n- [Requirement 1]\n- [Requirement 2]\n\n### Non-Functional Requirements\n- **Performance**: [Requirements]\n- **Security**: [Requirements]\n- **Scalability**: [Requirements]\n\n## Task Breakdown\n### Phase 1: [Phase Name]\n- [ ] Task 1.1: [Description] - Acceptance: [Criteria]\n- [ ] Task 1.2: [Description] - Acceptance: [Criteria]\n\n### Phase 2: [Phase Name]\n- [ ] Task 2.1: [Description] - Acceptance: [Criteria]\n- [ ] Task 2.2: [Description] - Acceptance: [Criteria]\n\n## Time Estimation\n- **Phase 1**: [Time]\n- **Phase 2**: [Time]\n- **Total**: [Time]\n\n## Dependencies\n- Task 1.1 \u2192 Task 2.1\n- Task 1.2 \u2192 Task 2.2\n\n## Risk Factors\n- [Risk 1]: [Mitigation]\n- [Risk 2]: [Mitigation]";
|
|
4
|
+
//# sourceMappingURL=planner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"planner.d.ts","sourceRoot":"","sources":["../../../src/subagents/spec/planner.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,aAAa,EAAE,WAc3B,CAAC;AAEF,eAAO,MAAM,aAAa,qqCA+CD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from '../../config/types';
|
|
2
|
+
export declare const reviewerConfig: AgentConfig;
|
|
3
|
+
export declare const reviewerPrompt = "You are REVIEWER - a specification validation and quality assurance specialist.\n\nYOUR EXPERTISE:\n- Specification completeness validation\n- Technical feasibility verification\n- Gap identification\n- Quality standards enforcement\n\nWORKFLOW:\n1. Review specification document\n2. Check completeness against requirements\n3. Verify technical feasibility\n4. Identify gaps and risks\n\nOUTPUT FORMAT:\n# \u2705 Review Report\n\n## Review Conclusion\n**Status**: [APPROVED / NEEDS_REVISION]\n**Completeness**: [X%]\n**Risk Level**: [Low/Medium/High]\n\n## Critical Issues\n1. [Issue] \u2192 [Suggested fix]\n\n## Warnings\n1. [Concern] \u2192 [Mitigation]\n\n## Missing Elements\n- [Missing 1]\n- [Missing 2]\n\n## Quality Metrics\n- **Requirements Coverage**: [X%]\n- **Technical Completeness**: [X%]\n- **Testability**: [High/Medium/Low]\n\n## Improvement Suggestions\n1. [Suggestion 1]\n2. [Suggestion 2]\n\n## Final Verdict\n[One paragraph assessment]";
|
|
4
|
+
//# sourceMappingURL=reviewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewer.d.ts","sourceRoot":"","sources":["../../../src/subagents/spec/reviewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,cAAc,EAAE,WAa5B,CAAC;AAEF,eAAO,MAAM,cAAc,i8BA0CA,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from '../../config/types';
|
|
2
|
+
export declare const explorerConfig: AgentConfig;
|
|
3
|
+
export declare const explorerPrompt = "You are EXPLORER - a feasibility and risk assessment specialist.\n\nYOUR EXPERTISE:\n- Technical feasibility analysis\n- Risk identification and mitigation\n- Alternative path exploration\n- Complexity assessment\n\nWORKFLOW:\n1. Analyze technical feasibility of proposed solution\n2. Identify potential risks and obstacles\n3. Explore alternative implementation paths\n4. Provide risk assessment report\n\nOUTPUT FORMAT:\n# \uD83D\uDD0D Exploration Report\n\n## Feasibility Assessment\n**Overall**: [Feasible/Risky/Infeasible]\n**Confidence**: [High/Medium/Low]\n**Effort Estimate**: [Hours/Days]\n\n## Risk Analysis\n| Risk | Probability | Impact | Mitigation |\n|------|-------------|--------|------------|\n| [Risk 1] | High/Med/Low | High/Med/Low | [Strategy] |\n| [Risk 2] | High/Med/Low | High/Med/Low | [Strategy] |\n\n## Alternative Paths\n1. **Path A**: [Description]\n - Feasibility: [High/Medium/Low]\n - Risk: [High/Medium/Low]\n\n2. **Path B**: [Description]\n - Feasibility: [High/Medium/Low]\n - Risk: [High/Medium/Low]\n\n## Recommendations\n- [Recommendation 1]\n- [Recommendation 2]\n- [Recommendation 3]";
|
|
4
|
+
//# sourceMappingURL=explorer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explorer.d.ts","sourceRoot":"","sources":["../../../src/subagents/vibe/explorer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,cAAc,EAAE,WAc5B,CAAC;AAEF,eAAO,MAAM,cAAc,gnCAwCN,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AgentConfig } from '../../config/types';
|
|
2
|
+
export declare const inspirerConfig: AgentConfig;
|
|
3
|
+
export declare const inspirerPrompt = "You are INSPIRER - a creativity and ideation specialist.\n\nYOUR EXPERTISE:\n- Creative brainstorming\n- Alternative solution generation\n- Innovation thinking\n- Pattern matching from similar projects\n\nWORKFLOW:\n1. Analyze user requirements and intent\n2. Generate multiple creative solutions\n3. Evaluate feasibility and innovation\n4. Provide implementation suggestions\n\nOUTPUT FORMAT:\n# \uD83D\uDCA1 Inspiration Report\n\n## Core Idea\n[Main creative concept]\n\n## Alternative Solutions\n1. **Solution A**: [Description]\n - Pros: [Advantages]\n - Cons: [Disadvantages]\n - Innovation: [What makes it unique]\n\n2. **Solution B**: [Description]\n - Pros: [Advantages]\n - Cons: [Disadvantages]\n - Innovation: [What makes it unique]\n\n3. **Solution C**: [Description]\n - Pros: [Advantages]\n - Cons: [Disadvantages]\n - Innovation: [What makes it unique]\n\n## Recommended Solution\n**Choice**: [Solution name]\n**Reason**: [Why this is best]\n\n## Implementation Key Points\n- [Key point 1]\n- [Key point 2]\n- [Key point 3]";
|
|
4
|
+
//# sourceMappingURL=inspirer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspirer.d.ts","sourceRoot":"","sources":["../../../src/subagents/vibe/inspirer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,eAAO,MAAM,cAAc,EAAE,WAa5B,CAAC;AAEF,eAAO,MAAM,cAAc,qiCA2CX,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ModeState, AgentMode } from '../config/types';
|
|
2
|
+
export declare class ModeSwitcher {
|
|
3
|
+
static switchMode(currentState: ModeState, targetMode: AgentMode): ModeState;
|
|
4
|
+
private static convertVibeToRequirements;
|
|
5
|
+
private static convertSpecToInspiration;
|
|
6
|
+
static createInitialState(mode: AgentMode): ModeState;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=modeSwitcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modeSwitcher.d.ts","sourceRoot":"","sources":["../../src/utils/modeSwitcher.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5D,qBAAa,YAAY;IACvB,MAAM,CAAC,UAAU,CAAC,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,GAAG,SAAS;IAoC5E,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAwBxC,OAAO,CAAC,MAAM,CAAC,wBAAwB;IAiBvC,MAAM,CAAC,kBAAkB,CAAC,IAAI,EAAE,SAAS,GAAG,SAAS;CA0BtD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ModelConfig } from '../config/types';
|
|
2
|
+
export declare class ModelResolver {
|
|
3
|
+
static validateModel(model: string): boolean;
|
|
4
|
+
static resolveModel(agentName: string, agentType: 'primary' | 'subagent', existingConfig: {
|
|
5
|
+
model?: string;
|
|
6
|
+
}, envVars: Record<string, string | undefined>): string;
|
|
7
|
+
static getModelRecommendations(): Record<string, ModelConfig>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=modelResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelResolver.d.ts","sourceRoot":"","sources":["../../src/utils/modelResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,qBAAa,aAAa;IACxB,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAO5C,MAAM,CAAC,YAAY,CACjB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,SAAS,GAAG,UAAU,EACjC,cAAc,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,EAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAC1C,MAAM;IA+BT,MAAM,CAAC,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;CAG9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelRouter.d.ts","sourceRoot":"","sources":["../../src/utils/modelRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAW7D,qBAAa,WAAW;IACtB,MAAM,CAAC,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,WAAW;IAQjD,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,QAAQ;CAyBjD"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { SteeringConfig } from '../config/types';
|
|
2
|
+
export declare class SteeringLoader {
|
|
3
|
+
static loadSteering(projectRoot: string): Promise<SteeringConfig>;
|
|
4
|
+
private static parseSteering;
|
|
5
|
+
static getDefaultConfig(): SteeringConfig;
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=steeringLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steeringLoader.d.ts","sourceRoot":"","sources":["../../src/utils/steeringLoader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AA4BtD,qBAAa,cAAc;WACZ,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAqBvE,OAAO,CAAC,MAAM,CAAC,aAAa;IAwB5B,MAAM,CAAC,gBAAgB,IAAI,cAAc;CAG1C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Todo, TodoStatus, AgentMode } from '../config/types';
|
|
2
|
+
export interface TodoExtractionResult {
|
|
3
|
+
hasTodos: boolean;
|
|
4
|
+
todos: Todo[];
|
|
5
|
+
completedCount: number;
|
|
6
|
+
pendingCount: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class TodoParser {
|
|
9
|
+
static extractTodos(content: string, mode?: AgentMode): TodoExtractionResult;
|
|
10
|
+
static formatTodoList(todos: Todo[], onlyPending?: boolean): string;
|
|
11
|
+
static updateTodoStatus(todos: Todo[], todoId: string, status: TodoStatus): Todo[];
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=todoParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"todoParser.d.ts","sourceRoot":"","sources":["../../src/utils/todoParser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAgB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB;AASD,qBAAa,UAAU;IACrB,MAAM,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,SAAkB,GAAG,oBAAoB;IAiCpF,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,WAAW,GAAE,OAAe,GAAG,MAAM;IAa1E,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,IAAI,EAAE;CAanF"}
|
package/docs/spec.md
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# OpenCode Vibe-Spec Plugin — Specification
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Multi-agent plugin for OpenCode providing **3 primary agent modes** backed by **11 specialized subagents** and an integrated quality gate workflow.
|
|
6
|
+
|
|
7
|
+
| Mode | Role | Architecture Pattern |
|
|
8
|
+
|------|------|---------------------|
|
|
9
|
+
| **Vibe** | Rapid prototyping | Reflector (self-improving loops) |
|
|
10
|
+
| **Spec** | Spec-driven development | Hierarchical + Plan-and-Solve |
|
|
11
|
+
| **Ask** | Research assistant | REWOO (5x token efficiency) |
|
|
12
|
+
|
|
13
|
+
**Quality gates** are integrated as automatic workflow validation mechanisms — not a standalone agent.
|
|
14
|
+
|
|
15
|
+
## System Architecture
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Vibe-Agent → (Inspirer / Explorer) → Rapid Prototyping + Reflector Loop
|
|
19
|
+
Spec-Agent → (Planner / Reviewer) → EARS Spec → Phase Gates → Traceability
|
|
20
|
+
Ask-Agent → (Librarian / Oracle / Architect) → REWOO Research
|
|
21
|
+
↓
|
|
22
|
+
Quality Gate Controller (Workflow Mechanism)
|
|
23
|
+
↓
|
|
24
|
+
Context-Bridge / Mode-Switcher
|
|
25
|
+
↓
|
|
26
|
+
Session-Store / TodoParser
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Key Components
|
|
30
|
+
|
|
31
|
+
| Component | Location | Responsibility |
|
|
32
|
+
|-----------|----------|----------------|
|
|
33
|
+
| Plugin Entry | `src/index.ts` | Default export, hook registration |
|
|
34
|
+
| Agent Configs | `src/config/agent-configs.ts` | 3 primary + 11 subagent definitions |
|
|
35
|
+
| Spec Engine | `src/spec/` | EARS parser, phase gates, traceability, templates |
|
|
36
|
+
| Quality Engine | `src/quality/` | Quality assessment, gate controller |
|
|
37
|
+
| Steering | `src/utils/steeringLoader.ts` + `src/spec/steering-integration.ts` | Project convention loading |
|
|
38
|
+
| Mode Switcher | `src/utils/modeSwitcher.ts` | Tab-key context-preserving switches |
|
|
39
|
+
| Session Store | `src/store/` | Persistent session state |
|
|
40
|
+
|
|
41
|
+
## Core Features
|
|
42
|
+
|
|
43
|
+
### Spec-Driven Development
|
|
44
|
+
- **EARS/GEARS Notation**: `WHEN [trigger] THE SYSTEM SHALL [response]`
|
|
45
|
+
- **Phase-Gated Workflow**: `requirements → design → tasks → implementation`
|
|
46
|
+
- **Task Traceability**: Requirements ↔ tasks bidirectional linkage matrix
|
|
47
|
+
- **Persistent Storage**: `.opencode/specs/<feature>/{requirements,design,tasks}.md`
|
|
48
|
+
- **Steering Integration**: Auto-loads `product.md`, `tech.md`, `structure.md`
|
|
49
|
+
|
|
50
|
+
### Quality Gate Validation
|
|
51
|
+
|
|
52
|
+
| Transition | Gate Requirements |
|
|
53
|
+
|------------|-------------------|
|
|
54
|
+
| requirements → design | Min 3 EARS requirements + acceptance criteria |
|
|
55
|
+
| design → tasks | Architecture diagram + technology stack |
|
|
56
|
+
| tasks → implementation | Min 1 task + requirement traceability |
|
|
57
|
+
|
|
58
|
+
**Gate Decisions**: `PROMOTE` (≥8/10) · `HOLD` (6-7/10) · `ROLLBACK` (<6/10)
|
|
59
|
+
|
|
60
|
+
### Mode Switching
|
|
61
|
+
- Tab-key switching with full context preservation
|
|
62
|
+
- Session store persists state across switches
|
|
63
|
+
- Todo enforcement (mandatory / advisory strategies)
|
|
64
|
+
|
|
65
|
+
## Agent Architecture Patterns
|
|
66
|
+
|
|
67
|
+
### REWOO (Ask Agent)
|
|
68
|
+
Separates planning from execution: Planner → parallel Workers → Solver synthesis. 5x token reduction vs ReAct by eliminating redundant observations.
|
|
69
|
+
|
|
70
|
+
### Hierarchical + Plan-and-Solve (Spec Agent)
|
|
71
|
+
Supervisor delegates to specialized workers through structured review cycles. Two-phase: complete planning before systematic execution.
|
|
72
|
+
|
|
73
|
+
### Reflector (Vibe Agent)
|
|
74
|
+
Self-improving loop: Generate → Critique → Refine. HumanEval accuracy: 80% → 91%.
|
|
75
|
+
|
|
76
|
+
## Model Selection Strategy
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{
|
|
80
|
+
"vibe": "zhipu/glm-4-flash",
|
|
81
|
+
"spec": "zhipu/glm-5.2",
|
|
82
|
+
"ask": "zhipu/glm-4-flash",
|
|
83
|
+
"subagents": {
|
|
84
|
+
"planner": "zhipu/glm-5.2",
|
|
85
|
+
"worker": "zhipu/glm-4-flash",
|
|
86
|
+
"reviewer": "zhipu/glm-4-flash"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Configurable via `VIBE_SPEC_MODEL_VIBE`, `VIBE_SPEC_MODEL_SPEC`, `VIBE_SPEC_MODEL_ASK` env vars.
|
|
92
|
+
|
|
93
|
+
## Configuration
|
|
94
|
+
|
|
95
|
+
### Plugin Installation
|
|
96
|
+
```json
|
|
97
|
+
{
|
|
98
|
+
"$schema": "https://opencode.ai/config.json",
|
|
99
|
+
"plugin": ["opencode-vibe-spec-plugin"]
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Steering Documents
|
|
104
|
+
```
|
|
105
|
+
steering/
|
|
106
|
+
default.md # Code style, architecture, testing conventions
|
|
107
|
+
product.md # Business context and goals (spec mode)
|
|
108
|
+
tech.md # Technology stack and constraints (spec mode)
|
|
109
|
+
structure.md # File organization patterns (spec mode)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Spec Storage Layout
|
|
113
|
+
```
|
|
114
|
+
.opencode/specs/<feature>/
|
|
115
|
+
requirements.md # EARS-formatted requirements
|
|
116
|
+
design.md # Technical design document
|
|
117
|
+
tasks.md # Implementation tasks with traceability
|
|
118
|
+
metadata.json # Phase, version, steering files used
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Hooks
|
|
122
|
+
|
|
123
|
+
| Hook | Purpose |
|
|
124
|
+
|------|---------|
|
|
125
|
+
| `tool.execute.before` | Pre-execution tool validation |
|
|
126
|
+
| `message.updated` | Incremental message processing |
|
|
127
|
+
| `message.completed` | Quality assessment triggers |
|
|
128
|
+
| `stop.requested` | Graceful shutdown handling |
|
|
129
|
+
| `session.start` | Session initialization |
|
|
130
|
+
| `session.end` | Session cleanup and persistence |
|
|
131
|
+
|
|
132
|
+
## Success Criteria
|
|
133
|
+
|
|
134
|
+
- **Test Suite**: 283 tests passing across 21 test files
|
|
135
|
+
- **TypeScript**: Zero compilation errors (strict mode)
|
|
136
|
+
- **Build**: ESM output, single default export, opencode-compatible
|
|
137
|
+
- **Agents**: 3 primary + 11 subagents registered and functional
|
|
138
|
+
- **Quality Gates**: Integrated workflow validation, not standalone agent
|
|
139
|
+
- **Mode Switching**: Context-preserving Tab-key switching verified
|
|
140
|
+
|
|
141
|
+
## Technical Requirements
|
|
142
|
+
|
|
143
|
+
- **Language**: TypeScript (ES2022+, strict mode)
|
|
144
|
+
- **Runtime**: Node.js 18+ / Bun (opencode runtime)
|
|
145
|
+
- **Build**: esbuild (ESM bundle) + tsc (declaration files)
|
|
146
|
+
- **Testing**: Vitest with 80%+ unit coverage target
|
|
147
|
+
- **Distribution**: npm package (`opencode-vibe-spec-plugin`)
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "opencode-vibe-spec-plugin",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Enterprise-grade multi-agent plugin for OpenCode — Vibe (rapid prototyping), Spec (structured specification), Ask (research assistant), and Quality Gate (ISO 25010 quality assurance).",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md",
|
|
11
|
+
"docs/spec.md"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "npm run clean && npm run build:types && npm run bundle",
|
|
15
|
+
"bundle": "esbuild src/index.ts --bundle --platform=node --format=esm --outfile=dist/index.js --external:@opencode-ai/*",
|
|
16
|
+
"build:types": "tsc --emitDeclarationOnly",
|
|
17
|
+
"clean": "rm -rf dist .tsbuildinfo",
|
|
18
|
+
"prepublishOnly": "npm run build",
|
|
19
|
+
"typecheck": "tsc --noEmit",
|
|
20
|
+
"lint": "eslint src/",
|
|
21
|
+
"lint:fix": "eslint src/ --fix",
|
|
22
|
+
"format": "prettier --write 'src/**/*.ts'",
|
|
23
|
+
"format:check": "prettier --check 'src/**/*.ts'",
|
|
24
|
+
"test": "vitest",
|
|
25
|
+
"test:run": "vitest run",
|
|
26
|
+
"test:coverage": "vitest run --coverage",
|
|
27
|
+
"ci": "npm run typecheck && npm run lint && npm run format:check && npm run test:run && npm run build"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"opencode",
|
|
31
|
+
"plugin",
|
|
32
|
+
"vibe",
|
|
33
|
+
"spec",
|
|
34
|
+
"ask",
|
|
35
|
+
"quality-gate",
|
|
36
|
+
"agent",
|
|
37
|
+
"prototyping",
|
|
38
|
+
"specification",
|
|
39
|
+
"research",
|
|
40
|
+
"quality-assurance",
|
|
41
|
+
"iso-25010",
|
|
42
|
+
"enterprise"
|
|
43
|
+
],
|
|
44
|
+
"author": "blank-1",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "https://github.com/blank-1/opencode-vibe-spec-plugin.git"
|
|
49
|
+
},
|
|
50
|
+
"bugs": {
|
|
51
|
+
"url": "https://github.com/blank-1/opencode-vibe-spec-plugin/issues"
|
|
52
|
+
},
|
|
53
|
+
"homepage": "https://github.com/blank-1/opencode-vibe-spec-plugin#readme",
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18.0.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@opencode-ai/plugin": "^1.17.13",
|
|
59
|
+
"@types/node": "^25.1.0",
|
|
60
|
+
"esbuild": "^0.28.1",
|
|
61
|
+
"typescript": "^5.9.3",
|
|
62
|
+
"vitest": "^3.2.1"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"zod": "^3.25.0"
|
|
66
|
+
}
|
|
67
|
+
}
|