nikos 0.1.1 → 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 (111) hide show
  1. package/README.md +45 -9
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.js +49 -1
  4. package/dist/commands/approve.d.ts +16 -0
  5. package/dist/commands/approve.js +120 -0
  6. package/dist/commands/ci.d.ts +18 -0
  7. package/dist/commands/ci.js +123 -0
  8. package/dist/commands/clear.d.ts +14 -0
  9. package/dist/commands/decide.d.ts +11 -0
  10. package/dist/commands/decide.js +3 -3
  11. package/dist/commands/decisions.d.ts +14 -0
  12. package/dist/commands/decisions.js +2 -2
  13. package/dist/commands/doctor.d.ts +11 -0
  14. package/dist/commands/doctor.js +92 -0
  15. package/dist/commands/export.d.ts +48 -0
  16. package/dist/commands/export.js +164 -0
  17. package/dist/commands/init.d.ts +16 -0
  18. package/dist/commands/init.js +8 -12
  19. package/dist/commands/join.d.ts +17 -0
  20. package/dist/commands/join.js +91 -0
  21. package/dist/commands/map.d.ts +65 -0
  22. package/dist/commands/map.js +202 -25
  23. package/dist/commands/migrate.d.ts +10 -0
  24. package/dist/commands/migrate.js +105 -0
  25. package/dist/commands/next.d.ts +19 -0
  26. package/dist/commands/next.js +29 -5
  27. package/dist/commands/plan.d.ts +8 -0
  28. package/dist/commands/plan.js +9 -8
  29. package/dist/commands/release.d.ts +66 -0
  30. package/dist/commands/release.js +75 -6
  31. package/dist/commands/show.d.ts +3 -0
  32. package/dist/commands/show.js +26 -4
  33. package/dist/commands/start.d.ts +28 -0
  34. package/dist/commands/start.js +138 -0
  35. package/dist/commands/state.d.ts +27 -0
  36. package/dist/commands/state.js +40 -22
  37. package/dist/commands/step.d.ts +17 -0
  38. package/dist/commands/step.js +38 -2
  39. package/dist/commands/story.d.ts +21 -0
  40. package/dist/commands/story.js +7 -10
  41. package/dist/commands/suggest.d.ts +16 -0
  42. package/dist/commands/suggest.js +140 -0
  43. package/dist/commands/tracker.d.ts +60 -0
  44. package/dist/commands/tracker.js +185 -0
  45. package/dist/commands/validate.d.ts +15 -0
  46. package/dist/commands/validate.js +149 -14
  47. package/dist/commands/verify.d.ts +20 -0
  48. package/dist/commands/video.d.ts +33 -0
  49. package/dist/commands/video.js +4 -3
  50. package/dist/index.d.ts +20 -0
  51. package/dist/index.js +24 -0
  52. package/dist/lib/approvals.d.ts +29 -0
  53. package/dist/lib/approvals.js +28 -0
  54. package/dist/lib/bets.d.ts +21 -0
  55. package/dist/lib/bets.js +9 -2
  56. package/dist/lib/frontmatter.d.ts +5 -0
  57. package/dist/lib/project.d.ts +25 -0
  58. package/dist/lib/project.js +25 -7
  59. package/dist/lib/settings.d.ts +29 -0
  60. package/dist/lib/settings.js +110 -0
  61. package/dist/lib/state-files.d.ts +44 -0
  62. package/dist/lib/state-files.js +102 -0
  63. package/dist/lib/store.d.ts +44 -0
  64. package/dist/lib/store.js +97 -0
  65. package/dist/lint/constitution.d.ts +5 -0
  66. package/dist/lint/gherkin.d.ts +12 -0
  67. package/dist/lint/gherkin.js +2 -2
  68. package/dist/lint/portable.d.ts +10 -0
  69. package/dist/mcp/server.d.ts +4 -0
  70. package/dist/mcp/server.js +239 -0
  71. package/dist/planning/bets.d.ts +31 -0
  72. package/dist/planning/cli.d.ts +8 -0
  73. package/dist/planning/cli.js +17 -1
  74. package/dist/planning/delivery.d.ts +12 -0
  75. package/dist/planning/delivery.js +8 -5
  76. package/dist/planning/krs.d.ts +28 -0
  77. package/dist/planning/model.d.ts +55 -0
  78. package/dist/planning/model.js +10 -10
  79. package/dist/planning/rollout.d.ts +72 -0
  80. package/dist/planning/rollout.js +206 -0
  81. package/dist/planning/server.d.ts +113 -0
  82. package/dist/planning/server.js +9 -6
  83. package/dist/planning/ui.d.ts +7 -0
  84. package/dist/planning/ui.js +26 -1
  85. package/dist/planning/upstream.d.ts +73 -0
  86. package/dist/planning/upstream.js +78 -20
  87. package/dist/verify/detect.d.ts +3 -0
  88. package/docs/format.md +110 -1
  89. package/docs/gherkin.md +3 -0
  90. package/docs/install.md +39 -0
  91. package/docs/library.md +53 -0
  92. package/docs/planning.md +51 -5
  93. package/docs/settings.md +112 -0
  94. package/package.json +12 -2
  95. package/schemas/approvals.schema.json +27 -0
  96. package/schemas/planning/kr.schema.json +1 -1
  97. package/schemas/settings.schema.json +40 -0
  98. package/schemas/state.schema.json +6 -2
  99. package/schemas/storymap.schema.json +13 -0
  100. package/skills/nikos-mode/SKILL.md +22 -1
  101. package/skills/nikos-mode/playbooks/build-a-story.md +1 -1
  102. package/skills/nikos-mode/playbooks/company.md +16 -0
  103. package/skills/nikos-mode/playbooks/index.md +4 -0
  104. package/skills/nikos-mode/playbooks/map-existing.md +14 -0
  105. package/skills/nikos-mode/playbooks/start.md +12 -0
  106. package/skills/nikos-mode/playbooks/tracker.md +14 -0
  107. package/skills/nikos-mode/trackers/github.md +18 -0
  108. package/skills/nikos-mode/trackers/gitlab.md +17 -0
  109. package/skills/nikos-mode/trackers/jira.md +19 -0
  110. package/skills/nikos-mode/trackers/linear.md +17 -0
  111. package/skills/verify/SKILL.md +9 -0
