bigpowers 2.86.1 → 2.86.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.
Files changed (59) hide show
  1. package/.agents/skills/security-review/SKILL.md +3 -1
  2. package/.agents/skills/smoke-test/SKILL.md +1 -1
  3. package/.agents/skills/wire-ci/SKILL.md +78 -59
  4. package/.codebuddy/skills/security-review/SKILL.md +3 -1
  5. package/.codebuddy/skills/smoke-test/SKILL.md +1 -1
  6. package/.codebuddy/skills/wire-ci/SKILL.md +78 -59
  7. package/.codex/skills/security-review/SKILL.md +3 -1
  8. package/.codex/skills/smoke-test/SKILL.md +1 -1
  9. package/.codex/skills/wire-ci/SKILL.md +78 -59
  10. package/.hermes/skills/security-review/SKILL.md +3 -1
  11. package/.hermes/skills/smoke-test/SKILL.md +1 -1
  12. package/.hermes/skills/wire-ci/SKILL.md +78 -59
  13. package/.kilocode/rules/security-review.md +3 -1
  14. package/.kilocode/rules/smoke-test.md +1 -1
  15. package/.kilocode/rules/wire-ci.md +78 -59
  16. package/.mimocode/skills/security-review/SKILL.md +3 -1
  17. package/.mimocode/skills/smoke-test/SKILL.md +1 -1
  18. package/.mimocode/skills/wire-ci/SKILL.md +78 -59
  19. package/.pi/package.json +1 -1
  20. package/.pi/prompts/security-review.md +3 -1
  21. package/.pi/prompts/smoke-test.md +1 -1
  22. package/.pi/prompts/wire-ci.md +78 -59
  23. package/.pi/skills/security-review/SKILL.md +3 -1
  24. package/.pi/skills/smoke-test/SKILL.md +1 -1
  25. package/.pi/skills/wire-ci/SKILL.md +78 -59
  26. package/.trae/skills/security-review/SKILL.md +3 -1
  27. package/.trae/skills/smoke-test/SKILL.md +1 -1
  28. package/.trae/skills/wire-ci/SKILL.md +78 -59
  29. package/.windsurf/rules/security-review.md +3 -1
  30. package/.windsurf/rules/smoke-test.md +1 -1
  31. package/.windsurf/rules/wire-ci.md +78 -59
  32. package/.zcode/skills/security-review/SKILL.md +3 -1
  33. package/.zcode/skills/smoke-test/SKILL.md +1 -1
  34. package/.zcode/skills/wire-ci/SKILL.md +78 -59
  35. package/CHANGELOG.md +21 -0
  36. package/SKILL-INDEX.md +1 -1
  37. package/package.json +1 -1
  38. package/scripts/lib/__pycache__/link_utils.cpython-312.pyc +0 -0
  39. package/scripts/lib/__pycache__/srp_engine_links.cpython-312.pyc +0 -0
  40. package/scripts/lib/context-wire.sh +9 -0
  41. package/scripts/lib/detect-forge.sh +105 -0
  42. package/scripts/lib/extract-story-verify.py +102 -0
  43. package/scripts/lib/fail-open-detect.sh +67 -0
  44. package/scripts/lib/golden-suite-gates.sh +4 -0
  45. package/scripts/lib/plan-consistency-check.sh +26 -2
  46. package/scripts/lib/test-assertions.sh +11 -1
  47. package/scripts/run-skill-verify.sh +5 -46
  48. package/scripts/run-story-verify.sh +208 -0
  49. package/scripts/test-adapters.sh +14 -8
  50. package/scripts/verify-cwe-fixture-sync.sh +88 -0
  51. package/scripts/verify-install.sh +13 -1
  52. package/scripts/wire-ci.sh +159 -0
  53. package/skills/security-review/SKILL.md +3 -1
  54. package/skills/security-review/fixtures/CWE-639-idor-negative.go +48 -0
  55. package/skills/security-review/fixtures/CWE-639-idor-positive.go +29 -0
  56. package/skills/smoke-test/SKILL.md +1 -1
  57. package/skills/wire-ci/REFERENCE.md +15 -4
  58. package/skills/wire-ci/SKILL.md +63 -55
  59. package/skills-lock.json +4 -4
