specweave 2.2.2 → 2.3.0
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/.claude-plugin/marketplace.json +2 -2
- package/README.md +22 -5
- package/bin/check-build.js +43 -0
- package/bin/check-node.js +136 -0
- package/bin/help.js +68 -0
- package/bin/project.js +28 -0
- package/bin/specweave.js +26 -305
- package/bin/startup-check.js +44 -0
- package/dist/dashboard/assets/index-DS3yH-sX.css +1 -0
- package/dist/dashboard/assets/index-DjfDqgzX.js +13 -0
- package/dist/dashboard/assets/web-0-CXU3YvQl.woff2 +0 -0
- package/dist/dashboard/assets/web-1-CnEgTPdE.woff2 +0 -0
- package/dist/dashboard/assets/web-10-ppjp2k5c.woff2 +0 -0
- package/dist/dashboard/assets/web-11-T5L87s1n.woff2 +0 -0
- package/dist/dashboard/assets/web-2-Cuw1d432.woff2 +0 -0
- package/dist/dashboard/assets/web-3-tuJ4lY6O.woff2 +0 -0
- package/dist/dashboard/assets/web-4-KUPCjGsn.woff2 +0 -0
- package/dist/dashboard/assets/web-5-BD64o3ke.woff2 +0 -0
- package/dist/dashboard/assets/web-6-CuVUMDWO.woff2 +0 -0
- package/dist/dashboard/assets/web-7-B2O-dwcv.woff2 +0 -0
- package/dist/dashboard/assets/web-8-b0I-AwbV.woff2 +0 -0
- package/dist/dashboard/assets/web-9-CjmLAiqB.woff2 +0 -0
- package/dist/dashboard/index.html +3 -3
- package/dist/src/adapters/codex/README.md +5 -101
- package/dist/src/adapters/codex/adapter.d.ts +5 -6
- package/dist/src/adapters/codex/adapter.d.ts.map +1 -1
- package/dist/src/adapters/codex/adapter.js +40 -226
- package/dist/src/adapters/codex/adapter.js.map +1 -1
- package/dist/src/adapters/registry.yaml +1 -1
- package/dist/src/cli/commands/dashboard.js +6 -6
- package/dist/src/cli/commands/dashboard.js.map +1 -1
- package/dist/src/cli/commands/gc.d.ts.map +1 -1
- package/dist/src/cli/commands/gc.js +18 -2
- package/dist/src/cli/commands/gc.js.map +1 -1
- package/dist/src/cli/commands/living-docs.d.ts.map +1 -1
- package/dist/src/cli/commands/living-docs.js +12 -6
- package/dist/src/cli/commands/living-docs.js.map +1 -1
- package/dist/src/cli/commands/lsp.d.ts.map +1 -1
- package/dist/src/cli/commands/lsp.js +38 -9
- package/dist/src/cli/commands/lsp.js.map +1 -1
- package/dist/src/cli/commands/project.d.ts +25 -0
- package/dist/src/cli/commands/project.d.ts.map +1 -0
- package/dist/src/cli/commands/project.js +123 -0
- package/dist/src/cli/commands/project.js.map +1 -0
- package/dist/src/cli/commands/refresh-plugins.d.ts +1 -0
- package/dist/src/cli/commands/refresh-plugins.d.ts.map +1 -1
- package/dist/src/cli/commands/refresh-plugins.js +15 -3
- package/dist/src/cli/commands/refresh-plugins.js.map +1 -1
- package/dist/src/cli/commands/save.d.ts +10 -2
- package/dist/src/cli/commands/save.d.ts.map +1 -1
- package/dist/src/cli/commands/save.js +35 -4
- package/dist/src/cli/commands/save.js.map +1 -1
- package/dist/src/cli/commands/update.d.ts.map +1 -1
- package/dist/src/cli/commands/update.js +7 -4
- package/dist/src/cli/commands/update.js.map +1 -1
- package/dist/src/cli/helpers/init/greenfield-detection.d.ts.map +1 -1
- package/dist/src/cli/helpers/init/greenfield-detection.js +12 -13
- package/dist/src/cli/helpers/init/greenfield-detection.js.map +1 -1
- package/dist/src/config/types.d.ts +4 -4
- package/dist/src/core/doctor/checkers/installation-health-checker.d.ts.map +1 -1
- package/dist/src/core/doctor/checkers/installation-health-checker.js +10 -0
- package/dist/src/core/doctor/checkers/installation-health-checker.js.map +1 -1
- package/dist/src/core/jev/browse.d.ts +2 -2
- package/dist/src/core/jev/browse.d.ts.map +1 -1
- package/dist/src/core/jev/browse.js +57 -11
- package/dist/src/core/jev/browse.js.map +1 -1
- package/dist/src/core/jev/client.d.ts.map +1 -1
- package/dist/src/core/jev/client.js +49 -20
- package/dist/src/core/jev/client.js.map +1 -1
- package/dist/src/core/jev/decide.d.ts.map +1 -1
- package/dist/src/core/jev/decide.js +12 -7
- package/dist/src/core/jev/decide.js.map +1 -1
- package/dist/src/core/living-docs/discovery.d.ts +6 -0
- package/dist/src/core/living-docs/discovery.d.ts.map +1 -1
- package/dist/src/core/living-docs/discovery.js +18 -6
- package/dist/src/core/living-docs/discovery.js.map +1 -1
- package/dist/src/core/lsp/lsp-client.d.ts.map +1 -1
- package/dist/src/core/lsp/lsp-client.js +13 -8
- package/dist/src/core/lsp/lsp-client.js.map +1 -1
- package/dist/src/core/project-hub/brief.d.ts +11 -0
- package/dist/src/core/project-hub/brief.d.ts.map +1 -0
- package/dist/src/core/project-hub/brief.js +39 -0
- package/dist/src/core/project-hub/brief.js.map +1 -0
- package/dist/src/core/project-hub/store.d.ts +25 -0
- package/dist/src/core/project-hub/store.d.ts.map +1 -0
- package/dist/src/core/project-hub/store.js +174 -0
- package/dist/src/core/project-hub/store.js.map +1 -0
- package/dist/src/core/project-hub/types.d.ts +51 -0
- package/dist/src/core/project-hub/types.d.ts.map +1 -0
- package/dist/src/core/project-hub/types.js +16 -0
- package/dist/src/core/project-hub/types.js.map +1 -0
- package/dist/src/core/session/handoff-secret-scrub.d.ts.map +1 -1
- package/dist/src/core/session/handoff-secret-scrub.js +2 -1
- package/dist/src/core/session/handoff-secret-scrub.js.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.d.ts.map +1 -1
- package/dist/src/dashboard/server/dashboard-server.js +2 -0
- package/dist/src/dashboard/server/dashboard-server.js.map +1 -1
- package/dist/src/dashboard/server/data/intent-store.d.ts +5 -0
- package/dist/src/dashboard/server/data/intent-store.d.ts.map +1 -1
- package/dist/src/dashboard/server/data/intent-store.js +31 -0
- package/dist/src/dashboard/server/data/intent-store.js.map +1 -1
- package/dist/src/dashboard/server/routes/project-hub-routes.d.ts +5 -0
- package/dist/src/dashboard/server/routes/project-hub-routes.d.ts.map +1 -0
- package/dist/src/dashboard/server/routes/project-hub-routes.js +75 -0
- package/dist/src/dashboard/server/routes/project-hub-routes.js.map +1 -0
- package/dist/src/init/compliance/types.d.ts +1 -1
- package/dist/src/init/research/types.d.ts +1 -1
- package/dist/src/utils/cleanup-stale-plugins.d.ts +9 -0
- package/dist/src/utils/cleanup-stale-plugins.d.ts.map +1 -1
- package/dist/src/utils/cleanup-stale-plugins.js +40 -23
- package/dist/src/utils/cleanup-stale-plugins.js.map +1 -1
- package/dist/src/utils/find-project-root.d.ts +23 -0
- package/dist/src/utils/find-project-root.d.ts.map +1 -1
- package/dist/src/utils/find-project-root.js +26 -4
- package/dist/src/utils/find-project-root.js.map +1 -1
- package/dist/src/utils/native-skill-installer.d.ts +10 -0
- package/dist/src/utils/native-skill-installer.d.ts.map +1 -0
- package/dist/src/utils/native-skill-installer.js +79 -0
- package/dist/src/utils/native-skill-installer.js.map +1 -0
- package/dist/src/utils/plugin-copier.d.ts +9 -0
- package/dist/src/utils/plugin-copier.d.ts.map +1 -1
- package/dist/src/utils/plugin-copier.js +20 -1
- package/dist/src/utils/plugin-copier.js.map +1 -1
- package/package.json +4 -3
- package/plugins/specweave/.claude-plugin/plugin.json +1 -1
- package/plugins/specweave/marketplace.json +6 -0
- package/plugins/specweave/skills/project/SKILL.md +45 -0
- package/src/styles/fonts/ibmplexsans-OFL.txt +93 -0
- package/src/styles/fonts/newsreader-OFL.txt +93 -0
- package/src/templates/AGENTS.md.template +4 -0
- package/dist/dashboard/assets/index-BeKUULf0.css +0 -1
- package/dist/dashboard/assets/index-Bf5TF0_l.js +0 -13
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>SpecWeave Dashboard</title>
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><text y='28' font-size='28'>⚡</text></svg>" />
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-DjfDqgzX.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DS3yH-sX.css">
|
|
10
10
|
</head>
|
|
11
|
-
<body class="
|
|
11
|
+
<body class="antialiased">
|
|
12
12
|
<div id="root"></div>
|
|
13
13
|
</body>
|
|
14
14
|
</html>
|
|
@@ -1,105 +1,9 @@
|
|
|
1
|
-
# OpenAI Codex
|
|
1
|
+
# OpenAI Codex adapter
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
SpecWeave uses `AGENTS.md` for project instructions and `.agents/skills` for Codex native skills. Initialize with `specweave init --adapter codex`, or use `specweave project init --name "Research" --goal "Produce a sourced report"` in an ordinary folder. Run `specweave refresh-plugins` to refresh core skills for the configured adapter.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The portable project hub holds shared goals, context, artifact references and reusable routines. `specweave project brief --harness codex` generates a fresh coordinator brief; add `--intent ID` for a worker assignment. Native task creation, subagents, connector authorization and scheduling remain with Codex and the user's permissions. CLI, desktop and cloud surfaces can differ.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Managed native skills use the `sw-` prefix (for example `$sw-project`). Changed installations preserve the previous directory under `.specweave/state/skill-backups/` before copying. Existing `.codex/skills` files are retained to avoid deleting user modifications. Review legacy duplicates when migrating. Hooks require supported events and explicit host trust review; this adapter does not install or approve hooks. No model or subscription tier is hardcoded.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **GPT-5-Codex Model**: Optimized for engineering tasks
|
|
12
|
-
- **Multiple Access Points**: CLI, Web, IDE, GitHub, iOS app
|
|
13
|
-
- **Task-Based Execution**: Isolated environments per task
|
|
14
|
-
- **File Operations**: Read, write, execute commands
|
|
15
|
-
- **Test Execution**: Run tests and validate implementations
|
|
16
|
-
- **Real-Time Progress**: Monitor task execution (1-30 min/task)
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
# Install Codex CLI (requires ChatGPT Plus/Pro/Business/Enterprise)
|
|
22
|
-
npm install -g openai-codex-cli
|
|
23
|
-
|
|
24
|
-
# Initialize SpecWeave project with Codex adapter
|
|
25
|
-
npx specweave init my-project --adapter codex
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
## How It Works
|
|
29
|
-
|
|
30
|
-
### Option 1: Codex CLI (Fastest)
|
|
31
|
-
```bash
|
|
32
|
-
codex "Read AGENTS.md and create increment for user authentication"
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
### Option 2: ChatGPT Web (Most Accessible)
|
|
36
|
-
1. Upload AGENTS.md file
|
|
37
|
-
2. Say: "Create increment for user authentication following SpecWeave"
|
|
38
|
-
3. Copy generated content to files
|
|
39
|
-
|
|
40
|
-
### Option 3: IDE Integration
|
|
41
|
-
Use Codex in your IDE (VS Code, JetBrains) with AGENTS.md reference
|
|
42
|
-
|
|
43
|
-
## Universal AGENTS.md
|
|
44
|
-
|
|
45
|
-
Instead of tool-specific files, SpecWeave uses **AGENTS.md** that works with ALL tools:
|
|
46
|
-
|
|
47
|
-
- ✅ Codex (OpenAI)
|
|
48
|
-
- ✅ Gemini CLI
|
|
49
|
-
- ✅ Cursor
|
|
50
|
-
- ✅ GitHub Copilot
|
|
51
|
-
- ✅ ANY AI tool
|
|
52
|
-
|
|
53
|
-
**Single source of truth** = easier maintenance!
|
|
54
|
-
|
|
55
|
-
## Example Workflows
|
|
56
|
-
|
|
57
|
-
### Create Feature (CLI)
|
|
58
|
-
```bash
|
|
59
|
-
codex "Read AGENTS.md. Create increment 0002 for payment processing with Stripe."
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
### Create Feature (Web)
|
|
63
|
-
1. Upload AGENTS.md to ChatGPT
|
|
64
|
-
2. Say: "Create increment for payment processing"
|
|
65
|
-
3. Download generated files
|
|
66
|
-
|
|
67
|
-
### Implement Task
|
|
68
|
-
```bash
|
|
69
|
-
codex "Read increment 0002, implement task T001"
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
### Fix Bug with Tests
|
|
73
|
-
```bash
|
|
74
|
-
codex "Read AGENTS.md and increment 0001. Fix auth bug. Run tests."
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## Comparison with Claude Code
|
|
78
|
-
|
|
79
|
-
| Feature | Claude Code | Codex |
|
|
80
|
-
|---------|-------------|-------|
|
|
81
|
-
| **Automation** | Full | Semi |
|
|
82
|
-
| **Skills** | Native | Via AGENTS.md |
|
|
83
|
-
| **Agents** | Native | Via AGENTS.md |
|
|
84
|
-
| **Access Points** | CLI only | CLI + Web + IDE + GitHub + iOS |
|
|
85
|
-
| **Model** | Opus 4.6 | GPT-5-Codex |
|
|
86
|
-
| **Task Isolation** | No | Yes (isolated per task) |
|
|
87
|
-
| **Hooks** | Yes | No |
|
|
88
|
-
|
|
89
|
-
## Plans & Pricing
|
|
90
|
-
|
|
91
|
-
- **ChatGPT Plus**: $20/month (Codex included)
|
|
92
|
-
- **ChatGPT Pro**: $200/month (unlimited, faster)
|
|
93
|
-
- **Business/Enterprise**: Custom pricing
|
|
94
|
-
|
|
95
|
-
## Links
|
|
96
|
-
|
|
97
|
-
- [OpenAI Codex](https://openai.com/codex/)
|
|
98
|
-
- [ChatGPT Features](https://chatgpt.com/features/codex)
|
|
99
|
-
- [SpecWeave Website](https://spec-weave.com)
|
|
100
|
-
|
|
101
|
-
---
|
|
102
|
-
|
|
103
|
-
**Status**: Active (v0.2.0+)
|
|
104
|
-
**Market Share**: ~20% (OpenAI users)
|
|
105
|
-
**Priority**: P1 (high impact - most accessible AI tool)
|
|
9
|
+
Official references: [Skills](https://learn.chatgpt.com/docs/build-skills), [Projects](https://learn.chatgpt.com/docs/projects), [Hooks](https://learn.chatgpt.com/docs/hooks).
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Codex Adapter (OpenAI)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* OpenAI Codex adapter with native skills and portable project instructions.
|
|
5
5
|
* Uses universal AGENTS.md file for instructions.
|
|
6
6
|
*
|
|
7
7
|
* Codex features:
|
|
8
|
-
* -
|
|
9
|
-
* - GPT-5-Codex optimized for engineering tasks
|
|
8
|
+
* - Native skills and project instructions
|
|
10
9
|
* - File read/write operations
|
|
11
10
|
* - Test execution and validation
|
|
12
11
|
* - Task-based isolated environments
|
|
@@ -50,15 +49,15 @@ export declare class CodexAdapter extends AdapterBase {
|
|
|
50
49
|
getSkillsDirectory(): string;
|
|
51
50
|
/**
|
|
52
51
|
* Compile and install a plugin for OpenAI Codex.
|
|
53
|
-
* Writes each SKILL.md as a separate file in `.
|
|
52
|
+
* Writes each SKILL.md as a separate file in `.agents/skills/`.
|
|
54
53
|
*/
|
|
55
54
|
compilePlugin(plugin: Plugin): Promise<void>;
|
|
56
55
|
/**
|
|
57
|
-
* Unload a plugin from Codex — removes skill files from `.
|
|
56
|
+
* Unload a plugin from Codex — removes skill files from `.agents/skills/`.
|
|
58
57
|
*/
|
|
59
58
|
unloadPlugin(pluginName: string): Promise<void>;
|
|
60
59
|
/**
|
|
61
|
-
* Get installed plugins for Codex by scanning `.
|
|
60
|
+
* Get installed plugins for Codex by scanning `.agents/skills/`.
|
|
62
61
|
*/
|
|
63
62
|
getInstalledPlugins(): Promise<string[]>;
|
|
64
63
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/codex/adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../src/adapters/codex/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAMtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAIzD,qBAAa,YAAa,SAAQ,WAAW;IAC3C,IAAI,SAAW;IACf,WAAW,SAAuF;IAClG,eAAe,EAAG,MAAM,CAAU;IAElC;;;;;;;OAOG;IACG,MAAM,IAAI,OAAO,CAAC,OAAO,CAAC;IAQhC;;OAEG;IACH,QAAQ,IAAI,WAAW,EAAE;IAezB;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAwBrD;;OAEG;YACW,gBAAgB;IAe9B;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD;;OAEG;IACH,eAAe,IAAI,OAAO;IAI1B,kBAAkB,IAAI,MAAM;IAI5B;;;OAGG;IACG,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAWlD;;OAEG;IACG,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAOrD;;OAEG;IACG,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAI9C;;OAEG;IACH,eAAe,IAAI,MAAM;CAuB1B"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Codex Adapter (OpenAI)
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* OpenAI Codex adapter with native skills and portable project instructions.
|
|
5
5
|
* Uses universal AGENTS.md file for instructions.
|
|
6
6
|
*
|
|
7
7
|
* Codex features:
|
|
8
|
-
* -
|
|
9
|
-
* - GPT-5-Codex optimized for engineering tasks
|
|
8
|
+
* - Native skills and project instructions
|
|
10
9
|
* - File read/write operations
|
|
11
10
|
* - Test execution and validation
|
|
12
11
|
* - Task-based isolated environments
|
|
@@ -17,12 +16,14 @@ import { AdapterBase } from '../adapter-base.js';
|
|
|
17
16
|
import { applyInstructionTemplate } from '../../cli/helpers/init/instruction-file-writer.js';
|
|
18
17
|
import { findSourceDir } from '../../cli/helpers/init/path-utils.js';
|
|
19
18
|
import { getDirname } from '../../utils/esm-helpers.js';
|
|
19
|
+
import { installNativeSkills } from '../../utils/native-skill-installer.js';
|
|
20
|
+
import { normalizeSkillFrontmatter } from '../../utils/plugin-copier.js';
|
|
20
21
|
const __dirname = getDirname(import.meta.url);
|
|
21
22
|
export class CodexAdapter extends AdapterBase {
|
|
22
23
|
constructor() {
|
|
23
24
|
super(...arguments);
|
|
24
25
|
this.name = 'codex';
|
|
25
|
-
this.description = 'OpenAI Codex adapter -
|
|
26
|
+
this.description = 'OpenAI Codex adapter - native skills, AGENTS.md and portable project coordination';
|
|
26
27
|
this.automationLevel = 'semi';
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
@@ -60,11 +61,11 @@ export class CodexAdapter extends AdapterBase {
|
|
|
60
61
|
* Install Codex adapter
|
|
61
62
|
*/
|
|
62
63
|
async install(options) {
|
|
63
|
-
console.log('\n📦 Installing OpenAI Codex Adapter
|
|
64
|
+
console.log('\n📦 Installing OpenAI Codex Adapter\n');
|
|
64
65
|
// Ensure .codex directory exists
|
|
65
66
|
const codexDir = path.join(options.projectPath, '.codex');
|
|
66
67
|
await fs.ensureDir(codexDir);
|
|
67
|
-
await fs.ensureDir(path.join(
|
|
68
|
+
await fs.ensureDir(path.join(options.projectPath, '.agents', 'skills'));
|
|
68
69
|
// Generate AGENTS.md
|
|
69
70
|
const agentsMdPath = path.join(options.projectPath, 'AGENTS.md');
|
|
70
71
|
await this.generateAgentsMd(agentsMdPath, options);
|
|
@@ -108,250 +109,63 @@ export class CodexAdapter extends AdapterBase {
|
|
|
108
109
|
return true;
|
|
109
110
|
}
|
|
110
111
|
getSkillsDirectory() {
|
|
111
|
-
return '.
|
|
112
|
+
return '.agents/skills';
|
|
112
113
|
}
|
|
113
114
|
/**
|
|
114
115
|
* Compile and install a plugin for OpenAI Codex.
|
|
115
|
-
* Writes each SKILL.md as a separate file in `.
|
|
116
|
+
* Writes each SKILL.md as a separate file in `.agents/skills/`.
|
|
116
117
|
*/
|
|
117
118
|
async compilePlugin(plugin) {
|
|
118
|
-
const skillsDir = '.
|
|
119
|
+
const skillsDir = '.agents/skills';
|
|
119
120
|
console.log(`\n📦 Installing plugin skills for Codex: ${plugin.manifest.name}`);
|
|
120
|
-
|
|
121
|
+
const result = installNativeSkills(plugin.skills.map(skill => ({
|
|
122
|
+
name: `${plugin.manifest.name}-${skill.name}`, sourceDir: skill.path,
|
|
123
|
+
})), process.cwd(), normalizeSkillFrontmatter);
|
|
124
|
+
for (const backup of result.backups)
|
|
125
|
+
console.log(` Previous skill preserved: ${backup}`);
|
|
121
126
|
console.log(` ✓ ${plugin.skills.length} skill(s) written to ${skillsDir}/`);
|
|
122
127
|
console.log(`\n✅ Plugin ${plugin.manifest.name} installed for Codex!`);
|
|
123
128
|
}
|
|
124
129
|
/**
|
|
125
|
-
* Unload a plugin from Codex — removes skill files from `.
|
|
130
|
+
* Unload a plugin from Codex — removes skill files from `.agents/skills/`.
|
|
126
131
|
*/
|
|
127
132
|
async unloadPlugin(pluginName) {
|
|
128
133
|
console.log(`\n🗑️ Unloading plugin from Codex: ${pluginName}`);
|
|
129
|
-
await this.removeSkillFiles(pluginName, '.
|
|
130
|
-
console.log(` ✓ Removed from .
|
|
134
|
+
await this.removeSkillFiles(pluginName, '.agents/skills');
|
|
135
|
+
console.log(` ✓ Removed from .agents/skills/`);
|
|
131
136
|
console.log(`\n✅ Plugin ${pluginName} unloaded!`);
|
|
132
137
|
}
|
|
133
138
|
/**
|
|
134
|
-
* Get installed plugins for Codex by scanning `.
|
|
139
|
+
* Get installed plugins for Codex by scanning `.agents/skills/`.
|
|
135
140
|
*/
|
|
136
141
|
async getInstalledPlugins() {
|
|
137
|
-
return await this.listInstalledPluginsInDir('.
|
|
142
|
+
return await this.listInstalledPluginsInDir('.agents/skills');
|
|
138
143
|
}
|
|
139
144
|
/**
|
|
140
145
|
* Get usage instructions for Codex adapter
|
|
141
146
|
*/
|
|
142
147
|
getInstructions() {
|
|
143
148
|
return `
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
**Option 1: Codex CLI** (Fastest)
|
|
166
|
-
|
|
167
|
-
1. Install Codex CLI:
|
|
168
|
-
|
|
169
|
-
# Included with ChatGPT Plus, Pro, Business, Enterprise
|
|
170
|
-
npm install -g openai-codex-cli
|
|
171
|
-
|
|
172
|
-
2. Create your first feature:
|
|
173
|
-
|
|
174
|
-
codex "Read AGENTS.md and create increment for user authentication"
|
|
175
|
-
|
|
176
|
-
Codex will:
|
|
177
|
-
- Read AGENTS.md for SpecWeave context
|
|
178
|
-
- Adopt PM role: Create spec.md (WHAT/WHY)
|
|
179
|
-
- Adopt Architect role: Create plan.md (HOW)
|
|
180
|
-
- Create tasks.md
|
|
181
|
-
- Execute in isolated environment
|
|
182
|
-
|
|
183
|
-
**Option 2: ChatGPT Web** (Most Accessible)
|
|
184
|
-
|
|
185
|
-
1. Open ChatGPT (Plus/Pro/Business/Enterprise)
|
|
186
|
-
|
|
187
|
-
2. Upload AGENTS.md file
|
|
188
|
-
|
|
189
|
-
3. Say:
|
|
190
|
-
"I'm using SpecWeave framework. Create increment for user authentication."
|
|
191
|
-
|
|
192
|
-
4. Copy generated content to files:
|
|
193
|
-
- spec.md
|
|
194
|
-
- plan.md
|
|
195
|
-
- tasks.md
|
|
196
|
-
|
|
197
|
-
**Option 3: IDE Integration** (If available in your IDE)
|
|
198
|
-
|
|
199
|
-
Use Codex integration in your IDE (VS Code, JetBrains, etc.)
|
|
200
|
-
Reference AGENTS.md for SpecWeave structure.
|
|
201
|
-
|
|
202
|
-
HOW TO USE:
|
|
203
|
-
|
|
204
|
-
**With Codex CLI**:
|
|
205
|
-
\`\`\`bash
|
|
206
|
-
# Explicit reference (recommended):
|
|
207
|
-
codex "Read AGENTS.md and [your request]"
|
|
208
|
-
|
|
209
|
-
# Natural language:
|
|
210
|
-
codex "Create a new feature following SpecWeave structure"
|
|
211
|
-
|
|
212
|
-
# With context:
|
|
213
|
-
codex "Following the PM role in AGENTS.md, create requirements for payments"
|
|
214
|
-
\`\`\`
|
|
215
|
-
|
|
216
|
-
**With ChatGPT Web**:
|
|
217
|
-
1. Upload AGENTS.md at start of conversation
|
|
218
|
-
2. Reference it: "Following AGENTS.md, create increment for..."
|
|
219
|
-
3. Download or copy-paste generated files
|
|
220
|
-
|
|
221
|
-
CONTEXT LOADING:
|
|
222
|
-
|
|
223
|
-
Load spec.md, plan.md, and tasks.md from your increment folder.
|
|
224
|
-
|
|
225
|
-
\`\`\`bash
|
|
226
|
-
# CLI:
|
|
227
|
-
codex "Read spec.md, plan.md, tasks.md from increment 0001, then implement task T001"
|
|
228
|
-
|
|
229
|
-
# Web:
|
|
230
|
-
# 1. Upload spec.md, plan.md, tasks.md from increment folder
|
|
231
|
-
# 2. Request task implementation
|
|
232
|
-
\`\`\`
|
|
233
|
-
|
|
234
|
-
FEATURES:
|
|
235
|
-
|
|
236
|
-
✅ GPT-5-Codex Model
|
|
237
|
-
- Optimized for engineering tasks
|
|
238
|
-
- Trained on complex, real-world projects
|
|
239
|
-
- Code generation, debugging, refactoring
|
|
240
|
-
|
|
241
|
-
✅ Task-Based Execution
|
|
242
|
-
- Each task in isolated environment
|
|
243
|
-
- Real-time progress monitoring
|
|
244
|
-
- Verifiable evidence (citations, logs)
|
|
245
|
-
|
|
246
|
-
✅ File Operations
|
|
247
|
-
- Read and edit files
|
|
248
|
-
- Run commands (tests, linters, type checkers)
|
|
249
|
-
- Create new files and directories
|
|
250
|
-
|
|
251
|
-
✅ Multiple Access Points
|
|
252
|
-
- CLI (fastest)
|
|
253
|
-
- Web (most accessible)
|
|
254
|
-
- IDE (most integrated)
|
|
255
|
-
- GitHub (for PRs)
|
|
256
|
-
- iOS app (mobile)
|
|
257
|
-
|
|
258
|
-
✅ Test Execution
|
|
259
|
-
- Run test harnesses
|
|
260
|
-
- Validate implementations
|
|
261
|
-
- Ensure quality
|
|
262
|
-
|
|
263
|
-
EXAMPLE WORKFLOWS:
|
|
264
|
-
|
|
265
|
-
1. **Create Feature (CLI)**:
|
|
266
|
-
\`\`\`bash
|
|
267
|
-
codex "Read AGENTS.md. Create increment 0002 for payment processing with Stripe. Follow SpecWeave structure."
|
|
268
|
-
\`\`\`
|
|
269
|
-
|
|
270
|
-
2. **Create Feature (Web)**:
|
|
271
|
-
- Upload AGENTS.md
|
|
272
|
-
- Say: "Create increment for payment processing"
|
|
273
|
-
- Download generated files
|
|
274
|
-
|
|
275
|
-
3. **Implement Task**:
|
|
276
|
-
\`\`\`bash
|
|
277
|
-
codex "Read increment 0002, implement task T001 (Setup Stripe SDK)"
|
|
278
|
-
\`\`\`
|
|
279
|
-
|
|
280
|
-
4. **Fix Bug**:
|
|
281
|
-
\`\`\`bash
|
|
282
|
-
codex "Read AGENTS.md and increment 0001. Fix authentication bug. Run tests."
|
|
283
|
-
\`\`\`
|
|
284
|
-
|
|
285
|
-
5. **Code Review**:
|
|
286
|
-
\`\`\`bash
|
|
287
|
-
codex "Adopt Tech Lead role from AGENTS.md. Review src/auth/ code."
|
|
288
|
-
\`\`\`
|
|
289
|
-
|
|
290
|
-
TIPS & TRICKS:
|
|
291
|
-
|
|
292
|
-
1. **Always Reference AGENTS.md**
|
|
293
|
-
- CLI: Explicit in command
|
|
294
|
-
- Web: Upload at conversation start
|
|
295
|
-
|
|
296
|
-
2. **Use Task-Based Approach**
|
|
297
|
-
- Break work into tasks (T001, T002, etc.)
|
|
298
|
-
- Each task runs in isolated environment
|
|
299
|
-
- Easier to track and validate
|
|
300
|
-
|
|
301
|
-
3. **Monitor Progress**
|
|
302
|
-
- CLI shows real-time progress (1-30 minutes per task)
|
|
303
|
-
- Web shows thinking process
|
|
304
|
-
- Review citations and logs
|
|
305
|
-
|
|
306
|
-
4. **Leverage Multiple Access Points**
|
|
307
|
-
- CLI for speed
|
|
308
|
-
- Web for accessibility
|
|
309
|
-
- IDE for integration
|
|
310
|
-
|
|
311
|
-
5. **Validate with Tests**
|
|
312
|
-
- Codex can run tests automatically
|
|
313
|
-
- Verify implementations work
|
|
314
|
-
|
|
315
|
-
COMPARISON:
|
|
316
|
-
|
|
317
|
-
| Feature | Claude Code | Codex |
|
|
318
|
-
|---------|-------------|-------|
|
|
319
|
-
| **Automation** | Full | Semi |
|
|
320
|
-
| **Skills** | Native | Via AGENTS.md |
|
|
321
|
-
| **Agents** | Native | Via AGENTS.md |
|
|
322
|
-
| **Access** | CLI only | CLI + Web + IDE + GitHub + iOS |
|
|
323
|
-
| **Model** | Opus 4.6 | GPT-5-Codex |
|
|
324
|
-
| **Task Isolation** | No | Yes (isolated environments) |
|
|
325
|
-
|
|
326
|
-
LIMITATIONS:
|
|
327
|
-
|
|
328
|
-
- No native skills/agents (manual role adoption via AGENTS.md)
|
|
329
|
-
- No hooks (can't auto-update docs on events)
|
|
330
|
-
- Tasks run 1-30 minutes (not instant)
|
|
331
|
-
- Requires ChatGPT Plus/Pro/Business/Enterprise
|
|
332
|
-
|
|
333
|
-
But very powerful with GPT-5-Codex and multiple access points!
|
|
334
|
-
|
|
335
|
-
PLANS & PRICING:
|
|
336
|
-
|
|
337
|
-
- **ChatGPT Plus**: $20/month (includes Codex CLI + Web)
|
|
338
|
-
- **ChatGPT Pro**: $200/month (unlimited, faster)
|
|
339
|
-
- **Business/Enterprise**: Custom pricing
|
|
340
|
-
|
|
341
|
-
Free trial may be available - check OpenAI website.
|
|
342
|
-
|
|
343
|
-
DOCUMENTATION:
|
|
344
|
-
|
|
345
|
-
- AGENTS.md: Universal SpecWeave instructions (READ THIS!)
|
|
346
|
-
- SPECWEAVE.md: Complete framework documentation
|
|
347
|
-
- .codex/README.md: Codex adapter guide
|
|
348
|
-
- https://openai.com/codex/
|
|
349
|
-
|
|
350
|
-
You're ready to build with SpecWeave on OpenAI Codex!
|
|
351
|
-
|
|
352
|
-
Pro tip: Use CLI for speed, Web for accessibility, and always
|
|
353
|
-
reference AGENTS.md for SpecWeave structure!
|
|
354
|
-
`;
|
|
149
|
+
OpenAI Codex adapter
|
|
150
|
+
|
|
151
|
+
AGENTS.md carries durable project instructions. Native skills live in .agents/skills.
|
|
152
|
+
Codex supports native skills and task/subagent capabilities; availability depends on
|
|
153
|
+
its surface and configuration. SpecWeave state remains in portable local files.
|
|
154
|
+
|
|
155
|
+
Quick start:
|
|
156
|
+
specweave project init --name "My project" --goal "Describe the outcome"
|
|
157
|
+
specweave project show
|
|
158
|
+
specweave project brief --harness codex
|
|
159
|
+
specweave refresh-plugins
|
|
160
|
+
|
|
161
|
+
Use the same intent board, task ledger and verification commands in any harness.
|
|
162
|
+
Managed native skills use the sw- prefix. Changed files are backed up under
|
|
163
|
+
.specweave/state/skill-backups. Existing .codex/skills files remain untouched.
|
|
164
|
+
Hooks require the host's supported events and trust review; this adapter does not
|
|
165
|
+
silently install or approve hooks. The project brief works without hooks.
|
|
166
|
+
|
|
167
|
+
Official setup: https://learn.chatgpt.com/docs/build-skills
|
|
168
|
+
`;
|
|
355
169
|
}
|
|
356
170
|
}
|
|
357
171
|
//# sourceMappingURL=adapter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../src/adapters/codex/adapter.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../../../src/adapters/codex/adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,IAAI,M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AAQ,MAAM,CAAC,MAAM,CAAC,MAAM,wBAAwB,SAAS,GAAG,CAAC,CAAC;QAC9E,OAAO,CAAC,GAAG,CAAC,cAAc,MAAM,CAAC,QAAQ,CAAC,IAAI,uBAAuB,CAAC,CAAC;IACzE,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,UAAkB;QACnC,OAAO,CAAC,GAAG,CAAC,uCAAuC,UAAU,EAAE,CAAC,CAAC;QACjE,MAAM,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAC1D,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;QACjD,OAAO,CAAC,GAAG,CAAC,cAAc,UAAU,YAAY,CAAC,CAAC;IACpD,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB;QACvB,OAAO,MAAM,IAAI,CAAC,yBAAyB,CAAC,gBAAgB,CAAC,CAAC;IAChE,CAAC;IAED;;OAEG;IACH,eAAe;QACb,OAAO;;;;;;;;;;;;;;;;;;;;CAoBV,CAAC;IACA,CAAC;CACF"}
|
|
@@ -10,15 +10,15 @@ import * as fs from 'fs';
|
|
|
10
10
|
import * as path from 'path';
|
|
11
11
|
import chalk from 'chalk';
|
|
12
12
|
import { findAvailablePort } from '../../utils/docs-preview/server-manager.js';
|
|
13
|
-
import {
|
|
13
|
+
import { findEffectiveRoot } from '../../utils/find-project-root.js';
|
|
14
14
|
const LOCK_FILE = path.join(process.env.HOME || '', '.specweave-dashboard.json');
|
|
15
15
|
export async function dashboardCommand(options = {}) {
|
|
16
|
-
const projectRoot =
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
console.log(chalk.red('No SpecWeave project found in current directory.'));
|
|
16
|
+
const projectRoot = findEffectiveRoot();
|
|
17
|
+
if (!projectRoot) {
|
|
18
|
+
console.log(chalk.red(`No SpecWeave project found: no .specweave/config.json in ${process.cwd()} or any parent directory`));
|
|
20
19
|
console.log(chalk.dim('Run `specweave init` first.'));
|
|
21
|
-
process.
|
|
20
|
+
process.exitCode = 1;
|
|
21
|
+
return;
|
|
22
22
|
}
|
|
23
23
|
// Check if dashboard is already running
|
|
24
24
|
const existing = readLockFile();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../../src/cli/commands/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../../../src/cli/commands/dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAErE,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,EAAE,EAAE,2BAA2B,CAAC,CAAC;AAOjF,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,UAA4B,EAAE;IACnE,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;IAExC,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,4DAA4D,OAAO,CAAC,GAAG,EAAE,0BAA0B,CAAC,CAAC,CAAC;QAC5H,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC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C/B,CAAC;AAED,SAAS,cAAc,CAAC,GAAW;IACjC,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,KAAK,UAAU,OAAO,CAAC,GAAW;IAChC,IAAI,CAAC;QACH,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,gCAAgC,CAAC,CAAC;QAC3E,MAAM,eAAe,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,CAAC;IAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gc.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/gc.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"gc.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/gc.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAYH,MAAM,WAAW,gBAAgB;IAC/B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,wBAAsB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD7E"}
|
|
@@ -6,11 +6,27 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import * as path from 'path';
|
|
8
8
|
import chalk from 'chalk';
|
|
9
|
-
import {
|
|
9
|
+
import { findEffectiveRoot } from '../../utils/find-project-root.js';
|
|
10
10
|
import { purgeState, findNestedSpecweaveDirs, worktreesSize, formatBytes, } from '../../core/state/state-gc.js';
|
|
11
11
|
// NOTE: user-facing command output; console.* is intentional here.
|
|
12
12
|
export async function gcCommand(options = {}) {
|
|
13
|
-
|
|
13
|
+
// An explicit --project-root is the caller's responsibility. Otherwise resolve
|
|
14
|
+
// the effective root with no process.cwd() fallback: the nested-.specweave
|
|
15
|
+
// scan below walks the tree under this root, which outside a project would
|
|
16
|
+
// be $HOME or / (0879).
|
|
17
|
+
const projectRoot = options.projectRoot || findEffectiveRoot();
|
|
18
|
+
if (!projectRoot) {
|
|
19
|
+
const msg = `No SpecWeave project found: no .specweave/config.json in ${process.cwd()} or any parent directory`;
|
|
20
|
+
if (options.json) {
|
|
21
|
+
console.log(JSON.stringify({ error: msg }, null, 2));
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
console.log(chalk.yellow(`\n${msg}`));
|
|
25
|
+
console.log(chalk.gray('Run this command from inside a SpecWeave project, or run `specweave init` first.\n'));
|
|
26
|
+
}
|
|
27
|
+
process.exitCode = 1;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
14
30
|
const stateDir = path.join(projectRoot, '.specweave', 'state');
|
|
15
31
|
const result = purgeState(stateDir, { apply: !!options.yes });
|
|
16
32
|
const worktrees = worktreesSize(projectRoot);
|