@mrciphersmith/keryx 0.4.35 → 0.4.37

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 (90) hide show
  1. package/dist/cli.js +14292 -6392
  2. package/dist/core.js +245 -48
  3. package/dist/keryx-general-worker-entry.js +277 -49
  4. package/package.json +2 -1
  5. package/src/gdskills/bundled/install-manifest.json +132 -95
  6. package/src/gdskills/bundled/rules/activity/implement.mdc +55 -0
  7. package/src/gdskills/bundled/rules/activity/review.mdc +47 -0
  8. package/src/gdskills/bundled/rules/activity/test.mdc +46 -0
  9. package/src/gdskills/bundled/rules/core/async-patterns.mdc +10 -9
  10. package/src/gdskills/bundled/rules/core/concurrency-patterns.mdc +2 -2
  11. package/src/gdskills/bundled/rules/core/definition-of-done.mdc +6 -5
  12. package/src/gdskills/bundled/rules/core/frontend-assistant.mdc +4 -3
  13. package/src/gdskills/bundled/rules/core/tdd-workflow.mdc +2 -18
  14. package/src/gdskills/bundled/rules/process/agent-conduct.mdc +79 -0
  15. package/src/gdskills/bundled/rules/{core → process}/documentation-management.mdc +1 -1
  16. package/src/gdskills/bundled/rules/{core → process}/git-rules.mdc +1 -1
  17. package/src/gdskills/bundled/rules/{core → process}/skills-storage-workflow.mdc +1 -1
  18. package/src/gdskills/bundled/skills/core/reviewer-skill-creator/SKILL.detail.md +1 -1
  19. package/src/gdskills/bundled/skills/orchestration/context-collector/SKILL.md +6 -6
  20. package/src/gdskills/bundled/skills/orchestration/context-collector/orchestrator-prompt.md +4 -0
  21. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/SKILL.md +4 -4
  22. package/src/gdskills/bundled/skills/orchestration/feature-analyzer/orchestrator-prompt.md +2 -0
  23. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/SKILL.md +19 -19
  24. package/src/gdskills/bundled/skills/orchestration/flow-orchestrator/input-contract.schema.json +1 -1
  25. package/src/gdskills/bundled/skills/orchestration/issue-analyzer/orchestrator-prompt.md +2 -0
  26. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/SKILL.md +9 -9
  27. package/src/gdskills/bundled/skills/orchestration/job-orchestrator/orchestrator-prompt.md +10 -0
  28. package/src/gdskills/bundled/skills/orchestration/task-implementer/SKILL.md +16 -17
  29. package/src/gdskills/bundled/skills/orchestration/task-implementer/orchestrator-prompt.md +4 -0
  30. package/src/gdskills/bundled/skills/planning/autodoc-orchestrator/SKILL.md +2 -2
  31. package/src/gdskills/bundled/skills/planning/docpack-orchestrator/SKILL.md +2 -2
  32. package/src/gdskills/bundled/skills/planning/prd-creator/SKILL.md +1 -1
  33. package/src/gdskills/bundled/skills/platform/scheduled-tasks/SKILL.md +7 -7
  34. package/src/gdskills/bundled/skills/quality/test-gen/SKILL.md +2 -10
  35. package/src/gdskills/bundled/skills/quality/tests-creator/SKILL.md +1 -1
  36. package/src/gdskills/bundled/skills/review/review-architecture/SKILL.md +7 -18
  37. package/src/gdskills/bundled/skills/review/review-backend/SKILL.md +2 -10
  38. package/src/gdskills/bundled/skills/review/review-clean-code/SKILL.md +2 -14
  39. package/src/gdskills/bundled/skills/review/review-core-boundaries/SKILL.md +1 -9
  40. package/src/gdskills/bundled/skills/review/review-degradation/SKILL.md +1 -4
  41. package/src/gdskills/bundled/skills/review/review-flow-graph/SKILL.md +1 -9
  42. package/src/gdskills/bundled/skills/review/review-frontend/SKILL.md +4 -12
  43. package/src/gdskills/bundled/skills/review/review-frontend-conventions/SKILL.md +4 -12
  44. package/src/gdskills/bundled/skills/review/review-highload/SKILL.md +1 -12
  45. package/src/gdskills/bundled/skills/review/review-jev-comments/SKILL.md +1 -4
  46. package/src/gdskills/bundled/skills/review/review-jev-contract/SKILL.md +1 -4
  47. package/src/gdskills/bundled/skills/review/review-jev-docs/SKILL.md +1 -4
  48. package/src/gdskills/bundled/skills/review/review-jev-risk/SKILL.md +1 -4
  49. package/src/gdskills/bundled/skills/review/review-jev-rules/SKILL.md +1 -4
  50. package/src/gdskills/bundled/skills/review/review-jev-scenarios/SKILL.md +1 -4
  51. package/src/gdskills/bundled/skills/review/review-layout/SKILL.md +1 -4
  52. package/src/gdskills/bundled/skills/review/review-logic/SKILL.md +5 -13
  53. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.detail.md +2 -2
  54. package/src/gdskills/bundled/skills/review/review-orchestrator/SKILL.md +5 -12
  55. package/src/gdskills/bundled/skills/review/review-orchestrator/reviewer-input.schema.json +6 -0
  56. package/src/gdskills/bundled/skills/review/review-performance/SKILL.md +5 -13
  57. package/src/gdskills/bundled/skills/review/review-pr-contract/SKILL.md +1 -6
  58. package/src/gdskills/bundled/skills/review/review-regression/SKILL.md +1 -6
  59. package/src/gdskills/bundled/skills/review/review-security-code/SKILL.md +1 -9
  60. package/src/gdskills/bundled/skills/review/review-style/SKILL.md +1 -9
  61. package/src/gdskills/bundled/skills/review/review-testing-practices/SKILL.md +2 -7
  62. package/src/gdskills/bundled/skills/review/review-ui-ux/SKILL.md +1 -4
  63. package/src/gdskills/bundled/{rules/core → stacks/mobx/rules}/mobx-store-template.mdc +4 -2
  64. package/src/gdskills/bundled/{rules/core → stacks/nestjs/rules}/nestjs-dto.mdc +4 -3
  65. package/src/gdskills/bundled/stacks/playwright/governance/scout.json +1 -0
  66. package/src/gdskills/bundled/stacks/playwright/pack.json +19 -0
  67. package/src/gdskills/bundled/{rules/core → stacks/playwright/rules}/playwright-testing.mdc +6 -6
  68. package/src/gdskills/bundled/{rules/core → stacks/react/rules}/code-style-patterns.mdc +11 -9
  69. package/src/gdskills/bundled/stacks/storybook/governance/scout.json +1 -0
  70. package/src/gdskills/bundled/stacks/storybook/pack.json +19 -0
  71. package/src/gdskills/bundled/{rules/core → stacks/storybook/rules}/storybook-guidelines.mdc +4 -3
  72. package/src/gdskills/bundled/stacks/ts-js-node/rules/coding-style.mdc +17 -1
  73. package/src/gdskills/bundled/stacks/ts-js-node/rules/patterns.mdc +18 -0
  74. package/src/gdskills/contracts/subagent-dispatch.schema.json +4 -1
  75. /package/src/gdskills/bundled/rules/{core → process}/commit-message-formatting.mdc +0 -0
  76. /package/src/gdskills/bundled/rules/{core → process}/execution-metrics.md +0 -0
  77. /package/src/gdskills/bundled/rules/{core → process}/git-concurrency.mdc +0 -0
  78. /package/src/gdskills/bundled/rules/{core → process}/implementation-doc-mandate.mdc +0 -0
  79. /package/src/gdskills/bundled/rules/{core → process}/implementation-plans.mdc +0 -0
  80. /package/src/gdskills/bundled/rules/{core → process}/jobs-documentation.mdc +0 -0
  81. /package/src/gdskills/bundled/rules/{core → process}/model-selection.mdc +0 -0
  82. /package/src/gdskills/bundled/rules/{core → process}/opus-5-5-prompting.mdc +0 -0
  83. /package/src/gdskills/bundled/rules/{core → process}/requirements-management.mdc +0 -0
  84. /package/src/gdskills/bundled/rules/{core → process}/requirements-package-standard.mdc +0 -0
  85. /package/src/gdskills/bundled/rules/{core → process}/rule-management-workflow.mdc +0 -0
  86. /package/src/gdskills/bundled/rules/{core → process}/session-plan-bridge.mdc +0 -0
  87. /package/src/gdskills/bundled/rules/{core → process}/skill-authoring.mdc +0 -0
  88. /package/src/gdskills/bundled/rules/{core → process}/skill-lifecycle.mdc +0 -0
  89. /package/src/gdskills/bundled/rules/{core → process}/subagent-context-construction.md +0 -0
  90. /package/src/gdskills/bundled/rules/{core → process}/subagent-status-protocol.md +0 -0