@@ -81,4 +81,4 @@ Part of **★ VERIFY ★**: `verify-work` → `validate-contracts` → `smoke-te
81
81
 
82
82
  ## Verify
83
83
 
84
- → verify: `test -x scripts/run-smoke.sh && grep -q 'run-smoke.sh' skills/smoke-test/SKILL.md && grep -qv 'See \[REFERENCE.md\]' skills/smoke-test/SKILL.md && echo OK`
84
+ → verify: `test -x scripts/run-smoke.sh && grep -q 'run-smoke.sh' skills/smoke-test/SKILL.md && ! grep -q 'See \[REFERENCE.md\](REFERENCE.md)$' skills/smoke-test/SKILL.md && echo OK`
@@ -16,19 +16,26 @@
16
16
  ### Create CI for a Go project (TBR + optional deploy)
17
17
 
18
18
  ```bash
19
- # Copy org templates
20
- cp ~/Developer/.github/workflow-templates/test-build-release-go.yml .github/workflows/test-build-release.yml
21
- cp ~/Developer/.github/workflow-templates/deploy-go.yml .github/workflows/deploy.yml
19
+ # Resolve forge + stack, then apply the bundled template
20
+ bash scripts/wire-ci.sh --detect
21
+ bash scripts/wire-ci.sh --apply
22
22
 
23
23
  wire-ci --validate
24
24
  wire-ci --dry-run
25
25
  ```
26
26
 
27
+ To use your own org templates instead of the bundled ones:
28
+
29
+ ```bash
30
+ BIGPOWERS_CI_TEMPLATES=/path/to/your/templates bash scripts/wire-ci.sh --apply
31
+ ```
32
+
27
33
  ### Create CI for a CLI tool (TBR only, no deploy)
28
34
 
29
35
  ```bash
30
- cp ~/Developer/.github/workflow-templates/test-build-release-go.yml .github/workflows/test-build-release.yml
36
+ bash scripts/wire-ci.sh --apply
31
37
  # Edit release job to download build artifact — see big-release dogfood
38
+ # CLI/library repos: delete deploy.yml; the release job is terminal.
32
39
 
33
40
  wire-ci --validate
