nikos 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +32 -2
- package/dist/cli.js +60 -0
- package/dist/commands/bet.js +97 -0
- package/dist/commands/clear.js +100 -0
- package/dist/commands/decide.js +60 -0
- package/dist/commands/decisions.js +71 -0
- package/dist/commands/init.js +72 -0
- package/dist/commands/next.js +35 -0
- package/dist/commands/plan.js +64 -0
- package/dist/commands/show.js +82 -0
- package/dist/commands/state.js +104 -0
- package/dist/commands/validate.js +206 -0
- package/dist/commands/verify.js +95 -0
- package/dist/lib/project.js +42 -0
- package/dist/lint/constitution.js +40 -0
- package/dist/lint/gherkin.js +99 -0
- package/dist/lint/portable.js +66 -0
- package/dist/verify/detect.js +21 -0
- package/docs/format.md +296 -0
- package/docs/gherkin.md +81 -0
- package/docs/install.md +72 -0
- package/docs/intentdocs-mapping.md +117 -0
- package/package.json +44 -4
- package/schemas/bet.schema.json +23 -0
- package/schemas/state.schema.json +34 -0
- package/schemas/storymap.schema.json +43 -0
- package/skills/clear/SKILL.md +55 -0
- package/skills/clear-review/SKILL.md +45 -0
- package/skills/decisions/SKILL.md +45 -0
- package/skills/intent/SKILL.md +39 -0
- package/skills/nikos-mode/SKILL.md +61 -0
- package/skills/nikos-mode/playbooks/answer.md +9 -0
- package/skills/nikos-mode/playbooks/bet.md +14 -0
- package/skills/nikos-mode/playbooks/build-a-story.md +14 -0
- package/skills/nikos-mode/playbooks/change.md +12 -0
- package/skills/nikos-mode/playbooks/idea-to-blueprint.md +16 -0
- package/skills/nikos-mode/playbooks/index.md +13 -0
- package/skills/nikos-mode/playbooks/validate.md +17 -0
- package/skills/nikos-mode/principles/index.md +14 -0
- package/skills/verify/SKILL.md +49 -0
- package/templates/intent/constitution.md +19 -0
- package/templates/intent/decisions.md +12 -0
- package/templates/intent/features/getting-started/first-story.feature +12 -0
- package/templates/intent/plans/.gitkeep +0 -0
- package/templates/intent/state.yaml +4 -0
- package/templates/intent/storymap.yaml +10 -0
- package/templates/plan.md +13 -0
- package/templates/verify/js/cucumber.mjs +6 -0
- package/templates/verify/js/test/steps/first-story.steps.mjs +16 -0
- package/templates/verify/python/behave.ini +4 -0
- package/templates/verify/python/steps/first_story_steps.py +19 -0
- package/templates/verify/ts/cucumber.mjs +6 -0
- package/templates/verify/ts/test/steps/first-story.steps.ts +16 -0
package/package.json
CHANGED
|
@@ -1,6 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nikos",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "nikOS \u2014 an open-source agent skill stack for spec-driven development. Specs, plans and Cucumber features live in your repo.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Niko Vijay",
|
|
7
|
+
"homepage": "https://nikos.tools",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/nikovijay/NikOS.git"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"bin": {
|
|
14
|
+
"nikos": "dist/cli.js"
|
|
15
|
+
},
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=20"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist",
|
|
21
|
+
"schemas",
|
|
22
|
+
"templates",
|
|
23
|
+
"skills",
|
|
24
|
+
"docs"
|
|
25
|
+
],
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsc -p tsconfig.json",
|
|
28
|
+
"prepublishOnly": "npm run build && npm test",
|
|
29
|
+
"test": "vitest run",
|
|
30
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
31
|
+
"test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=reports/junit.xml"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@cucumber/cucumber": "^12.9.0",
|
|
35
|
+
"@types/node": "^22.20.5",
|
|
36
|
+
"tsx": "^4.23.15",
|
|
37
|
+
"typescript": "^5.6.3",
|
|
38
|
+
"vitest": "^2.1.9"
|
|
39
|
+
},
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"@cucumber/gherkin": "^30.0.4",
|
|
42
|
+
"@cucumber/messages": "^26.0.1",
|
|
43
|
+
"ajv": "^8.17.1",
|
|
44
|
+
"yaml": "^2.6.1"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nikos.tools/schemas/bet.schema.json",
|
|
4
|
+
"title": "nikOS bet card front matter",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["id", "hypothesis", "key_result", "expected_uplift", "time_box", "blockers", "stories", "status"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"id": { "type": "string", "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$" },
|
|
10
|
+
"hypothesis": { "type": "string", "minLength": 1 },
|
|
11
|
+
"key_result": { "type": "string", "minLength": 1 },
|
|
12
|
+
"expected_uplift": { "type": "string", "minLength": 1 },
|
|
13
|
+
"time_box": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
|
|
14
|
+
"blockers": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
15
|
+
"stories": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"minItems": 1,
|
|
18
|
+
"uniqueItems": true,
|
|
19
|
+
"items": { "type": "string", "pattern": "^[A-Z][A-Z0-9]{0,9}-[0-9]+$" }
|
|
20
|
+
},
|
|
21
|
+
"status": { "enum": ["open", "won", "lost", "killed"] }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nikos.tools/schemas/state.schema.json",
|
|
4
|
+
"title": "nikOS state",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["format_version", "stories"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"format_version": { "const": 1 },
|
|
10
|
+
"stories": {
|
|
11
|
+
"type": "object",
|
|
12
|
+
"propertyNames": { "pattern": "^[A-Z][A-Z0-9]{0,9}-[0-9]+$" },
|
|
13
|
+
"additionalProperties": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["status"],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"status": { "enum": ["todo", "in_progress", "needs_rework", "done"] },
|
|
19
|
+
"claimed_by": { "type": "string" },
|
|
20
|
+
"plan_version": { "type": "integer", "minimum": 1 },
|
|
21
|
+
"blockers": { "type": "array", "items": { "type": "string" } },
|
|
22
|
+
"updated": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"run": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"queue": { "type": "array", "items": { "type": "string" } }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://nikos.tools/schemas/storymap.schema.json",
|
|
4
|
+
"title": "nikOS story map",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["format_version", "project", "key", "activities", "releases"],
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"format_version": { "const": 1 },
|
|
10
|
+
"project": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
11
|
+
"key": { "type": "string", "pattern": "^[A-Z][A-Z0-9]{0,9}$" },
|
|
12
|
+
"activities": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"minItems": 1,
|
|
15
|
+
"items": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["id", "title"],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
21
|
+
"title": { "type": "string", "minLength": 1 }
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"releases": {
|
|
26
|
+
"type": "array",
|
|
27
|
+
"minItems": 1,
|
|
28
|
+
"items": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"required": ["number", "title", "stories"],
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"properties": {
|
|
33
|
+
"number": { "type": "integer", "minimum": 1 },
|
|
34
|
+
"title": { "type": "string", "minLength": 1 },
|
|
35
|
+
"stories": {
|
|
36
|
+
"type": "array",
|
|
37
|
+
"items": { "type": "string", "pattern": "^[A-Z][A-Z0-9]{0,9}-[0-9]+$" }
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clear
|
|
3
|
+
description: Check a story is Clear, Lean, Executable, Accurate and Responsible before anyone plans or builds it. Use before building any story, or when asked to review or check a spec.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# clear
|
|
7
|
+
|
|
8
|
+
A story must pass all five checks before it's built. Bad specs caught here
|
|
9
|
+
never become bad code.
|
|
10
|
+
|
|
11
|
+
## 1. Run the mechanical checks
|
|
12
|
+
|
|
13
|
+
Run `nikos clear <story-id>` in the repo. It finds the story's `.feature` file
|
|
14
|
+
and decides **Lean** and **Executable**, which a script can check better than
|
|
15
|
+
a person. Use its result for those two checks; don't overrule it.
|
|
16
|
+
|
|
17
|
+
If the command isn't available, check them by hand:
|
|
18
|
+
|
|
19
|
+
- **Executable:** the feature has at least one Scenario, and every Scenario
|
|
20
|
+
has a When step and a Then step.
|
|
21
|
+
- **Lean:** the feature names no file paths, SQL, frameworks, databases or
|
|
22
|
+
storage mechanisms.
|
|
23
|
+
|
|
24
|
+
## 2. Judge the other three
|
|
25
|
+
|
|
26
|
+
Read the story's `.feature` file, `intent/constitution.md` and
|
|
27
|
+
`intent/decisions.md`.
|
|
28
|
+
|
|
29
|
+
- **Clear:** every sentence has one reading. Two people would build the same
|
|
30
|
+
thing from it. Vague words ("fast", "easy", "some", "etc.") fail.
|
|
31
|
+
- **Accurate:** it agrees with the constitution (who it's for, the problem,
|
|
32
|
+
the proof) and with every decision in `decisions.md`. Name the line it
|
|
33
|
+
contradicts.
|
|
34
|
+
- **Responsible:** where the story touches personal data, money, safety,
|
|
35
|
+
outreach to real people or accessibility, a scenario or the description
|
|
36
|
+
covers it. A story that touches none of these passes and says so.
|
|
37
|
+
|
|
38
|
+
## 3. Report all five, in this order
|
|
39
|
+
|
|
40
|
+
One line per check, every time, even when it passes:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Clear: pass. <why>
|
|
44
|
+
Lean: pass. <why>
|
|
45
|
+
Executable: fail. <what's missing>. Fix: <the change to make>
|
|
46
|
+
Accurate: pass. <why>
|
|
47
|
+
Responsible: pass. <why>
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Every fail names what's missing and the fix.
|
|
51
|
+
|
|
52
|
+
## 4. Stop on a fail
|
|
53
|
+
|
|
54
|
+
If any check fails, don't plan or build the story. Report the failures and
|
|
55
|
+
the fixes, and wait for the spec to change.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: clear-review
|
|
3
|
+
description: Get a sceptical second review of a story's spec before building it, from another model or a fresh agent when one is available. Use when a spec is about to be built and the person wants it challenged, or when CLEAR passed but something feels off.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# clear-review
|
|
7
|
+
|
|
8
|
+
One reviewer misses things. A second one, with no stake in the spec, finds
|
|
9
|
+
more.
|
|
10
|
+
|
|
11
|
+
## 1. Run CLEAR first
|
|
12
|
+
|
|
13
|
+
Check the story with the clear skill. If a check fails, stop and report it.
|
|
14
|
+
There's no point reviewing a spec that already fails.
|
|
15
|
+
|
|
16
|
+
## 2. Ask a second reviewer to attack it
|
|
17
|
+
|
|
18
|
+
If you can hand work to another model or a fresh agent with no memory of this
|
|
19
|
+
conversation, give it only:
|
|
20
|
+
|
|
21
|
+
- the story's `.feature` file,
|
|
22
|
+
- `intent/constitution.md`,
|
|
23
|
+
- the entries from `nikos decisions "<story-id>"`,
|
|
24
|
+
|
|
25
|
+
and this brief: "You are a sceptical reviewer. Find what's ambiguous,
|
|
26
|
+
missing, contradictory, untestable or risky in this spec. For each problem,
|
|
27
|
+
quote the line and say what could go wrong. Don't suggest code."
|
|
28
|
+
|
|
29
|
+
Don't share your own CLEAR results or opinion with it, so its read isn't
|
|
30
|
+
anchored on yours.
|
|
31
|
+
|
|
32
|
+
If you can't hand work off, do the review yourself as a separate pass: reread
|
|
33
|
+
the feature as that sceptical reviewer, line by line, and say in the report
|
|
34
|
+
that it was a single-model review.
|
|
35
|
+
|
|
36
|
+
## 3. Merge into one list
|
|
37
|
+
|
|
38
|
+
Combine your CLEAR results and the reviewer's findings into one list. Drop
|
|
39
|
+
duplicates, and say who raised each finding. For each one, say whether it
|
|
40
|
+
blocks building (the spec is wrong or untestable) or is a note.
|
|
41
|
+
|
|
42
|
+
## 4. Stop for the person
|
|
43
|
+
|
|
44
|
+
Show the list. Change the spec only once the person agrees to each change.
|
|
45
|
+
A finding is a question for them, not a fix for you.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: decisions
|
|
3
|
+
description: Show why something was decided by quoting the decision log, or say plainly that no decision is recorded. Use when someone asks why a choice was made, what was rejected, or whether something was ever decided.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# decisions
|
|
7
|
+
|
|
8
|
+
The reason for a choice is whatever `intent/decisions.md` says. Never invent
|
|
9
|
+
one.
|
|
10
|
+
|
|
11
|
+
## 1. Search the log
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
nikos decisions "<the question or topic>"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
It quotes every entry that mentions the topic, best match first, each with
|
|
18
|
+
its `intent/decisions.md:<first>-<last>` line range. A story id (e.g. HT-1)
|
|
19
|
+
finds the entries tagged with it.
|
|
20
|
+
|
|
21
|
+
If nothing matches, try again with the words the spec would use: the name
|
|
22
|
+
of the feature, the library or the setting, and other spellings (colour and
|
|
23
|
+
color).
|
|
24
|
+
|
|
25
|
+
## 2. Answer from the entries
|
|
26
|
+
|
|
27
|
+
Quote the lines that answer the question, cite them as
|
|
28
|
+
`intent/decisions.md:<lines>`, and give the date and story id. If an entry
|
|
29
|
+
says it supersedes another, quote both and say which one stands.
|
|
30
|
+
|
|
31
|
+
Only cite an entry that actually answers the question. A match on a shared
|
|
32
|
+
word isn't an answer.
|
|
33
|
+
|
|
34
|
+
## 3. When nothing is recorded
|
|
35
|
+
|
|
36
|
+
Say: "No decision about <topic> is recorded in intent/decisions.md." You may
|
|
37
|
+
add what the git history of `intent/` shows (`git log -p -- intent/`), marked
|
|
38
|
+
clearly as history, not a recorded decision. Then offer to log one:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
nikos decide "<title>" --why "<why>" --category <product|architecture|design|process>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Log it only once the person tells you the reason. Don't write a reason for
|
|
45
|
+
them.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intent
|
|
3
|
+
description: Explain what a story is meant to do and where it stands, from the repo's specs. Use when someone asks what a story is for, what it covers, or what state it's in, by its id (e.g. HT-2) or by topic.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# intent
|
|
7
|
+
|
|
8
|
+
Say what the spec says, not what the code happens to do.
|
|
9
|
+
|
|
10
|
+
## 1. Find the story
|
|
11
|
+
|
|
12
|
+
If you have a story id, use it. If you only have a topic, search the
|
|
13
|
+
`Feature:` lines under `intent/features/` and pick the story that matches.
|
|
14
|
+
If more than one could match, list them and ask which one.
|
|
15
|
+
|
|
16
|
+
## 2. Read everything recorded about it
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
nikos show <story-id>
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
It prints the feature (user story and scenarios), its status from
|
|
23
|
+
`intent/state.yaml`, its release, the latest plan, any bets it's linked to,
|
|
24
|
+
and decisions tagged with its id. Open the feature file and the plan it
|
|
25
|
+
names when you need more than the summary.
|
|
26
|
+
|
|
27
|
+
## 3. Answer in plain words
|
|
28
|
+
|
|
29
|
+
Say, in a few sentences:
|
|
30
|
+
|
|
31
|
+
- who it's for and what they get (the "As a / I want / So that" lines),
|
|
32
|
+
- what has to be true for it to be done (each scenario, by its AC label),
|
|
33
|
+
- where it stands: status, who has it (`claimed_by`), blockers, and the latest
|
|
34
|
+
plan. A story in the run queue but unclaimed is waiting, not being worked
|
|
35
|
+
on.
|
|
36
|
+
|
|
37
|
+
Cite each claim as `path:line`, including the bet and plan files `nikos show`
|
|
38
|
+
names. If the spec doesn't say something, say so.
|
|
39
|
+
Don't fill the gap from the code or from guesswork.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: nikos-mode
|
|
3
|
+
description: Entry point for nikOS spec-driven work. Use at the start of any request in a repo with an intent/ folder, or when asked to plan, build, change, check or explain a story. Picks the matching playbook and runs every step of it.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# nikos-mode
|
|
7
|
+
|
|
8
|
+
You follow a named playbook for every request instead of improvising. Run
|
|
9
|
+
these five steps in order, every time.
|
|
10
|
+
|
|
11
|
+
The playbooks run the `nikos` command. When it isn't installed (`nikos
|
|
12
|
+
--version` fails), run it as `npx -y nikos` instead: `npx -y nikos validate`
|
|
13
|
+
for `nikos validate`, and so on.
|
|
14
|
+
|
|
15
|
+
## 1. Read the principles
|
|
16
|
+
|
|
17
|
+
Read `principles/index.md` next to this file. Keep each principle in mind for
|
|
18
|
+
the rest of the request. When one applies, say which.
|
|
19
|
+
|
|
20
|
+
## 2. Pick a playbook and say which
|
|
21
|
+
|
|
22
|
+
Read `playbooks/index.md`. Match the request against the "Use when" column and
|
|
23
|
+
pick exactly one playbook. Then tell the person, before doing anything else:
|
|
24
|
+
|
|
25
|
+
> Playbook: **<name>** (`playbooks/<file>`), because <one-line reason>.
|
|
26
|
+
|
|
27
|
+
If two rows match, pick the first and say which other one you passed over. If
|
|
28
|
+
nothing matches, say "No playbook matches", then use `change` when the request
|
|
29
|
+
edits files in the repo and `answer` when it doesn't.
|
|
30
|
+
|
|
31
|
+
## 3. Copy every step into the task list
|
|
32
|
+
|
|
33
|
+
Open the chosen playbook file. Copy each numbered step into your task list,
|
|
34
|
+
word for word and in order, one item per step.
|
|
35
|
+
|
|
36
|
+
- If your tool has a built-in task or todo list, use it.
|
|
37
|
+
- If it has none, write the list in your reply as a Markdown checklist
|
|
38
|
+
(`- [ ] 1. …`) and repeat it, updated, whenever a step changes state.
|
|
39
|
+
|
|
40
|
+
Don't merge, reword, reorder or summarise steps. Don't add steps of your own
|
|
41
|
+
to the playbook's list; put extra work under the step it belongs to.
|
|
42
|
+
|
|
43
|
+
## 4. Never drop a step
|
|
44
|
+
|
|
45
|
+
Every step ends as done or skipped. A step you don't do stays on the list,
|
|
46
|
+
marked skipped, with the reason:
|
|
47
|
+
|
|
48
|
+
> ~~5. Run the story's scenarios~~ skipped: the repo has no Cucumber runner yet.
|
|
49
|
+
|
|
50
|
+
"Not needed" is not a reason. Say what makes it not needed.
|
|
51
|
+
|
|
52
|
+
## 5. Show evidence before you say done
|
|
53
|
+
|
|
54
|
+
Finish with a report that lists every step with its outcome:
|
|
55
|
+
|
|
56
|
+
- **done**, with the evidence: the command you ran and its result, the file
|
|
57
|
+
and line you changed, or the passage you quoted.
|
|
58
|
+
- **skipped**, with the reason from step 4.
|
|
59
|
+
|
|
60
|
+
Never call the request done, fixed or passing without that evidence. If a
|
|
61
|
+
check fails, say so and show the output.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# answer
|
|
2
|
+
|
|
3
|
+
Answer a question from what the repo's specs actually say.
|
|
4
|
+
|
|
5
|
+
1. Restate the question in one sentence.
|
|
6
|
+
2. Find the files in `intent/` that answer it: constitution, story map, features, plans or decisions.
|
|
7
|
+
3. Answer in plain words, citing each claim as `path:line`.
|
|
8
|
+
4. If the specs don't answer it, say so and name the file where the answer belongs.
|
|
9
|
+
5. Report every step with its evidence or its skip reason.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# bet
|
|
2
|
+
|
|
3
|
+
Frame work as a time-boxed bet you can judge: what you believe, how you'll
|
|
4
|
+
measure it, how much you expect it to move, by when, and which stories
|
|
5
|
+
deliver it. The person decides the bet and calls the outcome.
|
|
6
|
+
|
|
7
|
+
1. Ask what the person wants to move and why they think this work will move it, and read Proof, Founding hypothesis and Validation in `intent/constitution.md` and the related entries in `intent/decisions.md`.
|
|
8
|
+
2. Frame the bet with the person and confirm it: a hypothesis ("We believe <change> will <effect> for <users> because <evidence>"), a key result (one measure with a number), the expected uplift (from what to what), a time box end date, and any known blockers.
|
|
9
|
+
3. Pick the stories that deliver it from `intent/storymap.yaml`; if one is missing, propose it and add it only once the person agrees, following the story conventions in the idea-to-blueprint playbook.
|
|
10
|
+
4. Run `nikos bet new <bet-id> --hypothesis "<…>" --kr "<…>" --uplift "<…>" --time-box <yyyy-mm-dd> --story <id>` (one `--story` per story, one `--blocker` per blocker).
|
|
11
|
+
5. Fill in the card's `## Why we think so` with the evidence from step 1, quoting where it came from.
|
|
12
|
+
6. Run `nikos validate` and fix every error.
|
|
13
|
+
7. When the time box ends, or the person asks to close the bet: measure the key result, write it under `## Outcome`, propose won, lost or killed, set `status` once the person agrees, and record it with `nikos decide "<title>" --why "<why>" --category product`.
|
|
14
|
+
8. Report every step with its evidence or its skip reason.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# build-a-story
|
|
2
|
+
|
|
3
|
+
Take a story from its feature file to passing scenarios. Done means the
|
|
4
|
+
scenarios pass, not that you say so.
|
|
5
|
+
|
|
6
|
+
1. Run `nikos next` to pick the story, or use the story id the person named.
|
|
7
|
+
2. Check the story with the clear skill, and stop if any of the five checks fails.
|
|
8
|
+
3. Run `nikos plan new <story-id>` and write the approach into the plan file it creates.
|
|
9
|
+
4. Run `nikos state set <story-id> in_progress`.
|
|
10
|
+
5. Implement the story, with a step definition for each step in its scenarios (see the verify skill).
|
|
11
|
+
6. Run `nikos verify <story-id>`, then `nikos verify` to check every other story still passes, and keep the output.
|
|
12
|
+
7. Record each decision you made with `nikos decide "<title>" --story <story-id> --why "<why>"`.
|
|
13
|
+
8. Run `nikos state set <story-id> done`. If it refuses, fix the failing scenarios and go back to step 6.
|
|
14
|
+
9. Report every step with its evidence or its skip reason.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# change
|
|
2
|
+
|
|
3
|
+
Make a change to the repo and prove it works.
|
|
4
|
+
|
|
5
|
+
1. Restate the request in one sentence and name the story id it belongs to, or say it has none.
|
|
6
|
+
2. Read the story's `.feature` file and its latest plan in `intent/plans/`.
|
|
7
|
+
3. If the change alters behaviour, start a new plan version with `nikos plan new <story-id>` and write the approach in it.
|
|
8
|
+
4. Make the change.
|
|
9
|
+
5. Run the story's scenarios and the project's tests, and keep the output.
|
|
10
|
+
6. Append each decision you made to `intent/decisions.md`.
|
|
11
|
+
7. Set the story's status in `intent/state.yaml`, using `done` only if step 5 passed.
|
|
12
|
+
8. Report every step with its evidence or its skip reason.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# idea-to-blueprint
|
|
2
|
+
|
|
3
|
+
Turn a one-line idea into a spec that's ready to build: a constitution, a
|
|
4
|
+
story map and a feature file per story, all passing CLEAR. The person
|
|
5
|
+
decides; you ask, propose and write it down.
|
|
6
|
+
|
|
7
|
+
1. Capture the idea in one sentence, ask for the product's name, and confirm both with the person.
|
|
8
|
+
2. If the repo has no `intent/` folder, run `nikos init --name "<product name>"`, then put the one-sentence idea in the `idea:` line at the top of `intent/constitution.md`.
|
|
9
|
+
3. Ask the five vision questions one at a time (Users, Problem, Switch, First, Proof), wait for each answer, and write it into its section of `intent/constitution.md`. If an answer contradicts the idea or an earlier answer, point it out and ask which one wins.
|
|
10
|
+
4. Write a `## Jobs to be done` section ("When …, I want to …, so I can …") and a `## Founding hypothesis` section ("We believe <users> will <behaviour> because <reason>. We'll know we're right when <the Proof measure>."), then confirm both with the person.
|
|
11
|
+
5. Propose activities and releases, with the First answer as release 1, and write them into `intent/storymap.yaml` once the person agrees.
|
|
12
|
+
6. Write each story as `intent/features/<activity>/<story-slug>.feature`: tag it with its id, release and priority, put "As a … / I want … / So that …" under `Feature:`, and make each acceptance criterion a Scenario tagged and titled with its label (`@AC1`). Add each story to `intent/state.yaml` as `todo`, and remove the example story and its `getting-started` activity that `nikos init` created.
|
|
13
|
+
7. Check every story with the clear skill. For each failed check, propose the fix to the person and change the spec only once they agree.
|
|
14
|
+
8. Record every choice you made on the person's behalf (anything their answers didn't settle) with `nikos decide "<title>" --why "<why>" --category product`.
|
|
15
|
+
9. Run `nikos validate` and fix every error.
|
|
16
|
+
10. Report every step with its evidence or its skip reason.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Playbooks
|
|
2
|
+
|
|
3
|
+
nikos-mode matches the request against "Use when", top to bottom, and runs the
|
|
4
|
+
first match. Packs add rows here as they ship new playbooks.
|
|
5
|
+
|
|
6
|
+
| Playbook | File | Use when |
|
|
7
|
+
| --- | --- | --- |
|
|
8
|
+
| idea-to-blueprint | `idea-to-blueprint.md` | The person has a new product idea, or wants to start a project from scratch and there is no story map yet. |
|
|
9
|
+
| validate | `validate.md` | The person wants to test or validate an idea with real people, or draft outreach, a post or a demo script for it. |
|
|
10
|
+
| bet | `bet.md` | The person wants to frame work as a bet, set a key result or time box for some stories, or close a bet and call its outcome. |
|
|
11
|
+
| build-a-story | `build-a-story.md` | The person asks to build, do or pick up the next story, or a story by its id. |
|
|
12
|
+
| answer | `answer.md` | The person asks a question about the product, a story, a plan or a decision, and nothing in the repo needs to change. |
|
|
13
|
+
| change | `change.md` | The person asks to add, fix, change or remove something in the repo: code, tests, docs or specs. |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# validate
|
|
2
|
+
|
|
3
|
+
Test an idea with real people before building it: agree who to reach and
|
|
4
|
+
what counts as proof, draft the outreach, and write what comes back into the
|
|
5
|
+
constitution. You draft; the person signs off and sends. You never send,
|
|
6
|
+
post, email, message or schedule anything to anyone outside the repo, even
|
|
7
|
+
when a tool could.
|
|
8
|
+
|
|
9
|
+
1. Read `intent/constitution.md` (Users, Problem, Switch, Proof and, if present, Founding hypothesis); if there's no constitution yet, say so and run the idea-to-blueprint playbook first.
|
|
10
|
+
2. Agree with the person who to reach (which people, where to find them, how many) and the signal that counts as proof (a number with a threshold, drawn from the Proof answer; if it can only stand in for Proof, such as stated intent before there's a product, say so), and write both down before drafting anything.
|
|
11
|
+
3. Draft the outreach in `intent/outreach/<yyyy-mm-dd>-<channel>.md`: one message per channel in the person's voice, the questions to ask, and, if it would help, a short demo or reel script. Mark the top of each file `Status: draft, not sent`.
|
|
12
|
+
4. STOP. Show every draft with where it would go, add "Needs your sign-off: <file>" to the task list for each one, and wait for an explicit yes per draft. Change a draft only as the person asks. Silence, "looks fine" about something else, or a yes to a different draft is not sign-off.
|
|
13
|
+
5. Once the person has signed off a draft, change its status to `Status: signed off <date>, for the person to send` and hand it over; the person sends it. Ask them to paste or summarise replies as they come in.
|
|
14
|
+
6. Record the results under a `## Validation` section at the end of `intent/constitution.md`: for each round, the date, channel, how many were reached, how many replied, the signal against its threshold (met or not), and two or three replies in their words.
|
|
15
|
+
7. Compare the results with Proof and the Founding hypothesis. Propose any change to them and make it only once the person agrees, then record it with `nikos decide "<title>" --why "<why>" --category product`.
|
|
16
|
+
8. Run `nikos validate` and fix every error.
|
|
17
|
+
9. Report every step with its evidence or its skip reason.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Principles
|
|
2
|
+
|
|
3
|
+
One line each: the principle, then when it applies. nikos-mode reads this on
|
|
4
|
+
every request.
|
|
5
|
+
|
|
6
|
+
| Principle | Applies when |
|
|
7
|
+
| --- | --- |
|
|
8
|
+
| **CLEAR before build.** A story must be Clear, Lean, Executable, Accurate and Responsible before anyone builds it. | You're about to plan or build a story. |
|
|
9
|
+
| **Criteria are the loss function.** The acceptance criteria decide done, not the agent's opinion. | You're judging whether work is finished. |
|
|
10
|
+
| **Demos, not memos.** Show it working (a passing scenario, a command and its output) rather than describing it. | You're reporting progress or claiming done. |
|
|
11
|
+
| **Specs stay implementation-agnostic.** Features and criteria describe behaviour, never code, tables or libraries. | You're writing or editing a `.feature` file or story text. |
|
|
12
|
+
| **Bets are time boxes.** Work is framed as a bet with an end date; when time's up, decide to ship, extend or kill. | You're scoping a chunk of work or it's running long. |
|
|
13
|
+
| **Bets are grounded in evidence.** A bet cites what we saw (user quotes, numbers, results), not what we hope. | You're writing a hypothesis or a key result. |
|
|
14
|
+
| **The founder signs off outreach.** Nothing is sent to real people without the founder's explicit yes. | You've drafted a message, post or email to anyone outside the repo. |
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify
|
|
3
|
+
description: Make a story's .feature file run as a test, and prove it passes. Use when a story's scenarios can't run yet, when setting up Cucumber in a repo, or before calling a story done.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# verify
|
|
7
|
+
|
|
8
|
+
A story is done when its scenarios pass, not when the code looks right.
|
|
9
|
+
|
|
10
|
+
## 1. Set up the runner once
|
|
11
|
+
|
|
12
|
+
If the repo has no `cucumber.mjs` (JavaScript or TypeScript) or `behave.ini`
|
|
13
|
+
(Python), run:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
nikos verify setup
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
It picks cucumber-js or behave from the repo's files and writes the config
|
|
20
|
+
plus step stubs for the example story. It never overwrites a file. Then run
|
|
21
|
+
the install command it prints.
|
|
22
|
+
|
|
23
|
+
If it says it couldn't tell the stack, ask the person which runner they want.
|
|
24
|
+
Don't guess.
|
|
25
|
+
|
|
26
|
+
## 2. Write step definitions for the story
|
|
27
|
+
|
|
28
|
+
Step definitions go in `test/steps/` (JavaScript or TypeScript) or `steps/`
|
|
29
|
+
(Python). Write one for each step in the story's scenarios, and make each one
|
|
30
|
+
check the real behaviour of the app: click, call or read what a user would.
|
|
31
|
+
|
|
32
|
+
Never edit a `.feature` file to make a scenario pass. The feature is the spec.
|
|
33
|
+
If a scenario is wrong, say so and stop. Fixing it is a spec change for the
|
|
34
|
+
person to approve.
|
|
35
|
+
|
|
36
|
+
## 3. Run the story
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
nikos verify <story-id>
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
It runs only that story's scenarios and fails if no feature carries the tag.
|
|
43
|
+
Pending or unimplemented steps count as not passing.
|
|
44
|
+
|
|
45
|
+
## 4. Report what ran
|
|
46
|
+
|
|
47
|
+
Report the command and the runner's summary line, such as
|
|
48
|
+
`2 scenarios (2 passed)`. If anything failed or is pending, show the output
|
|
49
|
+
and don't call the story done.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: {{project_name}}
|
|
3
|
+
idea: One sentence on what this is and who it's for.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Users
|
|
7
|
+
Who it's for. Be specific: a role, a situation, a moment.
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
What hurts today, in their words.
|
|
11
|
+
|
|
12
|
+
## Switch
|
|
13
|
+
What makes them switch now, and from what.
|
|
14
|
+
|
|
15
|
+
## First
|
|
16
|
+
The smallest first version that proves it.
|
|
17
|
+
|
|
18
|
+
## Proof
|
|
19
|
+
How you'll know it's working.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Decisions
|
|
2
|
+
|
|
3
|
+
Append one entry per decision, newest last. Never rewrite an entry; add a new
|
|
4
|
+
one that supersedes it.
|
|
5
|
+
|
|
6
|
+
<!--
|
|
7
|
+
## YYYY-MM-DD — Decision title (STORY-ID)
|
|
8
|
+
**Category:** product | architecture | design | process
|
|
9
|
+
**Supersedes:** none
|
|
10
|
+
|
|
11
|
+
Why this, and what we rejected.
|
|
12
|
+
-->
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
@{{key}}-1 @release-1 @must @activity-getting-started
|
|
2
|
+
Feature: First story
|
|
3
|
+
|
|
4
|
+
As a first user
|
|
5
|
+
I want to do the one thing this product is for
|
|
6
|
+
So that I get the value it promises
|
|
7
|
+
|
|
8
|
+
@AC1 @must
|
|
9
|
+
Scenario: AC1 — The core action works
|
|
10
|
+
Given I am a new user
|
|
11
|
+
When I do the one thing this product is for
|
|
12
|
+
Then I see the result I came for
|
|
File without changes
|