@@ -0,0 +1,16 @@
1
+ # company
2
+
3
+ Set a company up with nikOS from the top: a company plan repo that departments
4
+ and teams join, the settings they inherit, and this period's objectives. Ask one
5
+ question at a time, and do nothing outward-facing (creating a repo, sending
6
+ anything) without a yes.
7
+
8
+ 1. Ask the company's name, the planning period, and its departments.
9
+ 2. Run `nikos company init --name "<name>" --period "<period>" --departments "<a, b>"` in an empty folder, or the company plan repo if one exists.
10
+ 3. Ask how approvals should work across the company: off, optional, or required before a release, and whether departments may change it. Save it with `nikos settings set approval.policy …`, and add it to `locked:` in `nikos.settings.yaml` if they say no.
11
+ 4. Run the tracker playbook to connect the company's tracker and map its statuses, here, so every level inherits it.
12
+ 5. Run the planning wizard at the company level for this period's objectives and key results. If they exist in a document already, read it through its MCP (Confluence, Google Docs, Notion) and draft from it.
13
+ 6. Ask whether to create the repo on GitHub or GitLab, and where. Only on a yes, create it with `gh` or `glab` (or the host's MCP), commit and push, and run `nikos company init --repo <path>` again to fill in the join line.
14
+ 7. Show the join line for each department and team, for the person to share however they like. Never send it yourself.
15
+ Later, "how's the rollout going?" runs `nikos planning rollout`: who has joined, who is behind, and delivery across their repos.
16
+ 8. Report every step with its evidence or its skip reason.
@@ -6,9 +6,13 @@ first match. Packs add rows here as they ship new playbooks.
6
6
  | Playbook | File | Use when |
7
7
  | --- | --- | --- |
8
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
+ | company | `company.md` | The person wants to set nikOS up for a whole company or department: a company plan, settings every team inherits, and departments joining. |
10
+ | start | `start.md` | The person wants to set nikOS up in this repo, or get started, and there's no `intent/` folder yet (or they ask to set it up again). |
11
+ | map-existing | `map-existing.md` | The person wants a story map of a product that already exists: "map what this repo does", or nikOS on an existing codebase. |
9
12
  | video | `video.md` | The person asks for a video: an explainer, product tour, demo, launch or social clip, or to edit or re-render one. Needs the Video pack. |
10
13
  | 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. |
11
14
  | planning | `planning.md` | The person wants to plan a period, set OKRs or key results, frame or review a bet, check in on key results, or see a planning dashboard. Needs the Planning pack. |
15
+ | tracker | `tracker.md` | The person wants to connect Jira, Linear, GitHub or GitLab issues, bring a tracker's backlog in, link stories to tickets, or bring the tracker and the story map back in step. |
12
16
  | 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. |
13
17
  | 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. |
14
18
  | change | `change.md` | The person asks to add, fix, change or remove something in the repo: code, tests, docs or specs. |
@@ -0,0 +1,14 @@
1
+ # map-existing
2
+
3
+ Draft the story map from a product that already exists, so a team sees its own
4
+ product mapped rather than an empty template. Nothing is written until the
5
+ person agrees to the draft.
6
+
7
+ 1. Run `nikos start` if `intent/` doesn't exist yet.
8
+ 2. Survey the code: entry points, routes or screens, commands, and the tests that exist. Group what the product does into three to seven activities: the areas a person uses it for, in the order they'd use them.
9
+ 3. Under each activity, list the steps a person takes, and a story for each thing the product already lets them do, in the user's words (As a… I want… So that…), with the files that implement it.
10
+ 4. Show the draft as activities, steps and stories. Let the person rename, merge, drop or add. Write nothing until they agree.
11
+ 5. Write it: `nikos activity add` for each activity, `nikos step add` for each step, and `nikos story add` for each story, all in release 1. Remove the starter story `nikos init` made if nobody wants it.
12
+ 6. For each story, write scenarios that describe what the product does today, and step definitions that drive the real code. Run `nikos verify <story-id>`; when they pass, move the story to done with `nikos state set` (in_progress, then done). A scenario that fails is a finding: show it, and leave the story in_progress.
13
+ 7. Add a second release for what the person wants next, if they say.
14
+ 8. Report every step with its evidence or its skip reason, and how many stories are now proved done.
@@ -0,0 +1,12 @@
1
+ # start
2
+
3
+ Set nikOS up in a repo and get to a first story that's proved done, in one
4
+ conversation. Ask as little as possible: nikOS takes the name, key, stack and
5
+ host from the repo.
6
+
7
+ 1. Run `nikos start`. It creates `intent/`, a scenario runner for the stack and CI for the host, each only if it's missing. Tell the person what it did in a sentence, not a list of files.
8
+ 2. Ask only what `nikos start` couldn't tell (its `?` lines), one question at a time, and finish the setup with the answer (`nikos verify setup`, `nikos ci setup --github` or `--gitlab`).
9
+ 3. If the repo already has code, run the map-existing playbook from here. If it's empty, ask what the product is for and who it's for, then run idea-to-blueprint from its step on the story map.
10
+ 4. Install the runner `nikos start` named, if it isn't installed, once the person agrees.
11
+ 5. Pick the first story with `nikos next` and build it with the build-a-story playbook, so the first session ends with one story's scenarios passing and the map showing it done.
12
+ 6. Report every step with its evidence or its skip reason.
@@ -0,0 +1,14 @@
1
+ # tracker
2
+
3
+ Connect the story map to the team's tracker, bring a backlog in, or keep the
4
+ two in step. nikOS never calls a tracker itself: you read and write tickets
5
+ through the tracker's own MCP, and hand what you read to `nikos tracker`.
6
+
7
+ 1. Run `nikos settings`. If `tracker.system` is `none`, ask which tracker the team uses (Jira, Linear, GitHub Issues, GitLab Issues, Azure DevOps, Shortcut, or none). Read its guide in `trackers/<system>.md` next to the playbooks.
8
+ 2. Check the tracker's MCP is connected, as the guide describes. If it isn't, tell the person how to add it, and stop.
9
+ 3. With the MCP, list the statuses tickets can have in their project (or team). Propose what each means to nikOS (todo, in_progress, needs_rework, done, approved, cancelled), ask the person to confirm or change each one, and ask whether moving a ticket to an approved status should approve the story.
10
+ 4. Save the answers with `nikos settings set` (`tracker.system`, `tracker.site`, `tracker.project`, `tracker.statuses`, `tracker.approvals`). If this repo is a company or department plan, say that every repo joined to it inherits them, and ask whether to lock any.
11
+ 5. To bring a backlog in: fetch the tickets with the MCP, write them to a JSON file as `[{ "key", "title", "group" }]` (group: the epic, project or label), and run `nikos tracker import <file>`. Stories start as todo; offer to write the first ones' scenarios.
12
+ 6. To link stories that already exist: match each to its ticket with the person, and run `nikos tracker link <story-id> <ticket>`.
13
+ 7. To keep them in step: for each linked ticket, read its status (and, for an approved status, who moved it there from the ticket's history), and run `nikos tracker record <story-id> --status "<status>" --by "<who>"`. Then run `nikos tracker sync --json` and move each ticket it lists to the status it gives, with the MCP. Never move a story to done because a ticket says so: done comes from its scenarios.
14
+ 8. Report every step with its evidence or its skip reason.
@@ -0,0 +1,18 @@
1
+ # GitHub Issues
2
+
3
+ **MCP:** GitHub's MCP server, or the `gh` command when the agent has a shell.
4
+ The person signs in through their app or `gh auth login`; you never handle a
5
+ token.
6
+
7
+ - **Project:** `tracker.project` is the repo (`owner/repo`), or a GitHub
8
+ Project if the team tracks work on a board. Tickets are issue numbers: link
9
+ them as `#57`.
10
+ - **Statuses:** an issue is only open or closed. Teams on a GitHub Project
11
+ board use its Status field (Todo, In Progress, Done…): map those. Without a
12
+ board, map labels the team uses (`in-progress`, `approved`) as statuses.
13
+ - **Who approved:** the issue's timeline says who closed it, or who changed
14
+ its Status field or labels.
15
+ - **Backlog import:** list the open issues (or the board's items). Use the
16
+ milestone or a label as the group.
17
+ - **Moving a ticket:** set the board's Status field, or the label, or close
18
+ the issue for done.
@@ -0,0 +1,17 @@
1
+ # GitLab Issues
2
+
3
+ **MCP:** GitLab's MCP server, or the `glab` command when the agent has a
4
+ shell. Self-managed GitLab works the same way, at the company's own host. The
5
+ person signs in; you never handle a token.
6
+
7
+ - **Project:** `tracker.site` is the host (`gitlab.com` or
8
+ `gitlab.acme.com`), `tracker.project` the project's full path
9
+ (`acme/product/payments`). Tickets are issue numbers: link them as `#57`.
10
+ - **Statuses:** an issue is open or closed, and teams track the rest with
11
+ scoped labels (`workflow::in progress`, `workflow::approved`) or board
12
+ lists. Map the labels the team uses.
13
+ - **Who approved:** the issue's history (system notes) says who added a label
14
+ or closed it.
15
+ - **Backlog import:** list the open issues. Use the epic or milestone as the
16
+ group.
17
+ - **Moving a ticket:** swap the scoped label, or close the issue for done.
@@ -0,0 +1,19 @@
1
+ # Jira
2
+
3
+ **MCP:** Atlassian's MCP server (it covers Jira and Confluence). The person
4
+ connects it in their app's connector or MCP settings and signs in with their
5
+ Atlassian account; you never handle a token.
6
+
7
+ - **Site and project:** `tracker.site` is the site's host (`acme.atlassian.net`),
8
+ `tracker.project` the project key (`PAY`). Ticket keys look like `PAY-123`.
9
+ - **Statuses:** each project has its own workflow, so list the statuses for
10
+ this project, not the site. Common ones: To Do, In Progress, In Review,
11
+ Done, and often an "Accepted" or "Approved" a product owner moves tickets
12
+ to.
13
+ - **Who approved:** an issue's changelog says who moved it to each status
14
+ and when. Use that for `--by`, never the assignee.
15
+ - **Backlog import:** search the project's open issues with JQL
16
+ (`project = PAY AND statusCategory != Done`). Use the epic as the group.
17
+ - **Moving a ticket:** Jira moves issues by transition, not by setting a
18
+ status. List the issue's transitions and pick the one that leads to the
19
+ status `nikos tracker sync` gives.
@@ -0,0 +1,17 @@
1
+ # Linear
2
+
3
+ **MCP:** Linear's own MCP server. The person connects it in their app and
4
+ signs in to Linear; you never handle a key.
5
+
6
+ - **Team:** Linear groups issues by team, not project. `tracker.project` is
7
+ the team key (`ENG`); ticket ids look like `ENG-42`. `tracker.site` is the
8
+ workspace's url name.
9
+ - **Statuses:** each team has its own workflow states, grouped as backlog,
10
+ unstarted, started, completed and canceled. Map the team's states, not the
11
+ groups.
12
+ - **Who approved:** an issue's history says who changed its state. Use that
13
+ for `--by`.
14
+ - **Backlog import:** list the team's issues that aren't completed or
15
+ canceled. Use the project (or the parent issue) as the group.
16
+ - **Moving a ticket:** set the issue's state to the one `nikos tracker sync`
17
+ gives.
@@ -47,3 +47,12 @@ Pending or unimplemented steps count as not passing.
47
47
  Report the command and the runner's summary line, such as
48
48
  `2 scenarios (2 passed)`. If anything failed or is pending, show the output
49
49
  and don't call the story done.
50
+
51
+ ## 5. Run it on every PR or merge request (once per repo)
52
+
53
+ When the person wants the checks to run in CI, run `nikos ci setup`. It reads
54
+ the origin remote to pick GitHub Actions (`.github/workflows/nikos.yml`) or
55
+ GitLab CI (`.gitlab/ci/nikos.yml`, included from `.gitlab-ci.yml`). Pass
56
+ `--github` or `--gitlab` when there's no remote yet. If the repo already has a
57
+ `.gitlab-ci.yml`, it prints the `include:` lines to add: add them, and show the
58
+ person the change.