@@ -1,12 +1,16 @@
1
1
  ---
2
- description: "React and TypeScript standard for the frontend, shared by code writers and reviewers, with the severities reviewers use: observer on every component that reads observables, layers (service IO, store logic, component render), where state lives, stores created once, effects that clean up, stable keys, accessibility basics, and TypeScript safety. Use when writing or reviewing React/TypeScript components."
2
+ extends: common
3
+ description: "React standard for the frontend, shared by code writers and reviewers, with the severities reviewers use: observer on every component that reads observables, layers (service IO, store logic, component render), where state lives, stores created once, effects that clean up, stable keys, accessibility basics, and props typing. Use when writing or reviewing React components. TypeScript safety (`any`, `!`, import paths) is the ts-js-node pack's coding-style.mdc."
3
4
  alwaysApply: false
4
5
  stack_requires: "react,mobx"
6
+ paths: ["**/*.tsx", "**/*.jsx"]
7
+ metadata:
8
+ origin: authored
5
9
  ---
6
10
 
7
11
  # Code Style and Architecture Patterns
8
12
 
9
- Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA basics and the TypeScript handbook. Store internals are `mobx-store-template.mdc`; backend layering is `clean-architecture.mdc`. This rule holds only this project's frontend decisions.
13
+ Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA basics and the TypeScript handbook. Store internals are `stacks/mobx/mobx-store-template.mdc`; backend layering is `core/clean-architecture.mdc`. This rule holds only this project's frontend decisions.
10
14
 
