@rashidee/co2 1.2.6 → 1.3.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/dist/.co2-dat/app.db +0 -0
- package/dist/.co2-dat/app.db-shm +0 -0
- package/dist/.co2-dat/app.db-wal +0 -0
- package/dist/.co2-dat/config.json +4 -0
- package/dist/index.js +5303 -3139
- package/drizzle/0011_workflow_history_v152.sql +5 -0
- package/drizzle/0012_prd_sections_v160.sql +14 -0
- package/drizzle/0013_brainstorm_sessions_v170.sql +10 -0
- package/drizzle/0014_bug_module_v180.sql +4 -0
- package/drizzle/0015_project_config_v190.sql +23 -0
- package/drizzle/0016_cicd_v2100.sql +22 -0
- package/drizzle/meta/_journal.json +42 -0
- package/package.json +1 -1
- package/plugin/README.md +2 -0
- package/plugin/SKILLS.md +417 -350
- package/plugin/skills/conductor-feature-develop/SKILL.md +1 -1
- package/plugin/skills/conductor-feature-prepare/SKILL.md +23 -3
- package/plugin/skills/depgen-k8s/SKILL.md +1 -1
- package/plugin/skills/tracegen-matrix/SKILL.md +1 -1
- package/plugin/skills/util-gencicdscript/SKILL.md +91 -0
- package/plugin/skills/util-gencicdscript/references/cicd-app-template.md +414 -0
- package/plugin/skills/util-plancicd/SKILL.md +130 -0
- package/plugin/skills/util-projectinit/SKILL.md +1 -1
- package/plugin/skills/util-projectsync/SKILL.md +1 -1
- package/plugin/skills/util-updprd/SKILL.md +85 -15
- package/plugin/skills/util-usanalyzer/SKILL.md +1 -1
- package/plugin/skills/util-ustagger/SKILL.md +1 -1
- package/static/assets/{abnfDiagram-VRR7QNED-DvPuwyCV.js → abnfDiagram-VRR7QNED-CN4J6j_u.js} +1 -1
- package/static/assets/{arc-DRKw7sjs.js → arc-N4fM3ZWM.js} +1 -1
- package/static/assets/{architectureDiagram-ZJ3FMSHR-CaNcxUbC.js → architectureDiagram-ZJ3FMSHR-uch_sUft.js} +1 -1
- package/static/assets/{blockDiagram-677ZJIJ3-Demd4AOK.js → blockDiagram-677ZJIJ3-B8ciSHmI.js} +1 -1
- package/static/assets/{c4Diagram-LMCZKHZV-PVKUfc2x.js → c4Diagram-LMCZKHZV-CQcm-uRR.js} +1 -1
- package/static/assets/channel-D1lJ_RG1.js +1 -0
- package/static/assets/{chunk-2Q5K7J3B-CExf8ww_.js → chunk-2Q5K7J3B-CKyyGyMe.js} +1 -1
- package/static/assets/{chunk-32BRIVSS-CFPaoONF.js → chunk-32BRIVSS-BUvhUzbF.js} +1 -1
- package/static/assets/{chunk-5VM5RSS4-DE2esM67.js → chunk-5VM5RSS4-DeYPG9gz.js} +1 -1
- package/static/assets/{chunk-EX3LRPZG-SON_YdDG.js → chunk-EX3LRPZG-M5DW3NIE.js} +1 -1
- package/static/assets/{chunk-JWPE2WC7-Qxah8LNr.js → chunk-JWPE2WC7-DdUQGRCV.js} +1 -1
- package/static/assets/{chunk-MOJQB5TN-BcWGQV3j.js → chunk-MOJQB5TN-BjTWQfa-.js} +1 -1
- package/static/assets/{chunk-RYQCIY6F-DkDj-OR5.js → chunk-RYQCIY6F-B6eqE68w.js} +1 -1
- package/static/assets/{chunk-V7JOEXUC-BlI1Mrah.js → chunk-V7JOEXUC-31fpjmeh.js} +1 -1
- package/static/assets/{chunk-VR4S4FIN-Agf__duj.js → chunk-VR4S4FIN-DIdhgHxJ.js} +1 -1
- package/static/assets/{chunk-XXDRQBXY-B5CfAh85.js → chunk-XXDRQBXY-CwmvQsRd.js} +1 -1
- package/static/assets/classDiagram-OUVF2IWQ-B2LV6Dty.js +1 -0
- package/static/assets/classDiagram-v2-EOCWNBFH-B2LV6Dty.js +1 -0
- package/static/assets/{cose-bilkent-JH36ORCC-DO0cQkcy.js → cose-bilkent-JH36ORCC-0fxMNvxl.js} +1 -1
- package/static/assets/{cynefin-VYW2F7L2-CfOnsnXc.js → cynefin-VYW2F7L2-CykGMMcJ.js} +1 -1
- package/static/assets/{cynefinDiagram-TSTJHNR4-BJ8tULAv.js → cynefinDiagram-TSTJHNR4-CXA1U39p.js} +1 -1
- package/static/assets/{dagre-VKFMJZFB-DfjwzHqP.js → dagre-VKFMJZFB-Bw5XMtDI.js} +1 -1
- package/static/assets/{diagram-FQU43EPY-CndSOIIM.js → diagram-FQU43EPY-xte6N075.js} +1 -1
- package/static/assets/{diagram-G47NLZAW-Czf5hN0Z.js → diagram-G47NLZAW-CHoRtp3z.js} +1 -1
- package/static/assets/{diagram-NH7WQ7WH-COAyojGh.js → diagram-NH7WQ7WH-CEFlTlPg.js} +1 -1
- package/static/assets/{diagram-OA4YK3LP-H8PoiN2m.js → diagram-OA4YK3LP-DJ0JX9s2.js} +1 -1
- package/static/assets/{diagram-WEI45ONY-DzcaVzjp.js → diagram-WEI45ONY-BRfCVtnm.js} +1 -1
- package/static/assets/{ebnfDiagram-CCIWWBDH-DPazGYLJ.js → ebnfDiagram-CCIWWBDH-Cc-dcKTE.js} +1 -1
- package/static/assets/{erDiagram-Q63AITRT-Bo-fubgF.js → erDiagram-Q63AITRT-DLZsu__O.js} +1 -1
- package/static/assets/{flowDiagram-23GEKE2U-CSvxUDwh.js → flowDiagram-23GEKE2U-Cczq8RCz.js} +1 -1
- package/static/assets/{ganttDiagram-NO4QXBWP-DnBveWX6.js → ganttDiagram-NO4QXBWP-DOXGNB5h.js} +1 -1
- package/static/assets/{gitGraphDiagram-IHSO6WYX-B3rVL8c-.js → gitGraphDiagram-IHSO6WYX-BM-SCSXa.js} +1 -1
- package/static/assets/{index-y7XDSgMG.js → index-CBLEvyTD.js} +172 -171
- package/static/assets/{index-LZSQkLE2.css → index-Dn_JY-18.css} +1 -1
- package/static/assets/{infoDiagram-FWYZ7A6U-CvWV9yy2.js → infoDiagram-FWYZ7A6U-dJDRFcA8.js} +1 -1
- package/static/assets/{ishikawaDiagram-FXEZZL3T-DF28a1N6.js → ishikawaDiagram-FXEZZL3T-VxLIIU05.js} +1 -1
- package/static/assets/{journeyDiagram-5HDEW3XC-CB6CugYk.js → journeyDiagram-5HDEW3XC-EvtzKlzP.js} +1 -1
- package/static/assets/{kanban-definition-HUTT4EX6-ResSLF6d.js → kanban-definition-HUTT4EX6-yO62k9Tr.js} +1 -1
- package/static/assets/{linear-CLO--ryk.js → linear-DZzMubPw.js} +1 -1
- package/static/assets/{mindmap-definition-LN4V7U3C-BvW3EbxX.js → mindmap-definition-LN4V7U3C-BRO6imMR.js} +1 -1
- package/static/assets/{pegDiagram-2B236MQR-BHCgqrrM.js → pegDiagram-2B236MQR-DJR3fTw9.js} +1 -1
- package/static/assets/{pieDiagram-ENE6RG2P-DVmCQ5FA.js → pieDiagram-ENE6RG2P-9mFM-_RT.js} +1 -1
- package/static/assets/{quadrantDiagram-ABIIQ3AL-B3e5KR52.js → quadrantDiagram-ABIIQ3AL-BEsVn0Kx.js} +1 -1
- package/static/assets/{railroadDiagram-RFXS5EU6-Csv5ysLc.js → railroadDiagram-RFXS5EU6-D9Mp7Mil.js} +1 -1
- package/static/assets/{requirementDiagram-TGXJPOKE-DOMVzvnB.js → requirementDiagram-TGXJPOKE-CRYcxiHN.js} +1 -1
- package/static/assets/{sankeyDiagram-HTMAVEWB-B1dcTOvy.js → sankeyDiagram-HTMAVEWB-9MJPBNY-.js} +1 -1
- package/static/assets/{sequenceDiagram-DBY2YBRQ-BY414yeO.js → sequenceDiagram-DBY2YBRQ-CSAt7g1a.js} +1 -1
- package/static/assets/{sizeCapture-X5ZJPWSS-CuJfrfBN.js → sizeCapture-X5ZJPWSS-DQ7t3sAl.js} +1 -1
- package/static/assets/{stateDiagram-2N3HPSRC-FX4rJkzV.js → stateDiagram-2N3HPSRC-B314IVUq.js} +1 -1
- package/static/assets/stateDiagram-v2-6OUMAXLB-C5_r7hRR.js +1 -0
- package/static/assets/{swimlanes-5IMT3BWC-Sfy58mmv.js → swimlanes-5IMT3BWC-gCXbGpn-.js} +2 -2
- package/static/assets/swimlanesDiagram-G3AALYLV-BkEgKJGN.js +8 -0
- package/static/assets/{timeline-definition-FHXFAJF6-CmV7by8p.js → timeline-definition-FHXFAJF6-Ypa-zz8f.js} +1 -1
- package/static/assets/{vennDiagram-L72KCM5P-FqIyFZFt.js → vennDiagram-L72KCM5P-C07T1tIJ.js} +1 -1
- package/static/assets/{wardleyDiagram-EHGQE667-BZ06O45i.js → wardleyDiagram-EHGQE667-DwsMVlwx.js} +1 -1
- package/static/assets/{xychartDiagram-FW5EYKEG-BOkffR06.js → xychartDiagram-FW5EYKEG-BCtXbdXL.js} +1 -1
- package/static/index.html +2 -2
- package/plugin/skills/util-preparek8senv/SKILL.md +0 -422
- package/static/assets/channel-C2nVbuwv.js +0 -1
- package/static/assets/classDiagram-OUVF2IWQ-DXJIljsR.js +0 -1
- package/static/assets/classDiagram-v2-EOCWNBFH-DXJIljsR.js +0 -1
- package/static/assets/stateDiagram-v2-6OUMAXLB-BVufbO_H.js +0 -1
- package/static/assets/swimlanesDiagram-G3AALYLV-wDCDw08H.js +0 -8
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: util-plancicd
|
|
3
|
+
model: claude-sonnet-5
|
|
4
|
+
effort: high
|
|
5
|
+
description: >
|
|
6
|
+
Infer a local-deployment plan for every custom application of a CO2 project and write it to
|
|
7
|
+
cicd/CICD_PLAN.md for human review in Compound Context Studio. Reads the project's
|
|
8
|
+
ENVIRONMENT.md and DEVTOOL.md, CLAUDE.md (# Custom Applications, # Port Allocation) and each
|
|
9
|
+
application's context/specification/SPECIFICATION.md, then decides per application: deployment
|
|
10
|
+
method (container vs bare process), build command (e.g. Spring Boot jar vs Docker image),
|
|
11
|
+
start command, stop mechanism, deploy method + command (none / web-server copy / docker run /
|
|
12
|
+
kubectl apply — only when the environment calls for one), port and health-check URL, plus a
|
|
13
|
+
port for the generated CI/CD app itself. The plan carries a top-level
|
|
14
|
+
`**Status**: IN PROGRESS` header flipped to `COMPLETED` when done — the studio's watcher reads
|
|
15
|
+
it. This skill NEVER generates the CI/CD app (that is util-gencicdscript, which runs only
|
|
16
|
+
after the studio stamps an **Approved**: line into the plan). Trigger on keywords: "plan
|
|
17
|
+
cicd", "plan deployment", "cicd plan", "infer deployment", "deployment plan", "plan ci/cd".
|
|
18
|
+
Accepts one MANDATORY argument: the project-relative path of the plan-request markdown the
|
|
19
|
+
studio generated (e.g., /util-plancicd execution/cicd-plan-3-1753000000000.md).
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Util Plan CI/CD
|
|
23
|
+
|
|
24
|
+
## Inputs
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
/util-plancicd <path-to-plan-request-md>
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
| Argument | Required | Description |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| path | yes | Project-relative path of the studio-generated plan-request markdown under `execution/` |
|
|
33
|
+
|
|
34
|
+
If the argument is missing or the file does not exist, STOP and tell the user to click
|
|
35
|
+
**Plan deployment** in the studio's CI/CD screen first.
|
|
36
|
+
|
|
37
|
+
### Auto-Resolved Paths
|
|
38
|
+
|
|
39
|
+
| Logical file | Path |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Plan request | `<argument>` |
|
|
42
|
+
| Environment | `ENVIRONMENT.md` (project root) |
|
|
43
|
+
| Dev tools | `DEVTOOL.md` (project root) |
|
|
44
|
+
| Project context | `CLAUDE.md` (project root; `source/CLAUDE.md` fallback) |
|
|
45
|
+
| App specification | `<app_folder>/context/specification/SPECIFICATION.md` |
|
|
46
|
+
| Output plan | `cicd/CICD_PLAN.md` |
|
|
47
|
+
|
|
48
|
+
## Phase 1 — Gather
|
|
49
|
+
|
|
50
|
+
1. Read the plan-request markdown; its `## Applications` list is the authoritative application set.
|
|
51
|
+
2. Read `ENVIRONMENT.md` (registries, credentials, external services) and `DEVTOOL.md`
|
|
52
|
+
(installed tools + paths: node/pnpm/docker/kubectl/python versions).
|
|
53
|
+
3. Read `CLAUDE.md`: `# Custom Applications` (folder names, Depends on) and `# Port Allocation`
|
|
54
|
+
(per-application ports).
|
|
55
|
+
4. For each application, read its SPECIFICATION.md tech-stack section if present; otherwise
|
|
56
|
+
infer the stack from build files (`package.json` → node, `pom.xml` → spring-boot,
|
|
57
|
+
`composer.json` → laravel).
|
|
58
|
+
|
|
59
|
+
## Phase 2 — Decide (per application)
|
|
60
|
+
|
|
61
|
+
- **Working directory (CRITICAL)**: the generated CI/CD app executes every command with the
|
|
62
|
+
**application folder** (`<project>/<folder>`) as its working directory — NEVER the project
|
|
63
|
+
root. All paths inside build/start/stop/deploy commands must therefore be relative to the
|
|
64
|
+
application folder (`mvn -q package`, `java -jar target\app.jar`) — never prefixed with the
|
|
65
|
+
application folder itself (`skolafund_middleware\target\...` is WRONG).
|
|
66
|
+
- **Method**: `container` only when Docker appears in DEVTOOL.md AND the stack has a sensible
|
|
67
|
+
container path; otherwise `process` (bare local process — the default for a dev VM).
|
|
68
|
+
- **Build command**: from the stack (e.g. `pnpm install && pnpm build`, `mvn -q package`,
|
|
69
|
+
`composer install`). Use tool paths from DEVTOOL.md when the tool is not on PATH.
|
|
70
|
+
- **Start command**: the stack's production-ish local start (e.g. `node dist/index.js`,
|
|
71
|
+
`java -jar target/<artifact>.jar`, `php artisan serve --port <port>`); `docker build`/
|
|
72
|
+
`docker run` pair when method=container. For jar-based stacks, resolve the EXACT artifact
|
|
73
|
+
filename — read the pom/gradle build config: a Maven `<finalName>` means
|
|
74
|
+
`target/<finalName>.jar` with NO version suffix (Spring Boot repackage keeps that name and
|
|
75
|
+
leaves a `.jar.original` beside it — never reference the `.original`). Never guess
|
|
76
|
+
`<app>-<version>.jar` and never use a `target/*.jar` glob (shell-dependent, breaks on
|
|
77
|
+
Windows cmd).
|
|
78
|
+
- **Stop**: `process-kill` for bare processes; `docker stop <name>` for containers.
|
|
79
|
+
- **Deploy** (method + command): only when ENVIRONMENT.md/DEVTOOL.md show a deployment target —
|
|
80
|
+
`kubernetes` (`kubectl apply -f <app>/k8s/` when kubectl + a cluster/kubeconfig appear),
|
|
81
|
+
`docker` (`docker run`/`docker compose up -d` when the image is the deliverable),
|
|
82
|
+
`web-server` (copy the built artifact into the configured web/app server, e.g. nginx html
|
|
83
|
+
root or Tomcat webapps, when one is configured). Default **`none`** — a bare local process
|
|
84
|
+
needs no deploy step beyond Start; never invent a target the config does not name.
|
|
85
|
+
- **Port**: from `# Port Allocation`; if absent, assign sequentially from 3000 avoiding
|
|
86
|
+
collisions with the studio (3001) and the CI/CD app port.
|
|
87
|
+
- **Health**: `http://127.0.0.1:<port>/` or a documented health endpoint from the spec.
|
|
88
|
+
- **CI/CD app port**: 4100 unless taken in `# Port Allocation`; record it in the plan.
|
|
89
|
+
|
|
90
|
+
## Phase 3 — Write the plan
|
|
91
|
+
|
|
92
|
+
Create `cicd/` if missing and write `cicd/CICD_PLAN.md`:
|
|
93
|
+
|
|
94
|
+
```markdown
|
|
95
|
+
# CI/CD Deployment Plan — <Project Name>
|
|
96
|
+
|
|
97
|
+
**Generated**: <ISO date>
|
|
98
|
+
**Status**: IN PROGRESS
|
|
99
|
+
|
|
100
|
+
## CI/CD App
|
|
101
|
+
|
|
102
|
+
- **Port**: <port>
|
|
103
|
+
- **Folder**: cicd/app
|
|
104
|
+
|
|
105
|
+
## Deployment Decisions
|
|
106
|
+
|
|
107
|
+
| Application | Folder | Method | Port | Build | Start | Stop | Deploy Method | Deploy | Health |
|
|
108
|
+
|---|---|---|---|---|---|---|---|---|---|
|
|
109
|
+
| <name> | <folder> | process|container | <port> | `<cmd>` | `<cmd>` | process-kill|docker stop | none|web-server|docker|kubernetes | `<cmd or ->` | <url> |
|
|
110
|
+
|
|
111
|
+
## Rationale
|
|
112
|
+
|
|
113
|
+
- <per-application: why this method/commands, citing ENVIRONMENT.md/DEVTOOL.md evidence>
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Then flip `**Status**: IN PROGRESS` to `**Status**: COMPLETED`. The studio watcher advances
|
|
117
|
+
only on COMPLETED.
|
|
118
|
+
|
|
119
|
+
## STOP — Hand Back to the Human
|
|
120
|
+
|
|
121
|
+
Print a one-paragraph summary and STOP. Never invoke util-gencicdscript or any other skill —
|
|
122
|
+
the human reviews and approves the plan in the studio's CI/CD screen first.
|
|
123
|
+
|
|
124
|
+
## Important Rules
|
|
125
|
+
|
|
126
|
+
- Never write the CI/CD app; never modify PRD.md/CLAUDE.md/BUG.md.
|
|
127
|
+
- Never delete an existing `**Approved**:` line if re-planning over a previous plan — overwrite
|
|
128
|
+
the whole file WITHOUT any Approved line (a re-plan always requires fresh approval).
|
|
129
|
+
- Credentials from ENVIRONMENT.md may be referenced in commands verbatim (dev-environment
|
|
130
|
+
plaintext rule) but never echoed into the Rationale narrative.
|
|
@@ -11,7 +11,9 @@ description: >
|
|
|
11
11
|
Automatically classifies the change complexity per application as major, minor or patch,
|
|
12
12
|
computes the next semantic version, and writes the new/updated items under a NEW version
|
|
13
13
|
tag layered on top of the existing versions in each PRD.md — never rewriting or deleting
|
|
14
|
-
prior versions.
|
|
14
|
+
prior versions. An optional `version:<vX.Y.Z>` argument overrides the auto-computed bump
|
|
15
|
+
and writes the items under that exact version instead, gated so a version lower than an
|
|
16
|
+
impacted application's current highest PRD/CHANGELOG version is rejected before any write. Cancelled items are struck through in place and recorded in the new
|
|
15
17
|
version. New items are tagged with unique IDs (via util-ustagger) and a CHANGELOG.md
|
|
16
18
|
entry is appended per impacted application. Presents an impact plan for human
|
|
17
19
|
confirmation before writing (skippable with `--auto-approve` for orchestrated runs).
|
|
@@ -21,10 +23,15 @@ description: >
|
|
|
21
23
|
"change requirement", "update requirements", "add user story", "cancel user story",
|
|
22
24
|
"modify user story", "add NFR", "add constraint", "requirement update", "bump PRD version",
|
|
23
25
|
"new version of requirements", "apply this requirement", "we now need", "the client wants".
|
|
24
|
-
Accepts a free-form change prompt as the main argument, with optional `application:<app
|
|
25
|
-
|
|
26
|
+
Accepts a free-form change prompt as the main argument, with optional `application:<app>`,
|
|
27
|
+
`module:<module>` scope filters and an optional `version:<vX.Y.Z>` explicit target version
|
|
26
28
|
(e.g., `/util-updprd "Add SSO login for all users"`,
|
|
27
|
-
`/util-updprd "Corridor codes must be unique" application:hub_middleware
|
|
29
|
+
`/util-updprd "Corridor codes must be unique" application:hub_middleware`,
|
|
30
|
+
`/util-updprd "Add audit logging" version:v2.1.0`).
|
|
31
|
+
Alternatively accepts the path to a PRD-Wizard-generated prd_updates markdown
|
|
32
|
+
(e.g., `/util-updprd execution/prd-wizard-3-1755123456789.md`) — the change request is read
|
|
33
|
+
from that file's `## Change Request` section, with its optional `## Target Module` section
|
|
34
|
+
used as the module hint.
|
|
28
35
|
---
|
|
29
36
|
|
|
30
37
|
# Util Update PRD
|
|
@@ -42,14 +49,16 @@ and traceably across every affected application.
|
|
|
42
49
|
## Inputs
|
|
43
50
|
|
|
44
51
|
```
|
|
45
|
-
/util-updprd "<free-form requirement change>" [application:<app>] [module:<module>] [--auto-approve]
|
|
52
|
+
/util-updprd "<free-form requirement change>" [application:<app>] [module:<module>] [version:<vX.Y.Z>] [--auto-approve]
|
|
53
|
+
/util-updprd <path/to/prd_updates.md> [application:<app>] [module:<module>] [version:<vX.Y.Z>] [--auto-approve]
|
|
46
54
|
```
|
|
47
55
|
|
|
48
56
|
| Argument | Required | Description |
|
|
49
57
|
|----------|----------|-------------|
|
|
50
|
-
| `<prompt>` | Yes |
|
|
58
|
+
| `<prompt>` \| `<file path>` | Yes | Either a free-form description of the new requirement(s) or the update(s) to existing ones (may describe multiple discrete changes at once, and may explicitly say something should be removed/cancelled), **or** the path to a prd_updates markdown generated by the co2-cli PRD Wizard (typically `execution/prd-wizard-<id>-<timestamp>.md`) — the change request is read from that file (see "File-Path Input Resolution"). |
|
|
51
59
|
| `application:<app>` | No | Restrict analysis to a single application. If omitted, **all** custom applications are analyzed and only the impacted ones are changed. |
|
|
52
60
|
| `module:<module>` | No | Hint/restrict the change to a specific module. If omitted, the impacted modules are inferred. |
|
|
61
|
+
| `version:<vX.Y.Z>` | No | Explicit target version for the update. If provided, the change is written under this exact version tag in every impacted application instead of auto-computing the next version from the bump level. **Gate check:** the provided version must be **equal to or higher than** each impacted application's current highest version — if it is lower for ANY impacted application, the whole run stops before any file is written (see "Phase 3 — Version Gate"). If omitted, the next version is computed automatically (current behavior). |
|
|
53
62
|
| `--auto-approve` | No | Skip the Phase 3 confirmation checkpoint and apply the plan directly. Intended for orchestrated/autonomous runs where interactive confirmation is not possible. Without this flag, the skill presents the plan and waits for the human to confirm before writing. |
|
|
54
63
|
|
|
55
64
|
Example invocations:
|
|
@@ -57,6 +66,28 @@ Example invocations:
|
|
|
57
66
|
- `/util-updprd "Drop the CSV export from the dashboard — it is being replaced by scheduled email reports" application:hub_middleware`
|
|
58
67
|
- `/util-updprd "Corridor codes must be globally unique and are now case-insensitive" application:hub_middleware module:corridor`
|
|
59
68
|
- `/util-updprd "Add audit logging for all admin actions" --auto-approve`
|
|
69
|
+
- `/util-updprd "Add audit logging for all admin actions" version:v2.1.0`
|
|
70
|
+
- `/util-updprd execution/prd-wizard-3-1755123456789.md`
|
|
71
|
+
|
|
72
|
+
### File-Path Input Resolution
|
|
73
|
+
|
|
74
|
+
The co2-cli **PRD Wizard** hands off to this skill with the generated prd_updates markdown path
|
|
75
|
+
as the main argument. When the main argument is a **path to an existing markdown file** (rather
|
|
76
|
+
than a quoted free-form prompt):
|
|
77
|
+
|
|
78
|
+
1. Read the file. It follows the PRD-Wizard template:
|
|
79
|
+
`# PRD Updates — <version>` / `## Change Request` / optional `## Target Module` /
|
|
80
|
+
`## Proposed Items` / `## Skill Hand-off`.
|
|
81
|
+
2. Use the body of the **`## Change Request`** section as the `<prompt>` for the rest of this
|
|
82
|
+
workflow, verbatim.
|
|
83
|
+
3. If a **`## Target Module`** section is present, use its value as the `module:` hint (an
|
|
84
|
+
explicit `module:` argument on the command line still wins).
|
|
85
|
+
4. Ignore the `## Proposed Items` and `## Skill Hand-off` sections — they are template
|
|
86
|
+
scaffolding, not part of the change request.
|
|
87
|
+
5. If the path does not exist or the file has no `## Change Request` section, report the
|
|
88
|
+
problem and **stop** — do not guess a change request.
|
|
89
|
+
|
|
90
|
+
Everything below treats the extracted change request exactly as if it had been passed inline.
|
|
60
91
|
|
|
61
92
|
### Application Resolution
|
|
62
93
|
|
|
@@ -109,12 +140,19 @@ modules of a single application receive the **same** new version tag. The bump l
|
|
|
109
140
|
application is the **highest-severity** change among everything affecting it (one major change
|
|
110
141
|
makes the whole application bump major, even if the other changes are patches).
|
|
111
142
|
|
|
143
|
+
**Explicit `version:` override.** When the caller passes `version:<vX.Y.Z>`, that exact version
|
|
144
|
+
is used as the new version tag for every impacted application — no bump is computed. It must
|
|
145
|
+
pass the Version Gate in Phase 3 (≥ each impacted application's current highest version) or the
|
|
146
|
+
run stops without writing anything.
|
|
147
|
+
|
|
112
148
|
## Workflow
|
|
113
149
|
|
|
114
150
|
### Phase 1 — Understand the Change
|
|
115
151
|
|
|
116
|
-
1.
|
|
117
|
-
|
|
152
|
+
1. Resolve the `<prompt>`: if the main argument is a file path, extract the change request per
|
|
153
|
+
"File-Path Input Resolution" first. Then decompose the prompt into a list of **discrete
|
|
154
|
+
changes**. A single prompt may contain several (e.g., "add password reset AND remove CSV
|
|
155
|
+
export" is two changes).
|
|
118
156
|
2. For each discrete change, determine its **operation** and **artifact type**:
|
|
119
157
|
- **Operation**: `ADD` (a brand-new requirement), `CANCEL` (an existing requirement is no
|
|
120
158
|
longer valid), or `MODIFY` (an existing requirement changes — treated as CANCEL of the old
|
|
@@ -150,7 +188,7 @@ For each candidate application (all, or the `application:`-filtered one):
|
|
|
150
188
|
5. Produce, per application, the set of `(module, subsection, operation, item text or target ID)`
|
|
151
189
|
entries. An application with zero entries is **not impacted** and will be left untouched.
|
|
152
190
|
|
|
153
|
-
### Phase 3 —
|
|
191
|
+
### Phase 3 — Resolve Version (Gate) & Present the Plan
|
|
154
192
|
|
|
155
193
|
For each **impacted** application:
|
|
156
194
|
|
|
@@ -158,9 +196,34 @@ For each **impacted** application:
|
|
|
158
196
|
CHANGELOG.md `## vX.Y.Z` headings; take the semantic-version maximum. If none exist, treat
|
|
159
197
|
the baseline as `v1.0.0`.
|
|
160
198
|
2. Classify the bump level using the table in "How Versions Work" — pick the highest severity
|
|
161
|
-
across all changes affecting this application.
|
|
162
|
-
|
|
163
|
-
|
|
199
|
+
across all changes affecting this application. (Do this even when `version:` is provided —
|
|
200
|
+
the level is still reported in the plan and summary.)
|
|
201
|
+
3. Resolve the new version:
|
|
202
|
+
- **`version:` NOT provided (default):** compute the new version by applying the bump to the
|
|
203
|
+
highest version (e.g., highest `v1.2.3` + minor → `v1.3.0`; + major → `v2.0.0`;
|
|
204
|
+
+ patch → `v1.2.4`).
|
|
205
|
+
- **`version:` provided:** use the provided version verbatim as the new version for **every**
|
|
206
|
+
impacted application — do not bump it further. First validate the format is `vX.Y.Z`
|
|
207
|
+
(a leading `v` plus three numeric parts); if malformed, report the problem and **stop**.
|
|
208
|
+
|
|
209
|
+
**Version Gate (only when `version:` is provided):** compare the provided version against each
|
|
210
|
+
impacted application's current highest version (semver comparison, from step 1):
|
|
211
|
+
|
|
212
|
+
- Provided version **lower** than the current highest of ANY impacted application → **STOP the
|
|
213
|
+
entire run before writing anything**. Report each failing application with its current highest
|
|
214
|
+
version, e.g.:
|
|
215
|
+
```
|
|
216
|
+
✖ Version gate failed — requested v1.2.0 is lower than the current highest version:
|
|
217
|
+
- hub_middleware: current highest v1.4.0
|
|
218
|
+
No files were modified. Re-run with a version ≥ the highest listed, or omit version: to
|
|
219
|
+
auto-compute the next version.
|
|
220
|
+
```
|
|
221
|
+
Do not partially apply the run to the applications that would pass — it is all or nothing.
|
|
222
|
+
- Provided version **equal** to the current highest → allowed; the change **accrues to that
|
|
223
|
+
existing version** (items are appended under the already-present `[vX.Y.Z]` blocks, and the
|
|
224
|
+
CHANGELOG gains a new row under the existing `## vX.Y.Z` heading).
|
|
225
|
+
- Provided version **higher** than the current highest → allowed; behaves exactly like an
|
|
226
|
+
auto-computed new version.
|
|
164
227
|
|
|
165
228
|
Then present a consolidated **Impact Analysis & Change Plan** and **wait for confirmation**
|
|
166
229
|
before writing anything (this is a cross-cutting, hard-to-reverse edit):
|
|
@@ -169,6 +232,7 @@ before writing anything (this is a cross-cutting, hard-to-reverse edit):
|
|
|
169
232
|
## PRD Update Plan
|
|
170
233
|
|
|
171
234
|
Change prompt: "<the prompt>"
|
|
235
|
+
Target version: v1.3.0 (explicit via version:) ← this line only when version: was provided
|
|
172
236
|
|
|
173
237
|
### hub_middleware (v1.2.3 → v1.3.0, MINOR)
|
|
174
238
|
| Module | Subsection | Op | Item |
|
|
@@ -257,8 +321,9 @@ For each impacted application, append an entry to `<app_folder>/CHANGELOG.md`:
|
|
|
257
321
|
(newest-first ordering), with a table header and the first row.
|
|
258
322
|
4. Row format:
|
|
259
323
|
`| {YYYY-MM-DD} | {application_name} | util-updprd | {impacted modules or "All"} | {N added, M cancelled, K modified — one-line summary} |`
|
|
260
|
-
5. **Never modify or delete existing rows.** The new version is always higher than
|
|
261
|
-
highest
|
|
324
|
+
5. **Never modify or delete existing rows.** The new version is always higher than — or, with an
|
|
325
|
+
explicit `version:` equal to — the previous highest (enforced by the Phase 3 Version Gate), so
|
|
326
|
+
it satisfies every downstream skill's version gate.
|
|
262
327
|
|
|
263
328
|
### Phase 7 — Output Summary
|
|
264
329
|
|
|
@@ -311,7 +376,12 @@ the follow-ups (as manual, human-triggered next steps) and stop.
|
|
|
311
376
|
strikethrough + a cancellation marker to a cancelled item's line).
|
|
312
377
|
- **One coherent version per application per run**, applied uniformly to every subsection touched.
|
|
313
378
|
- **Bump = highest severity.** If any change to an application is major, the application bumps
|
|
314
|
-
major; otherwise minor if any change is minor; otherwise patch.
|
|
379
|
+
major; otherwise minor if any change is minor; otherwise patch. An explicit `version:` argument
|
|
380
|
+
replaces the computed version but never the severity classification (still reported in the plan).
|
|
381
|
+
- **Explicit versions never go backwards.** A `version:` lower than any impacted application's
|
|
382
|
+
current highest version fails the Phase 3 Version Gate and aborts the whole run before any
|
|
383
|
+
write — never write a new block under an older version, and never apply the run partially to
|
|
384
|
+
only the applications that pass.
|
|
315
385
|
- **Leave IDs to util-ustagger.** Insert new items untagged; never hand-assign ID codes — that
|
|
316
386
|
risks collisions with the running counters ustagger maintains.
|
|
317
387
|
- **Preserve existing tags and formatting exactly**, including `[USHM…]`/`[NFRHM…]` codes and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-
|
|
1
|
+
import{g as p,r as u,d as a}from"./chunk-MOJQB5TN-BjTWQfa-.js";import{p as f}from"./chunk-JWPE2WC7-DdUQGRCV.js";import{_ as n,l as o}from"./index-CBLEvyTD.js";import{M as c,b as d}from"./cynefin-VYW2F7L2-CykGMMcJ.js";var v=d().RailroadAbnf.parser.LangiumParser,l=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),i=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:i,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return l(e.element);case"AbnfOptionalGroup":return{type:"optional",element:l(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:l(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},w={parser:R,db:a,renderer:u,styles:p};export{w as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Y as ln,$ as an,a0 as y,a1 as tn,a2 as F,a3 as q,a4 as _,a5 as un,a6 as rn,a7 as J,a8 as o,a9 as j,aa as sn,ab as on,ac as fn}from"./index-
|
|
1
|
+
import{Y as ln,$ as an,a0 as y,a1 as tn,a2 as F,a3 as q,a4 as _,a5 as un,a6 as rn,a7 as J,a8 as o,a9 as j,aa as sn,ab as on,ac as fn}from"./index-CBLEvyTD.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,z,a){var O=I-l,i=D-h,n=z-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function U(l,h,I,D,v,A,z){var a=l-I,O=h-D,i=(z?A:-A)/J(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,B=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*J(fn(0,T*T*R-P*P)),Y=(P*g-m*S)/R,$=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=Y-B,e=$-t,r=w-B,C=p-t;return x*x+e*e>r*r+C*C&&(Y=w,$=p),{cx:Y,cy:$,x01:-n,y01:-d,x11:Y*(v/T-1),y11:$*(v/T-1)}}function hn(){var l=cn,h=yn,I=j(0),D=null,v=gn,A=dn,z=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-an,c=A.apply(this,arguments)-an,B=un(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(B>tn-y)a.moveTo(s*F(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*F(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=B,S=B,Y=z.apply(this,arguments)/2,$=Y>y&&(D?+D.apply(this,arguments):J(u*u+s*s)),w=_(un(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if($>y){var C=sn($/u*q(Y)),K=sn($/s*q(Y));(P-=C*2)>y?(C*=t?1:-1,R+=C,T-=C):(P=0,R=T=(f+c)/2),(S-=K*2)>y?(K*=t?1:-1,m+=K,g-=K):(S=0,m=g=(f+c)/2)}var G=s*F(m),H=s*q(m),L=u*F(T),M=u*q(T);if(w>y){var N=s*F(g),Q=s*q(g),V=u*F(R),W=u*q(R),E;if(B<rn)if(E=pn(G,H,V,W,N,Q,L,M)){var X=G-E[0],Z=H-E[1],b=N-E[0],k=Q-E[1],nn=1/q(on((X*b+Z*k)/(J(X*X+Z*Z)*J(b*b+k*k)))/2),en=J(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=U(V,W,G,H,s,x,t),r=U(N,Q,L,M,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(G,H),a.arc(0,0,s,m,g,!t)):a.moveTo(G,H),!(u>y)||!(P>y)?a.lineTo(L,M):p>y?(e=U(L,M,N,Q,u,-p,t),r=U(G,H,V,W,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-rn/2;return[F(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:j(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:j(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:j(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:j(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:j(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:j(+n),i):A},i.padAngle=function(n){return arguments.length?(z=typeof n=="function"?n:j(+n),i):z},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
|