@defend-tech/opencode-optima 0.1.10
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/Agents_Common.md +50 -0
- package/Agents_Common.prompt.md +40 -0
- package/README.md +168 -0
- package/agents/business_analyst.md +22 -0
- package/agents/codemap.yml +11 -0
- package/agents/developer.md +23 -0
- package/agents/ops_product_manager.md +68 -0
- package/agents/product_manager.md +36 -0
- package/agents/qa_engineer.md +21 -0
- package/agents/tech_lead.md +28 -0
- package/agents/technical_architect.md +23 -0
- package/agents/ui_ux_designer.md +17 -0
- package/agents/workflow_product_manager.md +81 -0
- package/agents/workflow_runner.md +23 -0
- package/dist/index.js +11018 -0
- package/dist/sanitize_cli.js +11487 -0
- package/docs/architecture/TECHNICAL_ARCHITECTURE.md +21 -0
- package/docs/architecture/codemap.yml +4 -0
- package/docs/codemap.yml +12 -0
- package/docs/core/agent_orchestration.md +62 -0
- package/docs/core/agent_orchestration.prompt.md +27 -0
- package/docs/core/business_analyst_guidelines.md +21 -0
- package/docs/core/codemap.yml +27 -0
- package/docs/core/codemap_conventions.md +13 -0
- package/docs/core/communication_guidelines.md +10 -0
- package/docs/core/communication_guidelines.prompt.md +9 -0
- package/docs/core/discussion_agent_guidelines.md +11 -0
- package/docs/core/discussion_agent_guidelines.prompt.md +10 -0
- package/docs/core/documentation_structure.md +27 -0
- package/docs/core/documentation_structure.prompt.md +12 -0
- package/docs/core/humans.md +6 -0
- package/docs/core/pma_mode_full.md +25 -0
- package/docs/core/pma_mode_mini.md +33 -0
- package/docs/core/qa_guidelines.md +15 -0
- package/docs/core/role_contracts.md +44 -0
- package/docs/core/role_contracts.prompt.md +26 -0
- package/docs/core/task_model.md +36 -0
- package/docs/core/task_model.prompt.md +16 -0
- package/docs/core/tech_lead_guidelines.md +17 -0
- package/docs/core/tech_lead_mode_full.md +8 -0
- package/docs/core/tech_lead_mode_mini.md +11 -0
- package/docs/core/technical_guidelines.md +18 -0
- package/docs/core/testing_strategy.md +26 -0
- package/docs/core/ui_ux_guidelines.md +24 -0
- package/docs/domains/README.md +15 -0
- package/docs/domains/codemap.yml +7 -0
- package/docs/domains/domain-template/OVERVIEW.md +37 -0
- package/docs/domains/domain-template/codemap.yml +4 -0
- package/docs/domains/task-lifecycle/OVERVIEW.md +69 -0
- package/docs/domains/task-lifecycle/codemap.yml +4 -0
- package/docs/features/README.md +11 -0
- package/docs/features/codemap.yml +6 -0
- package/docs/features/feature-template/SPECIFICATION.md +36 -0
- package/docs/features/feature-template/codemap.yml +4 -0
- package/docs/guides/AGENTS.md +63 -0
- package/docs/guides/TEAM_MODE_FULL.md +44 -0
- package/docs/guides/TEAM_MODE_MINI.md +41 -0
- package/docs/guides/TOOLS.md +117 -0
- package/docs/guides/WORKFLOW.md +116 -0
- package/docs/guides/codemap.yml +8 -0
- package/docs/product/DOMAIN_MAP.md +41 -0
- package/docs/product/FEATURES_LIST.md +17 -0
- package/docs/product/PRODUCT_OVERVIEW.md +12 -0
- package/docs/product/codemap.yml +6 -0
- package/docs/setup/CONFIGURATION.md +117 -0
- package/docs/setup/INSTALLATION.md +66 -0
- package/docs/setup/RELEASING.md +101 -0
- package/docs/setup/codemap.yml +6 -0
- package/package.json +47 -0
- package/scripts/optima-sanitize-host.js +12 -0
- package/templates/codemap.yml.template +30 -0
- package/templates/optima.yaml.template +68 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Features List
|
|
2
|
+
|
|
3
|
+
This document is the "Single Source of Truth" for all features implemented or planned.
|
|
4
|
+
|
|
5
|
+
## 1. Core Features
|
|
6
|
+
- **Plugin-Based Agent Installation:** [Status: Done]
|
|
7
|
+
- **Product Manager Default Agent:** [Status: Done]
|
|
8
|
+
- **Workflow Runner Session Orchestration:** [Status: Done]
|
|
9
|
+
- **CodeMap Validation:** [Status: Done]
|
|
10
|
+
- **Complexity-Based Task Routing (`tiny`, `standard`, `complex`):** [Status: In Progress]
|
|
11
|
+
- **Standard Slice Model (`foundation`, `core`, `logic`, `ui`, `polish`, `qa`, `docs`):** [Status: In Progress]
|
|
12
|
+
- **Plugin Onboarding Docs:** [Status: In Progress]
|
|
13
|
+
|
|
14
|
+
## 2. Infrastructure
|
|
15
|
+
- **Agent Orchestration Workflow:** [Status: Done]
|
|
16
|
+
- **Task Management System:** [Status: Done]
|
|
17
|
+
- **Shared-Worktree Limited Parallelism:** [Status: In Progress]
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Product Overview
|
|
2
|
+
|
|
3
|
+
* **One-Liner:** Optima is an OpenCode plugin that installs the Optima Collective, an AI-native software development team with specialized delivery roles.
|
|
4
|
+
* **Target Audience:** Teams and solo builders who want AI agents to collaborate through explicit roles, task files, SCRs, and verification gates.
|
|
5
|
+
* **Problem Statement:** Default agent workflows are fast but often inconsistent because one assistant is expected to behave like an entire engineering organization. Optima solves that by introducing a structured AI software team with product, architecture, development, QA, review, and design roles that work through explicit artifacts and gated handoffs.
|
|
6
|
+
|
|
7
|
+
## Design Principles
|
|
8
|
+
- **Spec Before Delivery:** Significant changes should be grounded in approved SCRs and task artifacts.
|
|
9
|
+
- **Right-Sized Process:** Tiny work should stay lightweight, while complex work gets full orchestration.
|
|
10
|
+
- **Explicit Ownership:** Every task has a clear orchestrator, specialist handoff path, and verification gate.
|
|
11
|
+
- **Navigable Repos:** CodeMaps and documentation should make the repository understandable to future agents.
|
|
12
|
+
- **Team, Not Toolchain:** Optima should feel like an AI software company embedded in the repository, with clear roles and disciplined collaboration.
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
# Configuration
|
|
2
|
+
|
|
3
|
+
Optima reads repository-local configuration from `.optima/.config/optima.yaml`.
|
|
4
|
+
|
|
5
|
+
This file is typically created during the PMA-led repository setup flow.
|
|
6
|
+
|
|
7
|
+
## Minimal config
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
enabled: true
|
|
11
|
+
team_mode: full
|
|
12
|
+
|
|
13
|
+
defaults:
|
|
14
|
+
# provider: openai
|
|
15
|
+
# model: gpt-5.4
|
|
16
|
+
|
|
17
|
+
features:
|
|
18
|
+
debug_dumps: true
|
|
19
|
+
codemap_verification: true
|
|
20
|
+
|
|
21
|
+
policies:
|
|
22
|
+
extract_defaults: none
|
|
23
|
+
|
|
24
|
+
agents:
|
|
25
|
+
product_manager:
|
|
26
|
+
enabled: true
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Top-level sections
|
|
30
|
+
|
|
31
|
+
- `enabled`: Turns the Optima agent set on for the repository.
|
|
32
|
+
- `team_mode`: The supported team preset. Use `mini` for PMA + BA + Tech Lead only, or `full` for the complete collective. If omitted in an existing repository, Optima defaults to `full`.
|
|
33
|
+
- `defaults`: Shared defaults for providers, models, permissions, and other agent config fields.
|
|
34
|
+
- `features`: Plugin feature flags such as debug dumps and validation behavior.
|
|
35
|
+
- `policies`: Policy extraction controls for generated reference policy files.
|
|
36
|
+
- `agents`: Per-agent enablement and config overrides from `optima.yaml`.
|
|
37
|
+
|
|
38
|
+
## Supported team modes
|
|
39
|
+
|
|
40
|
+
### `mini`
|
|
41
|
+
|
|
42
|
+
- Enabled by default: `product_manager`, `business_analyst`, `tech_lead`
|
|
43
|
+
- Intended for: `tiny` and `standard` tasks in simple repositories
|
|
44
|
+
- Not supported: `complex` work and `workflow_runner`
|
|
45
|
+
|
|
46
|
+
### `full`
|
|
47
|
+
|
|
48
|
+
- Enables the full Optima Collective by default
|
|
49
|
+
- Intended for: repositories that need the complete role set, including `workflow_runner`
|
|
50
|
+
- Supports: `tiny`, `standard`, and `complex`
|
|
51
|
+
|
|
52
|
+
## Common uses
|
|
53
|
+
|
|
54
|
+
### Override a model for one agent
|
|
55
|
+
|
|
56
|
+
```yaml
|
|
57
|
+
agents:
|
|
58
|
+
developer:
|
|
59
|
+
provider: openai
|
|
60
|
+
model: gpt-5.4
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Disable an optional agent in a repo
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
agents:
|
|
67
|
+
ui_ux_designer:
|
|
68
|
+
enabled: false
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Mandatory agents cannot be disabled:
|
|
72
|
+
|
|
73
|
+
- `product_manager`
|
|
74
|
+
- `business_analyst`
|
|
75
|
+
- `tech_lead`
|
|
76
|
+
|
|
77
|
+
### Extend agent tools
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
agents:
|
|
81
|
+
workflow_runner:
|
|
82
|
+
tools_add:
|
|
83
|
+
- optima_validate
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Generate bundled policy references
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
policies:
|
|
90
|
+
extract_defaults: all
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
This writes the bundled default policy files to `.optima/.config/generated/policies/` for reference. Those generated files are not used directly at runtime. To customize one, copy it into `.optima/policies/` and edit the copy.
|
|
94
|
+
|
|
95
|
+
### Add repository-specific agent instructions
|
|
96
|
+
|
|
97
|
+
Create `.optima/agent-additions/<agent>.md` to append repository-specific instructions to a bundled or custom agent prompt.
|
|
98
|
+
|
|
99
|
+
### Add repository-local agents or override a bundled base prompt
|
|
100
|
+
|
|
101
|
+
Create `.optima/agents/<agent>.md` to:
|
|
102
|
+
|
|
103
|
+
- replace the bundled base prompt for an existing agent, or
|
|
104
|
+
- define a brand new custom repository agent
|
|
105
|
+
|
|
106
|
+
## Operational notes
|
|
107
|
+
|
|
108
|
+
- The `product_manager` agent becomes the default primary agent when Optima is enabled.
|
|
109
|
+
- Repository-local full agent definitions can live in `.optima/agents/`.
|
|
110
|
+
- Repository-local additive agent instructions can live in `.optima/agent-additions/`.
|
|
111
|
+
- Repository-local policy overrides can live in `.optima/policies/`.
|
|
112
|
+
- Generated reference policy files are written to `.optima/.config/generated/policies/` when `policies.extract_defaults` is set to `all`.
|
|
113
|
+
- Final agent prompts are dumped to `.optima/.config/generated/agents/` when `features.debug_dumps` is enabled.
|
|
114
|
+
|
|
115
|
+
## Feature flags
|
|
116
|
+
|
|
117
|
+
- `features.keep_builtin_agents`: when `true`, Optima will not disable agents that OpenCode already registered, including built-in agents such as `build`, `plan`, `general`, and `explore`. Optima will still set `product_manager` as the default agent.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Installation
|
|
2
|
+
|
|
3
|
+
## 1. Install the package
|
|
4
|
+
|
|
5
|
+
Add the Optima plugin package to the environment where OpenCode resolves plugins.
|
|
6
|
+
|
|
7
|
+
```json
|
|
8
|
+
{
|
|
9
|
+
"plugin": ["@defend-tech/opencode-optima"]
|
|
10
|
+
}
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
OpenCode's config schema allows plugin entries to be strings or `[package, options]` tuples. Use the form that matches your broader OpenCode setup.
|
|
14
|
+
|
|
15
|
+
## 2. Add the plugin to OpenCode config
|
|
16
|
+
|
|
17
|
+
Add Optima to your OpenCode configuration file and restart OpenCode so the plugin is loaded.
|
|
18
|
+
|
|
19
|
+
Minimal example:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"$schema": "https://opencode.ai/config.json",
|
|
24
|
+
"plugin": ["@defend-tech/opencode-optima"]
|
|
25
|
+
}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 3. Start with PMA
|
|
29
|
+
|
|
30
|
+
After the plugin loads, open the repository you want to enable and start talking to the `product_manager` agent (PMA).
|
|
31
|
+
|
|
32
|
+
PMA is the default orchestrator and will help you set up the repository for Optima. If the repository has not been initialized yet, PMA can trigger the required setup flow on your behalf.
|
|
33
|
+
|
|
34
|
+
During setup, PMA should ask whether you want:
|
|
35
|
+
|
|
36
|
+
- `mini` team mode for simple repositories and `tiny` / `standard` work
|
|
37
|
+
- `full` team mode for the complete collective, including `complex` workflows
|
|
38
|
+
|
|
39
|
+
You do not need to manually run Optima initialization commands as a first step.
|
|
40
|
+
|
|
41
|
+
## 4. Repository initialization artifacts
|
|
42
|
+
|
|
43
|
+
When PMA initializes the repository, Optima creates these artifacts and, in git repositories, ensures `.gitignore` protects Optima local/private state:
|
|
44
|
+
|
|
45
|
+
- `.optima/.config/optima.yaml`
|
|
46
|
+
- `.optima/policies/README.md`
|
|
47
|
+
- `.optima/agents/README.md`
|
|
48
|
+
- `.optima/agent-additions/README.md`
|
|
49
|
+
- `.optima/.config/generated/agents/README.md`
|
|
50
|
+
- `.optima/.config/generated/policies/README.md`
|
|
51
|
+
- `.optima/codemap.yml`
|
|
52
|
+
- `.optima/tasks/current.md`
|
|
53
|
+
- `.optima/tasks/done.md`
|
|
54
|
+
- `.optima/docs/scrs/current.md`
|
|
55
|
+
- `.optima/docs/scrs/done.md`
|
|
56
|
+
- `.gitignore` rules for `.optima/.config/` and Optima env/secret/token/credential patterns, if the target is a git repository
|
|
57
|
+
|
|
58
|
+
## 5. Configure Optima
|
|
59
|
+
|
|
60
|
+
Edit `.optima/.config/optima.yaml` to set defaults, features, policy extraction behavior, and per-agent config overrides. Use `.optima/agents/` for full repository-local agent definitions or custom agents, and `.optima/agent-additions/` for additive repo-specific agent instructions.
|
|
61
|
+
|
|
62
|
+
See:
|
|
63
|
+
|
|
64
|
+
- `docs/setup/CONFIGURATION.md`
|
|
65
|
+
- `docs/guides/AGENTS.md`
|
|
66
|
+
- `docs/guides/WORKFLOW.md`
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Releasing
|
|
2
|
+
|
|
3
|
+
Optima publishes to npm as `@defend-tech/opencode-optima`.
|
|
4
|
+
|
|
5
|
+
## Release Model
|
|
6
|
+
|
|
7
|
+
- Versioning, build verification, and npm publishing are handled by the GitHub Actions workflow `Release npm package`.
|
|
8
|
+
- Pushes to `dev` automatically publish npm prereleases.
|
|
9
|
+
- Pushes to `main` automatically publish stable npm releases.
|
|
10
|
+
- GitHub Actions publishes through npm Trusted Publishing with provenance enabled.
|
|
11
|
+
- The workflow does not commit or tag version changes back to the repository. It derives the publish version from `package.json` and npm's already-published versions.
|
|
12
|
+
|
|
13
|
+
## Trusted Publishing Setup
|
|
14
|
+
|
|
15
|
+
Configure npm Trusted Publishing for this GitHub repository before relying on CI publishes.
|
|
16
|
+
|
|
17
|
+
At a minimum, npm must trust this repository's GitHub Actions workflow as a publisher for `@defend-tech/opencode-optima`.
|
|
18
|
+
|
|
19
|
+
Expected setup:
|
|
20
|
+
|
|
21
|
+
1. Open the npm package settings for `@defend-tech/opencode-optima`.
|
|
22
|
+
2. Configure a Trusted Publisher for this GitHub repository.
|
|
23
|
+
3. Allow GitHub Actions from this repository to publish the package.
|
|
24
|
+
|
|
25
|
+
Critical npm-side details:
|
|
26
|
+
|
|
27
|
+
- GitHub organization or user: `defend-tech`
|
|
28
|
+
- Repository: `opencode-optima`
|
|
29
|
+
- Workflow filename: `release.yml`
|
|
30
|
+
- If you use an optional environment in npm's Trusted Publisher settings, it must exactly match the GitHub Actions environment name used by the workflow.
|
|
31
|
+
- `package.json` must include a `repository.url` that exactly matches `git+ssh://git@github.com/defend-tech/opencode-optima.git`.
|
|
32
|
+
- GitHub Actions must run on a supported Node.js version for npm Trusted Publishing. This workflow uses Node.js `24`.
|
|
33
|
+
|
|
34
|
+
No `NPM_TOKEN` repository secret is required once Trusted Publishing is configured correctly.
|
|
35
|
+
|
|
36
|
+
## Workflow Behavior
|
|
37
|
+
|
|
38
|
+
The release workflow performs these steps:
|
|
39
|
+
|
|
40
|
+
1. Triggers automatically on pushes to `dev` and `main`.
|
|
41
|
+
2. Installs dependencies with `npm ci`.
|
|
42
|
+
3. Runs `npm run release:check`, which executes tests, builds `dist/`, and previews the publish tarball.
|
|
43
|
+
4. Resolves the publish version based on the current branch and npm registry history.
|
|
44
|
+
5. Applies that version locally with `npm version --no-git-tag-version`.
|
|
45
|
+
6. Publishes the package with `npm publish --provenance` using npm Trusted Publishing.
|
|
46
|
+
|
|
47
|
+
## Branch Behavior
|
|
48
|
+
|
|
49
|
+
### `dev`
|
|
50
|
+
|
|
51
|
+
- Publishes prereleases using the `rc` dist-tag.
|
|
52
|
+
- Reads the stable base version from `package.json`.
|
|
53
|
+
- Looks up already published versions on npm.
|
|
54
|
+
- Publishes the next version in the sequence: `<package.json version>-rc.N`
|
|
55
|
+
|
|
56
|
+
Example:
|
|
57
|
+
|
|
58
|
+
- `package.json`: `1.4.0`
|
|
59
|
+
- published prereleases: `1.4.0-rc.0`, `1.4.0-rc.1`
|
|
60
|
+
- next `dev` publish: `1.4.0-rc.2`
|
|
61
|
+
|
|
62
|
+
### `main`
|
|
63
|
+
|
|
64
|
+
- Publishes stable releases using the default `latest` dist-tag.
|
|
65
|
+
- Publishes the exact stable version in `package.json`.
|
|
66
|
+
- Skips publishing if that version already exists on npm.
|
|
67
|
+
|
|
68
|
+
Example:
|
|
69
|
+
|
|
70
|
+
- `package.json`: `1.4.0`
|
|
71
|
+
- push to `main`
|
|
72
|
+
- publish: `1.4.0`
|
|
73
|
+
|
|
74
|
+
## Versioning Expectations
|
|
75
|
+
|
|
76
|
+
- Keep `package.json` on a stable semver base such as `1.4.0`.
|
|
77
|
+
- Do not commit prerelease versions like `1.4.0-rc.2` into `package.json`.
|
|
78
|
+
- Use `dev` to publish release candidates for the current base version.
|
|
79
|
+
- When the package is ready, merge the versioned changes to `main` to publish the stable release.
|
|
80
|
+
|
|
81
|
+
## Local Verification
|
|
82
|
+
|
|
83
|
+
Before triggering a release, you can run the same verification locally:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
npm run release:check
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
This command:
|
|
90
|
+
|
|
91
|
+
- runs the test suite
|
|
92
|
+
- builds `dist/`
|
|
93
|
+
- runs `npm pack --dry-run` to preview the package contents
|
|
94
|
+
|
|
95
|
+
## Notes
|
|
96
|
+
|
|
97
|
+
- `prepack` runs `npm run build`, so local `npm pack` and `npm publish` always include a fresh `dist/` build.
|
|
98
|
+
- `publishConfig.access` is set to `public` so the scoped package can publish correctly on npm.
|
|
99
|
+
- The prerelease counter is remembered via npm registry history, not via git tags or committed prerelease versions.
|
|
100
|
+
- CI publishing depends on npm Trusted Publishing plus the workflow permission `id-token: write`.
|
|
101
|
+
- If you need to dry-run a release locally without publishing, use `npm run release:check` and inspect the tarball preview output.
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@defend-tech/opencode-optima",
|
|
3
|
+
"version": "0.1.10",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+ssh://git@github.com/defend-tech/opencode-optima.git"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"bin": {
|
|
11
|
+
"optima-sanitize-host": "dist/sanitize_cli.js"
|
|
12
|
+
},
|
|
13
|
+
"opencode": {
|
|
14
|
+
"server": "default"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"sanitize:host": "node scripts/optima-sanitize-host.js",
|
|
18
|
+
"build": "node scripts/build.js",
|
|
19
|
+
"prepack": "npm run build",
|
|
20
|
+
"release:check": "npm test && npm run build && npm pack --dry-run",
|
|
21
|
+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
|
|
22
|
+
},
|
|
23
|
+
"publishConfig": {
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"dist",
|
|
28
|
+
"agents",
|
|
29
|
+
"docs",
|
|
30
|
+
"policies",
|
|
31
|
+
"templates",
|
|
32
|
+
"scripts/optima-sanitize-host.js",
|
|
33
|
+
"Agents_Common.md",
|
|
34
|
+
"Agents_Common.prompt.md"
|
|
35
|
+
],
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@opencode-ai/plugin": "^1.2.6",
|
|
38
|
+
"ignore": "^5.3.2",
|
|
39
|
+
"yaml": "^2.3.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"esbuild": "^0.25.0",
|
|
43
|
+
"@types/node": "^20.0.0",
|
|
44
|
+
"jest": "^30.2.0",
|
|
45
|
+
"typescript": "^5.0.0"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const scriptDir = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const sourceCli = path.join(scriptDir, "..", "src", "sanitize_cli.js");
|
|
8
|
+
const distCli = path.join(scriptDir, "..", "dist", "sanitize_cli.js");
|
|
9
|
+
const cliPath = fs.existsSync(sourceCli) ? sourceCli : distCli;
|
|
10
|
+
const { main } = await import(cliPath);
|
|
11
|
+
|
|
12
|
+
process.exitCode = await main();
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
scope: repo
|
|
2
|
+
name: {{projectName}}
|
|
3
|
+
purpose: >
|
|
4
|
+
Repository navigation index. Points to current-state
|
|
5
|
+
product specs, process docs, and module entrypoints.
|
|
6
|
+
|
|
7
|
+
code_roots:
|
|
8
|
+
- src/
|
|
9
|
+
- agents/
|
|
10
|
+
- docs/
|
|
11
|
+
|
|
12
|
+
links:
|
|
13
|
+
- title: Global Context
|
|
14
|
+
path: Agents_Common.md
|
|
15
|
+
summary: "Core rules and agent roles."
|
|
16
|
+
|
|
17
|
+
- title: Orchestration Strategy
|
|
18
|
+
path: docs/core/agent_orchestration.md
|
|
19
|
+
summary: "Collaboration and handoff protocols."
|
|
20
|
+
|
|
21
|
+
- title: Technical Architecture
|
|
22
|
+
path: docs/architecture/TECHNICAL_ARCHITECTURE.md
|
|
23
|
+
summary: "Global patterns and tech stack."
|
|
24
|
+
|
|
25
|
+
entrypoints: []
|
|
26
|
+
commands:
|
|
27
|
+
test: "echo 'No global test command defined'"
|
|
28
|
+
lint: "echo 'No global lint command defined'"
|
|
29
|
+
|
|
30
|
+
modules: []
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Optima repository configuration
|
|
2
|
+
enabled: true
|
|
3
|
+
team_mode: {{teamMode}}
|
|
4
|
+
|
|
5
|
+
defaults:
|
|
6
|
+
# provider: openai
|
|
7
|
+
# model: gpt-5.4
|
|
8
|
+
# temperature: 0.2
|
|
9
|
+
# permissions: allow
|
|
10
|
+
|
|
11
|
+
features:
|
|
12
|
+
debug_dumps: true # Dumps final agent configs to .optima/.config/generated/agents/ for verification
|
|
13
|
+
# debug_logs: false # Enable detailed console logging for the plugin
|
|
14
|
+
# keep_builtin_agents: false # If true, do not disable agents OpenCode already registered, including built-ins
|
|
15
|
+
codemap_verification: true
|
|
16
|
+
|
|
17
|
+
policies:
|
|
18
|
+
extract_defaults: none # Set to 'all' to write bundled policy defaults to .optima/.config/generated/policies/
|
|
19
|
+
|
|
20
|
+
workflow:
|
|
21
|
+
source_of_truth: clickup # ClickUp Docs/tasks are primary; .optima remains a local compatibility mirror
|
|
22
|
+
local_mirror: true # Keep .optima/tasks, .optima/docs/scrs, and .optima/evidences synchronized for agents/tests
|
|
23
|
+
actors:
|
|
24
|
+
cto: CTO
|
|
25
|
+
product_owner: PO
|
|
26
|
+
workflow_product_manager: workflow_product_manager
|
|
27
|
+
clickup:
|
|
28
|
+
statuses:
|
|
29
|
+
backlog: ignore
|
|
30
|
+
plan: plan
|
|
31
|
+
in progress: execute
|
|
32
|
+
validation: validate
|
|
33
|
+
merge: merge # Parent-task approval by CTO/PO after Tech Lead + Validator/QA pass; subtasks merge after Validator/QA validation
|
|
34
|
+
completed: ignore
|
|
35
|
+
Closed: ignore
|
|
36
|
+
delivery_task_types:
|
|
37
|
+
- Tarea
|
|
38
|
+
- Bug
|
|
39
|
+
- Doc
|
|
40
|
+
- PoC
|
|
41
|
+
ignored_task_types:
|
|
42
|
+
- Idea # Non-delivery; legacy ClickUp task type "Backlog" normalizes to Idea
|
|
43
|
+
- Backlog # Legacy alias for Idea
|
|
44
|
+
- Hito
|
|
45
|
+
- Nota de reunión
|
|
46
|
+
- Respuesta del formulario
|
|
47
|
+
custom_fields:
|
|
48
|
+
definition: Definition # Plan contract URL when native task-doc association is unavailable
|
|
49
|
+
story_points: Story Points # WPM estimates during plan and re-estimates on material plan changes
|
|
50
|
+
agent_metadata: agent_metadata # JSON session IDs per agent/type/task/subtask
|
|
51
|
+
running_label: Running # Optional webhook mode uses local runtime state; enable only through explicit OpenCode ClickUp webhook config
|
|
52
|
+
final_approval_roles:
|
|
53
|
+
- CTO
|
|
54
|
+
- PO
|
|
55
|
+
github:
|
|
56
|
+
remote: origin
|
|
57
|
+
main_branch: main
|
|
58
|
+
dev_branch: dev
|
|
59
|
+
worktree_root: ../worktrees # Parent directory for task-specific delivery worktrees
|
|
60
|
+
parent_branch_format: "<clickup-task-type>/<parent-task-id>"
|
|
61
|
+
subtask_branch_format: "<clickup-task-type>/<parent-task-id>/<subtask-id>"
|
|
62
|
+
poc_branch_format: "poc/<clickup-task-id>" # PoC branches persist and do not merge unless later productized
|
|
63
|
+
pr_targets:
|
|
64
|
+
subtask: parent_branch
|
|
65
|
+
parent: dev
|
|
66
|
+
release: main
|
|
67
|
+
|
|
68
|
+
agents:
|