11
15
  ## Rules
12
16
 
@@ -14,10 +18,10 @@ Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA
14
18
  2. **Layers.** A service does IO only; a store holds state, logic and state transitions; a component renders and forwards events to store actions. No API/IO call and no business logic (validation, transformation, branching on domain state) in a component, its handlers or its effects.
15
19
  3. **Where state lives.** UI-only state that one component uses (an open flag, a hover, an input draft) is `useState`. State with logic, or read by another component or a store, lives in a store; it is never copied into `useState`. `useMemo`/`useCallback` do not wrap store values or store methods.
16
20
  4. **A store is created once per mount**: `useState(() => new PageStore(api))[0]` or `useLocalObservable`, never `new Store()` in the component body.
17
- 5. **An effect that subscribes, listens or starts a timer returns its cleanup.** Data loading is not started from an effect (see `mobx-store-template.mdc` Rule 8).
21
+ 5. **An effect that subscribes, listens or starts a timer returns its cleanup.** Data loading is not started from an effect (see `stacks/mobx/mobx-store-template.mdc` Rule 8).
18
22
  6. **List keys** are on the element `.map()` returns and are stable ids; an index key only for a static list that never reorders or filters.
19
23
  7. **Accessibility.** `<img>` has `alt` (`""` when decorative); an icon-only button or link has `aria-label`; a form input has a label; a clickable element is a `<button>` or `<a>`, not a `<div onClick>`.
20
- 8. **TypeScript.** No `any` (use `unknown` and a guard, or the named type). A `!` assertion carries a comment that proves it; otherwise use `?.`/`??` and handle the missing case. Props types are `XProps`, no `I` prefix. Imports use relative paths or the configured aliases, never `from "src/..."`.
24
+ 8. **Props types** are `XProps`, no `I` prefix. The TypeScript rules every `.ts`/`.tsx` file follows (no `any`, a `!` that carries its proof, import paths) are `stacks/ts-js-node/coding-style.mdc` Review severities.
21
25
 
22
26
  ---
23
27
 