34
41
  ```
@@ -172,6 +179,10 @@ jobs:
172
179
  github-token: ${{ secrets.GITHUB_TOKEN }}
173
180
  run-id: ${{ github.event.workflow_run.id }}
174
181
  path: deploy-meta
182
+ # BigBase-specific composite action, not a bigpowers default: this deploy
183
+ # example targets the author's own hosting stack. Replace it with your
184
+ # platform's deploy step (or drop the deploy job entirely for CLI and
185
+ # library repos). bigpowers itself ships no deploy templates. (GH #104)
175
186
  - uses: danielvm-git/.github/actions/bigbase-deploy@9c56ac10c629f3baa110ddb19136579e3c90d690 # v1
176
187
  with:
177
188
  site_id: ${{ secrets.BIGBASE_SITE_ID }}
@@ -1,103 +1,111 @@
1
1
  ---
2
2
  name: wire-ci
3
- description: "CI pipeline setup with pre-built templates and local validation. Generates GitHub Actions workflows, validates YAML syntax and permissions, supports dry-run via act/gh. The CI equivalent of wire-observability."
3
+ description: "CI pipeline setup with bundled, forge-neutral templates and local validation. Detects the forge from the git remote, generates workflows for supported forges, and skips honestly for the rest. The CI equivalent of wire-observability."
4
4
  model: sonnet
5
5
  effort: standard
6
6
  ---
7
7
 
8
8
  # Wire CI
9
9
 
10
- > **HARD GATE** — Do not ship a project without CI. Run this skill before first merge to main or when adding CI to an existing project.
10
+ > **HARD GATE (supported forges only)** — Do not ship a project without CI. Run this skill before first merge to main.
11
+ >
12
+ > On a forge bigpowers ships no templates for, this skill **is not a gate**: it reports the forge, explains what it cannot do, and exits 3. A gate that cannot run must not claim it did. See § Unsupported forges.
11
13
  >
12
14
  > **HARD GATE** — CI that is untestable locally will break every cycle. Always run `--validate` after generating workflows and `--dry-run` before pushing.
13
15
 
14
- Generate, validate, and test CI workflows. Detects your project type, copies org templates from `danielvm-git/.github/workflow-templates/`, and provides local verification to catch auth, permissions, and syntax issues before they reach CI.
16
+ Generate, validate, and test CI workflows. Detects the forge and project type, copies a **bundled** template, and verifies locally before anything reaches CI.
15
17
 
16
- ## What this sets up
18
+ ## Forge resolution
17
19
 
18
- 1. **Test Build Release workflow** — `.github/workflows/test-build-release.yml` with lint → test → build → release (single pipeline, `needs:` chain)
19
- 2. **Deploy workflow** — `.github/workflows/deploy.yml` triggered via `workflow_run` (BigBase/Pages stacks only; CLI/library repos omit this)
20
- 3. **`--validate` mode** — checks YAML syntax, workflow permissions, required secrets, and common pitfalls
21
- 4. **`--dry-run` mode** — runs workflows locally via `act` or `gh workflow run` to prove correctness before push
22
- 5. **Failure pattern documentation** — common CI failure categories and their fixes
20
+ `scripts/lib/detect-forge.sh` resolves the forge, first match wins: `BIGPOWERS_FORGE` env var → `forge:` in `specs/forge.yaml` → the `origin` remote URL → `unknown`.
23
21
 
24
- ## Process
22
+ ```bash
23
+ bash scripts/wire-ci.sh --detect # report forge + stack, write nothing
24
+ bash scripts/wire-ci.sh --plan # show the template that would be used
25
+ bash scripts/wire-ci.sh --apply # write the workflow
26
+ ```
25
27
 
26
- ### 1. Detect project type
28
+ GitHub ships templates (`.github/workflows/`). GitLab, Bitbucket, Codeberg, and Gitea are detected but **unsupported** — `--apply` writes nothing and exits 3.
27
29
 
28
- Read the project root for manifest files to determine which template pair to copy:
30
+ ## Template source — configurable, bundled by default
29
31
 
30
- | Manifest | Type | Template pair (from `.github` repo) |
31
- |----------|------|-------------------------------------|
32
- | `Cargo.toml` | Rust | `test-build-release-monorepo.yml` + `deploy-monorepo.yml` (or monorepo subset) |
33
- | `package.json` | Node | `test-build-release-node.yml` + `deploy-node.yml` |
34
- | `setup.py` / `pyproject.toml` | Python | `test-build-release-python.yml` + `deploy-python.yml` |
35
- | `go.mod` | Go | `test-build-release-go.yml` + `deploy-go.yml` |
36
- | Static site (no server) | Static | `test-build-release-static.yml` + `deploy-static.yml` |
37
- | `Package.swift` | Swift | `test-build-release-swift.yml` only (no deploy yet) |
38
- | Multiple detected | Polyglot | `test-build-release-monorepo.yml` + `deploy-monorepo.yml` |
32
+ Templates live in `docs/templates/ci/<forge>/` **inside the bigpowers package**, so there is no network dependency on any third party's repository. Override with `BIGPOWERS_CI_TEMPLATES=/path/to/your/templates`, laid out as `<root>/<forge>/test-build-release-<stack>.yml`.
39
33
 
40
- **CLI/library repos** (no hosted target): copy only `test-build-release-<stack>.yml` → `test-build-release.yml`. The `release` job is terminal; skip `deploy.yml`. See `docs/how-to/migrate-ci-cd/migration-plan.md` § CLI and library repos.
34
+ ## What this sets up
41
35
 
42
- If no manifest is found, prompt the user to specify the type or pass `--type <rust|node|python|go|static|swift>`.
36
+ 1. **Test Build Release workflow** — lint → test → build → release in one `needs:` chain
37
+ 2. **`--validate` mode** — YAML syntax, workflow permissions, required secrets, common pitfalls
38
+ 3. **`--dry-run` mode** — runs workflows locally via `act` before push
39
+ 4. **Failure pattern documentation** — see the table below
43
40
 
44
- ### 2. Copy test-build-release template
41
+ Deploy workflows are **not** bundled: they are platform-specific. See [REFERENCE.md](REFERENCE.md) for a worked example.
45
42
 
46
- Copy the matching template from `~/Developer/.github/workflow-templates/` to `.github/workflows/test-build-release.yml`. **Do not rename the workflow `name:` field** — deploy listens for `"Test Build Release"`.
43
+ ## Process
47
44
 
48
- Edit placeholders: `APP_TYPE`, `SITE_URL`, language versions.
45
+ ### 1. Detect forge and stack
49
46
 
50
- See [REFERENCE.md](REFERENCE.md) for stack-specific job shapes.
47
+ ```bash
48
+ bash scripts/wire-ci.sh --detect
49
+ ```
51
50
 
52
- ### 3. Copy deploy template (hosted stacks only)
51
+ Stack detection reads the project root:
53
52
 
54
- If the project deploys to BigBase or GitHub Pages:
53
+ | Manifest | Stack | Bundled template |
54
+ |----------|-------|------------------|
55
+ | `Cargo.toml` | Rust | `test-build-release-rust.yml` |
56
+ | `package.json` | Node | `test-build-release-node.yml` |
57
+ | `pyproject.toml` / `setup.py` | Python | `test-build-release-python.yml` |
58
+ | `go.mod` | Go | `test-build-release-go.yml` |
59
+
60
+ No recognized manifest → exit 3 with the list of manifests it looked for. Do not guess.
61
+
62
+ ### 2. Apply the template
55
63
 
56
64
  ```bash
