testeiya 0.8.1 → 0.10.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 (63) hide show
  1. package/PIPELINES.md +153 -19
  2. package/README.md +29 -14
  3. package/dist/prompt/pipeline-report.js +23 -0
  4. package/dist/prompt/pipeline-report.js.map +1 -0
  5. package/dist/prompt/report.js +1 -1
  6. package/dist/prompt/testomat.io.js +2 -2
  7. package/dist/prompt/testomat.io.js.map +1 -1
  8. package/dist/src/args.js +19 -1
  9. package/dist/src/args.js.map +1 -1
  10. package/dist/src/cli.js +4 -2
  11. package/dist/src/cli.js.map +1 -1
  12. package/dist/src/doctor.js +8 -10
  13. package/dist/src/doctor.js.map +1 -1
  14. package/dist/src/langfuse-extension.js +2 -0
  15. package/dist/src/langfuse-extension.js.map +1 -1
  16. package/dist/src/mcp.js +20 -90
  17. package/dist/src/mcp.js.map +1 -1
  18. package/dist/src/pipeline/command-stage.js +2 -2
  19. package/dist/src/pipeline/command-stage.js.map +1 -1
  20. package/dist/src/pipeline/log.js +5 -0
  21. package/dist/src/pipeline/log.js.map +1 -1
  22. package/dist/src/pipeline/overlay.js +217 -0
  23. package/dist/src/pipeline/overlay.js.map +1 -0
  24. package/dist/src/pipeline/pipeline-file.js +67 -5
  25. package/dist/src/pipeline/pipeline-file.js.map +1 -1
  26. package/dist/src/pipeline/pipeline.js +48 -29
  27. package/dist/src/pipeline/pipeline.js.map +1 -1
  28. package/dist/src/pipeline/stage.js +49 -13
  29. package/dist/src/pipeline/stage.js.map +1 -1
  30. package/dist/src/pipeline/state.js +3 -1
  31. package/dist/src/pipeline/state.js.map +1 -1
  32. package/dist/src/pipeline/summary-stage.js +99 -0
  33. package/dist/src/pipeline/summary-stage.js.map +1 -0
  34. package/dist/src/pipeline/task-stage.js +25 -10
  35. package/dist/src/pipeline/task-stage.js.map +1 -1
  36. package/dist/src/pipeline/variables.js +34 -2
  37. package/dist/src/pipeline/variables.js.map +1 -1
  38. package/dist/src/session.js +19 -14
  39. package/dist/src/session.js.map +1 -1
  40. package/package.json +6 -9
  41. package/pipelines/api-testing.yml +9 -6
  42. package/pipelines/issue-test-cases.yml +14 -13
  43. package/pipelines/pr-review.yml +13 -9
  44. package/pipelines/regression.yml +6 -3
  45. package/pipelines/web-testing.yml +13 -12
  46. package/prompt/pipeline-report.ts +23 -0
  47. package/prompt/report.ts +1 -1
  48. package/prompt/testomat.io.ts +4 -4
  49. package/skills/codeceptjs/lint-codeceptjs-tests/SKILL.md +104 -0
  50. package/skills/skills.lock.json +5 -2
  51. package/skills/testomatio/qa-process/testing-workflow/SKILL.md +12 -7
  52. package/skills/testomatio/requirements/catalog-features/SKILL.md +132 -0
  53. package/skills/testomatio/requirements/catalog-features/references/layout.md +43 -0
  54. package/skills/testomatio/requirements/detect-product-mismatches/SKILL.md +146 -0
  55. package/skills/testomatio/requirements/detect-product-mismatches/references/features.md +84 -0
  56. package/skills/testomatio/requirements/detect-product-mismatches/references/layout.md +93 -0
  57. package/skills/testomatio/requirements/wiki-from-code/SKILL.md +58 -71
  58. package/skills/testomatio/requirements/wiki-from-code/references/behaviors.md +42 -0
  59. package/skills/testomatio/requirements/wiki-from-code/references/layout.md +70 -71
  60. package/dist/src/mcp-extension.js +0 -9
  61. package/dist/src/mcp-extension.js.map +0 -1
  62. package/dist/vendor/mcp.js +0 -14801
  63. package/mcp-tools.json +0 -1949
