@jenga-ai/agent 1.3.0 → 3.0.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/README.md +93 -256
- package/agents/developer.md +9 -8
- package/agents/scrum-master.md +57 -23
- package/agents/tester.md +51 -5
- package/hooks/on_session_end.sh +13 -1
- package/lib/generate-agent-context.js +18 -1
- package/lib/generate-copilot-instructions.js +18 -1
- package/lib/generate-skill-allow-list.js +197 -0
- package/lib/skill-allow-list.json +42 -0
- package/package.json +17 -13
- package/scripts/apply-j-prefix.sh +243 -0
- package/scripts/consume-context-digest.sh +103 -0
- package/scripts/generate-j-alias.sh +333 -0
- package/scripts/postinstall.js +25 -0
- package/scripts/sweep-stale-context-digests.sh +132 -0
- package/scripts/validate-board.sh +5 -0
- package/scripts/write-context-digest.sh +230 -0
- package/skills/{brainstorm → j-brainstorm}/SKILL.md +9 -2
- package/skills/{btw → j-btw}/SKILL.md +9 -2
- package/skills/{clearify → j-clearify}/SKILL.md +9 -2
- package/skills/{close-story → j-close-story}/SKILL.md +92 -13
- package/skills/j-close-story/scripts/check-privatized.sh +345 -0
- package/skills/{close-story → j-close-story}/scripts/check-story-closeable.sh +1 -1
- package/skills/{close-story → j-close-story}/scripts/extract-task-diff-stats.sh +1 -1
- package/skills/{commit → j-commit}/SKILL.md +9 -2
- package/skills/j-continue/SKILL.md +36 -0
- package/skills/{deep-dive → j-deep-dive}/SKILL.md +9 -8
- package/skills/{dev-done → j-dev-done}/SKILL.md +11 -4
- package/skills/{dev-done → j-dev-done}/scripts/classify-commit-outcome.sh +4 -4
- package/skills/{distribute → j-distribute}/SKILL.md +17 -10
- package/skills/{distribute → j-distribute}/scripts/distribute-changes.sh +1 -1
- package/skills/{do → j-do}/SKILL.md +111 -14
- package/skills/j-doc/README.md +155 -0
- package/skills/{doc → j-doc}/SKILL.md +55 -18
- package/skills/j-doc/authoring-notes.md +72 -0
- package/skills/j-doc/scripts/resolve_last_update.py +149 -0
- package/skills/{doc-sync → j-doc-sync}/SKILL.md +9 -2
- package/skills/{dooo → j-dooo}/SKILL.md +9 -2
- package/skills/j-error/SKILL.md +36 -0
- package/skills/{evaluate → j-evaluate}/SKILL.md +9 -2
- package/skills/j-examplify/SKILL.md +49 -0
- package/skills/{help → j-help}/SKILL.md +9 -2
- package/skills/{idea → j-idea}/SKILL.md +10 -3
- package/skills/{idea → j-idea}/assets/idea_handoff_template.md +1 -1
- package/skills/{improve → j-improve}/SKILL.md +9 -2
- package/skills/{init → j-init}/SKILL.md +21 -8
- package/skills/j-init/assets/scope-thresholds_template.json +7 -0
- package/skills/j-jbp/SKILL.md +32 -0
- package/skills/j-lgtm/SKILL.md +28 -0
- package/skills/{pi-plan → j-pi-plan}/SKILL.md +10 -3
- package/skills/{proceed → j-proceed}/SKILL.md +9 -2
- package/skills/{publish → j-publish}/SKILL.md +47 -40
- package/skills/{publish → j-publish}/adapters/droplet.md +1 -1
- package/skills/{publish → j-publish}/adapters/mobile-ios.md +3 -3
- package/skills/{publish → j-publish}/adapters/npm-ci.md +29 -7
- package/skills/{publish → j-publish}/adapters/npm.md +8 -8
- package/skills/{publish → j-publish}/assets/ci-contract.md +2 -2
- package/skills/{publish → j-publish}/schemas/publish.schema.json +1 -1
- package/skills/{publish → j-publish}/scripts/npm_ci_pipeline.sh +21 -1
- package/skills/{publish → j-publish}/scripts/npm_stage_inspect.sh +34 -1
- package/skills/{publish → j-publish}/scripts/npm_stage_pipeline.sh +9 -4
- package/skills/{publish → j-publish}/scripts/publish_deploy.sh +4 -4
- package/skills/{publish → j-publish}/scripts/validate_npm_stage_env.sh +1 -1
- package/skills/{publish → j-publish}/wizards/droplet.md +1 -1
- package/skills/{publish → j-publish}/wizards/mobile-ios.md +1 -1
- package/skills/{publish → j-publish}/wizards/npm-ci.md +1 -1
- package/skills/{publish → j-publish}/wizards/npm.md +1 -1
- package/skills/{reconcile → j-reconcile}/SKILL.md +12 -5
- package/skills/{reconcile → j-reconcile}/scripts/detect-unlinked-code.sh +2 -2
- package/skills/{reconcile → j-reconcile}/scripts/resolve-reconcile-scope.sh +3 -3
- package/skills/{reconcile-origin → j-reconcile-origin}/SKILL.md +13 -6
- package/skills/{redo → j-redo}/SKILL.md +9 -2
- package/skills/{skillify → j-skillify}/SKILL.md +10 -3
- package/skills/{spinoff → j-spinoff}/SKILL.md +9 -2
- package/skills/{status → j-status}/SKILL.md +9 -2
- package/skills/j-todo/SKILL.md +92 -0
- package/skills/{todo → j-todo}/assets/todo_handoff_template.md +1 -1
- package/skills/j-todo/scripts/add_trivial_task.sh +216 -0
- package/skills/j-todo/scripts/update_story_tasks.py +87 -0
- package/skills/{uncharted → j-uncharted}/SKILL.md +35 -28
- package/skills/{uncharted → j-uncharted}/assets/UNDERSTANDING_DOC_TEMPLATE.md +2 -2
- package/skills/{uncharted → j-uncharted}/scripts/detect-dependencies.sh +1 -1
- package/skills/{uncharted → j-uncharted}/scripts/detect-tests.sh +1 -1
- package/skills/{uncharted → j-uncharted}/scripts/directory-triage.sh +3 -3
- package/skills/{uncharted → j-uncharted}/scripts/elicitation-state.sh +3 -3
- package/skills/{uncharted → j-uncharted}/scripts/enumerate-target.sh +1 -1
- package/skills/{uncharted → j-uncharted}/scripts/import-source.sh +1 -1
- package/skills/{uncharted → j-uncharted}/scripts/inspect-provenance.sh +1 -1
- package/skills/{uncharted → j-uncharted}/scripts/resolve-segment-target.sh +5 -5
- package/skills/{uncharted → j-uncharted}/scripts/run-engine.sh +1 -1
- package/skills/{uncharted → j-uncharted}/scripts/validate-proposed-items.sh +2 -2
- package/skills/{uncharted → j-uncharted}/scripts/write-backfilled-epics.sh +1 -1
- package/skills/j-wtf/SKILL.md +27 -0
- package/skills/jenga/SKILL.md +1 -1
- package/skills/jenga/scripts/render-confirmation.sh +55 -18
- package/skills/jenga-permission-level/SKILL.md +1 -1
- package/templates/SCRUM_BOARD_SCHEMA.md +33 -2
- package/templates/agent-context.md.tpl +32 -9
- package/templates/copilot-instructions.md.tpl +66 -11
- package/skills/continue/SKILL.md +0 -29
- package/skills/error/SKILL.md +0 -29
- package/skills/examplify/SKILL.md +0 -42
- package/skills/init/assets/scope-thresholds_template.json +0 -7
- package/skills/jbp/SKILL.md +0 -25
- package/skills/lgtm/SKILL.md +0 -21
- package/skills/todo/SKILL.md +0 -48
- package/skills/wtf/SKILL.md +0 -20
- /package/skills/{close-story → j-close-story}/scripts/compute-scope-divergence.sh +0 -0
- /package/skills/{close-story → j-close-story}/scripts/extract-diff-stats.sh +0 -0
- /package/skills/{close-story → j-close-story}/scripts/update-task-frontmatter.sh +0 -0
- /package/skills/{commit → j-commit}/assets/user_instructions_template.md +0 -0
- /package/skills/{distribute → j-distribute}/CONFIG_SCHEMA.md +0 -0
- /package/skills/{distribute → j-distribute}/scripts/check-version.sh +0 -0
- /package/skills/{distribute → j-distribute}/scripts/commit-version-bump.sh +0 -0
- /package/skills/{do → j-do}/assets/intent-vs-diff-prompt.md +0 -0
- /package/skills/{do → j-do}/assets/sender_template.json +0 -0
- /package/skills/{doc → j-doc}/assets/path-objectives.yaml +0 -0
- /package/skills/{doc-sync → j-doc-sync}/assets/default_excludes.txt +0 -0
- /package/skills/{doc-sync → j-doc-sync}/assets/doc_targets.md +0 -0
- /package/skills/{evaluate → j-evaluate}/assets/evaluation_invokation_template.yml +0 -0
- /package/skills/{evaluate → j-evaluate}/assets/evaluation_rapport_template.md +0 -0
- /package/skills/{idea → j-idea}/assets/idea_template.md +0 -0
- /package/skills/{init → j-init}/assets/.gitignore_template +0 -0
- /package/skills/{init → j-init}/assets/PROJECT_SUMMARY_template.md +0 -0
- /package/skills/{init → j-init}/assets/directory_structure.txt +0 -0
- /package/skills/{init → j-init}/assets/strategy_stub_template.md +0 -0
- /package/skills/{init → j-init}/assets/test-config_template.json +0 -0
- /package/skills/{init → j-init}/assets/workflow_template.json +0 -0
- /package/skills/{init → j-init}/scripts/apply-project-visibility.sh +0 -0
- /package/skills/{init → j-init}/scripts/detect-existing-codebase.sh +0 -0
- /package/skills/{init → j-init}/scripts/init.sh +0 -0
- /package/skills/{pi-plan → j-pi-plan}/assets/epic.json +0 -0
- /package/skills/{pi-plan → j-pi-plan}/assets/story_template.md +0 -0
- /package/skills/{publish → j-publish}/assets/ExportOptions.plist.template +0 -0
- /package/skills/{publish → j-publish}/assets/ownership-matrix.md +0 -0
- /package/skills/{publish → j-publish}/assets/publish.example.json +0 -0
- /package/skills/{publish → j-publish}/assets/publish.example.npm-ci.json +0 -0
- /package/skills/{publish → j-publish}/assets/publish.example.npm.json +0 -0
- /package/skills/{publish → j-publish}/assets/secrets-guide.md +0 -0
- /package/skills/{publish → j-publish}/schemas/fixtures/npm-ci-minimal.json +0 -0
- /package/skills/{publish → j-publish}/schemas/fixtures/npm-ci-with-empty-secrets.json +0 -0
- /package/skills/{publish → j-publish}/schemas/fixtures/npm-ci-with-workflow-path.json +0 -0
- /package/skills/{publish → j-publish}/scripts/check_target_config.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/droplet_pipeline.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/finalize_changelog.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/generate_release_notes.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/ios_pipeline.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/npm_pipeline.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/publish_common.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/reconcile_tags.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/run_gates.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/setup_wizard.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/show_history.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/suggest_semver_bump.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/validate_config.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/validate_droplet_env.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/validate_ios_env.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/validate_npm_ci_env.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/validate_npm_env.sh +0 -0
- /package/skills/{publish → j-publish}/scripts/write_ledger_entry.sh +0 -0
- /package/skills/{reconcile → j-reconcile}/assets/report_format.md +0 -0
- /package/skills/{reconcile-origin → j-reconcile-origin}/scripts/reconcile-origin.sh +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-new/SKILL.md +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-new/assets/.gitignore_template +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-new/assets/PROJECT_SUMMARY_template.md +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-new/assets/directory_structure.txt +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-new/assets/test-config_template.json +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-new/assets/workflow_template.json +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-new/scripts/init.sh +0 -0
- /package/skills/{skillify → j-skillify}/assets/init-old/SKILL.md +0 -0
- /package/skills/{status → j-status}/assets/output_format.md +0 -0
- /package/skills/{todo → j-todo}/assets/todo_template.md +0 -0
- /package/skills/{uncharted → j-uncharted}/assets/SEGMENT_PROPOSAL_TEMPLATE.md +0 -0
- /package/skills/{uncharted → j-uncharted}/scripts/apply-subsystem-cap.sh +0 -0
- /package/skills/{uncharted → j-uncharted}/scripts/discover-subsystems.sh +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: publish
|
|
3
|
-
description: Configure, validate, and orchestrate scaffolded release workflows through a single `/publish` entry point with bounded sub-commands.
|
|
2
|
+
name: j.publish
|
|
3
|
+
description: Polyfill alias of the publish skill under a collision-safe directory name. Identical behavior to /publish — Configure, validate, and orchestrate scaffolded release workflows through a single `/publish` entry point with bounded sub-commands. Use when the bare /publish form is shadowed by another tool's own built-in command of the same name.
|
|
4
4
|
keywords:
|
|
5
5
|
- publish
|
|
6
6
|
- deploy
|
|
@@ -11,6 +11,8 @@ keywords:
|
|
|
11
11
|
- release notes
|
|
12
12
|
- staged publishing
|
|
13
13
|
- stage
|
|
14
|
+
- j-publish
|
|
15
|
+
- polyfill
|
|
14
16
|
examples:
|
|
15
17
|
- "publish setup --target staging-appstore"
|
|
16
18
|
- "publish setup --type mobile-ios"
|
|
@@ -26,6 +28,7 @@ examples:
|
|
|
26
28
|
- "test a release before publishing"
|
|
27
29
|
- "publish stage --target npm-registry --dry-run"
|
|
28
30
|
- "approve a staged npm release"
|
|
31
|
+
- "j-publish"
|
|
29
32
|
metadata:
|
|
30
33
|
scope: multi-target-v2
|
|
31
34
|
primary_target: multi
|
|
@@ -39,13 +42,17 @@ metadata:
|
|
|
39
42
|
|
|
40
43
|
# Publish — Deployment Pipeline Orchestrator
|
|
41
44
|
|
|
45
|
+
This skill is a literal-directory-name duplicate of `skills/publish/`. It exists so that `/j-publish` (and `j.j-publish`) give a guaranteed-unshadowed way to reach the same flow as `/publish`, even if a host tool's own built-in command of the same name would otherwise shadow or override the bare `/publish` alias (Claude Code's native skill resolution is a literal-string, directory-name-based match — see `docs/skill-authoring.md`'s "Invocation Convention").
|
|
46
|
+
|
|
47
|
+
This file is generated/synced by `scripts/generate-j-alias.sh publish` from `skills/publish/SKILL.md` — do not hand-edit it; re-run the generator instead to pick up source changes.
|
|
48
|
+
|
|
42
49
|
`/publish` is the single entry point for release workflows in this repository. It wires configuration validation, setup, gated deployment, release-note drafting, and ledger history into one end-to-end flow, and dispatches the final publish step to a per-type adapter.
|
|
43
50
|
|
|
44
51
|
Four target types are currently supported:
|
|
45
52
|
|
|
46
53
|
- **`mobile-ios`** — publishes an iOS build to App Store Connect via the iOS adapter. See the [iOS App Store](#ios-app-store) section for iOS-specific configuration.
|
|
47
|
-
- **`npm`** — publishes a package to an npm registry via the npm adapter. See the npm adapter (`skills/publish/adapters/npm.md`) and the npm wizard (`skills/publish/wizards/npm.md`) for npm-specific configuration.
|
|
48
|
-
- **`npm-ci`** — publishes a package to npmjs.com via GitHub Actions OIDC (Trusted Publishers), with no `NPM_TOKEN` stored. The adapter generates a GitHub Actions workflow, commits it to the repository, and triggers it via `gh workflow run`. See the npm-ci adapter (`skills/publish/adapters/npm-ci.md`) and the npm-ci wizard (`skills/publish/wizards/npm-ci.md`) for configuration details.
|
|
54
|
+
- **`npm`** — publishes a package to an npm registry via the npm adapter. See the npm adapter (`skills/j-publish/adapters/npm.md`) and the npm wizard (`skills/j-publish/wizards/npm.md`) for npm-specific configuration.
|
|
55
|
+
- **`npm-ci`** — publishes a package to npmjs.com via GitHub Actions OIDC (Trusted Publishers), with no `NPM_TOKEN` stored. The adapter generates a GitHub Actions workflow, commits it to the repository, and triggers it via `gh workflow run`. See the npm-ci adapter (`skills/j-publish/adapters/npm-ci.md`) and the npm-ci wizard (`skills/j-publish/wizards/npm-ci.md`) for configuration details.
|
|
49
56
|
- **`droplet`** — deploys a website or app to any SSH-reachable Linux host (including DigitalOcean Droplets) using a generated GitHub Actions workflow. The workflow SSHes into the host, pulls the deploy branch, runs an optional build command, and restarts the service. See [Droplet (GitHub Actions → SSH)](#droplet-github-actions--ssh) for configuration details.
|
|
50
57
|
|
|
51
58
|
Every sub-command validates the config before doing anything else, so behaviour is identical regardless of which target type a project uses.
|
|
@@ -55,23 +62,23 @@ Every sub-command validates the config before doing anything else, so behaviour
|
|
|
55
62
|
Before any sub-command executes, validate the config with:
|
|
56
63
|
|
|
57
64
|
```bash
|
|
58
|
-
bash skills/publish/scripts/validate_config.sh <path-to-publish.json>
|
|
65
|
+
bash skills/j-publish/scripts/validate_config.sh <path-to-publish.json>
|
|
59
66
|
```
|
|
60
67
|
|
|
61
68
|
For deploy-oriented flows, validate the selected target with:
|
|
62
69
|
|
|
63
70
|
```bash
|
|
64
|
-
bash skills/publish/scripts/check_target_config.sh <target-name> <path-to-publish.json>
|
|
71
|
+
bash skills/j-publish/scripts/check_target_config.sh <target-name> <path-to-publish.json>
|
|
65
72
|
```
|
|
66
73
|
|
|
67
74
|
- Default config resolution: prefer repo-root `publish.json`, fall back to `project/configs/publish.json`
|
|
68
|
-
- Schema: `skills/publish/schemas/publish.schema.json`
|
|
69
|
-
- Example config: `skills/publish/assets/publish.example.json`
|
|
70
|
-
- Secrets guide: `skills/publish/assets/secrets-guide.md`
|
|
71
|
-
- Deploy contract and exit codes: `skills/publish/assets/ci-contract.md`
|
|
72
|
-
- iOS adapter template: `skills/publish/adapters/mobile-ios.md`
|
|
73
|
-
- npm adapter template: `skills/publish/adapters/npm.md`
|
|
74
|
-
- Ownership matrix: `skills/publish/assets/ownership-matrix.md`
|
|
75
|
+
- Schema: `skills/j-publish/schemas/publish.schema.json`
|
|
76
|
+
- Example config: `skills/j-publish/assets/publish.example.json`
|
|
77
|
+
- Secrets guide: `skills/j-publish/assets/secrets-guide.md`
|
|
78
|
+
- Deploy contract and exit codes: `skills/j-publish/assets/ci-contract.md`
|
|
79
|
+
- iOS adapter template: `skills/j-publish/adapters/mobile-ios.md`
|
|
80
|
+
- npm adapter template: `skills/j-publish/adapters/npm.md`
|
|
81
|
+
- Ownership matrix: `skills/j-publish/assets/ownership-matrix.md`
|
|
75
82
|
|
|
76
83
|
If config or env validation fails, the skill exits with code `4` and does not continue.
|
|
77
84
|
|
|
@@ -79,15 +86,15 @@ If config or env validation fails, the skill exits with code `4` and does not co
|
|
|
79
86
|
|
|
80
87
|
| Command | Purpose | Implementation script | Notes |
|
|
81
88
|
|---|---|---|---|
|
|
82
|
-
| `/publish setup` | Prepare or refresh target configuration | `skills/publish/scripts/setup_wizard.sh` | Supported types: `mobile-ios`, `npm`, `npm-ci`, `droplet` |
|
|
83
|
-
| `/publish deploy` | Run the full 11-step deploy orchestration | `skills/publish/scripts/publish_deploy.sh` | Dispatches to the adapter for the target's `type` (`mobile-ios`, `npm`, `npm-ci`, or `droplet`); `--dry-run` is honoured end-to-end |
|
|
84
|
-
| `/publish stage` | Stage an npm release into npm's staged-publishing area, smoke-test it in isolation, then approve or reject it | `skills/publish/scripts/npm_stage_pipeline.sh` (the `publish` sub-command) and `skills/publish/scripts/npm_stage_inspect.sh` (`list`, `view`, `download`, `test`, `approve`, `reject`) | Supported for `npm` and `npm-ci` target types only |
|
|
85
|
-
| `/publish history` | Read the canonical publish ledger | `skills/publish/scripts/show_history.sh` | Target-agnostic; filter by `--target <name>` |
|
|
86
|
-
| `/publish release-notes` | Merge new release notes into the standing `CHANGELOG.md` (or a standalone draft via `--output`) without publishing | `skills/publish/scripts/generate_release_notes.sh` | Target-agnostic |
|
|
89
|
+
| `/publish setup` | Prepare or refresh target configuration | `skills/j-publish/scripts/setup_wizard.sh` | Supported types: `mobile-ios`, `npm`, `npm-ci`, `droplet` |
|
|
90
|
+
| `/publish deploy` | Run the full 11-step deploy orchestration | `skills/j-publish/scripts/publish_deploy.sh` | Dispatches to the adapter for the target's `type` (`mobile-ios`, `npm`, `npm-ci`, or `droplet`); `--dry-run` is honoured end-to-end |
|
|
91
|
+
| `/publish stage` | Stage an npm release into npm's staged-publishing area, smoke-test it in isolation, then approve or reject it | `skills/j-publish/scripts/npm_stage_pipeline.sh` (the `publish` sub-command) and `skills/j-publish/scripts/npm_stage_inspect.sh` (`list`, `view`, `download`, `test`, `approve`, `reject`) | Supported for `npm` and `npm-ci` target types only |
|
|
92
|
+
| `/publish history` | Read the canonical publish ledger | `skills/j-publish/scripts/show_history.sh` | Target-agnostic; filter by `--target <name>` |
|
|
93
|
+
| `/publish release-notes` | Merge new release notes into the standing `CHANGELOG.md` (or a standalone draft via `--output`) without publishing | `skills/j-publish/scripts/generate_release_notes.sh` | Target-agnostic |
|
|
87
94
|
|
|
88
95
|
## Quality Gate Policy
|
|
89
96
|
|
|
90
|
-
The deploy flow invokes `skills/publish/scripts/run_gates.sh` at two fixed points:
|
|
97
|
+
The deploy flow invokes `skills/j-publish/scripts/run_gates.sh` at two fixed points:
|
|
91
98
|
|
|
92
99
|
1. **Pre-deploy:** `run_gates.sh pre <target> <publish.json> [--non-interactive]`
|
|
93
100
|
2. **Post-deploy:** `run_gates.sh post <target> <publish.json> [--non-interactive]`
|
|
@@ -98,7 +105,7 @@ The deploy flow invokes `skills/publish/scripts/run_gates.sh` at two fixed point
|
|
|
98
105
|
- Post-deploy gate failure records a `partial` publish result instead of rolling back the adapter upload
|
|
99
106
|
- `--non-interactive` suppresses retry prompts and aborts immediately on failure
|
|
100
107
|
|
|
101
|
-
See `skills/publish/assets/ci-contract.md` for the full quality-gate policy.
|
|
108
|
+
See `skills/j-publish/assets/ci-contract.md` for the full quality-gate policy.
|
|
102
109
|
|
|
103
110
|
## Usage Signatures
|
|
104
111
|
|
|
@@ -108,13 +115,13 @@ See `skills/publish/assets/ci-contract.md` for the full quality-gate policy.
|
|
|
108
115
|
/publish setup [<target>] [--type mobile-ios|npm|droplet] [--config <path>]
|
|
109
116
|
```
|
|
110
117
|
|
|
111
|
-
Implementation: `bash skills/publish/scripts/setup_wizard.sh [<target>] [--type <deployment_type>] [--config <path>]`
|
|
118
|
+
Implementation: `bash skills/j-publish/scripts/setup_wizard.sh [<target>] [--type <deployment_type>] [--config <path>]`
|
|
112
119
|
|
|
113
120
|
Wizard flow:
|
|
114
121
|
1. Resolve or prompt for the target name.
|
|
115
122
|
2. Resolve or prompt for the deployment type. Supported values: `mobile-ios`, `npm`, `droplet`.
|
|
116
|
-
3. Print the secrets guide path and the opening warning from `skills/publish/assets/secrets-guide.md`.
|
|
117
|
-
4. Load `skills/publish/wizards/<type>.md` and render each `## Question:` section as a prompt.
|
|
123
|
+
3. Print the secrets guide path and the opening warning from `skills/j-publish/assets/secrets-guide.md`.
|
|
124
|
+
4. Load `skills/j-publish/wizards/<type>.md` and render each `## Question:` section as a prompt.
|
|
118
125
|
5. Preview the generated target config as JSON.
|
|
119
126
|
6. Save on confirmation by merging or creating `publish.json`.
|
|
120
127
|
7. Validate the saved file with `validate_config.sh`; if validation fails, roll back the write.
|
|
@@ -140,7 +147,7 @@ Example invocations:
|
|
|
140
147
|
/publish deploy [--target <name>] [--config <path>] [--yes] [--dry-run] [--minor | --major] [--notes-file <path>]
|
|
141
148
|
```
|
|
142
149
|
|
|
143
|
-
Implementation: `bash skills/publish/scripts/publish_deploy.sh [flags...]`
|
|
150
|
+
Implementation: `bash skills/j-publish/scripts/publish_deploy.sh [flags...]`
|
|
144
151
|
|
|
145
152
|
Deploy flow:
|
|
146
153
|
1. Select the target from config or `--target`
|
|
@@ -217,8 +224,8 @@ All seven sub-commands:
|
|
|
217
224
|
|
|
218
225
|
Implementation:
|
|
219
226
|
|
|
220
|
-
- `publish` → `bash skills/publish/scripts/npm_stage_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive] [--otp <otp>]` — six ordered phases (validate, gates, pack, stage, capture, ledger); writes a `staged` ledger entry on success.
|
|
221
|
-
- `test`, `list`, `view`, `download`, `approve`, `reject` → `bash skills/publish/scripts/npm_stage_inspect.sh <sub> [args] [--config <path>] [--dry-run] [--json]`
|
|
227
|
+
- `publish` → `bash skills/j-publish/scripts/npm_stage_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive] [--otp <otp>]` — six ordered phases (validate, gates, pack, stage, capture, ledger); writes a `staged` ledger entry on success.
|
|
228
|
+
- `test`, `list`, `view`, `download`, `approve`, `reject` → `bash skills/j-publish/scripts/npm_stage_inspect.sh <sub> [args] [--config <path>] [--dry-run] [--json]`
|
|
222
229
|
- `test` downloads the exact staged tarball into an isolated scratch directory outside the repo, installs it, runs the target's `npm.stage.smoke_cmd` (or the documented default check), and writes a `stage_tested` ledger entry (`pass`/`fail`).
|
|
223
230
|
- `approve` refuses to run unless a passing `test` is on record for that exact stage id, unless `--force <reason>` is given; writes an `approved` ledger entry.
|
|
224
231
|
- `reject` is the discard path omitted from npm's own staged-publishing docs page — documented here so it stays discoverable; writes a `rejected` ledger entry.
|
|
@@ -242,7 +249,7 @@ instead of being caught by users after `npm publish`.
|
|
|
242
249
|
/publish history [--config <path>] [--limit <count>] [--target <name>] [--json]
|
|
243
250
|
```
|
|
244
251
|
|
|
245
|
-
Implementation: `bash skills/publish/scripts/show_history.sh [--limit <count>] [--target <name>] [--json] [--config <path>]`
|
|
252
|
+
Implementation: `bash skills/j-publish/scripts/show_history.sh [--limit <count>] [--target <name>] [--json] [--config <path>]`
|
|
246
253
|
|
|
247
254
|
### `/publish release-notes`
|
|
248
255
|
|
|
@@ -250,7 +257,7 @@ Implementation: `bash skills/publish/scripts/show_history.sh [--limit <count>] [
|
|
|
250
257
|
/publish release-notes --target <name> [--config <path>] [--from-tag <tag>] [--to-ref <git-ref>] [--output <path>]
|
|
251
258
|
```
|
|
252
259
|
|
|
253
|
-
Implementation: `bash skills/publish/scripts/generate_release_notes.sh [--target <name>] [--from-tag <tag>] [--to-ref <git-ref>] [--output <path>] [<publish_json_path>]`
|
|
260
|
+
Implementation: `bash skills/j-publish/scripts/generate_release_notes.sh [--target <name>] [--from-tag <tag>] [--to-ref <git-ref>] [--output <path>] [<publish_json_path>]`
|
|
254
261
|
|
|
255
262
|
Release-note rules:
|
|
256
263
|
- The last publish tag is the highest semver tag on the current branch that also has a matching ledger entry in `project/logs/publish-history.json`.
|
|
@@ -263,15 +270,15 @@ Release-note rules:
|
|
|
263
270
|
## Ledger & Tagging
|
|
264
271
|
|
|
265
272
|
- `project/logs/publish-history.json` is append-only. New publishes add new rows; existing rows are never edited in-place.
|
|
266
|
-
- `bash skills/publish/scripts/suggest_semver_bump.sh` suggests `major`, `minor`, or `patch` based on git history since the last ledger-backed publish tag.
|
|
267
|
-
- `bash skills/publish/scripts/write_ledger_entry.sh <target> <adapter> <platform_state> <notes_path> [--yes] [--dry-run] [--version <vX.Y.Z>] [--config <path>]` appends the canonical publish entry and creates the matching annotated git tag.
|
|
268
|
-
- `bash skills/publish/scripts/reconcile_tags.sh [--dry-run] [--config <path>]` repairs drift:
|
|
273
|
+
- `bash skills/j-publish/scripts/suggest_semver_bump.sh` suggests `major`, `minor`, or `patch` based on git history since the last ledger-backed publish tag.
|
|
274
|
+
- `bash skills/j-publish/scripts/write_ledger_entry.sh <target> <adapter> <platform_state> <notes_path> [--yes] [--dry-run] [--version <vX.Y.Z>] [--config <path>]` appends the canonical publish entry and creates the matching annotated git tag.
|
|
275
|
+
- `bash skills/j-publish/scripts/reconcile_tags.sh [--dry-run] [--config <path>]` repairs drift:
|
|
269
276
|
- git tag without ledger entry → append `partial` ledger row with note `Manually tagged without /publish`
|
|
270
277
|
- ledger entry without git tag → create the missing tag retroactively
|
|
271
278
|
|
|
272
279
|
## Agent Roles
|
|
273
280
|
|
|
274
|
-
See `skills/publish/assets/ownership-matrix.md` for the action-by-action ownership matrix.
|
|
281
|
+
See `skills/j-publish/assets/ownership-matrix.md` for the action-by-action ownership matrix.
|
|
275
282
|
|
|
276
283
|
Summary:
|
|
277
284
|
- **Developer** initiates `/publish setup`, `/publish deploy`, and release-note review
|
|
@@ -280,7 +287,7 @@ Summary:
|
|
|
280
287
|
|
|
281
288
|
## Configuration Model
|
|
282
289
|
|
|
283
|
-
The canonical config must validate against `skills/publish/schemas/publish.schema.json`.
|
|
290
|
+
The canonical config must validate against `skills/j-publish/schemas/publish.schema.json`.
|
|
284
291
|
|
|
285
292
|
### Required top-level structure
|
|
286
293
|
|
|
@@ -327,10 +334,10 @@ The iOS adapter trust boundary is explicit: publish-side external commands are l
|
|
|
327
334
|
|
|
328
335
|
The `npm` adapter publishes a Node package to an npm-compatible registry.
|
|
329
336
|
|
|
330
|
-
- Adapter template: `skills/publish/adapters/npm.md`
|
|
331
|
-
- Wizard template: `skills/publish/wizards/npm.md`
|
|
337
|
+
- Adapter template: `skills/j-publish/adapters/npm.md`
|
|
338
|
+
- Wizard template: `skills/j-publish/wizards/npm.md`
|
|
332
339
|
|
|
333
|
-
See those files for the required target fields (registry URL, access, tag, `--dry-run` behaviour) and env references. Additional npm-specific schema details are owned by the npm settings block in `skills/publish/schemas/publish.schema.json`.
|
|
340
|
+
See those files for the required target fields (registry URL, access, tag, `--dry-run` behaviour) and env references. Additional npm-specific schema details are owned by the npm settings block in `skills/j-publish/schemas/publish.schema.json`.
|
|
334
341
|
|
|
335
342
|
## npm CI (OIDC Trusted Publisher)
|
|
336
343
|
|
|
@@ -338,9 +345,9 @@ The `npm-ci` adapter publishes a Node package to npmjs.com via **GitHub Actions
|
|
|
338
345
|
|
|
339
346
|
> Use `npm` for local publishes with a token; use `npm-ci` for CI-only publishing with OIDC (no token required).
|
|
340
347
|
|
|
341
|
-
- Adapter template: `skills/publish/adapters/npm-ci.md`
|
|
342
|
-
- Wizard template: `skills/publish/wizards/npm-ci.md`
|
|
343
|
-
- Example config: `skills/publish/assets/publish.example.npm-ci.json`
|
|
348
|
+
- Adapter template: `skills/j-publish/adapters/npm-ci.md`
|
|
349
|
+
- Wizard template: `skills/j-publish/wizards/npm-ci.md`
|
|
350
|
+
- Example config: `skills/j-publish/assets/publish.example.npm-ci.json`
|
|
344
351
|
|
|
345
352
|
### Required target fields for `npm-ci`
|
|
346
353
|
|
|
@@ -400,7 +407,7 @@ The generated workflow reads these from GitHub Actions secrets:
|
|
|
400
407
|
- `DROPLET_SSH_KEY` (or value of `ssh_key_secret`) — private key contents
|
|
401
408
|
- `DROPLET_KNOWN_HOSTS` (or value of `known_hosts_secret`) — `ssh-keyscan` output
|
|
402
409
|
|
|
403
|
-
See `skills/publish/assets/secrets-guide.md` for setup instructions.
|
|
410
|
+
See `skills/j-publish/assets/secrets-guide.md` for setup instructions.
|
|
404
411
|
|
|
405
412
|
### First-run prerequisites (manual)
|
|
406
413
|
|
|
@@ -76,7 +76,7 @@ The `gh` CLI must be authenticated (`gh auth login`) before running
|
|
|
76
76
|
### Pipeline entrypoint
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
|
-
bash skills/publish/scripts/droplet_pipeline.sh \
|
|
79
|
+
bash skills/j-publish/scripts/droplet_pipeline.sh \
|
|
80
80
|
--target <name> \
|
|
81
81
|
--config <path-to-publish.json> \
|
|
82
82
|
[--dry-run]
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `mobile-ios` adapter drives the `/publish deploy` flow for iOS App Store targets.
|
|
4
4
|
It is a prompt/template contract for the agent layer and delegates concrete execution to
|
|
5
|
-
`skills/publish/scripts/ios_pipeline.sh`.
|
|
5
|
+
`skills/j-publish/scripts/ios_pipeline.sh`.
|
|
6
6
|
|
|
7
7
|
## Invocation Contract
|
|
8
8
|
|
|
@@ -43,13 +43,13 @@ The required env vars are:
|
|
|
43
43
|
Validate them before execution with:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
|
-
bash skills/publish/scripts/validate_ios_env.sh <path-to-publish.json>
|
|
46
|
+
bash skills/j-publish/scripts/validate_ios_env.sh <path-to-publish.json>
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
### Pipeline entrypoint
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
-
bash skills/publish/scripts/ios_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive]
|
|
52
|
+
bash skills/j-publish/scripts/ios_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive]
|
|
53
53
|
```
|
|
54
54
|
|
|
55
55
|
## Execution Phases
|
|
@@ -79,7 +79,7 @@ The `gh` CLI must be authenticated before running `/publish deploy` against an
|
|
|
79
79
|
### Pipeline entrypoint
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
|
-
bash skills/publish/scripts/npm_ci_pipeline.sh \
|
|
82
|
+
bash skills/j-publish/scripts/npm_ci_pipeline.sh \
|
|
83
83
|
--target <name> \
|
|
84
84
|
--config <path-to-publish.json> \
|
|
85
85
|
[--dry-run]
|
|
@@ -99,11 +99,33 @@ Run the adapter phases in this exact order:
|
|
|
99
99
|
```yaml
|
|
100
100
|
permissions:
|
|
101
101
|
id-token: write
|
|
102
|
-
contents:
|
|
102
|
+
contents: write
|
|
103
103
|
```
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
(`contents: write` — bumped from `read` — is required so the `publish` and
|
|
105
|
+
`stage` jobs can push the tags described below; this is the CI's own token
|
|
106
|
+
gaining write access to tag *its own* repository, nothing else, and no new
|
|
107
|
+
secret or credential is introduced) and runs `npm publish --provenance` to
|
|
108
|
+
attach a build provenance attestation to the published package. In
|
|
109
|
+
`--dry-run` mode, print the rendered YAML to stdout and exit 0 without
|
|
110
|
+
writing any file.
|
|
111
|
+
|
|
112
|
+
Each job also gains a final step, gated on `if: success()` so a failed
|
|
113
|
+
publish/stage never creates or moves a tag:
|
|
114
|
+
- **`publish` job — "Tag prod release and remove stage tag":** reads the
|
|
115
|
+
version from `package.json`, tags the checked-out commit `v<version>`
|
|
116
|
+
(no force — this tag is immutable; a genuine collision fails loudly
|
|
117
|
+
rather than silently moving a prod tag), pushes it, then best-effort
|
|
118
|
+
deletes the corresponding `v<version>-stage` tag both locally and on the
|
|
119
|
+
remote (tolerating its absence, e.g. a prod publish that skipped
|
|
120
|
+
staging).
|
|
121
|
+
- **`stage` job — "Tag stage release":** reads the version the same way
|
|
122
|
+
and tags the checked-out commit `v<version>-stage` — a **mutable**
|
|
123
|
+
pointer, force-created (`git tag -f`) and force-pushed, so re-staging the
|
|
124
|
+
same version moves the tag rather than failing.
|
|
125
|
+
|
|
126
|
+
Both new steps configure a `github-actions[bot]` git identity
|
|
127
|
+
(`user.name`/`user.email`) before tagging, since no prior step in the
|
|
128
|
+
workflow sets one.
|
|
107
129
|
|
|
108
130
|
3. **`commit-workflow`** — write the generated YAML to `<workflow_path>`
|
|
109
131
|
(creating the `.github/workflows/` directory if needed) and commit it with:
|
|
@@ -213,9 +235,9 @@ automated and human halves of the flow:
|
|
|
213
235
|
- **Approval is always a human, out-of-CI step.** `npm stage approve`
|
|
214
236
|
requires an interactive npm 2FA one-time password — there is no OIDC
|
|
215
237
|
equivalent for approval. A human runs
|
|
216
|
-
`bash skills/publish/scripts/npm_stage_inspect.sh test <stage-id>` (or
|
|
238
|
+
`bash skills/j-publish/scripts/npm_stage_inspect.sh test <stage-id>` (or
|
|
217
239
|
relies on the automated CI-staged test result) and then
|
|
218
|
-
`bash skills/publish/scripts/npm_stage_inspect.sh approve <stage-id> --otp <otp>`
|
|
240
|
+
`bash skills/j-publish/scripts/npm_stage_inspect.sh approve <stage-id> --otp <otp>`
|
|
219
241
|
from their own machine. `reject` (same script) is available to either
|
|
220
242
|
side to discard a staged candidate.
|
|
221
243
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
The `npm` adapter drives the `/publish deploy` flow for npm registry targets.
|
|
4
4
|
It is a prompt/template contract for the agent layer and delegates concrete execution to
|
|
5
|
-
`skills/publish/scripts/npm_pipeline.sh`.
|
|
5
|
+
`skills/j-publish/scripts/npm_pipeline.sh`.
|
|
6
6
|
|
|
7
7
|
## Invocation Contract
|
|
8
8
|
|
|
@@ -30,13 +30,13 @@ The required env vars are:
|
|
|
30
30
|
Validate them before execution with:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
bash skills/publish/scripts/validate_npm_env.sh <path-to-publish.json>
|
|
33
|
+
bash skills/j-publish/scripts/validate_npm_env.sh <path-to-publish.json>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
### Pipeline entrypoint
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
bash skills/publish/scripts/npm_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive]
|
|
39
|
+
bash skills/j-publish/scripts/npm_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive]
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
## Execution Phases
|
|
@@ -114,13 +114,13 @@ A successful run produces:
|
|
|
114
114
|
Before a live `deploy`, this target type also supports **staged publishing**
|
|
115
115
|
via `/publish stage` — npm's own pre-publish staging area, which lets a
|
|
116
116
|
release be smoke-tested from the exact tarball that would ship before it
|
|
117
|
-
becomes visible on the registry. See `skills/publish/SKILL.md`'s
|
|
117
|
+
becomes visible on the registry. See `skills/j-publish/SKILL.md`'s
|
|
118
118
|
`### /publish stage` section for the full command reference; summary here:
|
|
119
119
|
|
|
120
|
-
- `bash skills/publish/scripts/npm_stage_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive] [--otp <otp>]` runs validate → gates → pack → stage → capture → ledger and writes a `staged` ledger entry.
|
|
121
|
-
- `bash skills/publish/scripts/npm_stage_inspect.sh test <stage-id>` installs the staged tarball into an isolated scratch directory and smoke-tests it, writing a `stage_tested` ledger entry.
|
|
122
|
-
- `bash skills/publish/scripts/npm_stage_inspect.sh approve <stage-id>` requires an npm 2FA one-time password and refuses without a passing `test` on record unless `--force <reason>` is given.
|
|
123
|
-
- `bash skills/publish/scripts/npm_stage_inspect.sh reject <stage-id>` discards the staged version.
|
|
120
|
+
- `bash skills/j-publish/scripts/npm_stage_pipeline.sh <target> <path-to-publish.json> [--dry-run] [--non-interactive] [--otp <otp>]` runs validate → gates → pack → stage → capture → ledger and writes a `staged` ledger entry.
|
|
121
|
+
- `bash skills/j-publish/scripts/npm_stage_inspect.sh test <stage-id>` installs the staged tarball into an isolated scratch directory and smoke-tests it, writing a `stage_tested` ledger entry.
|
|
122
|
+
- `bash skills/j-publish/scripts/npm_stage_inspect.sh approve <stage-id>` requires an npm 2FA one-time password and refuses without a passing `test` on record unless `--force <reason>` is given.
|
|
123
|
+
- `bash skills/j-publish/scripts/npm_stage_inspect.sh reject <stage-id>` discards the staged version.
|
|
124
124
|
|
|
125
125
|
Same registry-existence precondition as a normal `npm` publish: staged
|
|
126
126
|
publishing only applies to a package that has already had at least one
|
|
@@ -7,9 +7,9 @@ This document defines the CI-safe execution contract for the scaffolded `/publis
|
|
|
7
7
|
Every `/publish` invocation must perform these steps before command-specific work:
|
|
8
8
|
|
|
9
9
|
1. Resolve config path (`--config <path>` or default `project/configs/publish.json`)
|
|
10
|
-
2. Run `bash skills/publish/scripts/validate_config.sh <resolved-path>`
|
|
10
|
+
2. Run `bash skills/j-publish/scripts/validate_config.sh <resolved-path>`
|
|
11
11
|
3. Abort immediately with exit code `4` if the file is missing, invalid JSON, or fails validation
|
|
12
|
-
4. For the iOS adapter, run `bash skills/publish/scripts/validate_ios_env.sh <resolved-path>` before build/upload work begins
|
|
12
|
+
4. For the iOS adapter, run `bash skills/j-publish/scripts/validate_ios_env.sh <resolved-path>` before build/upload work begins
|
|
13
13
|
|
|
14
14
|
## Inputs
|
|
15
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://jenga.local/skills/publish/schemas/publish.schema.json",
|
|
3
|
+
"$id": "https://jenga.local/skills/j-publish/schemas/publish.schema.json",
|
|
4
4
|
"title": "Publish Skill Configuration",
|
|
5
5
|
"description": "Schema for project/configs/publish.json used by the /publish skill.",
|
|
6
6
|
"type": "object",
|
|
@@ -172,7 +172,7 @@ on:
|
|
|
172
172
|
|
|
173
173
|
permissions:
|
|
174
174
|
id-token: write
|
|
175
|
-
contents:
|
|
175
|
+
contents: write
|
|
176
176
|
|
|
177
177
|
jobs:
|
|
178
178
|
publish:
|
|
@@ -194,6 +194,17 @@ jobs:
|
|
|
194
194
|
- name: Publish to npm
|
|
195
195
|
run: npm publish --provenance --access ${NPM_ACCESS} --tag ${DIST_TAG}
|
|
196
196
|
|
|
197
|
+
- name: Tag prod release and remove stage tag
|
|
198
|
+
if: success()
|
|
199
|
+
run: |
|
|
200
|
+
git config user.name "github-actions[bot]"
|
|
201
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
202
|
+
VERSION="\$(node -p "require('./package.json').version")"
|
|
203
|
+
git tag "v\${VERSION}"
|
|
204
|
+
git push origin "v\${VERSION}"
|
|
205
|
+
git tag -d "v\${VERSION}-stage" 2>/dev/null || true
|
|
206
|
+
git push origin ":refs/tags/v\${VERSION}-stage" 2>/dev/null || true
|
|
207
|
+
|
|
197
208
|
stage:
|
|
198
209
|
if: \${{ github.event.inputs.mode == 'stage' }}
|
|
199
210
|
runs-on: ubuntu-latest
|
|
@@ -212,6 +223,15 @@ jobs:
|
|
|
212
223
|
|
|
213
224
|
- name: Stage to npm
|
|
214
225
|
run: npm stage publish --provenance --access ${NPM_ACCESS} --tag ${DIST_TAG}
|
|
226
|
+
|
|
227
|
+
- name: Tag stage release
|
|
228
|
+
if: success()
|
|
229
|
+
run: |
|
|
230
|
+
git config user.name "github-actions[bot]"
|
|
231
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
232
|
+
VERSION="\$(node -p "require('./package.json').version")"
|
|
233
|
+
git tag -f "v\${VERSION}-stage"
|
|
234
|
+
git push origin "v\${VERSION}-stage" --force
|
|
215
235
|
EOF
|
|
216
236
|
)"
|
|
217
237
|
|
|
@@ -419,8 +419,31 @@ cmd_list() {
|
|
|
419
419
|
# `list` itself needs no config (npm stage list takes no target/config).
|
|
420
420
|
: "${config_arg}"
|
|
421
421
|
|
|
422
|
+
# `npm stage list` rejects a version-qualified spec ("Version specifiers
|
|
423
|
+
# are not supported for listing staged packages") — it only accepts a bare
|
|
424
|
+
# package name. If the caller passed one anyway (e.g. "@jenga-ai/agent@1.3.0"
|
|
425
|
+
# or "some-pkg@1.3.0"), split it into name + version here, pass only the
|
|
426
|
+
# bare name to npm, and filter the result to that version client-side
|
|
427
|
+
# below (same fallback the fix in npm_stage_pipeline.sh uses). A leading
|
|
428
|
+
# '@' belongs to a scoped package's own name, not a version marker, so the
|
|
429
|
+
# version split point is the second '@' for scoped specs, the first for
|
|
430
|
+
# unscoped ones.
|
|
431
|
+
local package_name="${package_spec}" package_version=""
|
|
432
|
+
if [[ -n "${package_spec}" ]]; then
|
|
433
|
+
if [[ "${package_spec}" == @* ]]; then
|
|
434
|
+
local rest="${package_spec#@}"
|
|
435
|
+
if [[ "${rest}" == *"@"* ]]; then
|
|
436
|
+
package_name="@${rest%%@*}"
|
|
437
|
+
package_version="${rest#*@}"
|
|
438
|
+
fi
|
|
439
|
+
elif [[ "${package_spec}" == *"@"* ]]; then
|
|
440
|
+
package_name="${package_spec%%@*}"
|
|
441
|
+
package_version="${package_spec#*@}"
|
|
442
|
+
fi
|
|
443
|
+
fi
|
|
444
|
+
|
|
422
445
|
local -a cmd=(npm stage list)
|
|
423
|
-
[[ -n "${
|
|
446
|
+
[[ -n "${package_name}" ]] && cmd+=("${package_name}")
|
|
424
447
|
cmd+=(--json)
|
|
425
448
|
|
|
426
449
|
if (( dry_run )); then
|
|
@@ -436,6 +459,16 @@ cmd_list() {
|
|
|
436
459
|
exit "${EXIT_OP_FAILED}"
|
|
437
460
|
fi
|
|
438
461
|
|
|
462
|
+
if [[ -n "${package_version}" ]]; then
|
|
463
|
+
local filtered
|
|
464
|
+
if filtered="$(printf '%s' "${output}" | jq -c --arg ver "${package_version}" '
|
|
465
|
+
( if (type == "array") then . else (.stages? // .items? // []) end )
|
|
466
|
+
| [ .[] | select((.version // "") == $ver) ]
|
|
467
|
+
' 2>/dev/null)"; then
|
|
468
|
+
output="${filtered}"
|
|
469
|
+
fi
|
|
470
|
+
fi
|
|
471
|
+
|
|
439
472
|
if (( json_out )); then
|
|
440
473
|
printf '%s\n' "${output}"
|
|
441
474
|
exit "${EXIT_OK}"
|
|
@@ -379,13 +379,18 @@ if [[ -z "${STAGE_ID}" ]] && printf '%s' "${STAGE_OUTPUT}" | jq -e . >/dev/null
|
|
|
379
379
|
STAGE_ID="$(printf '%s' "${STAGE_OUTPUT}" | jq -r '.id // .stageId // .stage_id // empty' 2>/dev/null || true)"
|
|
380
380
|
fi
|
|
381
381
|
|
|
382
|
-
# Attempt 3: fall back to `npm stage list <package
|
|
383
|
-
#
|
|
382
|
+
# Attempt 3: fall back to `npm stage list <package> --json` and extract the
|
|
383
|
+
# most recent matching entry's id. `npm stage list` rejects a version-
|
|
384
|
+
# qualified spec ("Version specifiers are not supported for listing staged
|
|
385
|
+
# packages") — it only accepts a bare package name — so this must pass
|
|
386
|
+
# PACKAGE_NAME, never PACKAGE_SPEC; the version match happens client-side via
|
|
387
|
+
# jq below instead (confirmed live on jenga-npm during v1.3.0 staging on
|
|
388
|
+
# 2026-09-01, project/todo.md).
|
|
384
389
|
if [[ -z "${STAGE_ID}" ]]; then
|
|
385
390
|
log_warn "could not parse a stage id directly from stage output; falling back to 'npm stage list --json'..."
|
|
386
391
|
|
|
387
392
|
LIST_STATUS=0
|
|
388
|
-
LIST_OUTPUT="$(npm stage list "${
|
|
393
|
+
LIST_OUTPUT="$(npm stage list "${PACKAGE_NAME}" --json 2>&1)" || LIST_STATUS=$?
|
|
389
394
|
|
|
390
395
|
if [[ ${LIST_STATUS} -ne 0 ]]; then
|
|
391
396
|
printf '%s\n' "${LIST_OUTPUT}" >&2
|
|
@@ -405,7 +410,7 @@ if [[ -z "${STAGE_ID}" ]]; then
|
|
|
405
410
|
fi
|
|
406
411
|
|
|
407
412
|
if [[ -z "${STAGE_ID}" ]]; then
|
|
408
|
-
printf 'npm stage pipeline: staged successfully but the stage id could not be captured from either the direct output or "npm stage list --json". Run "npm stage list %s --json" manually to recover it.\n' "${
|
|
413
|
+
printf 'npm stage pipeline: staged successfully but the stage id could not be captured from either the direct output or "npm stage list --json". Run "npm stage list %s --json" manually to recover it (bare package name — a version-qualified spec is rejected by npm).\n' "${PACKAGE_NAME}" >&2
|
|
409
414
|
exit "${EXIT_STAGE_FAILURE}"
|
|
410
415
|
fi
|
|
411
416
|
|
|
@@ -463,16 +463,16 @@ print_manual_steps() {
|
|
|
463
463
|
local adapter_doc
|
|
464
464
|
case "$TARGET_TYPE" in
|
|
465
465
|
droplet)
|
|
466
|
-
adapter_doc="$PUBLISH_REPO_ROOT/skills/publish/adapters/droplet.md"
|
|
466
|
+
adapter_doc="$PUBLISH_REPO_ROOT/skills/j-publish/adapters/droplet.md"
|
|
467
467
|
;;
|
|
468
468
|
npm)
|
|
469
|
-
adapter_doc="$PUBLISH_REPO_ROOT/skills/publish/adapters/npm.md"
|
|
469
|
+
adapter_doc="$PUBLISH_REPO_ROOT/skills/j-publish/adapters/npm.md"
|
|
470
470
|
;;
|
|
471
471
|
npm-ci)
|
|
472
|
-
adapter_doc="$PUBLISH_REPO_ROOT/skills/publish/adapters/npm-ci.md"
|
|
472
|
+
adapter_doc="$PUBLISH_REPO_ROOT/skills/j-publish/adapters/npm-ci.md"
|
|
473
473
|
;;
|
|
474
474
|
mobile-ios)
|
|
475
|
-
adapter_doc="$PUBLISH_REPO_ROOT/skills/publish/adapters/mobile-ios.md"
|
|
475
|
+
adapter_doc="$PUBLISH_REPO_ROOT/skills/j-publish/adapters/mobile-ios.md"
|
|
476
476
|
;;
|
|
477
477
|
*)
|
|
478
478
|
return 0
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
# Exit codes:
|
|
14
14
|
# 0 all four preflight checks passed
|
|
15
15
|
# 4 one of the checks failed (config/environment invalid), matching
|
|
16
|
-
# skills/publish/assets/ci-contract.md
|
|
16
|
+
# skills/j-publish/assets/ci-contract.md
|
|
17
17
|
#
|
|
18
18
|
# Security note: the registry probe (check 4) never prints npm's raw stdout/stderr. Only
|
|
19
19
|
# messages composed by this script are emitted, so nothing npm writes — which could in
|
|
@@ -261,7 +261,7 @@ Once all answers have been collected, perform the following steps in order:
|
|
|
261
261
|
```
|
|
262
262
|
|
|
263
263
|
4. **Validate against the schema.** Run
|
|
264
|
-
`bash skills/publish/scripts/validate_config.sh <path-to-publish.json>`
|
|
264
|
+
`bash skills/j-publish/scripts/validate_config.sh <path-to-publish.json>`
|
|
265
265
|
before saving. If validation fails, report the error and abort — do not
|
|
266
266
|
write a broken `publish.json`.
|
|
267
267
|
|
|
@@ -110,7 +110,7 @@ Optional short string such as `exampleco`.
|
|
|
110
110
|
Maps to: `targets[].secrets.app_store_connect_api_key_id`
|
|
111
111
|
|
|
112
112
|
Enter the environment-variable name that will supply the App Store Connect API key identifier.
|
|
113
|
-
See `skills/publish/assets/secrets-guide.md` before answering.
|
|
113
|
+
See `skills/j-publish/assets/secrets-guide.md` before answering.
|
|
114
114
|
|
|
115
115
|
## Expected format:
|
|
116
116
|
|
|
@@ -213,7 +213,7 @@ Once all six answers have been collected, perform the following steps in order:
|
|
|
213
213
|
- Do not include a `secrets` block — this adapter uses OIDC and no token
|
|
214
214
|
is required.
|
|
215
215
|
4. **Validate against the schema.** Run
|
|
216
|
-
`skills/publish/scripts/validate_config.sh` before saving. If validation
|
|
216
|
+
`skills/j-publish/scripts/validate_config.sh` before saving. If validation
|
|
217
217
|
fails, report the error and abort — do not write a broken `publish.json`.
|
|
218
218
|
5. **Report to the user.** Print a short summary confirming (a) the target
|
|
219
219
|
block written, (b) the `github_repo` value, and (c) the `workflow_path`
|
|
@@ -97,7 +97,7 @@ deploy).
|
|
|
97
97
|
## Prerequisite: NPM_TOKEN
|
|
98
98
|
|
|
99
99
|
The npm pipeline reads the auth token from the `NPM_TOKEN` environment
|
|
100
|
-
variable at publish time (`skills/publish/adapters/npm.md` defines this
|
|
100
|
+
variable at publish time (`skills/j-publish/adapters/npm.md` defines this
|
|
101
101
|
contract). The wizard does not collect the token value — that would be
|
|
102
102
|
unsafe. Instead, at the end of the wizard, write the following instructions
|
|
103
103
|
file so the user knows exactly what to configure:
|