@djordje-stojanovic/sigmaskills 0.2.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.
Files changed (53) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/LICENSE +21 -0
  3. package/README.md +342 -0
  4. package/bin/sigmaskills.js +7 -0
  5. package/manifest.json +28 -0
  6. package/package.json +42 -0
  7. package/registry/agent-hosts.json +2404 -0
  8. package/registry/schema.json +110 -0
  9. package/registry/skill-baselines.json +4 -0
  10. package/registry/source.json +6 -0
  11. package/sigmabrief/SKILL.md +56 -0
  12. package/sigmabrief/agents/openai.yaml +12 -0
  13. package/sigmabrief/references/brief-method.md +73 -0
  14. package/sigmabrief/references/prompt-contract.md +174 -0
  15. package/sigmaperformance/SKILL.md +118 -0
  16. package/sigmaperformance/agents/openai.yaml +12 -0
  17. package/sigmaperformance/references/audit-method.md +112 -0
  18. package/sigmaperformance/references/calibration.md +45 -0
  19. package/sigmaperformance/references/report-contract.md +103 -0
  20. package/sigmareview/SKILL.md +133 -0
  21. package/sigmareview/agents/openai.yaml +12 -0
  22. package/sigmareview/references/report-contract.md +217 -0
  23. package/sigmareview/references/review-method.md +233 -0
  24. package/sigmawrite/SKILL.md +45 -0
  25. package/sigmawrite/agents/openai.yaml +12 -0
  26. package/src/adoption.js +370 -0
  27. package/src/backup.js +398 -0
  28. package/src/catalog.js +211 -0
  29. package/src/cli.js +657 -0
  30. package/src/customization.js +344 -0
  31. package/src/destinations.js +491 -0
  32. package/src/interactive.js +959 -0
  33. package/src/links.js +157 -0
  34. package/src/plan.js +429 -0
  35. package/src/prepack.js +10 -0
  36. package/src/project-lock.js +169 -0
  37. package/src/purge.js +477 -0
  38. package/src/registry/automation-ci.js +411 -0
  39. package/src/registry/automation.js +554 -0
  40. package/src/registry/diff.js +149 -0
  41. package/src/registry/normalize.js +67 -0
  42. package/src/registry/parse.js +184 -0
  43. package/src/registry/sync.js +230 -0
  44. package/src/registry/validate.js +223 -0
  45. package/src/release-ci.js +12 -0
  46. package/src/release.js +837 -0
  47. package/src/restore.js +518 -0
  48. package/src/revision.js +82 -0
  49. package/src/state.js +480 -0
  50. package/src/status.js +469 -0
  51. package/src/transaction.js +636 -0
  52. package/src/uninstall.js +647 -0
  53. package/src/update.js +815 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,77 @@
