nikos 0.0.0-stage → 0.0.2
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 +107 -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 +99 -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/docs/quickstart.md +153 -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
|
@@ -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
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Step definitions for intent/features/getting-started/first-story.feature.
|
|
2
|
+
// Replace each "pending" with a real check against your app. Never edit the
|
|
3
|
+
// feature to make a step pass.
|
|
4
|
+
import { Given, When, Then } from "@cucumber/cucumber";
|
|
5
|
+
|
|
6
|
+
Given("I am a new user", function () {
|
|
7
|
+
return "pending";
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
When("I do the one thing this product is for", function () {
|
|
11
|
+
return "pending";
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
Then("I see the result I came for", function () {
|
|
15
|
+
return "pending";
|
|
16
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Step definitions for intent/features/getting-started/first-story.feature.
|
|
2
|
+
# Replace each NotImplementedError with a real check against your app. Never
|
|
3
|
+
# edit the feature to make a step pass.
|
|
4
|
+
from behave import given, when, then
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@given("I am a new user")
|
|
8
|
+
def step_new_user(context):
|
|
9
|
+
raise NotImplementedError("STEP: Given I am a new user")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@when("I do the one thing this product is for")
|
|
13
|
+
def step_core_action(context):
|
|
14
|
+
raise NotImplementedError("STEP: When I do the one thing this product is for")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@then("I see the result I came for")
|
|
18
|
+
def step_result(context):
|
|
19
|
+
raise NotImplementedError("STEP: Then I see the result I came for")
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Step definitions for intent/features/getting-started/first-story.feature.
|
|
2
|
+
// Replace each "pending" with a real check against your app. Never edit the
|
|
3
|
+
// feature to make a step pass.
|
|
4
|
+
import { Given, When, Then } from "@cucumber/cucumber";
|
|
5
|
+
|
|
6
|
+
Given("I am a new user", function (): string {
|
|
7
|
+
return "pending";
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
When("I do the one thing this product is for", function (): string {
|
|
11
|
+
return "pending";
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
Then("I see the result I came for", function (): string {
|
|
15
|
+
return "pending";
|
|
16
|
+
});
|