@howaboua/opencode-roadmap-plugin 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/descriptions/createroadmap.txt +20 -0
- package/dist/src/descriptions/loader.js +2 -4
- package/dist/src/descriptions/readroadmap.txt +2 -0
- package/dist/src/descriptions/updateroadmap.txt +8 -0
- package/dist/src/errors/action_mismatch.txt +1 -0
- package/dist/src/errors/action_not_found.txt +1 -0
- package/dist/src/errors/immutable_feature.txt +3 -0
- package/dist/src/errors/invalid_action_id.txt +1 -0
- package/dist/src/errors/invalid_feature_id.txt +1 -0
- package/dist/src/errors/invalid_transition.txt +1 -0
- package/dist/src/errors/loader.js +1 -2
- package/dist/src/errors/no_changes_specified.txt +1 -0
- package/dist/src/errors/roadmap_corrupted.txt +1 -0
- package/dist/src/errors/roadmap_not_found.txt +1 -0
- package/package.json +4 -12
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Initialize or append to project roadmap. Supports adding new features and actions.
|
|
2
|
+
|
|
3
|
+
Constraints:
|
|
4
|
+
1. Descriptions: MUST be detailed, clear, and actionable (unlike the minimal example below).
|
|
5
|
+
2. Append-only: New IDs must follow sequence (Feature 1->2, Action 1.01->1.02).
|
|
6
|
+
3. ID Format: Feature "1", Action "1.01".
|
|
7
|
+
4. Validation: Action prefix MUST match Feature (Action "1.01" belongs to Feature "1").
|
|
8
|
+
5. Status: Must be "pending".
|
|
9
|
+
|
|
10
|
+
Example:
|
|
11
|
+
{
|
|
12
|
+
"features": [
|
|
13
|
+
{
|
|
14
|
+
"number": "1", "title": "Auth", "description": "User authentication system setup",
|
|
15
|
+
"actions": [
|
|
16
|
+
{ "number": "1.01", "description": "Initialize PostgreSQL database schema with users table and indexes", "status": "pending" }
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { promises as fs } from "fs";
|
|
2
2
|
import { join } from "path";
|
|
3
3
|
export async function loadDescription(filename) {
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
const descriptionsDir = join(__dirname, "..", "..", "src", "descriptions");
|
|
7
|
-
const filePath = join(descriptionsDir, filename);
|
|
4
|
+
// Assets are colocated with the compiled loader (copied into dist/src/descriptions).
|
|
5
|
+
const filePath = join(__dirname, filename);
|
|
8
6
|
try {
|
|
9
7
|
return await fs.readFile(filePath, "utf-8");
|
|
10
8
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
Update action status or description.
|
|
2
|
+
|
|
3
|
+
Constraints:
|
|
4
|
+
1. Forward-only status: pending → in_progress → completed.
|
|
5
|
+
2. Immutable IDs: Cannot change action numbers or move actions.
|
|
6
|
+
3. Side Effect: Automatically archives roadmap file when ALL actions are completed.
|
|
7
|
+
|
|
8
|
+
Input: actionNumber (required), status (optional), description (optional).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ID Mismatch: Action "{action}" must belong to Feature "{feature}" (e.g. "{feature}.01").
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Action "{id}" not found. Use ReadRoadmap to see available action numbers.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Invalid action ID "{id}". Must be 'X.YY' (e.g. '1.01').
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Invalid feature ID "{id}". Must be integer string (e.g. '1', '2').
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Invalid transition: "{from}" → "{to}". Allowed: {allowed}.
|
|
@@ -4,8 +4,7 @@ const ERROR_CACHE = {};
|
|
|
4
4
|
export async function loadErrorTemplate(filename) {
|
|
5
5
|
if (ERROR_CACHE[filename])
|
|
6
6
|
return ERROR_CACHE[filename];
|
|
7
|
-
const
|
|
8
|
-
const filePath = join(errorsDir, filename + ".txt");
|
|
7
|
+
const filePath = join(__dirname, `${filename}.txt`);
|
|
9
8
|
try {
|
|
10
9
|
const content = await fs.readFile(filePath, "utf-8");
|
|
11
10
|
ERROR_CACHE[filename] = content.trim();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
No changes specified. Provide either a description, status, or both to update the action.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Roadmap file is corrupted or unreadable. Ask user to check roadmap.json file.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
No roadmap exists. Use CreateRoadmap to create one.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@howaboua/opencode-roadmap-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Strategic roadmap planning and multi-agent coordination for OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -27,7 +27,8 @@
|
|
|
27
27
|
"zod": "^3.22.0"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsc -p tsconfig.json",
|
|
30
|
+
"build": "tsc -p tsconfig.json && npm run copy-assets",
|
|
31
|
+
"copy-assets": "mkdir -p dist/src/descriptions dist/src/errors && cp src/descriptions/*.txt dist/src/descriptions/ && cp src/errors/*.txt dist/src/errors/",
|
|
31
32
|
"prepublishOnly": "npm run build"
|
|
32
33
|
},
|
|
33
34
|
"opencode": {
|
|
@@ -37,14 +38,5 @@
|
|
|
37
38
|
"updateroadmap",
|
|
38
39
|
"readroadmap"
|
|
39
40
|
]
|
|
40
|
-
}
|
|
41
|
-
"repository": {
|
|
42
|
-
"type": "git",
|
|
43
|
-
"url": "https://github.com/sst/opencode",
|
|
44
|
-
"directory": "roadmap"
|
|
45
|
-
},
|
|
46
|
-
"bugs": {
|
|
47
|
-
"url": "https://github.com/sst/opencode/issues"
|
|
48
|
-
},
|
|
49
|
-
"homepage": "https://opencode.ai"
|
|
41
|
+
}
|
|
50
42
|
}
|