@@ -36,8 +40,6 @@ Canon applies: the React documentation (rules of hooks, effects, keys), WAI-ARIA
36
40
  | Subscription, listener or timer without cleanup (Rule 5) | always | `major` | — |
37
41
  | Missing `key` (Rule 6) | always | `major` | — |
38
42
  | Index key on a list that reorders, filters or paginates (Rule 6) | always | `minor` | a static list |
39
- | `<img>` without `alt`; interactive element without an accessible name (Rule 7) | always | rated by the missing-accessible-name row of `ui-anti-slop.mdc` Review severities | — |
40
- | Clickable non-semantic element without keyboard support (Rule 7) | always | rated by the keyboard-reachability row of `ui-anti-slop.mdc` Review severities | — |
41
- | `!` on a value the types allow to be missing (Rule 8) | a named input reaches it | `blocker` when it throws during render; `major` elsewhere; `minor` with no input shown | a `!` with a comment that proves it |
42
- | `any` in new code (Rule 8) | always | `minor`; `major` with a named input and the wrong value it lets through | — |
43
- | `I`-prefixed props type, `from "src/..."` import (Rule 8) | introduced by the change | `minor` | — |
43
+ | `<img>` without `alt`; interactive element without an accessible name (Rule 7) | always | rated by the missing-accessible-name row of `core/ui-anti-slop.mdc` Review severities | — |
44
+ | Clickable non-semantic element without keyboard support (Rule 7) | always | rated by the keyboard-reachability row of `core/ui-anti-slop.mdc` Review severities | — |
45
+ | `I`-prefixed props type (Rule 8) | introduced by the change | `minor` | — |
@@ -0,0 +1,19 @@
1
+ {
2
+ "id": "storybook",
3
+ "family": "tool",
4
+ "modules": ["storybook-rules"],
5
+ "detectionMarkers": ["storybook"],
6
+ "provenance": {
7
+ "origin": "authored",
8
+ "sourceRef": "ADR-0001 P4 (rules-layers): storybook-guidelines moved out of rules/core"
9
+ },
10
+ "stability": "experimental",
11
+ "skills": {
12
+ "implement": [],
13
+ "test": [],
14
+ "review": [],
15
+ "build-fix": [],
16
+ "migrate": []
17
+ },
18
+ "notes": "Rules-only pack: it carries the Storybook rule that used to sit in rules/core (gated stack_requires: react). Detected from a storybook or @storybook/* dependency, not from React, so a React project without Storybook no longer receives it. Story review stays with review-frontend and review-frontend-conventions, which read this pack's rule."
19
+ }
@@ -1,10 +1,11 @@
1
1
  ---
2
+ extends: common
2
3
  description: "Storybook standard shared by code writers and reviewers, with the severities reviewers use: typed stories, which states every component's stories cover (default and empty always, loading and error when the component has them, stress cases for lists and long text), fn() for actions, no side effects in render. Use when writing or reviewing *.stories.tsx."
3
4
  alwaysApply: false
4
- globs:
5
- - ".storybook/**"
6
- - "**/*.stories.tsx"
7
5
  stack_requires: "react"
6
+ paths: ["**/*.stories.tsx", "**/*.stories.ts", ".storybook/**/*.ts", ".storybook/**/*.tsx"]
7
+ metadata:
8
+ origin: authored
8
9
  ---
9
10
 