@@ -0,0 +1,93 @@
1
+ # Mismatches layout
2
+
3
+ Reads catalogs (layout owned by `catalog-features`) and feature pages (owned by `wiki-from-code`); changes them only through those skills (SKILL.md › 2. Catalogs). Writes mismatch pages into `mismatches/`
4
+
5
+ ```
6
+ mismatches/ # output folder
7
+ README.md # sitemap; one line each
8
+ sources/
9
+ README.md # every catalog here: name, type, role, link, Date
10
+ {name}/ # source name
11
+ features/ # feature pages (wiki-from-code), when present
12
+ .catalog/ # internal: `catalog-features` skill output
13
+ mismatches/
14
+ README.md # index
15
+ {mismatch}.md # one mismatch per disagreement, every compared source
16
+ ```
17
+
18
+ ## Formatting
19
+
20
+ Every page: `# Title`, then a breadcrumb that matches folders (links to the parent pages only), then the body. Mismatch pages: no breadcrumb. Relative links to pages in the output folder and to repo paths; source features as key + URL.
21
+
22
+ ## Kinds
23
+
24
+ | Kind | Meaning | Where |
25
+ | ------------------- | ---------------------------------------------------------------------------- | ----------- |
26
+ | Differs | Sources disagree on one behavior: values, conditions, roles, labels, flow | Page |
27
+ | Not implemented | Behavior from another source that the code lacks | Page |
28
+ | Missing in {source} | Feature a source is silent on, within its catalog Scope (SKILL.md › Sources) | README list |
29
+
30
+ ## README
31
+
32
+ `mismatches/README.md` missing → create it: `# Mismatches`, breadcrumb. Write the mismatches list.
33
+
34
+ 1. Compared: one row per source: name, role, scope, history, catalog link, Date (code: baseline commit). Product version. Check date.
35
+ 2. Differs, Not implemented: one list per kind, highest impact first: page link + impact level + sources + likely cause.
36
+ 3. Missing features: one list per silent source (Not implemented, Unspecified, Undocumented, Missing in {source}): feature + where found (catalog feature links) + where searched.
37
+ 4. Open questions: vague behaviors, unread content, or unclear Scope that blocks a comparison.
38
+
39
+ ## Page
40
+
41
+ A reader learns what disagrees from the first lines, without opening the sources.
42
+
43
+ File name: follow existing file name pattern or kebab-case of the title by default.
44
+
45
+ - `# Title`: the behavior in question, as the user meets it.
46
+ - `Feature:` the feature area › title; link to its feature page in `features/`, when present.
47
+ - `## Difference`: first a one-sentence summary of how they differ, then one bullet per side, code first when compared; sources that agree grouped on one bullet. Each bullet: the sources (key or name), then their behavior. Write each side so it is clear alone: the condition, then what the user gets. Not implemented: the code bullet says what is missing and where it was searched.
48
+ - `## Impact`: level first: **High** (users blocked, data or money wrong), **Medium** (a workaround exists), **Low** (wording, cosmetic). Then who meets it, when, and what they see or cannot do.
49
+ - `## Likely cause`: SKILL.md › Likely cause, with the dates that decide it.
50
+ - `## Solution`: suggested fix, from the likely cause: Bug → change the code; Stale requirement → update the requirement; Stale docs → update the docs; Decide → the options for the product owner.
51
+ - `## Sources`: evidence, one row per compared source; Code row always, first, when code is compared.
52
+ - Other info required to explain the mismatch.
53
+
54
+ ### Example
55
+
56
+ ```markdown
57
+ # Expired cards at checkout
58
+
59
+ Feature: [Checkout › Pay with saved card](../sources/code/features/checkout/pay-with-saved-card.md)
60
+
61
+ ## Difference
62
+
63
+ The code lists expired saved cards at checkout, greyed out; Confluence says they are not listed.
64
+
65
+ - **Code, PAY-112:** Expired saved cards are listed at checkout, greyed out and not selectable.
66
+ - **Confluence "Saved cards":** Expired saved cards are not listed at checkout.
67
+
68
+ ## Impact
69
+
70
+ Low. A customer with an expired card sees it greyed out at checkout. Support answers based on Confluence say it should not appear.
71
+
72
+ ## Likely cause
73
+
74
+ Stale requirement: PAY-112 (2026-08-28) changed the behavior after the Confluence page (2026-01-10).
75
+
76
+ ## Solution
77
+
78
+ Update the Confluence page "Saved cards": expired saved cards are listed at checkout, greyed out and not selectable.
79
+
80
+ ## Sources
81
+
82
+ | Source | Says | Link | Updated |
83
+ | ---------------------- | ----------------------------------------------------- | ------------------------------------------------ | ---------- |
84
+ | Code (actual) | Expired saved cards are listed, greyed out | `src/checkout/cards.ts:48-61` | 2026-08-30 |
85
+ | Jira (intended) | PAY-112: Expired saved cards are listed, not selectable | [PAY-112](https://example.atlassian.net/...) | 2026-08-28 |
86
+ | Confluence (intended) | Expired saved cards are not listed | [Saved cards](https://example.atlassian.net/...) | 2026-01-10 |
87
+ | User docs (documented) | silent | Searched: docs/payments/, site search "expired" | |
88
+ ```
89
+
90
+ - `Says`: the source's behavior, as [features.md](features.md) › Behaviors describes; `silent` when it has none.
91
+ - `Link`: repo file: `path:lines`; issue: key + URL; page: title + URL, with the heading when the page is long; silent: where searched.
92
+ - `Updated`: the date read at the source (SKILL.md › Likely cause).
93
+ - Superseded issues of a source with history: omit, or mark `superseded by {key}` when it explains the mismatch.
@@ -1,124 +1,111 @@
1
1
  ---
