nga-skills-factory 0.0.1
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 +145 -0
- package/bin/nga-skills.js +30 -0
- package/bitbucket-pipelines.yml +33 -0
- package/package.json +32 -0
- package/skills/claude/commands/architect/SKILL.md +551 -0
- package/skills/claude/commands/brainstorm/SKILL.md +211 -0
- package/skills/claude/commands/implement/SKILL.md +316 -0
- package/skills/claude/commands/spec-writer/SKILL.md +429 -0
- package/skills/claude/commands/write-prd/SKILL.md +362 -0
- package/skills/copilot/copilot-instructions.md +165 -0
- package/skills/cursor/rules/architect.mdc +251 -0
- package/skills/cursor/rules/brainstorm.mdc +167 -0
- package/skills/cursor/rules/implement.mdc +218 -0
- package/skills/cursor/rules/spec-writer.mdc +176 -0
- package/skills/cursor/rules/write-prd.mdc +215 -0
- package/src/installer.js +98 -0
- package/src/lister.js +29 -0
- package/src/manifest.js +34 -0
- package/src/utils.js +32 -0
package/README.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# nga-skills
|
|
2
|
+
|
|
3
|
+
Structured AI development workflow skills - install once, use everywhere.
|
|
4
|
+
|
|
5
|
+
Supports **Claude Code**, **Cursor**, and **GitHub Copilot**.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick Start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Interactive install — detects which assistants are configured in your workspace
|
|
13
|
+
npx nga-skills-factory
|
|
14
|
+
|
|
15
|
+
# Install for a specific assistant
|
|
16
|
+
npx nga-skills-factory install --claude
|
|
17
|
+
npx nga-skills-factory install --cursor
|
|
18
|
+
npx nga-skills-factory install --copilot
|
|
19
|
+
|
|
20
|
+
# Install for all assistants at once
|
|
21
|
+
npx nga-skills-factory install --all
|
|
22
|
+
|
|
23
|
+
# See all available skills
|
|
24
|
+
npx nga-skills-factory list
|
|
25
|
+
|
|
26
|
+
# Overwrite existing files
|
|
27
|
+
npx nga-skills-factory install --claude --force
|
|
28
|
+
|
|
29
|
+
# Install into a specific directory (default: current directory)
|
|
30
|
+
npx nga-skills-factory install --claude --dir /path/to/project
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## What Gets Installed
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
| Skill | Type | Claude | Cursor | Copilot |
|
|
39
|
+
| -------------- | ------------- | ------ | ------ | ------- |
|
|
40
|
+
| `/spec-writer` | Slash command | ✓ | ✓ | ✓ |
|
|
41
|
+
| `/brainstorm` | Slash command | ✓ | ✓ | ✓ |
|
|
42
|
+
| `/write-prd` | Slash command | ✓ | ✓ | ✓ |
|
|
43
|
+
| `/architect` | Slash command | ✓ | ✓ | ✓ |
|
|
44
|
+
| `/implement` | Slash command | ✓ | ✓ | ✓ |
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Install Locations
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
| Assistant | Files land in |
|
|
51
|
+
| -------------- | --------------------------------- |
|
|
52
|
+
| Claude Code | `.claude/commands/` |
|
|
53
|
+
| Cursor | `.cursor/rules/` |
|
|
54
|
+
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
### Output Artifacts
|
|
58
|
+
|
|
59
|
+
All skills write their output to `_nsf_output/` in your project root:
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
| Skill | Output file(s) |
|
|
63
|
+
| -------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
64
|
+
| `/spec-writer` | `_nsf_output/docs/raw-storming.md`, `context-map.md`, `domain-brief.md`, `master-prd.md`, `prd-<context>.md` × N |
|
|
65
|
+
| `/brainstorm` | `_nsf_output/BRAINSTORM.md` |
|
|
66
|
+
| `/write-prd` | `_nsf_output/PRD.md` |
|
|
67
|
+
| `/architect` | `_nsf_output/ARCHITECTURE.md` |
|
|
68
|
+
| `/implement` | `_nsf_output/IMPLEMENTATION_LOG.md` |
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Kairos-Aware
|
|
74
|
+
|
|
75
|
+
Every skill auto-detects whether the current project is a **Kairos component** (by `go.mod` references to `kairos-component-common` / `kairos-gen` / `nga-common`, presence of `pkg/schema/` and the standard `internal/` layout, presence of `topic-config.json`, or `CLAUDE.md` mentioning Kairos). When Kairos mode triggers, the skills produce Kairos-shaped output: bounded-context-to-component mapping, `EntityBase` aggregates with 2-column JSONB persistence, Fiber endpoints using `api.SuccessResponse` / `api.ErrorResponse`, CloudEvent message schemas under `pkg/schema/`, `kairos-gen`-aware `make generate` gates, and Component Map rows routed to the matching layer skills (`domain-model-development`, `repository-development`, `service-development`, `client-api-development`, `event-handler-development`, `message-schema-development`, `kairos-testing`, `kairos-feature-scaffolding`).
|
|
76
|
+
|
|
77
|
+
For non-Kairos projects the skills fall back to generic templates. Each skill records the detected mode in its output header (`Mode: Kairos | Generic`). Users can override with "use generic" or "use kairos" in their prompt.
|
|
78
|
+
|
|
79
|
+
Every skill also honours `CLAUDE.md` and `AGENTS.md` — project rules override skill defaults.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Skills Reference
|
|
84
|
+
|
|
85
|
+
### `/spec-writer` *(Phase 0 - event storming path)*
|
|
86
|
+
|
|
87
|
+
Takes raw event storming artifacts as input and converts them into a full set of structured specs. Organises stickies into domain events, commands, aggregates, actors, policies, hot spots, and external systems. Identifies bounded contexts and classifies their relationships (Customer/Supplier, Partnership, Conformist, ACL). In **Kairos mode**, also produces a bounded-context-to-Kairos-component mapping (this repo / existing component / new component repo — defaulting to colocation) and adds Go-naming hints to the ubiquitous language glossary. Then generates a domain brief, a master PRD (with Kairos NFR defaults in Kairos mode — tenant isolation, idempotency, ETag concurrency, audit log, correlation propagation), and one focused PRD per bounded context. All outputs land in `_nsf_output/docs/`. Feeds directly into `/brainstorm`.
|
|
88
|
+
|
|
89
|
+
### `/brainstorm`
|
|
90
|
+
|
|
91
|
+
Run this before writing any requirements. Leads a structured 4-phase ideation session: forces you to articulate the real pain and user, challenges hidden assumptions, generates 3 contrasting approaches, and gives a clear recommendation. In **Kairos mode**, the assumption-challenging step surfaces Kairos-specific risks (tenant model, idempotency, ETag concurrency, cross-component coupling, master-data ownership), and the approach options are labelled with their Kairos shape (single-component, context-by-context, vertical slice, new repo). Produces `_nsf_output/BRAINSTORM.md`.
|
|
92
|
+
|
|
93
|
+
### `/write-prd`
|
|
94
|
+
|
|
95
|
+
Translates a brainstorm doc or spec file into a complete, unambiguous Product Requirements Document. Reads `_nsf_output/BRAINSTORM.md` (or a spec you provide), fills gaps with targeted questions, then produces `_nsf_output/PRD.md` with testable functional requirements, user stories, acceptance criteria, edge cases, and success metrics. **Kairos mode** uses Kairos NFR defaults (tenant isolation, at-least-once idempotency, ETag optimistic concurrency, audit log, correlation propagation, structured observability), names aggregates instead of generic entities, and flags **technical leakage** (any FR/NFR prescribing implementation detail that should be `/architect`'s call). Stays product-level — persistence shape and library choices are left to `/architect`.
|
|
96
|
+
|
|
97
|
+
### `/architect`
|
|
98
|
+
|
|
99
|
+
Designs the full technical architecture before any code is written. Reads `_nsf_output/PRD.md`, makes explicit decisions on each architectural area with options, trade-offs, and a clear recommendation. In **Kairos mode** the decision areas are Kairos-specific (aggregate placement, `EntityBase` shape, 2-column JSONB persistence, `ServicesFactory` wiring, Fiber endpoints, `pkg/schema/` messages, `internal/event-handler/` map, cross-component integration via `topic-config.json`, layer-specific testing tools). The resulting `_nsf_output/ARCHITECTURE.md` includes: domain model with `EntityBase`, 2-column JSONB persistence + JSONB-path index hints, API contracts using `api.SuccessResponse` / `api.ErrorResponse`, a message schema table, an event/command handler map, and a **Component Map with a Layer Skill column per row** plus an explicit `make generate` step between schemas and dependents. Generic projects get a stack-appropriate generic template instead.
|
|
100
|
+
|
|
101
|
+
### `/implement`
|
|
102
|
+
|
|
103
|
+
Executes the architecture one phase at a time. Reads `_nsf_output/ARCHITECTURE.md`, validates the Component Map and Implementation Sequence, and builds components in the declared order. In **Kairos mode**, each Component Map row is **routed to its layer skill** (`domain-model-development`, `message-schema-development`, `repository-development`, `service-development`, `client-api-development`, `event-handler-development`, `kairos-testing`); aggregate-shaped maps invoke `kairos-feature-scaffolding` as orchestrator for the ServicesFactory / AppConfig wiring. `make generate` is a hard gate — after any schema or `topic-config.json` change, generation runs before dependents build, and `kairos-gen` outputs (`sql/1.gen/`, generated topic subscriptions) are never hand-edited. Writes tests alongside each component via `kairos-testing`, runs verification after each phase (`make generate` idempotent, build, vet, test, lint), and stops at every milestone for review. Logs all progress, generated-code refreshes, and deviations to `_nsf_output/IMPLEMENTATION_LOG.md`.
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## Workflow
|
|
108
|
+
|
|
109
|
+
Both paths run through the full pipeline. The only difference is whether you start with event storming data or a raw idea:
|
|
110
|
+
|
|
111
|
+
**Event storming path** — you have a domain model from a storming session:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
/spec-writer → /brainstorm → /write-prd → /architect → /implement
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Greenfield path** — you have an idea but no formal domain model:
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
/brainstorm → /write-prd → /architect → /implement
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
When `/spec-writer` output is present in `_nsf_output/docs/`, `/brainstorm` automatically detects it and switches to a domain-informed mode — it skips the raw intake questions and focuses on product strategy (MVP scope, constraints, success metrics) instead. The bounded contexts from the domain model drive the approach options.
|
|
124
|
+
|
|
125
|
+
You can enter the pipeline at any point — if you already have a PRD, start with `/architect`; if you have an architecture, start with `/implement`.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Adding New Skills
|
|
130
|
+
|
|
131
|
+
1. Add the skill file to `skills/claude/commands/<name>/SKILL.md` and/or `skills/cursor/rules/<name>.mdc`
|
|
132
|
+
2. Register it in `src/manifest.js`
|
|
133
|
+
3. Bump the version in `package.json`
|
|
134
|
+
4. Publish: `npm publish`
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Publishing
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npm login
|
|
142
|
+
npm publish --access public
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
Users then run: `npx nga-skills-factory`
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const { program } = require('commander');
|
|
5
|
+
const { install } = require('../src/installer');
|
|
6
|
+
const { list } = require('../src/lister');
|
|
7
|
+
const pkg = require('../package.json');
|
|
8
|
+
|
|
9
|
+
program
|
|
10
|
+
.name('nga-skills-factory')
|
|
11
|
+
.description('Install IFS NGA skills into your AI assistant workspace')
|
|
12
|
+
.version(pkg.version);
|
|
13
|
+
|
|
14
|
+
program
|
|
15
|
+
.command('install', { isDefault: true })
|
|
16
|
+
.description('Install skills into the current workspace (default command)')
|
|
17
|
+
.option('--claude', 'Install for Claude Code only')
|
|
18
|
+
.option('--cursor', 'Install for Cursor only')
|
|
19
|
+
.option('--copilot', 'Install for GitHub Copilot only')
|
|
20
|
+
.option('--all', 'Install for all AI assistants')
|
|
21
|
+
.option('--force', 'Overwrite existing skill files')
|
|
22
|
+
.option('--dir <path>', 'Target workspace directory', process.cwd())
|
|
23
|
+
.action(install);
|
|
24
|
+
|
|
25
|
+
program
|
|
26
|
+
.command('list')
|
|
27
|
+
.description('List all available skills')
|
|
28
|
+
.action(list);
|
|
29
|
+
|
|
30
|
+
program.parse(process.argv);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
image: node:20
|
|
2
|
+
|
|
3
|
+
definitions:
|
|
4
|
+
caches:
|
|
5
|
+
npm: ~/.npm
|
|
6
|
+
|
|
7
|
+
steps:
|
|
8
|
+
- step: &install-test
|
|
9
|
+
name: Install & Test
|
|
10
|
+
caches:
|
|
11
|
+
- npm
|
|
12
|
+
script:
|
|
13
|
+
- npm ci
|
|
14
|
+
- npm test
|
|
15
|
+
|
|
16
|
+
pipelines:
|
|
17
|
+
default:
|
|
18
|
+
- step: *install-test
|
|
19
|
+
|
|
20
|
+
branches:
|
|
21
|
+
master:
|
|
22
|
+
- step: *install-test
|
|
23
|
+
- step:
|
|
24
|
+
name: Publish to npm
|
|
25
|
+
deployment: production
|
|
26
|
+
condition:
|
|
27
|
+
changesets:
|
|
28
|
+
includePaths:
|
|
29
|
+
- "package.json"
|
|
30
|
+
- "package-lock.json"
|
|
31
|
+
script:
|
|
32
|
+
- npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
|
|
33
|
+
- npm publish --access public
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nga-skills-factory",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "IFS NGA skills installer for AI coding assistants (Claude Code, Cursor, GitHub Copilot)",
|
|
5
|
+
"main": "src/index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"nga-skills-factory": "./bin/nga-skills.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "node --test"
|
|
11
|
+
},
|
|
12
|
+
"keywords": [
|
|
13
|
+
"ifs",
|
|
14
|
+
"nga",
|
|
15
|
+
"ai-skills",
|
|
16
|
+
"claude",
|
|
17
|
+
"cursor",
|
|
18
|
+
"copilot",
|
|
19
|
+
"developer-tools"
|
|
20
|
+
],
|
|
21
|
+
"author": "IFS NGA",
|
|
22
|
+
"license": "ISC",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"chalk": "^4.1.2",
|
|
25
|
+
"commander": "^11.1.0",
|
|
26
|
+
"fs-extra": "^11.2.0",
|
|
27
|
+
"inquirer": "^8.2.6"
|
|
28
|
+
},
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=16.0.0"
|
|
31
|
+
}
|
|
32
|
+
}
|