10
11
  # Storybook Guidelines
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  extends: common
3
- paths: ["**/*.ts", "**/*.js", "**/*.mjs", "**/*.cjs"]
3
+ paths: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.mjs", "**/*.cjs"]
4
4
  metadata:
5
5
  origin: authored
6
6
  ---
@@ -20,6 +20,10 @@ comes from the common rules this file `extends`.
20
20
  - Prefer `unknown` over `any` for a value whose shape is not yet known;
21
21
  narrow it with a type guard before use. An untyped external payload
22
22
  (parsed JSON, a fetch body) is `unknown`, not `any`.
23
+ - No `any` (use `unknown` and a guard, or the named type). A `!` assertion
24
+ carries a comment that proves it; otherwise use `?.`/`??` and handle the
25
+ missing case. Imports use relative paths or the configured aliases, never
26
+ `from "src/..."`.
23
27
  - Match `moduleResolution` to what the project already declares
24
28
  (`nodenext` or `bundler`) -- do not mix `require()` and `import` in code
25
29
  the project already runs as ESM (`"type": "module"` in `package.json`).
@@ -71,3 +75,15 @@ comes from the common rules this file `extends`.
71
75
  - Explicit `.js` extensions on relative ESM imports when
72
76
  `moduleResolution: nodenext` requires them (Node's own ESM resolver does
73
77
  not add extensions); match whatever the surrounding files already do.
78
+
79
+ ---
80
+
81
+ ## Review severities (shared with reviewers)
82
+
83
+ Reviewers rate these patterns by this table; `review-logic` cites the `!` row. Change a row here, never in a reviewer.
84
+
85
+ | Signal | A finding when | Default | Not a finding |
86
+ |---|---|---|---|
87
+ | `!` on a value the types allow to be missing (Typing and module shape) | a named input reaches it | `blocker` when it throws during render; `major` elsewhere; `minor` with no input shown | a `!` with a comment that proves it |
88
+ | `any` in new code (Typing and module shape) | always | `minor`; `major` with a named input and the wrong value it lets through | — |
89
+ | `from "src/..."` import (Typing and module shape) | introduced by the change | `minor` | — |
@@ -59,3 +59,21 @@ code; component composition patterns belong to the `react` pack.
59
59
  - **try/catch that only rethrows the same error unchanged**: adds a stack
60
60
  frame and nothing else; either add context (`cause`, a wrapped error
61
61
  type) or remove the try/catch.
62
+
63
+ ## Async and concurrency in Node.js (core `async-patterns`, `concurrency-patterns`)
64
+
65
+ Canon applies: `Promise.all` / `allSettled` semantics (MDN), the Node.js "Don't Block the Event Loop" guide, `@typescript-eslint/no-floating-promises`, the `wx` open flag and `child_process` stream semantics. The principles and their severities are `core/async-patterns.mdc` and `core/concurrency-patterns.mdc`; these are their Node.js values.
66
+
67
+ - **Independent awaits** (async Rule 1): if B does not depend on A, use `Promise.all`; use `Promise.allSettled` when some results are optional, and handle each rejection.
68
+ - **Timeouts** (async Rule 2) are set with `AbortSignal.timeout(ms)`.
69
+ - **The event loop** (async Rule 4): `JSON.parse` / `JSON.stringify` of a payload over 1MB, sync file reads in hot paths and CPU-heavy loops go to a stream, `fs.promises` or a worker thread.
70
+ - **Lock files** (concurrency Rule 1) are taken with the `wx` open flag.
71
+ - **Child output** (concurrency Rule 5): child stdout and stderr are read as streams into a ring buffer or a file.
72
+
73
+ ### Review severities (shared with reviewers)
74
+
75
+ `review-logic` rates these patterns by this table. A Node.js form of a core signal (`Promise.all` over an optional call, a call with no `AbortSignal`, sync `fs` or `JSON.parse` of a large payload on a request path) is rated by the matching row of `core/async-patterns.mdc` Review severities, not here. Change a row here, never in a reviewer.
76
+
77
+ | Signal | A finding when | Default | Not a finding |
78
+ |---|---|---|---|
79
+ | Timeout built from `AbortController` + `setTimeout` (async Rule 2) | always | `minor` | — |
@@ -53,7 +53,10 @@
53
53
  },
54
54
  "constraints": {
55
55
  "type": "array",
56
- "items": { "type": "string" }
56
+ "description": "Constraints the worker must honour. One entry must be the mandatory agent-conduct block (ADR-0001 D2) with all five numbered constraints: the \"Dispatch form\" line of rules/process/agent-conduct.mdc, rendered from src/lib/agent-conduct.ts. An unfilled template placeholder does not match.",
57
+ "items": { "type": "string" },
58
+ "minItems": 1,
59
+ "contains": { "type": "string", "pattern": "^Agent conduct \\(mandatory\\): \\(1\\) .+ \\(2\\) .+ \\(3\\) .+ \\(4\\) .+ \\(5\\) .+" }
57
60
  },
58
61
  "allowed_actions": {
59
62
  "type": "array",