2
2
  name: wiki-from-code
3
3
  description: >-
4
- Builds and refreshes a product wiki from the application source code (implicit requirements).
5
- Optionally attaches issue-tracker task/issue/story links.
6
- Use when the user asks to build or refresh the wiki/requirements/specification/docs from code, or to catalog existing functionality.
4
+ Builds a product wiki from the application source code or updates it after large code changes (release, refactor, many merged PRs).
5
+ Records mismatches between code and claims about it (comments, docstrings, developer docs, API specs, configs).
6
+ Use when the user asks to build or update the wiki/requirements/specification/docs from code.
7
7
  metadata:
8
8
  author: Testomat.io
9
- version: 1.0.0
9
+ version: 2.0.0
10
10
  ---
11
11
 
12
12
  # Wiki from code
13
13
 
14
- Wiki of **how the product works now**. Bootstrap from code. Refresh when the code changes.
14
+ Wiki of **how the product works now**: one page per feature, listing its behaviors, and mismatches between the code and other repo claims.
15
15
 
16
- We call this "wiki" as the closest term to what we are building. But user may ask for "requirements" or "specification" or "docs" or something similar.
16
+ Output folder:
17
+ - default: `wiki/` (in the repo root)
18
+ - or given by calling skill or the user
19
+ - all paths are relative inside the output folder
20
+ - if there is `features-catalog/` dir → move it to `features/.catalog/`
17
21
 
18
- **Implicit** requirements means inferred from code. **Explicit** requirements means from issues/tasks/docs etc.
19
-
20
- Decide audience once:
21
-
22
- | Audience | Human wiki |
23
- | --- | --- |
24
- | End users (default, preferred) | Behavior and acceptance only. No file paths, types, stack, or protocol internals. |
25
- | Callers who are not end users (API, job, contract etc.) | Technical entry could be treated as requirements. |
22
+ **Mismatch** is a disagreement between code and a claim about it (comment, docstring, developer docs, API spec, config, infra, test). They could differ, be not implemented, not used, etc.
26
23
 
27
24
  ## Modes
28
25
 
29
- Pick one. If unclear, **bootstrap** when `wiki/` is missing, else **refresh**.
30
-
31
- | Mode | When |
32
- | --- | --- |
33
- | `bootstrap` | First wiki from this repo |
34
- | `refresh` | Code moved; update implicit pages + catalog |
35
-
36
- Default root: `wiki/` (or the user’s path).
37
-
38
- Move from **overview** to **details**. Do not write feature pages before the tree exists.
26
+ | Mode | When |
27
+ | -------- | --------------------------------------------------------------------------------------- |
28
+ | `build` | No `features/` or baseline in the root `README.md`, no git, or the user asks to rebuild |
29
+ | `update` | `features/` and baseline exist: change only what the code changed since the baseline |
39
30
 
40
31
  ## Steps
41
32
 
