@xn-intenton-z2a/agentic-lib 7.1.89 → 7.1.90

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xn-intenton-z2a/agentic-lib",
3
- "version": "7.1.89",
3
+ "version": "7.1.90",
4
4
  "description": "Agentic-lib Agentic Coding Systems SDK powering automated GitHub workflows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -12,12 +12,24 @@ to build) and the tests pass and the main at least doesn't output an error.
12
12
  Your goal is mission complete — if the mission can be fully accomplished while fixing this issue,
13
13
  do it. Don't limit yourself to the minimal fix when you can deliver the whole mission in one pass.
14
14
 
15
- The repository has a website in `src/web/` that uses the JS library. If a fix affects library
16
- exports or behaviour, also update the website files to stay in sync.
15
+ ## All Code Must Change Together
17
16
 
18
- **Both unit tests AND behaviour tests must pass.** If the project has a `test:behaviour` npm script
19
- (typically Playwright-based, testing the website), run it after your changes. If the behaviour test
20
- expects elements like `#demo-output`, `#lib-name`, or `#lib-version`, ensure the website provides them.
17
+ A fix is never just one file. These layers form a single unit if you change one, check all the others:
18
+
19
+ - **Library source** (`src/lib/main.js`) the core implementation
20
+ - **Unit tests** (`tests/unit/`) — test every function at the API level with exact values and edge cases
21
+ - **Website** (`src/web/index.html` and related files) — imports and calls the library to demonstrate features
22
+ - **Website unit tests** (`tests/unit/web.test.js`) — verify HTML structure and library wiring
23
+ - **Behaviour tests** (`tests/behaviour/`) — Playwright tests that load the website in a real browser
24
+ and verify features work at a high navigational level (demo output visible, interactive elements work)
25
+
26
+ If the failure is in one layer, the fix often requires coordinating changes across multiple layers.
27
+ For example, if a unit test fails because a function signature changed, the website and behaviour tests
28
+ that use that function also need updating. A full test suite (unit + behaviour) runs after your fix
29
+ regardless — each failed attempt consumes transformation budget, so get it right in one pass.
30
+
31
+ **Both unit tests AND behaviour tests must pass.** The project runs `npm test` (unit tests) and
32
+ `npm run test:behaviour` (Playwright). Both are gated — your fix must pass both.
21
33
 
22
34
  ## Merge Conflict Resolution
23
35
 
@@ -56,7 +56,7 @@ When relaying supervisor responses back to the user, present them naturally as y
56
56
  Users can ask for new features or mission changes through this discussion thread:
57
57
 
58
58
  - **Feature requests** — When a user says "add feature X" or "I want Y", acknowledge the request and pass it to the supervisor to create a GitHub issue. The pipeline will pick it up and implement it.
59
- - **Re-seed requests** — When a user says "change the mission to Z" or "re-seed with plot-code-lib", explain that this requires running `npx @xn-intenton-z2a/agentic-lib init --purge --mission <name>`. List the available missions if asked: hamming-distance, fizz-buzz, roman-numerals, string-utils, dense-encoding, cron-engine, owl-ontology, plot-code-lib, time-series-lab, lunar-lander, empty. Note that re-seeding resets all source code, issues, and discussions.
59
+ - **Re-seed requests** — When a user says "change the mission to Z" or "re-seed with plot-code-lib", explain that this requires running `npx @xn-intenton-z2a/agentic-lib init --purge --mission <name>`. List the available missions if asked: hamming-distance, fizz-buzz, roman-numerals, string-utils, dense-encoding, cron-engine, owl-ontology, plot-code-lib, time-series-lab, lunar-lander, c64-emulator, ray-tracer, markdown-compiler, empty. Note that re-seeding resets all source code, issues, and discussions.
60
60
  - **Website feedback** — The project has a website that uses the JS library, published via GitHub Pages. If a user comments on the website, pass feedback to the supervisor to create an issue for the pipeline to address.
61
61
 
62
62
  ## Website Awareness
@@ -9,6 +9,27 @@ Do as much as you can all at once. Your goal is mission complete — if the miss
9
9
  accomplished in this single transform, it should be. Deliver all acceptance criteria, tests, website,
10
10
  docs, and README in one pass. Only leave work for a follow-up if it genuinely cannot fit.
11
11
 