1
+ # Changelog
2
+
3
+ All notable changes to [Sigmaskills](https://github.com/Djordje-Stojanovic/Sigmaskills) are documented here.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.2.0] — 2026-08-20
8
+
9
+ ### Fixed
10
+
11
+ - `npm test` lists `test/*.test.js` files in a runner script so Node.js 20 CI runs the suite without glob expansion. Registry pin hashing ignores CRLF from Windows checkout so the fixture still matches `contentSha256`.
12
+
13
+ ### Added
14
+
15
+ - Safe Agent Host registry additions and description-only changes may auto-merge after required checks and publish a patch Release through the trusted idempotent publication primitive. Destination, ID, alias, detection, platform, membership, removal, and unknown changes still need owner review. Version calculation serializes concurrent runs against live npm and GitHub state. The generated branch is deleted only after verified merge and matching publication. Automation cannot change skills, CLI behavior, unrelated work, human branches, or major/minor Releases, and it never overwrites an existing npm version.
16
+ - Release-candidate qualification packs the published tarball and proves install, adoption, status, update, unsafe resolution, restore, uninstall, uninstall-all, and purge on that artifact. Unknown newer state schemas fail without mutation; supported migrations keep ownership and backup references. The package allowlist, Skill Revisions, and publication preflight agree. Bundled install, status, uninstall, and restore stay offline. CI runs the suite on Windows, macOS, and Linux for Node.js 20+.
17
+ - Guarded Agent Host registry automation fetches a pinned upstream revision as data, runs converter code only from an exact trusted default-branch SHA, and opens a tightly scoped pull request limited to `registry/agent-hosts.json`, `registry/source.json`, and the pinned upstream fixture. Semantic classification allows only validated new hosts and description-only changes; path, ID, alias, detection, platform, membership, removal, and unknown changes stay blocked. Generated pull requests record the upstream commit, full semantic diff, validation evidence, and blocked reasons. Forks, human branches, stale heads, moved default branches, failed checks, and concurrent runs cannot be auto-authorized. This automation does not auto-merge, publish npm, close unrelated issues or pull requests, or delete unrelated branches.
18
+ - The Sigma Installer `release` command prepares one immutable publication preview from the accepted source commit and, after `--expected-commit`, `--expected-version`, and `--expected-digest`, dispatches the trusted GitHub workflow that rebuilds that commit, verifies the artifact, and publishes matching git tag, GitHub Release, and npm provenance under `latest`. `--yes` is not authority. Missing npm reservation, trusted publisher, protected `release` environment, or a conflicting version/tag/Release fails closed. Partial success is retried without overwriting versions or duplicating Releases. Ordinary merges never publish.
19
+ - The Sigma Installer `purge` command removes all Sigma-owned active content, customizations, locks, state, journals, and backups in one explicit Project or Global scope: it prints an exact ownership plan, requires the typed phrase `purge SigmaSkills` (or `--confirm-purge` with that phrase), and does not treat `--yes`, CI, non-TTY, or JSON as authority. Purge never infers ownership from folder names. Unowned occupants stop the command. Durable journaling and reversible quarantine keep the ownership manifest until owned trees are moved; interrupted cleanup leaves recoverable quarantined state.
20
+ - The Sigma Installer `uninstall --all` command composes Uninstall Review across every recorded Sigma skill in one explicit Project or Global scope: there is no review-skipping fast path; the aggregate plan lists every skill, owned destination, canonical dependency, state change, and retained backup; keep choices leave shared state intact; changed skills default to backup so snapshots stay restorable; project and global scopes stay isolated; cancellation or failure writes a durable recovery journal and restores the failed skill; human, dry-run, and JSON results report removed, retained, skipped, and failed skills.
21
+ - The Sigma Installer `uninstall` command runs Uninstall Review per selected skill: clean skills offer remove or keep; changed, customized, or malformed skills offer backup-and-remove, keep, export, or permanent-delete-current. The preview lists every path, method, scope, and remaining canonical dependency. Execution revalidates leaves, deletes a link itself never its target, keeps canonical content while dependents remain, leaves older backups on permanent delete, and writes state only after filesystem commit. Missing, stale, unowned, divergent, and wrong-target cases stop without partial ownership.
22
+ - The Sigma Installer `restore` command returns the latest retained backup for a skill: the preview names Release, Skill Revision, creation date, verified size, scope, canonical target, and affected links or copies; content and metadata are integrity-checked and staged before any live write; a successful restore makes the displaced tree the new one-step backup; identical content is a no-op; missing, truncated, tampered, schema-incompatible, insufficient-space, stale-ownership, occupied-unowned, and failed Windows fallback cases write nothing.
23
+ - The Sigma Installer `update` command diagnoses missing, duplicate, reversed, nested, and malformed customization markers, blocks automatic update for that skill, shows exact proposed repair bytes when a unique mechanical repair exists, and requires `--malformed-markers skip|repair|replace`. Repair never infers marker boundaries; skip leaves the skill while others continue; replace backs up then clean-installs. Combined outside drift keeps all content until both resolutions are explicit, and failure paths write nothing partial.
24
+ - The Sigma Installer `update` command classifies outside-customization edits, shows local-only and concurrent effects, and lets a user skip, export, or approve a whole-skill replace with an integrity-checked private backup. Skip leaves that skill unchanged; export uses a planned path, refuses collisions, and removes partial output; a prior backup is kept until the new tree and metadata commit, and cleanup failure may retain two backups with recorded debt.
25
+ - The Sigma Installer `update` command replaces selected whole skills with the Release bundled in the running CLI: it groups changed and unchanged skills, shows changelog and whole-skill diffs, preserves Skill Customization bytes exactly, updates the canonical copy and its links or matching copies together, and stops without mutation on unknown state schemas, missing bundled revisions, or unsafe drift.
26
+ - The Sigma Installer `status` command reports managed Project and Global Installation state and drift without writing files or contacting the network: live hashes and link checks classify clean copies, valid Skill Customization, outside edits, missing or extra resources, malformed markers, missing destinations, stale state, broken or wrong-target links, and copy disagreement.
27
+ - The Sigma Installer hardens Emberforge for real terminals: the accepted warm LAPI palette stays, layouts reflow below 76 columns, `?` opens keyboard help, reduced-motion/`NO_COLOR`/CI/JSON/non-TTY modes drop animation, truecolor through ASCII fallbacks keep safety copy, and the cursor restores after success, failure, interrupt, EOF, and exceptions.
28
+ - The Sigma Installer protects Global Installation with two confirmations, sandboxed user-home paths, schema-versioned global state, and the same adoption rules as Project Installation: `--global` plus `--yes` are required to write; CI, TTY, JSON, and Agent Host detection never imply that authority.
29
+ - The Sigma Installer migrates changed, duplicate, older, pre-marker, and unverified Sigma-looking trees with explicit replace, skip, or export choices: known legacy provenance requires a bundled baseline, a complete private backup is committed before replace, valid customization is preserved, and malformed markers are not guessed.
30
+ - The Sigma Installer adopts exact current official copies and valid links in place: valid Sigma state, then exact bundled Skill Revision, then resolved link target. Generic `skills-lock.json` entries never imply Sigma ownership.
31
+ - The Sigma Installer recommended link method: Windows directory junctions and macOS/Linux symbolic links to the canonical `.agents/skills` copy, with an explicit copy alternative, informed copy fallback, and ownership records for canonical dependencies.
32
+ - The Sigma Installer Project Installation destination picker: every bundled Agent Host stays searchable, only `.agents/skills` is selected by default, host-specific destinations require an explicit choice, and ownership state records each managed copy.
33
+ - The first npm package is `@djordje-stojanovic/sigmaskills` because the unscoped name is too close to an existing package. The installed command remains `sigmaskills`.
34
+ - The Sigma Installer's interactive Project Installation through plain `npx @djordje-stojanovic/sigmaskills`, with manifest-driven multi-skill selection, exact destination confirmation, cancellation-safe prompts, and no-color, static, and narrow-terminal modes.
35
+ - Structural regression tests (`npm test`) and GitHub Actions CI so skill registry, README wiring, templates, and SigmaWrite soft-steer invariants cannot silently drift.
36
+ - Root [`AGENTS.md`](AGENTS.md): mandatory work rules and clear-writing rules, project map, and the `KNOWN_SKILLS` + README + CHANGELOG update rule.
37
+
38
+
39
+ ## [0.1.0] — 2026-08-11
40
+
41
+ First public release. Portable [Agent Skills](https://agentskills.io/) for Codex, Pi, Claude Code, Cursor, and compatible hosts.
42
+
43
+ ### Idea
44
+
45
+ Ship high-rigor, installable agent skills (not apps): full-repo audits, performance investigation, parallel-agent briefing, and clear technical writing voice — each with a tight operating contract and `npx skills add` / Codex `$skill-installer` install paths.
46
+
47
+ ### Skills
48
+
49
+ - **SigmaReview** (`sigmareview`) — One-shot full-repository engineering audit; single findings Markdown report opened as a report-only PR; no runtime code changes.
50
+ - **SigmaPerformance** (`sigmaperformance`) — Calibrated, audit-only performance investigation; measured and mechanically proven bottlenecks; single report PR; no runtime-source edits by default.
51
+ - **SigmaBrief** (`sigmabrief`) — Prompt factory: turns issues/work into paste-ready agent briefs; chat-only; does not implement or open product fix PRs.
52
+ - **SigmaWrite** (`sigmawrite`) — STE-inspired clear technical English for explanations; soft steers (not hard numbered rules); pasteable system-prompt block; chat style only.
53
+
54
+ ### Repository
55
+
56
+ - MIT license and root README with multi-host install/run/output contracts (Codex, Claude Code, Cursor, Pi, OpenCode, LAPI-style paths, and Agent Skills–compatible TUIs).
57
+ - GitHub Issue Forms + PR template (from github-issue-kit), tailored to Agent Skills / prompts / templates work.
58
+ - Packaged GitHub Release **v0.1.0** with source zip of all skills.
59
+
60
+ ### Commits since inception
61
+
62
+ | Date | Commit | Summary |
63
+ |------|--------|---------|
64
+ | 2026-07-11 | `1867a70` | Publish SigmaReview skill |
65
+ | 2026-07-11 | `ddca5b7` | Publish SigmaReview source files |
66
+ | 2026-07-12 | `2343d5b` | Add SigmaPerformance skill |
67
+ | 2026-07-29 | `71b2c09` | Add SigmaBrief prompt-factory skill |
68
+ | 2026-07-29 | `462d291` | Merge PR #1 (`feat/sigmabrief`) |
69
+ | 2026-08-10 | `8dcf2b4` | Add GitHub issue forms and PR template from github-issue-kit |
70
+ | 2026-08-10 | `3ef4cd8` | Tailor GitHub issue forms and PR template to SigmaSkills |
71
+ | 2026-08-11 | `9631834` | Add SigmaWrite skill for STE-inspired clear technical English |
72
+ | 2026-08-11 | `5dab832` | Add CHANGELOG and mark v0.1.0 as the first Sigmaskills release |
73
+ | 2026-08-11 | `124a666` | Polish v0.1.0 docs for multi-host install and use |
74
+
75
+ [Unreleased]: https://github.com/Djordje-Stojanovic/Sigmaskills/compare/v0.2.0...HEAD
76
+ [0.2.0]: https://github.com/Djordje-Stojanovic/Sigmaskills/releases/tag/v0.2.0
77
+ [0.1.0]: https://github.com/Djordje-Stojanovic/Sigmaskills/releases/tag/v0.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Djordje Stojanovic
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,342 @@
1
+ # SigmaSkills
2
+
3
+ **High-rigor Agent Skills for every serious coding agent.**
4
+
5
+ Portable [Agent Skills](https://agentskills.io/) that install once and run on **Codex**, **Claude Code**, **Cursor**, **Pi**, **OpenCode**, **LAPI**, Reasonix-class TUIs, Kimi/Muse-style hosts, and any tool that reads a `SKILL.md`.
6
+
7
+ | | |
8
+ |---|---|
9
+ | **Release** | [**v0.2.0**](https://github.com/Djordje-Stojanovic/Sigmaskills/releases/tag/v0.2.0) |
10
+ | **Changelog** | [CHANGELOG.md](CHANGELOG.md) |
11
+ | **License** | [MIT](LICENSE) |
12
+ | **Spec** | [agentskills.io](https://agentskills.io/) |
13
+
14
+ ```text
15
+ Σ review → one findings report, one PR, no runtime edits
16
+ Σ performance→ calibrated bottlenecks, one report PR
17
+ Σ brief → paste-ready agent briefs, chat only
18
+ Σ write → clear STE-inspired technical English
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Quick start
24
+
25
+ Start the first-party Sigma Installer in a project:
26
+
27
+ ```bash
28
+ npx @djordje-stojanovic/sigmaskills
29
+ ```
30
+
31
+ Select any set of skills. By default the installer writes only to `.agents/skills/<id>` and lists every Agent Host that reads that universal destination. Host-specific directories such as `.claude/skills` or `.pi/skills` stay unselected until you choose them. Selected host destinations use Windows directory junctions or macOS/Linux symbolic links to the canonical copy; `--copy` writes an independent managed copy instead. Link failure reports the exact cause and offers copy — the installer never changes method silently. Exact current official copies and valid links are adopted in place without rewriting skill bytes. Changed, older, pre-marker, and unverified Sigma-looking trees are classified with a file diff and provenance confidence; replace commits a private backup first, skip leaves the tree, and export writes a collision-safe copy. Pre-marker extra content is never guessed into the customization block; malformed markers stop unless you pass an explicit `--adopt-malformed` choice. The confirmation plan shows every full destination path and method. Press `g` in the skill picker for Global Installation: an immediate scope warning appears, then a second confirmation repeats every Agent Host, resolved path, method, overwrite effect, and backup action. Non-interactive Global writes need both `--global` and `--yes`; CI, TTY, JSON, and Agent Host detection never imply that authority. To install one skill without the interactive interface:
32
+
33
+ ```bash
34
+ npx @djordje-stojanovic/sigmaskills install sigmawrite --project .
35
+ npx @djordje-stojanovic/sigmaskills install sigmawrite --project . --destination .claude/skills
36
+ npx @djordje-stojanovic/sigmaskills install sigmawrite --project . --destination .claude/skills --copy
37
+ npx @djordje-stojanovic/sigmaskills install sigmawrite --global --dry-run
38
+ npx @djordje-stojanovic/sigmaskills install sigmawrite --global --yes
39
+ ```
40
+
41
+ Then invoke with your host’s normal skill syntax (`$sigmawrite`, `/skill:sigmawrite`, skill picker, …).
42
+
43
+ ---
44
+
45
+ ## The skills
46
+
47
+ | Skill | Id | Job | Output |
48
+ |-------|-----|-----|--------|
49
+ | **SigmaReview** | `sigmareview` | One-shot full-repo engineering audit | One findings MD + report-only PR |
50
+ | **SigmaPerformance** | `sigmaperformance` | Calibrated performance investigation | One report MD + report-only PR |
51
+ | **SigmaBrief** | `sigmabrief` | Prompt factory for parallel / single agents | Chat briefs only |
52
+ | **SigmaWrite** | `sigmawrite` | Clear STE-inspired technical English | Chat writing voice |
53
+
54
+ ### SigmaReview
55
+
56
+ A single agent walks an entire repository — correctness, completeness, architecture, data and concurrency, reliability, security, performance, tests, dependencies, delivery, operations, and domain-specific engineering. Speculative findings are rejected. Exactly **one** evidence-rich Markdown report is published as a **report-only** pull request. Runtime code is never changed.
57
+
58
+ ### SigmaPerformance
59
+
60
+ Maps real user journeys, then separates **measured** and **mechanically proven** bottlenecks from measurement-required opportunities. Publishes one structured report PR. Runtime sources stay untouched unless calibration explicitly says otherwise.
61
+
62
+ ### SigmaBrief
63
+
64
+ Turns GitHub issues, features, upgrades, bugs, or plain work statements into short, copy-pastable briefs for other agents. Light research → dispatch list → fenced briefs → **stop**. Does not implement work or open product fix PRs. Default brief arc: plan → optional grill-me (including Windows worktree) → approve → execute → validate → PR for review (**do not merge**).
65
+
66
+ **User-triggered only.** Do not treat Brief as ambient chat decoration.
67
+
68
+ ### SigmaWrite
69
+
70
+ Writing voice inspired by **ASD-STE100 Simplified Technical English** — soft steers, not hard numbered rules. High-quality, still-technical explanations a sharp outsider can follow. Hard bans on gibberish and invented words. Includes a pasteable system-prompt block inside `SKILL.md`. Not certified STE; no dictionary ship.
71
+
72
+ ---
73
+
74
+ ## Install
75
+
76
+ ### Sigma Installer: Project Installation (recommended)
77
+
78
+ Run `npx @djordje-stojanovic/sigmaskills` with no command. The Sigma Installer's Emberforge interface reads the Skill Pack catalog from `manifest.json` and the bundled Agent Host registry. Project Installation selects only the universal `.agents/skills/` destination by default, expands every Agent Host that reads it, and leaves host-specific destinations unselected until you choose them. Search remains available for every supported Agent Host, including hosts that are not detected. Exact current official copies and valid links are recorded as managed without rewriting skill bytes. Escape, EOF, Ctrl+C, or a rejected confirmation exits without writing.
79
+
80
+ The Emberforge screens keep the accepted warm LAPI palette and do not mix in Prismgrid or Monolith. Layouts reflow below 76 columns and wrap long paths. Keyboard-only controls cover focus, search, selection, confirmation, cancellation, and `?` help. `--no-color`, `--static`, `--narrow`, `--json`, `NO_COLOR`, `CI`, `REDUCED_MOTION=1`, `PREFERS_REDUCED_MOTION=reduce`, redirected output, and non-TTY sessions disable animation and decorative color. Truecolor, 256-color, 16-color, and ASCII fallbacks stay readable and still show safety copy. The cursor and raw mode restore after success, failure, interrupt, EOF, and exceptions.
81
+
82
+ Use `--no-color`, `--static`, or `--narrow` when the terminal needs those modes. Use `--project <path>` to select another project root.
83
+
84
+ ### Sigma Installer: Global Installation
85
+
86
+ Project Installation stays the default. In the interactive installer, `g` selects Global Installation and shows a scope warning immediately. The final confirmation repeats every selected Agent Host, exact resolved path, method, overwrite or delete effect, and backup action. Cancel at either prompt leaves prior user-level state unchanged.
87
+
88
+ Non-interactive mutation requires both `--global` and `--yes`. `--dry-run` shows those confirmation requirements and the full impact without writing. Unknown newer global state schemas fail closed; supported migrations keep ownership, hashes, methods, and backup references. Exact and changed existing copies use the same adoption path as Project Installation.
89
+
90
+ ### Sigma Installer: status
91
+
92
+ `npx @djordje-stojanovic/sigmaskills status` is read-only. It reports Project Installation state by default, or Global Installation with `--global`. Human and `--json` output name the scope, installed and running Release, Skill Revisions, Agent Hosts, methods, exact paths, and ownership. Classification uses live per-file hashes and `lstat`/link checks. Valid Skill Customization is drift, not corruption. Drift discovery still exits `0`; command failures exit `1`. Status does not migrate, repair, write state or destinations, rewrite `skills-lock.json`, or contact the network.
93
+
94
+ ### Sigma Installer: update
95
+
96
+ `npx @djordje-stojanovic/sigmaskills update --dry-run` groups changed and unchanged skills, shows the bundled changelog and whole-skill file diffs, and writes nothing. `--yes` updates every changed skill when none are blocked; `--skill <id>` (repeatable) selects complete skills only. Valid Skill Customization bytes between the markers are copied onto the new official `SKILL.md` exactly. Edits outside that block are classified as local-only or concurrent with upstream; `--dry-run` names those cases and the overwrite or delete effects. `--outside-edit replace|skip|export` is required before mutation: replace takes a complete integrity-checked private backup first, skip leaves that skill and its state untouched while other skills continue, and export copies the prior tree to a planned path and refuses collisions. Missing, duplicate, reversed, nested, or otherwise malformed customization markers block automatic update for that skill and are never guessed into a customization boundary. `--dry-run` shows the marker shape, exact proposed repair bytes when a unique mechanical repair exists, and the resulting replacements or deletions. `--malformed-markers skip|repair|replace` is required before mutation: skip leaves that skill unchanged while others continue, repair writes only an approved exact repair, and replace takes a complete private backup then installs a clean official copy. Malformed markers plus outside drift keep all content until both `--malformed-markers` and `--outside-edit` are explicit. Cancellation, invalid repair, editor failure, backup failure, or transaction failure writes nothing partial. The latest valid backup stays until the new tree and backup metadata commit; cleanup failure may keep two backups and record cleanup debt. The canonical `.agents/skills/<id>` copy owns customization; links and matching managed copies follow it. Unknown newer state schemas, missing bundled Skill Revisions, broken links, and copy disagreement stop without mutation. Updates use the same transactional install path and refresh state only after commit. Project Installation is the default; Global Installation needs `--global` and `--yes`.
97
+
98
+ ### Sigma Installer: restore
99
+
100
+ `npx @djordje-stojanovic/sigmaskills restore --skill <id> --dry-run` shows the latest retained backup: Release and Skill Revision when known, creation date, verified size, scope, canonical target, and affected links or copies. `--yes` stages and integrity-checks the backup before any live write. On success the displaced current tree becomes the new one-step backup. Restoring identical content is a no-op and does not rotate backups. A removed skill can return from portable ownership metadata without claiming unrelated paths. Missing, truncated, tampered, schema-incompatible, insufficient-space, stale-ownership, occupied-unowned, and failed Windows fallback cases stop with the prior live tree and retained backup intact. Project Installation is the default; Global Installation needs `--global` and `--yes`.
101
+
102
+ ### Sigma Installer: uninstall
103
+
104
+ `npx @djordje-stojanovic/sigmaskills uninstall --skill <id> --dry-run` runs Uninstall Review for each selected skill. `npx @djordje-stojanovic/sigmaskills uninstall --all --dry-run` composes that same Uninstall Review across every recorded Sigma skill in one explicit Project or Global scope. There is no review-skipping fast path. The aggregate plan lists every skill, owned destination, canonical dependency, planned state change, and retained backup. Clean skills offer `--clean remove|keep`. Changed, customized, or malformed skills offer `--changed backup|keep|export|delete`. Uninstall-all defaults to `--changed backup` so backups remain restorable. `--yes` applies those choices: remove deletes only revalidated Sigma-owned paths; backup snapshots the current tree then removes it; export copies the current tree to `--export-dir` then removes managed paths; delete removes current content and leaves any older retained backup; keep writes nothing. Keep choices leave shared state and canonical dependency graphs intact. Execution rechecks each leaf with `lstat` and deletes a link itself, never its resolved target. Canonical content stays until recorded dependents are gone. Project uninstall-all never writes Global Installation; global uninstall-all never scans projects. For selected uninstall, missing paths, stale state, unowned replacements, divergent managed copies, and wrong-target links stop without a partial ownership change. For uninstall-all, those cases skip that skill, continue the rest, and report it as skipped. Interruption or failure leaves a durable recovery journal in installer state (`uninstall-journal.json`) and restores the failed skill so no active partial links remain. Human, dry-run, and JSON results report removed, retained, skipped, and failed skills. State and lock update only after filesystem operations commit. Project Installation is the default; Global Installation needs `--global` and `--yes`.
105
+
106
+ ### Sigma Installer: purge
107
+
108
+ `npx @djordje-stojanovic/sigmaskills purge --dry-run` lists the exact ownership plan for one Project or Global scope: revalidated Sigma-owned trees, links or junctions, copies, backups, staging, journals, and relevant locks. Purge never infers ownership from folder names. `--yes`, CI, non-TTY, and JSON are not authority. Apply with the typed phrase `purge SigmaSkills`, or non-interactively with `--confirm-purge "purge SigmaSkills"`. Unexpected unowned occupants stop the command and stay untouched. Cross-filesystem deletes journal first and quarantine owned trees before the ownership manifest is removed. An interrupted cleanup leaves recoverable quarantined state rather than active partial links. Retry with the same confirmation phrase finishes the purge. Project purge never writes Global Installation; global purge never scans projects.
109
+
110
+ ### Sigma Installer: Agent Host registry automation
111
+
112
+ The `registry-sync.yml` workflow fetches one pinned `vercel-labs/skills` revision as data and runs converter code only from the exact default-branch SHA in `EXPECTED_HEAD`. Generated changes are limited to `registry/agent-hosts.json`, `registry/source.json`, and `test/fixtures/vercel-skills/src/agents.ts`. New hosts must pass safe-root, traversal, collision, overlap, control-character, and platform checks. Only a generated pull request from that trusted workflow, with an exact allowlisted diff, the validated head SHA, current protected `main`, and all required checks may auto-merge. Validated additions and description-only edits can then publish a patch Release through the same idempotent trusted publication primitive as owner Releases. Path, ID, alias, detection, platform, membership, removal, unknown fields, and validation failures stay blocked for owner review. Version calculation serializes concurrent runs and reconciles npm and GitHub before the patch. The generated branch is deleted only after verified merge and matching npm/GitHub completion. Automation cannot change skills, CLI behavior, unrelated issues or pull requests, human branches, or major/minor Releases, and it never overwrites an existing npm version. Configure an npm trusted publisher for `registry-sync.yml` in addition to `release.yml`.
113
+
114
+ ### Sigma Installer: release
115
+
116
+ `npx @djordje-stojanovic/sigmaskills release --dry-run` calculates the next semantic version and complete change set from the accepted source commit, then prints one publication preview: commit, version, required tests, tarball contents and SHA-256 digest, Skill Revisions, git tag, GitHub Release, npm package, and `latest` dist-tag. Ordinary merges never publish. `--yes`, CI, and informal text cannot dispatch. `--write-identities` writes matching `package.json`, `manifest.json`, and `CHANGELOG.md` identities so the owner can commit them. Dispatch requires `--expected-commit`, `--expected-version`, and `--expected-digest` that match that rebuilt preview. The trusted `release.yml` workflow independently checks out the approved commit, re-runs tests, rebuilds the tarball, and verifies those values before the publish job. Validation stays `contents: read`. Only the final job receives `id-token: write`, `contents: write`, and the protected `release` environment, with actions pinned by commit SHA. Missing npm reservation, trusted publisher, environment protection, or a conflicting version, tag, or GitHub Release fails closed with setup guidance. Matching npm provenance or an existing GitHub Release at the same commit is skipped rather than overwritten or duplicated.
117
+
118
+ ### Cross-host alternative
119
+
120
+ The cross-agent [skills](https://github.com/vercel-labs/skills) CLI detects Codex, Claude Code, Cursor, OpenCode, Pi, and dozens more:
121
+
122
+ ```bash
123
+ # Everything, all detected agents, global
124
+ npx skills add Djordje-Stojanovic/Sigmaskills --all -g -y
125
+
126
+ # One skill at a time
127
+ npx skills add Djordje-Stojanovic/Sigmaskills --skill sigmareview -g
128
+ npx skills add Djordje-Stojanovic/Sigmaskills --skill sigmaperformance -g
129
+ npx skills add Djordje-Stojanovic/Sigmaskills --skill sigmabrief -g
130
+ npx skills add Djordje-Stojanovic/Sigmaskills --skill sigmawrite -g
131
+
132
+ # Pin to specific hosts
133
+ npx skills add Djordje-Stojanovic/Sigmaskills --skill sigmawrite -g -a cursor -a claude-code -a codex -a opencode -a pi
134
+
135
+ # List what this repo ships (no install)
136
+ npx skills add Djordje-Stojanovic/Sigmaskills --list
137
+ ```
138
+
139
+ Full GitHub URL also works:
140
+
141
+ ```bash
142
+ npx skills add https://github.com/Djordje-Stojanovic/Sigmaskills --skill sigmabrief -g
143
+ ```
144
+
145
+ ### Codex
146
+
147
+ ```text
148
+ $skill-installer install sigmareview from https://github.com/Djordje-Stojanovic/Sigmaskills
149
+ $skill-installer install sigmaperformance from https://github.com/Djordje-Stojanovic/Sigmaskills
150
+ $skill-installer install sigmabrief from https://github.com/Djordje-Stojanovic/Sigmaskills
151
+ $skill-installer install sigmawrite from https://github.com/Djordje-Stojanovic/Sigmaskills
152
+ ```
153
+
154
+ ### Manual / universal copy
155
+
156
+ When a host only watches a skills folder (Pi, LAPI mirrors, custom TUIs, air-gapped boxes):
157
+
158
+ **POSIX**
159
+
160
+ ```bash
161
+ git clone https://github.com/Djordje-Stojanovic/Sigmaskills.git
162
+ mkdir -p ~/.agents/skills
163
+ cp -R Sigmaskills/sigmareview ~/.agents/skills/sigmareview
164
+ cp -R Sigmaskills/sigmaperformance ~/.agents/skills/sigmaperformance
165
+ cp -R Sigmaskills/sigmabrief ~/.agents/skills/sigmabrief
166
+ cp -R Sigmaskills/sigmawrite ~/.agents/skills/sigmawrite
167
+ ```
168
+
169
+ **Windows (PowerShell)**
170
+
171
+ ```powershell
172
+ git clone https://github.com/Djordje-Stojanovic/Sigmaskills.git
173
+ New-Item -ItemType Directory -Force -Path "$HOME\.agents\skills" | Out-Null
174
+ Copy-Item -Recurse Sigmaskills\sigmareview "$HOME\.agents\skills\sigmareview"
175
+ Copy-Item -Recurse Sigmaskills\sigmaperformance "$HOME\.agents\skills\sigmaperformance"
176
+ Copy-Item -Recurse Sigmaskills\sigmabrief "$HOME\.agents\skills\sigmabrief"
177
+ Copy-Item -Recurse Sigmaskills\sigmawrite "$HOME\.agents\skills\sigmawrite"
178
+ ```
179
+
180
+ Point other hosts at the same folders (or copy again) as needed:
181
+
182
+ | Host family | Typical skills path |
183
+ |-------------|---------------------|
184
+ | Universal / Codex-style | `~/.agents/skills/<id>/` |
185
+ | Cursor | `~/.cursor/skills/<id>/` or project `.agents/skills/` |
186
+ | Claude Code | `~/.claude/skills/<id>/` |
187
+ | Pi / LAPI-style | `~/.pi/agent/skills/<id>/` |
188
+ | OpenCode | `~/.config/opencode/skills/<id>/` |
189
+ | Codex | `~/.codex/skills/<id>/` |
190
+
191
+ Release zip: download [**Sigmaskills-v0.2.0**](https://github.com/Djordje-Stojanovic/Sigmaskills/releases/tag/v0.2.0) and copy the four skill folders into the path your agent reads.
192
+
193
+ ### Optional: SigmaWrite as system prompt
194
+
195
+ Open [`sigmawrite/SKILL.md`](sigmawrite/SKILL.md), copy the **Paste as system prompt** block into host instructions when you want the voice always on — without editing this repo’s release contract.
196
+
197
+ ---
198
+
199
+ ## Run
200
+
201
+ Use your host’s skill syntax. Examples:
202
+
203
+ <table>
204
+ <tr>
205
+ <td width="50%">
206
+
207
+ **Codex**
208
+
209
+ ```text
210
+ $sigmareview https://github.com/owner/repo
211
+ $sigmaperformance https://github.com/owner/repo
212
+ $sigmabrief https://github.com/owner/repo/issues/12
213
+ $sigmabrief all open
214
+ $sigmawrite
215
+ ```
216
+
217
+ </td>
218
+ <td width="50%">
219
+
220
+ **Pi / skill-slash hosts**
221
+
222
+ ```text
223
+ /skill:sigmareview https://github.com/owner/repo
224
+ /skill:sigmaperformance https://github.com/owner/repo
225
+ /skill:sigmabrief https://github.com/owner/repo/issues/12
226
+ /skill:sigmabrief all open
227
+ /skill:sigmawrite
228
+ ```
229
+
230
+ </td>
231
+ </tr>
232
+ </table>
233
+
234
+ **Claude Code · Cursor · OpenCode · ChatGPT/Codex UI · Reasonix-class · Kimi/Muse · others**
235
+ Use the skill picker, `@` / `$` skill mention, or whatever that product documents for Agent Skills. Folder name = skill id = invocation token.
236
+
237
+ | Skill | Typical invoke | Notes |
238
+ |-------|----------------|-------|
239
+ | `sigmareview` | repo URL | Needs push/fork rights for the report PR |
240
+ | `sigmaperformance` | repo URL | Starts with two short calibration batches, then runs |
241
+ | `sigmabrief` | issue URL · `#N` · `all open` · plain work | Explicit only — not ambient |
242
+ | `sigmawrite` | (no args) | Session writing voice until you turn it off |
243
+
244
+ ---
245
+
246
+ ## Output contracts
247
+
248
+ ### SigmaReview
249
+
250
+ - File: `SIGMAREVIEW-FINDINGS-YYYY-MM-DD.md`
251
+ - One dedicated branch + **report-only** PR
252
+ - Prioritized, confidence-gated findings with exact evidence
253
+ - Implementation-ready remediation and verification steps
254
+ - Full repository coverage ledger
255
+ - **No** source fixes, dependency installs, app execution, subagents, or auxiliary repo artifacts
256
+
257
+ ### SigmaPerformance
258
+
259
+ - File: `SIGMAPERFORMANCE-REPORT-YYYY-MM-DD.md`
260
+ - One dedicated **report-only** PR
261
+ - **M1** measured · **M2** mechanically proven bottlenecks
262
+ - **M3** measurement-required opportunities, failed experiments, unverified boundaries (accounted separately)
263
+ - Structured future SigmaOptimize handoff
264
+ - Default single-agent; bounded subagents only via explicit calibration opt-in
265
+ - **No** runtime-source changes or temp measurement junk in the repo diff
266
+
267
+ ### SigmaBrief
268
+
269
+ - Chat-only dispatch list + paste-ready fenced `text` briefs
270
+ (**no** `SIGMABRIEF-*.md` in the product repo)
271
+ - Types: greenfield · finish-PR · skip · blocked
272
+ - Executing briefs: plan first · optional grill-me · **do not merge** · self-review before PR
273
+ - Isolation on → agent-created Windows `git worktree`; cleanup only after human merge or abandon
274
+ - Never implements the work or opens product fix PRs
275
+
276
+ ### SigmaWrite
277
+
278
+ - Chat writing style only (no report file, no PR)
279
+ - Soft STE-inspired steers + hard bans (gibberish / invented words / talking down / renaming code)
280
+ - Optional pasteable system-prompt block in `SKILL.md`
281
+ - Does not override another skill’s rigid output contract
282
+
283
+ ---
284
+
285
+ ## Requirements
286
+
287
+ | Skill | Needs |
288
+ |-------|--------|
289
+ | All | Agent that can load Agent Skills (`SKILL.md`) |
290
+ | SigmaReview · SigmaPerformance | Read access to the target repo · authenticated GitHub tooling to push a branch or fork + open a PR |
291
+ | SigmaPerformance | Authority / safety boundary chosen in calibration |
292
+ | SigmaBrief | `gh` read when briefing from issues/PRs · **no** push to the product repo |
293
+ | SigmaWrite | Nothing beyond chat — optional paste into system instructions |
294
+
295
+ Windows-native defaults where skills mention shells or worktrees (PowerShell-friendly; do not assume WSL).
296
+
297
+ ---
298
+
299
+ ## Repo layout
300
+
301
+ ```text
302
+ Sigmaskills/
303
+ ├── AGENTS.md Agent working contract
304
+ ├── README.md · CHANGELOG.md · LICENSE · package.json
305
+ ├── test/ Structural regression tests (npm test)
306
+ ├── .github/ Issue forms · PR template · CI
307
+ ├── sigmareview/ SKILL.md · agents/ · references/
308
+ ├── sigmaperformance/ SKILL.md · agents/ · references/
309
+ ├── sigmabrief/ SKILL.md · agents/ · references/
310
+ └── sigmawrite/ SKILL.md · agents/
311
+ ```
312
+
313
+ Each top-level folder is one installable skill. `name` in frontmatter = folder name = `--skill` id.
314
+
315
+ Agents working in this repo should read [`AGENTS.md`](AGENTS.md).
316
+
317
+ ---
318
+
319
+ ## Testing
320
+
321
+ Zero-dependency Node tests guard the beauty: skill registry, `SKILL.md` frontmatter, `agents/openai.yaml`, README install/run wiring, CHANGELOG, issue templates, agent docs, and SigmaWrite’s soft-steer contract.
322
+
323
+ ```bash
324
+ npm test
325
+ ```
326
+
327
+ CI runs the same suite on Windows, macOS, and Linux for Node.js 20 and 22, on every pull request and every push to `main`. Those jobs cover real junctions or symbolic links, copy fallback, shell differences, and an isolated temp filesystem.
328
+
329
+ When you **add or rename a skill**, update `KNOWN_SKILLS` in [`test/repo-invariants.test.js`](test/repo-invariants.test.js) in the same change as README and CHANGELOG — otherwise CI fails on purpose. That rule also lives in [`AGENTS.md`](AGENTS.md).
330
+
331
+ ---
332
+
333
+ ## Contributing & issues
334
+
335
+ Use the issue chooser: [New issue](https://github.com/Djordje-Stojanovic/Sigmaskills/issues/new/choose)
336
+ Bug · Feature · Improvement · Docs — written for skills, prompts, and templates (not unrelated product apps).
337
+
338
+ ---
339
+
340
+ ## License
341
+
342
+ [MIT](LICENSE) © Djordje Stojanovic
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { runCli } from '../src/cli.js';
3
+
4
+ const exitCode = await runCli(process.argv.slice(2));
5
+ if (exitCode !== 0) {
6
+ process.exit(exitCode);
7
+ }
package/manifest.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "name": "sigmaskills",
4
+ "version": "0.2.0",
5
+ "description": "Portable Agent Skills monorepo and first-party Sigma Installer",
6
+ "skills": [
7
+ {
8
+ "id": "sigmareview",
9
+ "title": "SigmaReview",
10
+ "needsReferences": true
11
+ },
12
+ {
13
+ "id": "sigmaperformance",
14
+ "title": "SigmaPerformance",
15
+ "needsReferences": true
16
+ },
17
+ {
18
+ "id": "sigmabrief",
19
+ "title": "SigmaBrief",
20
+ "needsReferences": true
21
+ },
22
+ {
23
+ "id": "sigmawrite",
24
+ "title": "SigmaWrite",
25
+ "needsReferences": false
26
+ }
27
+ ]
28
+ }
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "@djordje-stojanovic/sigmaskills",
3
+ "version": "0.2.0",
4
+ "description": "Portable Agent Skills monorepo and first-party Sigma Installer",
5
+ "type": "module",
6
+ "bin": {
7
+ "sigmaskills": "bin/sigmaskills.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "src",
12
+ "registry/agent-hosts.json",
13
+ "registry/source.json",
14
+ "registry/schema.json",
15
+ "registry/skill-baselines.json",
16
+ "manifest.json",
17
+ "sigmareview",
18
+ "sigmaperformance",
19
+ "sigmabrief",
20
+ "sigmawrite",
21
+ "README.md",
22
+ "LICENSE",
23
+ "CHANGELOG.md"
24
+ ],
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/Djordje-Stojanovic/Sigmaskills.git"
28
+ },
29
+ "publishConfig": {
30
+ "access": "public",
31
+ "provenance": true
32
+ },
33
+ "engines": {
34
+ "node": ">=20"
35
+ },
36
+ "scripts": {
37
+ "prepack": "node ./src/prepack.js",
38
+ "test": "node scripts/run-tests.js",
39
+ "registry:sync": "node ./src/registry/sync.js",
40
+ "registry:validate": "node ./test/registry-validate-cli.mjs"
41
+ }
42
+ }