57
- cp ~/Developer/.github/workflow-templates/deploy-${STACK}.yml .github/workflows/deploy.yml
65
+ bash scripts/wire-ci.sh --apply
58
66
  ```
59
67
 
60
- Configure `BIGBASE_SITE_ID`, `BIGBASE_DEPLOY_TOKEN`, and matching `SITE_URL`. Deploy runs via `workflow_run` after TBR succeeds on `main` with `cancel-in-progress: false`.
68
+ **Do not rename the workflow `name:` field** — deploy listens for `"Test Build Release"`.
61
69
 
62
- Skip this step for CLI/library repos.
70
+ Edit placeholders after copying: language versions, `APP_TYPE`, `SITE_URL`.
63
71
 
64
- ### 4. Validate workflows (`--validate`)
72
+ ### 3. Unsupported forges
65
73
 
66
- Run `wire-ci --validate` to check all generated workflow files:
74
+ `--apply` writes nothing and exits 3. Your options, in the order the runner prints them:
67
75
 
68
- See [REFERENCE.md](REFERENCE.md)
76
+ - point `BIGPOWERS_CI_TEMPLATES` at templates for your forge
77
+ - pin `forge: github` in `specs/forge.yaml` if the remote is misdetected
78
+ - write the CI config by hand
69
79
 
70
- **Exit codes:**
71
- - `0` — all checks pass (no errors)
72
- - `1` — YAML syntax errors found
73
- - `2` — validation warnings only (missing permissions, secrets, etc.)
80
+ Contributing a `docs/templates/ci/gitlab/` set and adding `gitlab` to `FORGE_SUPPORTED_LIST` is the natural next slice — per-forge command mapping (`gh pr checks` → `glab ci status`) is not implemented yet.
74
81
 
75
- ### 5. Dry-run workflows (`--dry-run`)
82
+ ### 4. Validate workflows (`--validate`)
83
+
84
+ See [REFERENCE.md](REFERENCE.md). Exit codes: `0` clean, `1` YAML syntax errors, `2` warnings only.
76
85
 
77
- Attempt to run the generated workflows locally to catch errors before push:
86
+ ### 5. Dry-run workflows (`--dry-run`)
78
87
 
79
- See [REFERENCE.md](REFERENCE.md)
88
+ See [REFERENCE.md](REFERENCE.md).
80
89
 
81
90
  > **act** runs workflows in a local Docker environment — the most accurate pre-push validation.
82
- > **gh workflow run** sends the workflow to GitHub but doesn't execute locally — useful for checking YAML parsing but not for testing the actual steps.
91
+ > **gh workflow run** sends the workflow to GitHub but does not execute locally.
83
92
 
84
93
  ### 6. Document common CI failure patterns
85
94
 
86
- Add the following to the project's documentation or CLAUDE.md after setup:
87
-
88
95
  | Failure | Cause | Fix |
89
96
  |---------|-------|-----|
90
- | `npm publish` fails | `NPM_TOKEN` not set as repo secret | Add `NPM_TOKEN` to GitHub repo secrets |
91
- | `semantic-release` fails on push | Missing `permissions: contents: write` | Add `permissions: contents: write` to release job |
92
- | `cargo publish` auth fail | `CARGO_REGISTRY_TOKEN` not set | Add token to `~/.cargo/config.toml` or env |
93
- | `go vet` fails | Go version mismatch | Match `go.mod` `go` directive with setup-go version |
94
- | `cargo clippy` errors | New lints in Rust nightly | `cargo clippy --fix` or allow specific lints |
95
- | `act` not found | Docker not running or act not installed | `brew install act` / `docker ps` to verify Docker |
96
- | Hardcoded Node version stale | `.nvmrc` exists but workflow uses hardcoded version | Use `node-version-file: .nvmrc` instead |
97
- | Deploy never runs | TBR workflow renamed | Keep `name: Test Build Release` in test-build-release.yml |
98
- | Release rebuilds binary | Artifact not downloaded | `release` job must `download-artifact` from `build` |
97
+ | `npm publish` fails | `NPM_TOKEN` not set as repo secret | Add `NPM_TOKEN` to repo secrets |
98
+ | `semantic-release` fails on push | Missing `permissions: contents: write` | Add it to the release job |
99
+ | `cargo publish` auth fail | `CARGO_REGISTRY_TOKEN` not set | Add token to env or `~/.cargo/config.toml` |
100
+ | `go vet` fails | Go version mismatch | Use `go-version-file: go.mod` |
101
+ | `cargo clippy` errors | New nightly lints | Pin the toolchain; `cargo clippy --fix` |
102
+ | `act` not found | Docker not running or act missing | `brew install act`; `docker ps` |
103
+ | Hardcoded Node version stale | `.nvmrc` exists but workflow hardcodes | Use `node-version-file: .nvmrc` |
104
+ | Deploy never runs | TBR workflow renamed | Keep `name: Test Build Release` |
105
+ | Release rebuilds binary | Artifact not downloaded | `release` must `download-artifact` from `build` |
99
106
 
100
107
  ## Verify
101
108
 
102
- → verify: `test -f skills/wire-ci/REFERENCE.md && test -f .github/workflows/sync-skills.yml`
109
+ → verify: `bash scripts/wire-ci.sh --self-test`
110
+ → verify: `test -f docs/templates/ci/github/test-build-release-node.yml && test -f scripts/lib/detect-forge.sh`
103
111
  → verify: `grep -q wire-ci SKILL-INDEX.md`
package/skills-lock.json CHANGED
@@ -303,7 +303,7 @@
303
303
  },
304
304
  "security-review": {
305
305
  "description": ">",
306
- "sha256": "0265010d9bd22e27",
306
+ "sha256": "3d046f443689fc1e",
307
307
  "path": "skills/security-reviewSKILL.md"
308
308
  },
309
309
  "seed-conventions": {
@@ -333,7 +333,7 @@
333
333
  },
334
334
  "smoke-test": {
335
335
  "description": "\"Post-deploy health-check against a live URL. Validates HTTP status, response content, and critical endpoints. Runnable standalone OR as the final step of the deploy skill.\"",
336
- "sha256": "f75e9e57d4003209",
336
+ "sha256": "050170d66ada581e",
337
337
  "path": "skills/smoke-testSKILL.md"
338
338
  },
339
339
  "spike-prototype": {
@@ -387,8 +387,8 @@
387
387
  "path": "skills/visual-dashboardSKILL.md"
388
388
  },
389
389
  "wire-ci": {
390
- "description": "\"CI pipeline setup with pre-built templates and local validation. Generates GitHub Actions workflows, validates YAML syntax and permissions, supports dry-run via act/gh. The CI equivalent of wire-observability.\"",
391
- "sha256": "7d661e394662e35c",
390
+ "description": "\"CI pipeline setup with bundled, forge-neutral templates and local validation. Detects the forge from the git remote, generates workflows for supported forges, and skips honestly for the rest. The CI equivalent of wire-observability.\"",
391
+ "sha256": "4b37294c95eabdad",
392
392
  "path": "skills/wire-ciSKILL.md"
393
393
  },
394
394
  "wire-observability": {