42
33
  ```
43
- - [ ] 1. Catalog (shallow)
44
- - [ ] 2. Tracker links? (ask; optional)
45
- - [ ] 3. Overview tree (indexes)
46
- - [ ] 4. Dive each area (one subagent each)
34
+ - [ ] 1. Catalog
35
+ - [ ] 2. Indexes
36
+ - [ ] 3. Feature pages (one subagent per area)
37
+ - [ ] 4. Merge
47
38
  - [ ] 5. Validate
48
39
  - [ ] 6. Report
49
40
  ```
50
41
 
51
- Read [references/layout.md](references/layout.md) before writing files.
42
+ Read [references/behaviors.md](references/behaviors.md) and [references/layout.md](references/layout.md) before writing files.
52
43
 
53
44
  ## Rules
54
45
 
55
- - Current-state code wins any other source (e.g. docs, tests, config, infra, comments, issues etc). Intended, but not implemented (or implemented differently) behavior goes in `mismatches/` only — never a SHOULD heading on a feature page.
56
- - Name areas and features from the **product** and user perspective, not the stack or code.
57
- - Capabilities describe *what the product does*. Catalog records *where that lives in the repo*.
58
- - Pair capabilities and catalog items (use relative path) (`capabilities/{area}/{feature}.md` ↔ `catalog/{area}/{feature}.yaml`). Feature page: after breadcrumb, relative link to the YAML.
59
- - Tracker links (tasks, issues, stories, etc.) are optional. **Ask** before adding any. Put them in catalog YAML (`issues`), not on feature pages. Do not invent keys or URLs.
60
-
61
- ## 1. Catalog (shallow)
62
-
63
- The **catalog** is what exists in the product: first a shallow area → feature list, then YAML facts in `catalog/`. Code, test, doc, and issue tracker links live here (`sources`, `tests`, `wiki_path`, `issues`).
64
-
65
- From **code** map the product into **areas**, each with a **feature list**. That list *is* the catalog of what exists in the product at this step. Do not draft Requirement/Acceptance or YAML yet.
46
+ - Source is the repository only.
47
+ - **Current-state code wins** over claims (comments, docstrings, developer docs, API specs, configs, tests, etc.). What they claim that the code lacks or does differently goes in `mismatches/` only, never as a "should" on a feature page.
48
+ - Write only paths that exist in the repo. Never guess or build them.
49
+ - Name areas and features from the product and user's perspective, NOT from the code/stack/files/classes/etc.
50
+ - Domain terms (prefer the docs' terms), one term per concept across the wiki.
51
+ - Update catalog file names and content as you get more info about the features.
52
+ - Treat and describe features as end-to-end flows or use cases, not just "actions" from code.
66
53
 
67
- If an area is large, group features into sub-folders at this step. Catalog YAML uses the same relative path as the feature page.
54
+ ## 1. Catalog
68
55
 
69
- ## 2. Tracker links (optional)
56
+ Run `catalog-features` skill on the repo, same mode, output folder `features/.catalog/`.
70
57
 
71
- **Ask the user** whether to attach issue-tracker links (tasks, issues, stories, etc.) to catalog YAML.
58
+ `update`: get the baseline commit > `git diff --name-status -M {baseline}..HEAD` > process updated/removed files accordingly.
72
59
 
73
- If none of MCP / user-supplied links work: skip with reason. Do not write placeholder tickets.
60
+ ## 2. Indexes
74
61
 
75
- Write only into catalog YAML (`issues`). Omit the `issues` key when a feature has no match.
62
+ Write the `features/` indexes before any feature page.
76
63
 
77
- ## 3. Overview tree
64
+ [layout.md](references/layout.md)
78
65
 
79
- Write only the indexes first ([references/layout.md](references/layout.md)). Give the tree hierarchy when the product is complex enough. If names are ambiguous, **stop and show the list** before diving.
66
+ ## 3. Feature pages
80
67
 
81
- Shared rules live on one page; others link.
68
+ One subagent per area, in parallel (`update`: affected areas only). Each subagent gets: the area, its subareas and catalog features (feature YAMLs), allowed code paths, the Domain from `features/.catalog/README.md`, the rules above, [references/behaviors.md](references/behaviors.md), [references/layout.md](references/layout.md). `update` also: the area's existing pages and mismatches, and its changed features.
82
69
 
83
- ## 4. Dive each area
70
+ Subagent, per feature, starting from its catalog links:
84
71
 
85
- For each feature: catalog YAML first (`catalog/{area}/{feature}.yaml`), then the feature page (Requirement / Acceptance). Stubs, unused wiring, and doc-vs-code gaps go in `mismatches/` with all required source links (layout).
72
+ 1. In its catalog feature YAML: adds implementation files to `code`, and adds `tests`.
73
+ 2. Writes the feature page ([layout.md](references/layout.md) › Feature page): Description, then Behaviors ([behaviors.md](references/behaviors.md)).
74
+ 3. Returns one mismatch per disagreement: its kind and every section of a mismatch page ([layout.md](references/layout.md) › Mismatches).
86
75
 
87
- Use `subagent` per area/feature to keep the main agent focused on the helicopter view, subagents focused on the details of one area/feature.
76
+ Subagent writes only inside its area, in `features/` and `features/.catalog/`. Catalog features found missing, misnamed, or misplaced → fix them in the area's catalog files. Anything outside the area (mismatch pages, catalog README, other areas) → return it.
88
77
 
89
- Each subagent gets: area/feature name, allowed paths, audience, [references/layout.md](references/layout.md), "code wins", and whether tracker `issues` are in scope (matched links to write, or omit). Feature pages are Requirement / Acceptance only. Do not rewrite sibling areas except to add the one index line the parent asked for.
78
+ Subagent returns: files added, changed, and removed; mismatches (`update`: also resolved ones); changes outside its area; open questions; catalog errors; terms the Domain lacks.
90
79
 
91
- Subagent returns: files written, mismatches, open questions. Parent merges links and sitemap; then validates.
80
+ ## 4. Merge
92
81
 
93
- Exception: a one-line fix on an existing page already in context — no subagent spawn.
82
+ 1. Apply the changes subagents returned outside their areas, including links to renamed or moved pages. Terms the Domain lacks → add to the Domain in `features/.catalog/README.md`.
83
+ 2. Update every `README.md` in `features/` to list the feature pages that now exist. Write the root `README.md`: a link and purpose for each folder (not `.catalog/`), plus the baseline commit.
84
+ 3. Write the mismatch pages subagents returned. Same disagreement from several areas → one mismatch page.
85
+ 4. Two terms for one concept → keep one, fix the pages that use the other.
86
+ 5. `update`: remove resolved mismatches.
87
+ 6. In `mismatches/README.md`, write the mismatches list ([layout.md](references/layout.md) › Mismatches).
94
88
 
95
89
  ## 5. Validate
96
90
 
97
91
  ```markdown
98
92
  Structure
99
- - [ ] wiki/README.md is a sitemap; every listed link exists
100
- - [ ] catalog YAML exists for every feature; every wiki_path exists
101
- - [ ] catalog/README.md indexes every area; each area catalog README lists its YAML
102
- - [ ] Area (and group) folders named from the product, not from stack/code
103
- - [ ] Feature pages use the layout heading order (Requirement, Acceptance); breadcrumbs match folder depth; links are relative
104
- - [ ] Feature pages link to the paired catalog YAML (relative path)
105
- - [ ] Feature pages are not mega-dumps (one cluster per page)
106
- - [ ] Feature pages not overloaded with meta info (it is located in catalog YAML)
107
- - [ ] Tracker links are in catalog YAML (`issues`); omitted when declined or none matched; no invented keys/URLs
93
+ - [ ] README.md is a sitemap with the baseline commit
94
+ - [ ] Every catalog feature has a feature page, and its feature YAML lists the rest of its implementation files in `code` and its tests in `tests`; `features/` mirrors the catalog's areas and subareas
95
+ - [ ] Every `links`, `code`, and `tests` path exists in the repo
108
96
 
109
97
  Content
110
- - [ ] Features described from the user perspective, not the stack/code
111
- - [ ] Catalog is YAML facts, not a second spec
112
- - [ ] Current-state Requirement matches code
113
- - [ ] mismatches/ covers disagreements (between code and other sources)
98
+ - [ ] Every feature page has a Description and at least one behavior under Behaviors; every behavior passes the check in [references/behaviors.md](references/behaviors.md)
99
+ - [ ] Every disagreement between code and claims has a mismatch page
100
+ - [ ] update: resolved mismatches removed; nothing left for deleted code
114
101
  ```
115
102
 
116
103
  ## 6. Report
117
104
 
118
- Where to start from. Results. Mismatches. Huge projects: those three only.
105
+ Where to start. Results (`update`: features added, changed, removed). Mismatches by kind, highest user impact first. Catalog errors. Open questions.
119
106
 
120
107
  ## Next actions
121
108
 
122
- - Explain a capability in QA language → `qa-explain-behavior`
123
- - Risk scenarios for a capability → `qa-thinking`
124
- - Test cases for capability/feature → `qa-write-test-cases`
109
+ - Compare with issues, requirements, user docs → `detect-product-mismatches`
110
+ - Explain a feature in QA language → `qa-explain-behavior`
111
+ - Test cases for a feature → `qa-write-test-cases`
@@ -0,0 +1,42 @@
1
+ # Behaviors
2
+
3
+ A behavior is one observable statement about how the product works now: what someone who uses it (end user, admin, API client, integrated system) can do, see, or get, and when. Feature pages list them under Behaviors.
4
+
5
+ ## From code
6
+
7
+ - Code that runs now and users can reach. Behind a flag or setting that can be turned on → a behavior with that condition.
8
+ - Comments, docstrings, developer docs, API specs, configs, and tests are claims, not behaviors. Where they disagree with the code → `mismatches/`.
9
+ - Never a behavior: internal steps with no visible effect (caching, logging, internal retries), refactoring, helpers.
10
+
11
+ ## Shape
12
+
13
+ - One behavior per bullet, one sentence, present tense.
14
+ - No `should`, `shall`, `must`, `will`: state it as a fact, present tense.
15
+ - Name who acts or what changes, in domain terms. Never "the system", "it", or "we".
16
+ - Outcome is what the actor can observe (screen, response, file, email, notification), not how the code gets there.
17
+ - Conditions stay in the behavior: role, platform, setting, state.
18
+ - Negative behaviors count: `Viewer cannot delete a project.`
19
+ - Split on "and" when each part can be checked on its own.
20
+
21
+ ## Values and words
22
+
23
+ - Exact values from the code that runs: limits, defaults, timeouts, sizes, formats.
24
+ - A value read from config or environment: its default, marked `(configurable)`.
25
+ - UI labels and messages verbatim, in quotes; navigation paths with `›`.
26
+ - No class, function, table, file, flag, or library names. Protocol details (endpoints, status codes, fields) only when the API is what users use.
27
+
28
+ ## Examples
29
+
30
+ | Code | Behavior |
31
+ | --------------------------------------------------- | ------------------------------------------------------------ |
32
+ | `if (cards.length >= 5) throw new CardLimitError()` | `Customer can save up to 5 cards.` |
33
+ | `IDLE_TIMEOUT = env.IDLE_TIMEOUT ?? 1800` (seconds) | `Session expires after 30 min of inactivity (configurable).` |
34
+ | `cache.set(user_id, cards)` | Not a behavior: no visible effect |
35
+
36
+ ## Check
37
+
38
+ - [ ] Every reachable behavior in the feature's code is listed
39
+ - [ ] One observable behavior per bullet, present tense, who or what named
40
+ - [ ] Exact values from the code; config values marked `(configurable)`
41
+ - [ ] Domain terms; no stack names unless the API is what users use
42
+ - [ ] No internal steps; nothing taken from comments, docs, or tests
@@ -1,94 +1,93 @@
1
1
  # Wiki layout
2
2
 
3
- Product-agnostic. Name `{area}` / `{feature}` (and any extra group folders) from **what the product does**, not from the stack. Follow naming rules according to code/language used (kebab-case by default). Same relative path in `capabilities/` and `catalog/`.
3
+ `features/` mirrors `features/.catalog/`: same areas and subareas, one feature page per catalog feature. Every folder has a README. Tree may be updated while the wiki is built.
4
4
 
5
- Default tree is multiple levels under `capabilities/`. Add sub-folders (with required depth) when the project is complex enough that an area needs a named group. Each with a README.
6
5
 
7
6
  ```
8
- wiki/
9
- README.md # front door → roots
10
- capabilities/ # Wiki > Capabilities
11
- README.md # areas index
12
- {area}/ # Wiki > Capabilities > {Area}
13
- README.md # features index
14
- {feature}.md # Wiki > … > {Feature} — leaf
15
- {group}/ # optional extra nesting
16
- README.md
17
- {feature}.md
18
- catalog/ # Wiki > Catalog — list of functionalities
19
- README.md # areas index
20
- {area}/
21
- README.md # YAML index
22
- {feature}.yaml
23
- {group}/
24
- README.md
25
- {feature}.yaml
26
- mismatches/ # optional — create when a disagreement exists
27
- README.md
7
+ {output}/ # output folder
8
+ README.md # sitemap, baseline commit
9
+ features/
10
+ README.md # areas
11
+ .catalog/ # internal: code catalog (catalog-features)
12
+ {area}/ # any depth, as in the catalog
13
+ README.md # subareas and features
14
+ {feature}.md # feature page
15
+ {subarea}/ # as in the catalog
16
+ README.md # subareas and features
17
+ {feature}.md # feature page
18
+ mismatches/ # code vs claims in the repo
19
+ README.md # index
20
+ {mismatch}.md # one behavior, every source that disagrees
28
21
  ```
29
22
 
30
- Create `mismatches/` when code disagrees with comments, infra, docs, issues etc.
23
+ ## Feature page
31
24
 
32
- ## Rules
25
+ - Breadcrumb that matches folders.
26
+ - Feature description.
27
+ - `## Behaviors`: [behaviors.md](behaviors.md).
33
28
 
34
- | Rule | Do |
35
- | --- | --- |
36
- | Default | `capabilities/{area}/{feature}.md` |
37
- | Extra depth | New group folder when the area (or group) is too crowded or a cluster needs a name. Any depth. |
38
- | Split | New sibling `{feature}.md`, a new group folder, or a new `{area}/`. |
39
- | Share | One page owns a shared rule; others link. Same behavior, two entries → one page. |
40
- | Growth | New behavior → new leaf + catalog entry + one new index line. Do not thicken an existing leaf into a mega-page. |
41
- | Overview first | Indexes exist before any leaf is written. |
29
+ ## Catalog feature YAML
42
30
 
43
- ## Formatting
31
+ - No key (cause does not exist in code).
32
+ - `links` become `code` paths.
44
33
 
45
- Every page: `# Title`, then a breadcrumb that matches folders, then the body. Omit empty sections. Relative links only.
34
+ ```yaml
35
+ # features/.catalog/checkout/pay-with-saved-card.yaml
36
+ title: Pay with saved card # catalog-feature
37
+ code: # implementation files
38
+ - src/api/cards.ts
39
+ tests: # tests that cover the feature
40
+ - test/checkout/cards.spec.ts
41
+ ```
46
42
 
47
- **Index** (any `README.md`): title + breadcrumb + a bullet list. No Requirement or Acceptance.
43
+ ## Mismatches
48
44
 
49
- | File | Body |
50
- | --- | --- |
51
- | `wiki/README.md` | Roots (`capabilities/`, `catalog/`, `changes/` / `mismatches/` (if present)) |
52
- | `capabilities/README.md` | Every area: link + purpose (markdown indexes only — not catalog YAML) |
53
- | `capabilities/{area}/README.md` | Every child feature (or group): link + purpose |
54
- | Extra group `README.md` | Every child feature (or deeper group): link + purpose |
55
- | `catalog/README.md` | Every area: link to that area’s catalog README |
56
- | `catalog/{area}/README.md` | Every child YAML: link + purpose (YAML indexes only — not feature pages) |
45
+ `mismatches/README.md` missing → create it: `# Mismatches`, breadcrumb. Write the list of mismatches, grouped by kind (not implemented, differs, unwired/not used, etc.), highest impact first: page link + impact level.
57
46
 
58
- **Leaf** (`{feature}.md`): headings in this order only — Requirement, Acceptance. After the breadcrumb, a relative link to the paired catalog YAML. Intended-but-unwired behavior is not a feature heading — it goes in `mismatches/` only. Code and tracker references live in catalog YAML (`sources`, `tests`, `issues`), never on the feature page.
47
+ ### Mismatch page
59
48
 
60
- ## Catalog YAML
49
+ A reader learns what disagrees from the first lines, without opening the sources.
61
50
 
62
- ```yaml
63
- wiki_path: capabilities/{area}/{feature}.md
64
- entry:
65
- - POST /api/v1/orders
66
- - UI /checkout
67
- - Job SettlePayments
68
- sources:
69
- - path/to/code
70
- tests:
71
- - TestOrSpecFile
72
- issues: # optional; omit the key when none
73
- - key: PROJ-123
74
- url: https://example.com/browse/PROJ-123
75
- behaviors:
76
- - One as-implemented fact (observable outcome).
77
- ```
51
+ File name: follow existing file name pattern or kebab-case of the title by default.
52
+
53
+ - `# Title`: the behavior in question, as the user meets it.
54
+ - `Feature:` the feature area › title, linked to its feature page.
55
+ - `## Difference`: first a one-sentence summary of how they differ, then one bullet for the code, first, then one per claim; claims that agree grouped on one bullet. Each bullet: the source, then its behavior. Write each side so it is clear alone: the condition, then what the user gets.
56
+ - `## Impact`: level first: **High** (users blocked, data or money wrong), **Medium** (a workaround exists), **Low** (wording, cosmetic). Then who meets it, when, and what they see or cannot do.
57
+ - `## Solution`: suggested fix: change the code, or correct the claim.
58
+ - `## Sources`: evidence, one row per source; Code row always, first. Code, Comment, Docstring, README, Developer docs, API spec, Config, Infra, Test, etc.
59
+ - Other info required to explain the mismatch.
60
+
61
+ #### Example
78
62
 
79
- `entry` is whatever a human would use to *find* the behavior. Catalog is **implicit** current state. One YAML per feature. If the feature sits in extra folders, the YAML uses the same folders.
63
+ ```markdown
64
+ # Upload retries after a network error
80
65
 
81
- `wiki_path` is the pointer from catalog to the feature page. `sources` is the implementation (and product docs that describe it). `issues` is optional tracker links (tasks, issues, stories). `url` is required on each item; `key` when the tracker has a display key. Ask before adding. Omit `issues` when the user declined or nothing matched.
66
+ Feature: [Reports › Upload results](../features/reports/upload-results.md)
82
67
 
83
- Repo paths (implementation, tests, docs) and tracker links are written only in catalog YAML.
68
+ ## Difference
84
69
 
85
- ## Mismatch page
70
+ The code retries a failed upload 3 times; the docstring and developer docs say 5.
86
71
 
87
- Create `mismatches/` when code disagrees with comments, infra, docs, issues/tasks. Index: `mismatches/README.md`.
72
+ - **Code:** A failed upload is retried 3 times, then the run shows "Upload failed".
73
+ - **Docstring, developer docs:** A failed upload is retried 5 times.
88
74
 
89
- Every mismatch must link every source that justifies it (omit none that exist):
75
+ ## Impact
76
+
77
+ Low. On a flaky network, "Upload failed" shows after 3 attempts, sooner than a developer reading the docs expects.
78
+
79
+ ## Solution
80
+
81
+ Correct the docstring and developer docs: 3 retries.
82
+
83
+ ## Sources
84
+
85
+ | Source | Says | Link | Updated |
86
+ | -------------- | ---------------------------- | --------------------------- | ---------- |
87
+ | Code (actual) | Retries 3 times, then fails | `src/upload/client.ts:40-52` | 2026-09-02 |
88
+ | Docstring | "Retries up to 5 times" | `src/upload/client.ts:31` | 2026-03-11 |
89
+ | Developer docs | "5 retries before giving up" | `docs/upload.md:18` | 2026-03-11 |
90
+ ```
90
91
 
91
- | Link | What to point at |
92
- | --- | --- |
93
- | Implemented | Always — current behavior based on code |
94
- | Intended | Always — the non-wiki source that disagrees with those files (comment, doc, infra, issue, unused config, or stub) |
92
+ - `Link`: repo file: `path:lines`; outside the repo: URL, with the heading when the page is long.
93
+ - `Updated`: repo file: date the cited line last changed (`git blame --date=short -L {line},+1 -- {path}`), doc section without a line: the section's last change; URL: the page's "last updated" date, else empty.
@@ -1,9 +0,0 @@
1
- import { mcpConfig, seedMetadataCache, vendorBundle } from "./mcp.js";
2
- /** The MCP adapter, configured from the environment, as a pi extension. */
3
- export default async function mcpExtension(pi) {
4
- const config = mcpConfig();
5
- await seedMetadataCache(config);
6
- const { createMcpAdapter } = (await import(vendorBundle()));
7
- await createMcpAdapter({ config })(pi);
8
- }
9
- //# sourceMappingURL=mcp-extension.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mcp-extension.js","sourceRoot":"","sources":["../../src/mcp-extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAEtE,2EAA2E;AAC3E,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,YAAY,CAAC,EAAW;IACpD,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAEhC,MAAM,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC,CAEzD,CAAC;IACF,MAAM,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AACzC,CAAC"}