12
+ ## All Code Must Change Together
13
+
14
+ Every transform produces a coordinated set of changes across all layers. These are NOT independent —
15
+ they form a single unit that must be internally consistent:
16
+
17
+ - **Library source** (`src/lib/main.js`) — the core implementation. All exported functions, types, constants.
18
+ - **Unit tests** (`tests/unit/`) — test every function and edge case at the API level. These bind to the
19
+ detail: exact return values, error types, boundary conditions, parameter validation.
20
+ - **Website** (`src/web/index.html` and related files) — a working demo that imports and calls the library.
21
+ The website is the public face of the library and should show its features in action.
22
+ - **Website unit tests** (`tests/unit/web.test.js`) — verify the website HTML structure and library wiring.
23
+ - **Behaviour tests** (`tests/behaviour/`) — Playwright tests that load the website in a real browser and
24
+ verify it works end-to-end. These test at a high navigational level: can a user see the demo output?
25
+ Do the interactive elements work? Is the library identity displayed?
26
+ - **Documentation** (`docs/`, `README.md`) — evidence, examples, and user-facing docs.
27
+
28
+ If you change a function signature in the library, you MUST also update: the unit tests that call it,
29
+ the website code that uses it, the web tests that check for its output, and any behaviour test assertions
30
+ that depend on it. A partial change that updates the library but not the tests will fail — and there will
31
+ be a full test run after your changes regardless, consuming budget on each failure.
32
+
12
33
  ## Tests Must Pass
13
34
 
14
35
  Your changes MUST leave all existing tests passing. If you change function signatures, return values, or
@@ -21,10 +42,19 @@ When writing both tests and implementation:
21
42
  - Ensure the implementation passes those tests before delivering
22
43
  - Do not write tests with different expectations than the implementation produces
23
44
 
24
- **Both unit tests AND behaviour tests must pass.** If the project has a `test:behaviour` npm script
25
- (typically Playwright-based, testing the website), run it after your changes. If your changes affect
26
- the website (`src/web/`) or library exports, ensure the behaviour test still finds the expected
27
- elements (e.g. `#demo-output`, `#lib-name`, `#lib-version`).
45
+ **Both unit tests AND behaviour tests must pass.** The project runs `npm test` (unit tests) and
46
+ `npm run test:behaviour` (Playwright). Both are gated your changes must pass both.
47
+
48
+ ### Test philosophy
49
+
50
+ - **Unit tests** bind to the detail: exact return values, error types, edge cases, parameter validation.
51
+ Every exported function should have unit test coverage.
52
+ - **Behaviour tests** demonstrate features at a high navigational level through the website. They verify
53
+ that a user visiting the site can see the library working: demo output appears, interactive elements
54
+ respond, the library identity is displayed. Aim to show features through behaviour tests rather than
55
+ just testing internal APIs — if a feature is worth building, it's worth demonstrating on the website.
56
+ - **Web unit tests** verify the HTML structure: expected elements exist (`#demo-output`, `#lib-name`,
57
+ `#lib-version`), scripts load, and the library is wired in correctly.
28
58
 
29
59
  Follow the linting guidelines and the formatting guidelines from the included config.
30
60
 
@@ -55,6 +85,8 @@ automatically (from `docs/` via `npm run build:web`).
55
85
  - **Use the library**: Import the library (or its browser-compatible parts) and call its functions on the page
56
86
  - **Show real results**: Display actual output from library functions, not placeholder text
57
87
  - When you add or change library functions, update the website to reflect them
88
+ - **Demonstrate features**: Each significant library feature should be visible and usable on the website.
89
+ Behaviour tests will verify these demonstrations work, so make them testable (use IDs, structured output).
58
90
 
59
91
  ### Guidelines
60
92
 
@@ -27,4 +27,9 @@ Features must be achievable in a single software repository not part of a corpor
27
27
  The feature spec should be a multiline markdown with a few level 1 headings.
28
28
  The feature must be compatible with the mission statement in MISSION.md and ideally realise part of the value in the mission.
29
29
  The feature must be something that can be realised in a single source file (as below), ideally just as a library, CLI tool or possibly an HTTP API in combination with infrastructure as code deployment.
30
- The repository also has a website in `src/web/` that uses the JS library. When proposing features, consider both the library API and how the feature could be shown on the website.
30
+ The repository also has a website in `src/web/` that uses the JS library. When proposing features, consider:
31
+ - The library API (`src/lib/main.js`) and its exports
32
+ - How the feature could be demonstrated on the website — features should be visible and interactive
33
+ - Unit tests (`tests/unit/`) that verify exact behaviour at the API level
34
+ - Behaviour tests (`tests/behaviour/`) that verify features work at a high navigational level through the website
35
+ - All layers (library, tests, website, web tests, behaviour tests) must change together in a single transform
@@ -3,7 +3,19 @@ Please review the GitHub issue and determine if it should be enhanced, closed or
3
3
  If the issue is relevant to the mission statement and features:
4
4
 
5
5
  1. Decide if the issue should be refined, closed or if no operation is needed.
6
- 2. Update the issue description with testable acceptance criteria derived from MISSION.md. Include ALL of: implementation, tests matching MISSION.md acceptance criteria, website updates, docs/evidence, and README. The issue should ask for mission complete — if the entire mission can be accomplished in a single transform, the acceptance criteria should cover everything. Only scope down if the mission is genuinely too large for one pass.
6
+ 2. Update the issue description with testable acceptance criteria derived from MISSION.md. Include ALL of:
7
+ - **Library implementation** (`src/lib/main.js`) — the core functions and exports
8
+ - **Unit tests** (`tests/unit/`) — tests that bind to the detail: exact return values, error types, edge cases
9
+ - **Website updates** (`src/web/`) — demonstrate the feature on the website so users can see it working
10
+ - **Behaviour tests** (`tests/behaviour/`) — Playwright tests that verify the feature works at a high
11
+ navigational level through the website (e.g. demo output is visible, interactive elements respond).
12
+ Prefer demonstrating features through behaviour tests rather than only testing internal APIs.
13
+ - **Web tests** (`tests/unit/web.test.js`) — verify HTML structure and library wiring
14
+ - **Docs/evidence** (`docs/`) and **README** updates
15
+ The issue should ask for mission complete — if the entire mission can be accomplished in a single
16
+ transform, the acceptance criteria should cover everything. Only scope down if the mission is
17
+ genuinely too large for one pass. Emphasise that all layers must change together because a full
18
+ test suite runs after the transform.
7
19
  3. Enhance the issue by adding relevant library documents as issue comments that support implementation.
8
20
 
9
21
  If the issue is irrelevant to the mission statement or features:
@@ -1,16 +1,23 @@
1
- Does the combination source file, test file, website files, README file and dependencies file resolve the following issue? Check that the solution satisfies the issue's acceptance criteria and moves the mission toward complete.
1
+ Does the combination of library source, unit tests, website, web tests, behaviour tests, README,
2
+ and dependencies resolve the following issue? Check that the solution satisfies the issue's
3
+ acceptance criteria and moves the mission toward complete.
2
4
 
3
5
  An issue is NOT resolved unless ALL of the following are true:
4
- 1. The implementation exists and matches what the issue asks for
5
- 2. Tests exist that specifically test the implemented functionality (seed-only identity tests do NOT count)
6
+ 1. The **library source** (`src/lib/main.js`) has the implementation and matches what the issue asks for
7
+ 2. **Unit tests** (`tests/unit/`) exist that specifically test the implemented functionality
8
+ (seed-only identity tests do NOT count). Tests bind to the detail: exact return values, error types, edge cases.
6
9
  3. Tests match the acceptance criteria in MISSION.md — the mission is the source of truth
7
10
  4. Tests and implementation are consistent — test expectations must match what the code actually returns (casing, types, formats)
11
+ 5. The **website** (`src/web/`) has been updated to demonstrate the new/changed library features
12
+ 6. **Web tests** (`tests/unit/web.test.js`) verify the website structure and library wiring
13
+ 7. **Behaviour tests** (`tests/behaviour/`) demonstrate features at a high navigational level through the
14
+ website — a user visiting the site can see the feature working (not just that the API exists internally)
8
15
 
9
- If any of these are missing, the issue is NOT resolved — keep it open or create a follow-up issue for the gap. Do not close an issue just because implementation code exists without matching tests.
16
+ If any of these are missing, the issue is NOT resolved — keep it open or create a follow-up issue for the gap.
17
+ Do not close an issue just because implementation code exists without matching tests and website updates.
10
18
 
11
- If the mission could have been fully accomplished in this transform but the solution only partially addresses it, note this gap and suggest a follow-up issue for the remaining work.
12
-
13
- Note: The repository has a website in `src/web/` that uses the JS library. When reviewing, check that website files are updated alongside library changes.
19
+ If the mission could have been fully accomplished in this transform but the solution only partially addresses it,
20
+ note this gap and suggest a follow-up issue for the remaining work.
14
21
 
15
22
  When reviewing, also check that evidence artifacts exist under `docs/` for implemented features.
16
23
  If a feature works but has no evidence (no example outputs, test results, or walkthroughs in `docs/`),
@@ -17,7 +17,7 @@
17
17
  "author": "",
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
- "@xn-intenton-z2a/agentic-lib": "^7.1.89"
20
+ "@xn-intenton-z2a/agentic-lib": "^7.1.90"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@playwright/test": "^1.58.0",