opencode-design-lab 0.1.1 → 0.1.2
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/.opencode/plugins/design-lab.js +149 -14
- package/package.json +2 -2
|
@@ -3541,9 +3541,9 @@ function createDesignerPrimaryAgent(options) {
|
|
|
3541
3541
|
read: true,
|
|
3542
3542
|
bash: true,
|
|
3543
3543
|
delegate_task: true,
|
|
3544
|
-
edit:
|
|
3544
|
+
edit: true,
|
|
3545
3545
|
task: false,
|
|
3546
|
-
write:
|
|
3546
|
+
write: true
|
|
3547
3547
|
},
|
|
3548
3548
|
permission: {
|
|
3549
3549
|
bash: "allow",
|
|
@@ -3614,6 +3614,13 @@ ${options.reviewModels.map((spec) => `- ${spec.agentName} (model: ${spec.model},
|
|
|
3614
3614
|
- Which design is recommended overall
|
|
3615
3615
|
- Approximate scores per design (from the score table)
|
|
3616
3616
|
- Notable disagreements between reviewers
|
|
3617
|
+
6. After all reviews are complete, perform synthesis:
|
|
3618
|
+
- Read all review markdown files from reviews/ directory
|
|
3619
|
+
- Read all score JSON files from scores/ directory
|
|
3620
|
+
- Analyze consensus and dissent between reviewers
|
|
3621
|
+
- Identify patterns of agreement and disagreement
|
|
3622
|
+
- Write final-report.md to the run directory root
|
|
3623
|
+
- Include sections: Executive Summary, Consensus Analysis, Design-by-Design Assessment, Final Recommendation, Key Insights
|
|
3617
3624
|
|
|
3618
3625
|
## Output rules
|
|
3619
3626
|
|
|
@@ -3775,6 +3782,38 @@ function buildReviewCommand(options) {
|
|
|
3775
3782
|
description: "Run cross-reviews on existing designs using all configured review models",
|
|
3776
3783
|
agent: "designer",
|
|
3777
3784
|
template: `Run cross-reviews on existing designs.
|
|
3785
|
+
|
|
3786
|
+
$input
|
|
3787
|
+
|
|
3788
|
+
## Instructions
|
|
3789
|
+
|
|
3790
|
+
1. If a run directory is specified above, use it. Otherwise, find the most
|
|
3791
|
+
recent run directory under ${options.baseOutputDir}/ (sort by date prefix).
|
|
3792
|
+
2. Read all design files from the designs/ subdirectory.
|
|
3793
|
+
3. Create subdirectory: reviews/ (if it doesn't exist).
|
|
3794
|
+
4. Delegate review tasks to each review subagent in parallel:
|
|
3795
|
+
${reviewList}
|
|
3796
|
+
5. Fire all delegate_task calls simultaneously - do NOT wait for each to complete before starting the next.
|
|
3797
|
+
6. Each reviewer must read ALL designs and produce ONE comparative markdown
|
|
3798
|
+
report written to its output_file path.
|
|
3799
|
+
7. Wait for ALL review subagents to complete, then read the reviews and produce a summary:
|
|
3800
|
+
- Which design is recommended overall
|
|
3801
|
+
- Approximate scores per design
|
|
3802
|
+
- Notable disagreements between reviewers`
|
|
3803
|
+
};
|
|
3804
|
+
}
|
|
3805
|
+
/**
|
|
3806
|
+
* Build the `/synthesize` command configuration.
|
|
3807
|
+
*
|
|
3808
|
+
* Usage: /synthesize [run-directory]
|
|
3809
|
+
* Synthesizes reviews and scores into a final qualitative report.
|
|
3810
|
+
* If no directory is given, finds the most recent run under the base output directory.
|
|
3811
|
+
*/
|
|
3812
|
+
function buildSynthesizeCommand(options) {
|
|
3813
|
+
return {
|
|
3814
|
+
description: "Synthesize reviews into final qualitative report",
|
|
3815
|
+
agent: "designer",
|
|
3816
|
+
template: `Synthesize reviews and scores into a final qualitative report.
|
|
3778
3817
|
|
|
3779
3818
|
$input
|
|
3780
3819
|
|
|
@@ -3782,17 +3821,107 @@ $input
|
|
|
3782
3821
|
|
|
3783
3822
|
1. If a run directory is specified above, use it. Otherwise, find the most
|
|
3784
3823
|
recent run directory under ${options.baseOutputDir}/ (sort by date prefix).
|
|
3785
|
-
2. Read all
|
|
3786
|
-
3.
|
|
3787
|
-
4.
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
-
|
|
3794
|
-
-
|
|
3795
|
-
-
|
|
3824
|
+
2. Read all review files from the reviews/ subdirectory.
|
|
3825
|
+
3. Read all score files from the scores/ subdirectory.
|
|
3826
|
+
4. Perform qualitative synthesis:
|
|
3827
|
+
- Analyze patterns across all reviews
|
|
3828
|
+
- Identify consensus and disagreements
|
|
3829
|
+
- Synthesize scores with qualitative insights
|
|
3830
|
+
- Determine overall recommendations
|
|
3831
|
+
5. Write the final synthesis report to final-report.md with the following sections:
|
|
3832
|
+
- Executive Summary
|
|
3833
|
+
- Design Comparison Matrix
|
|
3834
|
+
- Qualitative Analysis
|
|
3835
|
+
- Consensus Findings
|
|
3836
|
+
- Recommendations
|
|
3837
|
+
- Appendix (detailed scores and review excerpts)`
|
|
3838
|
+
};
|
|
3839
|
+
}
|
|
3840
|
+
/**
|
|
3841
|
+
* Build the `/repowiki` command configuration.
|
|
3842
|
+
*
|
|
3843
|
+
* Usage: /design-lab:repowiki [language]
|
|
3844
|
+
* Generates comprehensive repository documentation in a structured wiki format.
|
|
3845
|
+
* Creates hierarchical markdown documentation with architecture diagrams,
|
|
3846
|
+
* source citations, and relationship metadata in .repowiki/ directory.
|
|
3847
|
+
*/
|
|
3848
|
+
function buildRepowikiCommand(_baseDir) {
|
|
3849
|
+
return {
|
|
3850
|
+
description: "Generate comprehensive repository wiki documentation with architecture diagrams and source citations",
|
|
3851
|
+
agent: "designer",
|
|
3852
|
+
template: `Generate comprehensive repository documentation (repowiki) for this codebase.
|
|
3853
|
+
|
|
3854
|
+
## User Input
|
|
3855
|
+
$input
|
|
3856
|
+
|
|
3857
|
+
## Instructions
|
|
3858
|
+
|
|
3859
|
+
1. Check for existing repowiki at .repowiki/en/meta/repowiki-metadata.json
|
|
3860
|
+
- If exists, read it to get the last_commit and perform an INCREMENTAL UPDATE
|
|
3861
|
+
- If not exists, perform a FULL GENERATION
|
|
3862
|
+
|
|
3863
|
+
2. **For FULL GENERATION**:
|
|
3864
|
+
- Create .repowiki/en/content/ directory structure
|
|
3865
|
+
- Generate the following standard topic categories:
|
|
3866
|
+
- System Overview (root page)
|
|
3867
|
+
- Getting Started Guide
|
|
3868
|
+
- Development Guidelines
|
|
3869
|
+
- Architecture/Architecture Overview
|
|
3870
|
+
- Technology Stack & Architecture
|
|
3871
|
+
- Backend Services overview
|
|
3872
|
+
- Frontend Application
|
|
3873
|
+
- Infrastructure overview
|
|
3874
|
+
- API Reference
|
|
3875
|
+
- Each page must include:
|
|
3876
|
+
- Cite block with referenced files
|
|
3877
|
+
- Table of Contents
|
|
3878
|
+
- Source citations after each section
|
|
3879
|
+
- Mermaid diagrams where appropriate
|
|
3880
|
+
- Create .repowiki/en/meta/repowiki-metadata.json with:
|
|
3881
|
+
- version: current date (YYYY-MM-DD)
|
|
3882
|
+
- last_commit: current HEAD SHA
|
|
3883
|
+
- wiki_items: all pages with IDs and paths
|
|
3884
|
+
- knowledge_relations: parent-child relationships
|
|
3885
|
+
|
|
3886
|
+
3. **For INCREMENTAL UPDATE**:
|
|
3887
|
+
- Get current HEAD commit: git rev-parse HEAD
|
|
3888
|
+
- Compare with last_commit from metadata
|
|
3889
|
+
- List new commits: git log --oneline <last_commit>..HEAD
|
|
3890
|
+
- Analyze changes: git diff --stat <last_commit>..HEAD
|
|
3891
|
+
- Identify affected wiki pages based on changed file paths
|
|
3892
|
+
- Update only affected pages with new content
|
|
3893
|
+
- Update metadata with new last_commit and version
|
|
3894
|
+
|
|
3895
|
+
4. **Output Structure**:
|
|
3896
|
+
\`\`\`
|
|
3897
|
+
.repowiki/
|
|
3898
|
+
└── en/
|
|
3899
|
+
├── content/
|
|
3900
|
+
│ ├── System Overview.md
|
|
3901
|
+
│ ├── Getting Started Guide.md
|
|
3902
|
+
│ ├── Architecture/
|
|
3903
|
+
│ │ ├── Architecture.md
|
|
3904
|
+
│ │ └── [subtopics]/
|
|
3905
|
+
│ ├── Backend Services/
|
|
3906
|
+
│ │ └── Backend Services.md
|
|
3907
|
+
│ └── ...
|
|
3908
|
+
└── meta/
|
|
3909
|
+
└── repowiki-metadata.json
|
|
3910
|
+
\`\`\`
|
|
3911
|
+
|
|
3912
|
+
5. **Content Standards**:
|
|
3913
|
+
- Use <cite> blocks at top of each file listing referenced files
|
|
3914
|
+
- Include Table of Contents on every page
|
|
3915
|
+
- Add **Section sources** after each major section
|
|
3916
|
+
- Add **Diagram sources** after each Mermaid diagram
|
|
3917
|
+
- File citations use format: [filename](file://path#L10-L50)
|
|
3918
|
+
- Tone: Technical, professional, comprehensive
|
|
3919
|
+
- Audience: Developers new to the codebase
|
|
3920
|
+
|
|
3921
|
+
6. Report the status:
|
|
3922
|
+
- Whether it was a full generation or incremental update
|
|
3923
|
+
- List of created/updated files
|
|
3924
|
+
- Summary of what was documented`
|
|
3796
3925
|
};
|
|
3797
3926
|
}
|
|
3798
3927
|
|
|
@@ -7873,7 +8002,13 @@ const DesignLab = async (ctx) => {
|
|
|
7873
8002
|
baseOutputDir: pluginConfig.base_output_dir,
|
|
7874
8003
|
designModels: designSpecs,
|
|
7875
8004
|
reviewModels: reviewSpecs
|
|
7876
|
-
})
|
|
8005
|
+
}),
|
|
8006
|
+
"design-lab:synthesize": buildSynthesizeCommand({
|
|
8007
|
+
baseOutputDir: pluginConfig.base_output_dir,
|
|
8008
|
+
designModels: designSpecs,
|
|
8009
|
+
reviewModels: reviewSpecs
|
|
8010
|
+
}),
|
|
8011
|
+
"design-lab:repowiki": buildRepowikiCommand(ctx.directory)
|
|
7877
8012
|
};
|
|
7878
8013
|
const agentKeys = Object.keys(config$1.agent ?? {});
|
|
7879
8014
|
const commandKeys = Object.keys(config$1.command ?? {});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-design-lab",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"description": "An OpenCode plugin that generates multiple independent design proposals using different AI models, then systematically evaluates, compares, and ranks those designs in a reproducible and structured way.",
|
|
6
6
|
"author": "OpenCode Design Lab Contributors",
|
|
7
7
|
"license": "MIT",
|
|
@@ -39,4 +39,4 @@
|
|
|
39
39
|
"@opencode-ai/sdk": "^1.1.27",
|
|
40
40
|
"zod": "^4.3.5"
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
}
|