requirementbot 0.0.0-stage → 0.1.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 (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +197 -2
  3. package/bin/requirementbot.js +21 -0
  4. package/package.json +53 -4
  5. package/prompts/README.md +18 -0
  6. package/prompts/check.md +15 -0
  7. package/prompts/fix.md +4 -0
  8. package/prompts/from-code.md +12 -0
  9. package/prompts/from-docs.md +11 -0
  10. package/prompts/from-issues.md +14 -0
  11. package/prompts/mdq.md +8 -0
  12. package/prompts/partials/non-interactive.md +1 -0
  13. package/prompts/partials/subagents.md +1 -0
  14. package/prompts/report.md +8 -0
  15. package/prompts/system.md +9 -0
  16. package/skills/SOURCE.md +14 -0
  17. package/skills/catalog-features/SKILL.md +168 -0
  18. package/skills/catalog-features/references/layout.md +87 -0
  19. package/skills/detect-product-mismatches/SKILL.md +147 -0
  20. package/skills/detect-product-mismatches/references/features.md +84 -0
  21. package/skills/detect-product-mismatches/references/layout.md +99 -0
  22. package/skills/pull-request-diff-analyzer/SKILL.md +141 -0
  23. package/skills/qa-explain-behavior/SKILL.md +112 -0
  24. package/skills/qa-explain-behavior/references/answer-shapes.md +116 -0
  25. package/skills/qa-explain-behavior/references/examples.md +157 -0
  26. package/skills/qa-pr-requirements-analyzer/SKILL.md +149 -0
  27. package/skills/qa-pr-requirements-analyzer/references/summary-example.md +54 -0
  28. package/skills/qa-requirement-reviewer/SKILL.md +126 -0
  29. package/skills/qa-requirement-reviewer/references/requirements_reviewer_examples.md +128 -0
  30. package/skills/qa-thinking/SKILL.md +46 -0
  31. package/skills/requirements-from-code/SKILL.md +114 -0
  32. package/skills/requirements-from-code/references/behaviors.md +42 -0
  33. package/skills/requirements-from-code/references/layout.md +100 -0
  34. package/skills/requirements-from-expected/SKILL.md +116 -0
  35. package/skills/requirements-from-expected/references/behaviors.md +49 -0
  36. package/skills/requirements-from-expected/references/layout.md +74 -0
  37. package/skills/requirements-from-expected/references/merge.md +34 -0
  38. package/skills/write-user-story/SKILL.md +42 -0
  39. package/src/agent/agent.js +278 -0
  40. package/src/agent/auth.js +209 -0
  41. package/src/agent/prompt.js +36 -0
  42. package/src/branding.js +27 -0
  43. package/src/cli.js +26 -0
  44. package/src/commands/agent-command.js +61 -0
  45. package/src/commands/check.js +26 -0
  46. package/src/commands/command.js +40 -0
  47. package/src/commands/connect.js +33 -0
  48. package/src/commands/disconnect.js +18 -0
  49. package/src/commands/generate-from-code.js +20 -0
  50. package/src/commands/generate-from-docs.js +38 -0
  51. package/src/commands/generate-from-issues.js +41 -0
  52. package/src/commands/index.js +40 -0
  53. package/src/commands/login.js +44 -0
  54. package/src/commands/logout.js +17 -0
  55. package/src/commands/models.js +11 -0
  56. package/src/commands/pull.js +15 -0
  57. package/src/commands/push.js +29 -0
  58. package/src/commands/query.js +31 -0
  59. package/src/commands/report.js +23 -0
  60. package/src/commands/skills.js +20 -0
  61. package/src/commands/sources.js +16 -0
  62. package/src/commands/update-from-code.js +7 -0
  63. package/src/commands/update-from-docs.js +7 -0
  64. package/src/commands/update-from-issues.js +7 -0
  65. package/src/config.js +90 -0
  66. package/src/files.js +25 -0
  67. package/src/github.js +50 -0
  68. package/src/http.js +19 -0
  69. package/src/requirements.js +139 -0
  70. package/src/sources/adf.js +48 -0
  71. package/src/sources/github.js +81 -0
  72. package/src/sources/index.js +41 -0
  73. package/src/sources/jira.js +135 -0
  74. package/src/sources/pages.js +67 -0
  75. package/src/sources/source.js +60 -0
  76. package/src/transports/confluence.js +114 -0
  77. package/src/transports/git.js +90 -0
  78. package/src/transports/github.js +42 -0
  79. package/src/transports/index.js +36 -0
  80. package/src/transports/notion.js +108 -0
  81. package/src/transports/page-tree.js +119 -0
  82. package/src/transports/transport.js +41 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Testomat.io
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 CHANGED
@@ -1,3 +1,198 @@
1
- # Temporary Holding Version
1
+ # requirementbot
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ AI requirements generator by [Testomat.io](https://testomat.io). It reads your code, issues and documentation and writes product requirements as markdown: one page per feature, with its behaviors and the mismatches between sources. Then it pushes them to Git, GitHub, Confluence or Notion.
4
+
5
+ requirementbot runs non-interactively, so it fits CI. It is built on the [pi coding agent](https://pi.dev) and bundles the Testomat.io [requirements skills](https://github.com/testomatio/skills/tree/master/plugins/requirements).
6
+
7
+ ```bash
8
+ export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY, OPENROUTER_API_KEY, ...
9
+
10
+ npx requirementbot generate:from-code .
11
+ npx requirementbot push github:testomatio/doc-map
12
+ ```
13
+
14
+ ## Generate requirements
15
+
16
+ | Command | What it does |
17
+ | --- | --- |
18
+ | `generate:from-code [path]` | Builds requirements from the code: feature catalog, feature pages with behaviors, and mismatches between code and comments, docs, specs and configs. Skill: `requirements-from-code`. |
19
+ | `update:from-code [path]` | Updates only what changed since the baseline commit recorded in the requirements. |
20
+ | `generate:from-issues` | Fetches issues from connected trackers and builds feature pages and mismatches inside the source from them. Skill: `requirements-from-expected`. |
21
+ | `update:from-issues` | Fetches only issues changed since the last run and updates the pages. |
22
+ | `generate:from-docs [path]` | Builds feature pages from a docs folder, or from connected Confluence/Notion spaces. Skill: `requirements-from-expected`. |
23
+ | `check` | Compares code, issues and docs and records what disagrees, what is not implemented, and what is undocumented. Skill: `detect-product-mismatches`. |
24
+
25
+ Everything is written to `requirements/` (change it with `-o <dir>`):
26
+
27
+ ```
28
+ requirements/
29
+ README.md index
30
+ actual/ how it works now
31
+ <repo>/ generate:from-code
32
+ features/ one page per feature, Behaviors section
33
+ mismatches/ code vs. claims in the repo
34
+ expected/ what was intended to be built
35
+ <source>/ generate:from-issues, generate:from-docs
36
+ features/ one page per feature, Behaviors section
37
+ mismatches/ contradictions inside this source
38
+ mismatches/ check: mismatches between sources
39
+ ```
40
+
41
+ `actual` and `expected` are fixed names: every source folder is inside one of them. `<repo>` is the name of the repository folder, `<source>` the name of the connected source or docs folder. See [docs/structure.md](docs/structure.md).
42
+
43
+ After each run, requirementbot checks that every page has the sections the skill requires, and sends the agent back once to fix any that are missing.
44
+
45
+ Agent options for every generating command:
46
+
47
+ | Option | |
48
+ | --- | --- |
49
+ | `-m, --model <provider/id>` | Model, e.g. `anthropic/claude-sonnet-5-5`. Default: the newest Claude Sonnet you have a key for. `requirementbot models` lists them. Also `REQUIREMENTBOT_MODEL` or `"model"` in config. |
50
+ | `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`. |
51
+ | `--no-mcp` | Do not connect MCP servers. |
52
+ | `--session` | Keep the agent transcript in `.requirementbot/sessions/`. |
53
+ | `-v, --verbose` | Stream the agent's text. |
54
+
55
+ ## Model credentials
56
+
57
+ An API key in the environment is enough (see the top of this page). To use a subscription instead, sign in once:
58
+
59
+ ```bash
60
+ npx requirementbot login anthropic # Claude Pro/Max
61
+ npx requirementbot login codex # ChatGPT Plus/Pro through the Codex sign-in
62
+ npx requirementbot login github-copilot
63
+ npx requirementbot login # pick from a list
64
+ npx requirementbot login anthropic --api-key # store an API key instead of using the environment
65
+ npx requirementbot login --list # providers and what is stored
66
+ npx requirementbot logout anthropic
67
+ ```
68
+
69
+ `login` runs [pi](https://pi.dev)'s own sign-in flows and stores the credential in pi's `~/.pi/agent/auth.json` (`PI_CODING_AGENT_DIR` moves it). The credential is shared both ways: a sign-in made with `/login` inside pi works in requirementbot too. `claude`, `codex`, `chatgpt`, `copilot` and `grok` are accepted as provider names. `--no-browser` only prints the sign-in URL. Keep `auth.json` private.
70
+
71
+ In CI, where nobody can sign in, set the provider's API key. Check your provider's terms before using a personal subscription in shared automation.
72
+
73
+ With no `-m`, requirementbot tries the preferred models in order, and when the account refuses one on the first request (a model the account cannot access, no credit left) it says so and moves to the next. A model given with `-m` is never swapped.
74
+
75
+ ## Connect sources
76
+
77
+ ```bash
78
+ npx requirementbot connect github:https://github.com/myorg/mycode --state-reason completed
79
+ npx requirementbot connect jira:https://acme.atlassian.net/PROJ --jql 'project = PROJ AND component = Payments'
80
+ npx requirementbot connect confluence:DOCS/123456
81
+ npx requirementbot connect notion:https://www.notion.so/acme/Product-docs-1f2e3d4c5b6a79881726354453627180
82
+ npx requirementbot sources
83
+ ```
84
+
85
+ Only resolved issues are fetched: closed GitHub issues, Jira issues in the Done status category, whatever the query. Issues that built nothing are left out: GitHub "not planned" and "duplicate" when fetched; Jira resolutions such as Won't Do or Duplicate by the agent, since resolution names vary per instance. Each issue is saved with every comment, its linked issues (Jira issue links; GitHub `#123` mentions in the body and comments) and its sub-tasks; `--no-comments` leaves comments out. The scope (labels, state reason, JQL, limit) is stored in `.requirementbot/config.json`, so later runs never stop to ask. Issues are downloaded as markdown into `.requirementbot/cache/` before the agent starts. The agent reads files and makes no network calls of its own.
86
+
87
+ | Source | Credentials |
88
+ | --- | --- |
89
+ | GitHub | `GITHUB_TOKEN`, or a logged-in `gh` CLI |
90
+ | Jira Cloud | `JIRA_EMAIL` + `JIRA_TOKEN` |
91
+ | Jira Server / Data Center | `JIRA_TOKEN` (personal access token) |
92
+ | Confluence | `CONFLUENCE_URL` + `CONFLUENCE_EMAIL` + `CONFLUENCE_TOKEN` |
93
+ | Notion | `NOTION_TOKEN` (share the parent page with the integration) |
94
+
95
+ ## Push and pull
96
+
97
+ ```bash
98
+ npx requirementbot push git:git@github.com:testomatio/doc-map.git#main
99
+ npx requirementbot push github:git@github.com:testomatio/doc-map.git
100
+ npx requirementbot push confluence:DOCS/123456
101
+ npx requirementbot push notion:1f2e3d4c5b6a79881726354453627180
102
+
103
+ npx requirementbot pull notion: # reuses the last notion destination
104
+ npx requirementbot push --dry-run # reuses the last destination, shows changes only
105
+ ```
106
+
107
+ | Destination | Push | Pull |
108
+ | --- | --- | --- |
109
+ | `git:<url>[#branch]` | Clones, replaces the `requirements/` folder in the repo (`--path`), commits and pushes to the branch. | Copies the folder back. |
110
+ | `github:<url or owner/repo>[#base]` | Same as git, but pushes a new `requirementbot/<time>` branch and opens a pull request into `base`, with `gh` or `GITHUB_TOKEN`. | Same as git. |
111
+ | `confluence:<SPACE>[/<parentPageId>]` | Mirrors folders as a page tree under the parent page (default: the space home page). Links between pages become Confluence page links. | Downloads the given page and the pages under it as markdown. |
112
+ | `notion:<page id or URL>` | Mirrors folders as nested pages under the parent page. | Downloads the given page and its nested pages as markdown. |
113
+
114
+ For Confluence and Notion, pull treats the target page as the root of the requirements folder.
115
+ Push prints the id of the requirements page it creates: `Requirements page id: <id>`.
116
+
117
+ Confluence and Notion page ids are remembered in `.requirementbot/<kind>-pages.json`, so a second push updates the same pages. Commit that file if your team pushes from several machines.
118
+
119
+ ## Query and report
120
+
121
+ [mdq](https://www.npmjs.com/package/mdq-cli) is bundled for structured markdown queries. `query` runs a selector over the requirements without AI:
122
+
123
+ ```bash
124
+ npx requirementbot query 'section("Impact") paragraph(~"High")'
125
+ npx requirementbot query --count 'section("Behaviors") item'
126
+ npx requirementbot query --json 'section("Sources") table' requirements/actual/<repo>/mismatches
127
+ ```
128
+
129
+ `report` asks the agent, which also uses mdq, for a short markdown answer:
130
+
131
+ ```bash
132
+ npx requirementbot report "all High priority mismatches"
133
+ npx requirementbot report "features without tests" -f report.md
134
+ ```
135
+
136
+ ## MCP servers
137
+
138
+ The agent can use MCP tools through pi's native MCP support. Add servers in the standard `mcpServers` format to:
139
+
140
+ - `~/.requirementbot/agent/mcp.json` for your own servers and credentials
141
+ - `.requirementbot/mcp.json` for servers the project needs
142
+
143
+ ```json
144
+ {
145
+ "mcpServers": {
146
+ "testomatio": { "command": "npx", "args": ["-y", "@testomatio/mcp"], "env": { "TESTOMATIO_API_KEY": "${TESTOMATIO_API_KEY}" } },
147
+ "atlassian": { "url": "https://mcp.atlassian.com/v1/mcp" }
148
+ }
149
+ }
150
+ ```
151
+
152
+ ## Subagents
153
+
154
+ Large repositories are split by area, and each area goes to a child agent ([pi-subagents](https://github.com/nicobailon/pi-subagents)) running in parallel.
155
+
156
+ ## Configuration
157
+
158
+ | Path | |
159
+ | --- | --- |
160
+ | `.requirementbot/config.json` | Output folder, model, connected sources, last destinations |
161
+ | `.requirementbot/cache/` | Downloaded issues and pages (git-ignored) |
162
+ | `~/.requirementbot/agent/` | Agent home: `models.json`, `mcp.json` (`REQUIREMENTBOT_HOME` moves it) |
163
+ | `~/.pi/agent/auth.json` | Model credentials, written by `requirementbot login` or pi's `/login` |
164
+
165
+ ## Skills
166
+
167
+ `npx requirementbot skills` lists the bundled skills. They are copied from [testomatio/skills](https://github.com/testomatio/skills/tree/master/plugins/requirements); see `skills/SOURCE.md` for the commit. Project skills in `.agents/skills/` or `.pi/skills/` are loaded too.
168
+
169
+ ## Prompts
170
+
171
+ Every prompt the agent receives is a markdown file in [`prompts/`](prompts/README.md): one per command, plus the system rules and mdq instructions. Edit them like any document. `{{value}}` marks a value requirementbot fills in, and `{{> partial}}` includes a file from `prompts/partials/`.
172
+
173
+ ## Development
174
+
175
+ Code layout:
176
+
177
+ ```
178
+ src/commands/ one class per CLI command (Command, AgentCommand base classes)
179
+ src/agent/ Agent (pi session + run loop), Prompt (prompts/*.md loader), Auth (pi login and credentials)
180
+ src/sources/ Source base class: GitHubSource, JiraSource, ConfluenceSource, NotionSource
181
+ src/transports/ Transport base class: GitTransport, GitHubTransport, ConfluenceTransport, NotionTransport
182
+ src/requirements.js the output folder: mdq queries, structure checks, index
183
+ ```
184
+
185
+ A new source or destination is one class with the base class's interface, added to `Sources.all` or `Transports.all`.
186
+
187
+ Tasks live in the [Bunoshfile](Bunoshfile.js):
188
+
189
+ ```bash
190
+ npx bunosh test # unit tests
191
+ npx bunosh lint # syntax check
192
+ npx bunosh skills:update # refresh bundled skills from testomatio/skills
193
+ npx bunosh release:publish --dry-run
194
+ ```
195
+
196
+ ## License
197
+
198
+ MIT
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import { join } from 'node:path';
3
+ import { homedir } from 'node:os';
4
+ import { existsSync } from 'node:fs';
5
+
6
+ // Provider keys can live in a .env next to the project; variables already set in the shell win.
7
+ if (existsSync('.env')) process.loadEnvFile('.env');
8
+
9
+ // pi and pi-subagents resolve their agent dir from this variable; keep requirementbot state out of ~/.pi.
10
+ process.env.PI_CODING_AGENT_DIR ||= join(process.env.REQUIREMENTBOT_HOME || join(homedir(), '.requirementbot'), 'agent');
11
+
12
+ process.stdout.on('error', (err) => {
13
+ if (err.code === 'EPIPE') process.exit(0);
14
+ throw err;
15
+ });
16
+
17
+ const { main } = await import('../src/cli.js');
18
+ await main(process.argv);
19
+
20
+ // MCP servers and extension timers keep the event loop alive; a CLI run is over once main returns.
21
+ process.stdout.write('', () => process.exit(process.exitCode ?? 0));
package/package.json CHANGED
@@ -1,6 +1,55 @@
1
1
  {
2
2
  "name": "requirementbot",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "AI requirements generator by Testomat.io: build markdown requirements from code, issues and docs, and sync them to Git, GitHub, Confluence and Notion",
5
+ "type": "module",
6
+ "bin": {
7
+ "requirementbot": "bin/requirementbot.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "src",
12
+ "skills",
13
+ "prompts",
14
+ "README.md",
15
+ "LICENSE"
16
+ ],
17
+ "scripts": {
18
+ "test": "bunosh test"
19
+ },
20
+ "engines": {
21
+ "node": ">=22"
22
+ },
23
+ "keywords": [
24
+ "requirements",
25
+ "ai",
26
+ "agent",
27
+ "pi",
28
+ "testomatio",
29
+ "confluence",
30
+ "notion",
31
+ "wiki"
32
+ ],
33
+ "author": "Testomat.io",
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/testomatio/requirementbot.git"
38
+ },
39
+ "dependencies": {
40
+ "@earendil-works/pi-coding-agent": "^1.4.0",
41
+ "@notionhq/client": "^5.28.0",
42
+ "@tryfabric/martian": "^1.2.4",
43
+ "chalk": "^6.0.1",
44
+ "commander": "^15.0.0",
45
+ "gray-matter": "^4.0.3",
46
+ "marked": "^18.1.1",
47
+ "mdq-cli": "^0.1.3",
48
+ "notion-to-md": "^3.1.9",
49
+ "pi-subagents": "^0.82.1",
50
+ "turndown": "^7.2.4"
51
+ },
52
+ "devDependencies": {
53
+ "bunosh": "^0.6.3"
54
+ }
55
+ }
@@ -0,0 +1,18 @@
1
+ # Prompts
2
+
3
+ Every prompt the agent receives is a markdown file here. Edit them freely.
4
+
5
+ - `{{name}}` inserts a value requirementbot passes in (paths, mode, question). Each prompt lists its values at the top in a comment.
6
+ - `{{> name}}` inserts `partials/name.md`.
7
+ - `<!-- comments -->` are removed before the prompt is sent.
8
+
9
+ | File | Used by |
10
+ | --- | --- |
11
+ | `system.md` | appended to the agent's system prompt in every run |
12
+ | `mdq.md` | context file in every run: how to use `mdq-cli` |
13
+ | `from-code.md` | `generate:from-code`, `update:from-code` |
14
+ | `from-issues.md` | `generate:from-issues`, `update:from-issues` (once per source) |
15
+ | `from-docs.md` | `generate:from-docs`, `update:from-docs` (once per source) |
16
+ | `check.md` | `check` |
17
+ | `report.md` | `report` |
18
+ | `fix.md` | after a generate run, when pages miss required sections |
@@ -0,0 +1,15 @@
1
+ <!-- Values: mode (build | update), catalogs (one line per source), output, skills -->
2
+ Compare what the sources say the product does and record mismatches.
3
+
4
+ Use the `detect-product-mismatches` skill (`{{skills}}/detect-product-mismatches/SKILL.md`) in `{{mode}}` mode.
5
+
6
+ - Output folder: `{{output}}`
7
+ - Sources, each already cataloged. The catalog README of each one gives its type, role, scope and history:
8
+
9
+ {{catalogs}}
10
+
11
+ The catalogs and feature pages already exist at these paths. Read them where they are, and link to them from the mismatches README.
12
+
13
+ {{> subagents}}
14
+
15
+ {{> non-interactive}}
package/prompts/fix.md ADDED
@@ -0,0 +1,4 @@
1
+ <!-- Values: problems (one line per problem) -->
2
+ The structure check found problems in the files you wrote. Fix them, keeping the skill's layout, then report briefly.
3
+
4
+ {{problems}}
@@ -0,0 +1,12 @@
1
+ <!-- Values: mode (build | update), repo, output, skills -->
2
+ Build the product requirements from code.
3
+
4
+ Use the `requirements-from-code` skill (`{{skills}}/requirements-from-code/SKILL.md`) in `{{mode}}` mode.
5
+
6
+ - Repository, read-only: `{{repo}}`
7
+ - Output folder: `{{output}}`. Every requirements path is inside it. Pass it to `catalog-features` as well: the catalog goes to `{{output}}/features/.catalog/`.
8
+ - In `update` mode, use the baseline commit recorded in the output README. If there is none, build from scratch.
9
+
10
+ {{> subagents}}
11
+
12
+ {{> non-interactive}}
@@ -0,0 +1,11 @@
1
+ <!-- Values: mode (build | update), name, docs, output, skills -->
2
+ Build product requirements from user documentation.
3
+
4
+ Use the `requirements-from-expected` skill (`{{skills}}/requirements-from-expected/SKILL.md`) in `{{mode}}` mode on it as a "User docs" source named `{{name}}`, role Expected.
5
+
6
+ - Docs, read-only: `{{docs}}`
7
+ - Output folder: `{{output}}`
8
+
9
+ {{> subagents}}
10
+
11
+ {{> non-interactive}}
@@ -0,0 +1,14 @@
1
+ <!-- Values: mode (build | update), name, kind, dump, scope, output, skills -->
2
+ Build product requirements from the issue tracker source **{{name}}** ({{kind}}).
3
+
4
+ Use the `requirements-from-expected` skill (`{{skills}}/requirements-from-expected/SKILL.md`) in `{{mode}}` mode on it as an "Issue tracker" source: role Expected, History: Yes.
5
+
6
+ - Issues: markdown files in `{{dump}}`, one per issue, resolved issues only, already in the Issue item shape of `catalog-features` (`{{skills}}/catalog-features/references/layout.md`). They are the source items: no network access is needed.
7
+ - Scope, already applied to the dump: {{scope}}. Do not ask for a query; record the scope in the catalog README.
8
+ - Output folder: `{{output}}`
9
+
10
+ In `update` mode the dump holds only issues changed since the last run: update the affected features and leave the rest.
11
+
12
+ {{> subagents}}
13
+
14
+ {{> non-interactive}}
package/prompts/mdq.md ADDED
@@ -0,0 +1,8 @@
1
+ When you need to inspect, validate, or edit structured Markdown, use `mdq-cli` selectors instead of parsing or rewriting the document manually; run `mdq-cli --help` for the available query and edit options.
2
+
3
+ Examples:
4
+
5
+ - `mdq-cli 'section("Impact")' page.md` prints a section; exit code 1 when it is missing.
6
+ - `mdq-cli --count 'section("Behaviors") item' page.md` counts behaviors.
7
+ - `mdq-cli 'section("Sources") table' --json page.md` reads a table as JSON.
8
+ - `mdq-cli 'section("Open questions") list' --add-item 'Text' --in-place README.md` appends a list item.
@@ -0,0 +1 @@
1
+ This run is non-interactive: do not ask questions and do not wait for confirmation. Decide, keep going, and list open questions in the final report and in the output README.
@@ -0,0 +1 @@
1
+ When the skill asks for subagents, use the `subagent` tool and run them in parallel. Children do not see this conversation: give each one the absolute paths of the skill files it needs (skills are in `{{skills}}`), its scope, and the output folder.
@@ -0,0 +1,8 @@
1
+ <!-- Values: question, output -->
2
+ Answer a question about the requirements in `{{output}}`.
3
+
4
+ Question: {{question}}
5
+
6
+ - Use `mdq-cli` to query the markdown (sections, tables, lists, counts) instead of reading whole files when you can. For example, mismatch pages have an `## Impact` section whose first word is the level: `mdq-cli 'section("Impact") paragraph[0]' page.md`.
7
+ - Do not modify any file.
8
+ - Reply with a brief markdown report only: a one-line answer first, then a table or list with relative links to the pages, then totals. No preamble.
@@ -0,0 +1,9 @@
1
+ # requirementbot
2
+
3
+ You are requirementbot by Testomat.io. You turn code, issues and documentation into product requirements written as markdown.
4
+
5
+ - Run non-interactively. Nobody can answer questions: never ask the user anything and never wait for input. Make a reasonable decision, and record open questions in the output folder's README under "Open questions".
6
+ - Sources (code, issue dumps, docs) are read-only. Do not run, build or modify them. Write only inside the output folder you are given.
7
+ - Follow the requested skill exactly: read its SKILL.md and its references before writing files.
8
+ - Name areas and features from the product and user's perspective.
9
+ - Finish with a short report: what was written, where to start, open questions.
@@ -0,0 +1,14 @@
1
+ # Bundled skills
2
+
3
+ Copied from [testomatio/skills](https://github.com/testomatio/skills/tree/e1cf03227adfcb553c94ea5ee08c0eebc397e875/plugins/requirements/skills) (`master`, `e1cf032`) by `bunosh skills:update`. Do not edit here.
4
+
5
+ - catalog-features
6
+ - detect-product-mismatches
7
+ - pull-request-diff-analyzer
8
+ - qa-explain-behavior
9
+ - qa-pr-requirements-analyzer
10
+ - qa-requirement-reviewer
11
+ - qa-thinking
12
+ - requirements-from-code (renamed here from upstream `wiki-from-code`: `skills:update` brings back the old name)
13
+ - requirements-from-expected (local only, not yet in testomatio/skills: `skills:update` removes it)
14
+ - write-user-story
@@ -0,0 +1,168 @@
1
+ ---
2
+ name: catalog-features
3
+ description: >-
4
+ Builds a catalog of product features from one source: a tree of areas and features, each feature as a key, title, status, and links to the source items that describe it. Code, issues, requirements, docs, etc. are supported.
5
+ Use when asked to catalog/list features, existing functionality, issues, requirements, specs, PRDs, user docs or similar sources.
6
+ metadata:
7
+ author: Testomat.io
8
+ version: 1.0.0
9
+ ---
10
+
11
+ # Catalog features
12
+
13
+ Catalog of **the source's features**: a tree of areas and features, each feature with its key, title, status, and links to the source items (issues, pages, code paths) that describe it. Its behaviors (description, requirements, acceptance criteria, etc.) stay in the source items.
14
+
15
+ Requirements folder: `requirements/` in the repo root, or given by the calling skill or the user.
16
+
17
+ Source folder: `{source-name}`, always inside `requirements/actual/` or `requirements/expected/`, by the source's role (Source roles):
18
+
19
+ - `features/.catalog/`: the catalog.
20
+ - `.source/`: raw source items (copy of the source, not a rewrite; don't copy source code to the `.source/`)
21
+ - `README.md`: source summary
22
+
23
+ ## Modes
24
+
25
+ `build` from scratch; `update` from an existing catalog. When `update`, use info from the catalog README.
26
+
27
+ ## Source roles
28
+
29
+ | Role | Description | Source folder |
30
+ | -------- | ----------------------------------------------------------------------------------------- | -------------------------------------- |
31
+ | Actual | How the product works now. Code, configs, etc. | `requirements/actual/{source-name}/` |
32
+ | Expected | What was intended to be built, what users are told. Requirements, tickets, user docs, etc. | `requirements/expected/{source-name}/` |
33
+
34
+ - `{source-name}`: code: the repository name; other sources: the tool and its project or space, e.g. `jira-{project-name}`, `confluence-docs`.
35
+ - The calling skill or the user may give the name, not the place: the role decides between `actual/` and `expected/`.
36
+
37
+ ## Status
38
+
39
+ Expected sources only.
40
+
41
+ - **Built issues only.** In scope: resolved issues that built something: the issue's status is in the tracker's done category (Jira `statusCategory = Done`; GitHub closed), with no resolution saying nothing was built.
42
+ - Out of scope: don't read them, don't save them to `.source/`, don't catalog them, don't report them as missing:
43
+ - Unresolved issues: open, to do, in progress, in review, blocked, etc.
44
+ - Resolved issues that built nothing: Won't Do, Won't Fix, Duplicate, Cannot Reproduce, Declined, etc.; GitHub not planned, duplicate. Count them in the Report.
45
+ - Source item: its status and resolution as the source states them (page: published, draft, archived).
46
+ - Feature: issue tracker: `Done`. Sources without a workflow (requirements, user docs): `Current`, `Draft`, `Deprecated`.
47
+
48
+ ## Rules
49
+
50
+ - **Read-only on the source.** Do NOT edit the source even when the tools offer it.
51
+ - One source folder per source.
52
+
53
+ ## Sources
54
+
55
+ ### Code
56
+
57
+ - Tree: areas → features, named from what the product does for its users, not from the stack or code folders, classes, files, or functions.
58
+ - Feature: one per feature, not per file; same feature in two places → one feature. Link: repo paths of the main implementation (route, screen, job), not every file.
59
+ - Scope: features users can reach now. Not stubs, routes users cannot reach, or features behind disabled flags; comments, docs, and tests do not make a feature.
60
+ - `update`: `git diff --name-status -M {baseline}..HEAD`; take into account renamed, moved, deleted files.
61
+ - Role: Actual.
62
+ - History: No.
63
+
64
+ ### Issue tracker
65
+
66
+ - Source items: issues of every level: initiatives, epics, parent issues, issues, sub-tasks, etc.) Save each with every comment, its parent, links to other issues, and sub-tasks ([references/layout.md](references/layout.md) › Issue item).
67
+ - Tree: areas → features. A feature is what the issues build, not one issue: aggregate the issues that describe it (an epic and its stories, a story and its sub-tasks, later issues that change it). Areas: epics, components, or labels when they hold related features; else by product logic.
68
+ - Scope: a query (JQL, `gh` search, Linear filter, etc.); ask the user for it and store it. Always narrowed to built issues (Status), whatever the query says. An issue that describes no feature (task, chore, spike) stays in `.source/` without one.
69
+ - Role: Expected.
70
+ - History: Yes (unless user specified). Because different issues may be related to the same feature. Need to store date of creation and resolution to determine which issue overrides the other.
71
+
72
+ ### Requirements
73
+
74
+ - Word, PDF: extract the text first.
75
+ - Source items: pages, documents.
76
+ - Tree: area by heading or other logical structure.
77
+ - Scope: ask user for the scope and other crucial filters. Take into account that there could be drafts, deprecated pages, copies. Process them accordingly (Status).
78
+ - Role: Expected.
79
+ - History: No.
80
+
81
+ ### User docs
82
+
83
+ - Source items: pages.
84
+ - Tree: keep the original structure with required hierarchy levels.
85
+ - Role: Expected.
86
+ - Scope: ask user.
87
+ - History: No.
88
+
89
+ ### Other
90
+
91
+ Any source that describes the product. Agree on role, coverage, history with the user before syncing.
92
+
93
+ ## Steps
94
+
95
+ ```
96
+ - [ ] 1. Source and domain
97
+ - [ ] 2. Inventory
98
+ - [ ] 3. Write the tree
99
+ - [ ] 4. Validate
100
+ - [ ] 5. Report
101
+ ```
102
+
103
+ Read [references/layout.md](references/layout.md) before writing files.
104
+
105
+ ## 1. Source and domain
106
+
107
+ Ask the user in one message, unless given:
108
+
109
+ - Type and access: repository, MCP, CLI, URL, export, or file path. No access → stop and ask for an MCP connection or an export.
110
+ - Scope as a concrete, repeatable filter: repo paths, tracker query (JQL, project, label), root page or space, docs root.
111
+ - Domain: what the product does and for whom, key terms. Not given → infer it from the source.
112
+
113
+ Name area and features in the domain terms.
114
+
115
+ Several sources in one run → one source folder each; define all of them first, then run steps 2–4 per source.
116
+
117
+ ## 2. Inventory
118
+
119
+ List every source item in scope with key or URL, title, status. Navigate all the pages.
120
+
121
+ Expected: save every source item to `.source/` ([references/layout.md](references/layout.md) › Source items). Items the caller already downloaded → copy the ones in scope as they are.
122
+
123
+ Aggregate the source items into features (Sources).
124
+
125
+ When `update`: take into account renamed, moved, deleted files and source items. Process them accordingly.
126
+
127
+ If source is code create areas and features based on features and logic, not just files, classes, functions.
128
+
129
+ ## 3. Write the tree
130
+
131
+ As [references/layout.md](references/layout.md) describes:
132
+
133
+ - Catalog README, area READMEs, feature YAMLs.
134
+ - Expected: `.source/README.md` with every source item, its status and its feature.
135
+ - Source `README.md`: create it when missing.
136
+
137
+ ## 4. Validate
138
+
139
+ ```markdown
140
+ Structure
141
+ - [ ] Source folder is inside `requirements/actual/` or `requirements/expected/`, by its role
142
+ - [ ] Catalog README has every fact and the counts; indexes every area
143
+ - [ ] Every area README lists its subareas and features
144
+ - [ ] Expected: every source item in scope is in `.source/` and in `.source/README.md` with its status and its feature, or why it has none
145
+
146
+ Content
147
+ - [ ] Every feature yml is according to the `references/layout.md`
148
+ - [ ] Code: areas and features named from the product, not the stack
149
+ - [ ] Expected: every feature has a status
150
+ - [ ] Issue tracker: no unresolved or not-built issue in `.source/` or in the catalog
151
+ - [ ] Issue tracker: every issue in `.source/` has every comment, its parent, links, and sub-tasks as the source gives them ([references/layout.md](references/layout.md) › Issue item)
152
+ - [ ] Update: features and source items gone from scope removed
153
+ - [ ] Only existing keys and urls are used in the catalog
154
+ ```
155
+
156
+ ## 5. Report
157
+
158
+ Where to start. Features synced, skipped by reason. Expected: features by status, source items without a feature. Issue tracker: issues left out as not built, by resolution.
159
+
160
+ To a calling skill: features added, changed, and removed.
161
+
162
+ ## Next actions
163
+
164
+ - `detect-product-mismatches`
165
+ - Feature pages from the code → `requirements-from-code`
166
+ - Feature pages from issues, requirements, user docs → `requirements-from-expected`
167
+ - `qa-requirement-reviewer`
168
+ - Test cases from requirements → `qa-write-test-cases`