@sumrco/cli 0.3.9 → 0.4.2

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 (41) hide show
  1. package/ARTIFACT-MANIFEST.json +18 -0
  2. package/README.md +12 -0
  3. package/THIRD_PARTY_NOTICES.md +1119 -0
  4. package/ai/modules/kontract/resources/api-generation-standards.rf.md +18 -5
  5. package/ai/modules/kontract/resources/authoring/configuration.rf.md +568 -12
  6. package/ai/modules/kontract/resources/authoring/schema-reuse.rf.md +25 -4
  7. package/ai/modules/kontract/resources/authoring/scope-and-splitting.rf.md +8 -6
  8. package/ai/modules/kontract/resources/authoring/spec-layout.rf.md +4 -0
  9. package/ai/modules/kontract/resources/generated-output.rf.md +712 -44
  10. package/ai/modules/kontract/resources/nestjs-eslint.rf.md +153 -0
  11. package/ai/modules/kontract/resources/openapi-sdk-generator-research.rf.md +177 -0
  12. package/ai/modules/kontract/resources/overview.md +70 -8
  13. package/ai/modules/kontract/resources/performance.rf.md +11 -2
  14. package/ai/modules/kontract/sumr.module.yaml +15 -14
  15. package/ai/modules/mission/resources/flow-config.rf.md +2 -2
  16. package/ai/modules/mission/resources/overview.md +42 -35
  17. package/ai/modules/mission/resources/stage-closeout.rf.md +5 -5
  18. package/ai/modules/mission/resources/stage-delivery.rf.md +5 -5
  19. package/ai/modules/mission/resources/stage-intake.rf.md +2 -2
  20. package/ai/modules/mission/resources/stage-planning.rf.md +43 -4
  21. package/ai/modules/mission/resources/stage-pull-request.rf.md +2 -2
  22. package/ai/modules/mission/resources/stage-quality.rf.md +8 -8
  23. package/ai/modules/mission/resources/team-members/planner.tm.md +17 -5
  24. package/ai/modules/mission/resources/workflows/daily-triage.cmd.md +5 -1
  25. package/ai/modules/mission/resources/workflows/mission-cycle.cmd.md +7 -5
  26. package/ai/modules/mission/resources/workflows/planning-only.cmd.md +8 -3
  27. package/ai/modules/mission/sumr.module.yaml +20 -16
  28. package/ai/modules/playbook/resources/authoring/extraction.rf.md +28 -1
  29. package/ai/modules/playbook/resources/authoring/frontmatter.rf.md +7 -0
  30. package/ai/modules/playbook/resources/authoring/overview.md +33 -2
  31. package/ai/modules/playbook/resources/authoring/patterns.rf.md +21 -0
  32. package/ai/modules/playbook/resources/team-members/technical-writer.tm.md +5 -1
  33. package/ai/modules/playbook/sumr.module.yaml +13 -12
  34. package/ai/registry.json +3 -3
  35. package/bin/sumr +18 -3
  36. package/eslint/index.mjs +2 -0
  37. package/eslint/kontract/index.mjs +22 -0
  38. package/eslint/kontract/rules/typescript-nestjs/operation-contract.mjs +656 -0
  39. package/index.js +3060 -462
  40. package/package.json +26 -23
  41. package/sbom.cdx.json +5111 -0
@@ -20,7 +20,11 @@ Apply **authoring** before writing or editing Playbook docs.
20
20
  - Before splitting, decide the owning context folder: same-folder references for supporting detail, child `overview.md` topic folders for standalone subtopics.
21
21
  - If a split creates multiple files for one microconcept, promote it to a child folder. The child `overview.md` is the invoker/entry point; sibling files are references.
22
22
  - Move deep detail into `category: reference` files beside the `overview.md` they support.
23
- - Review every fenced code block before extraction. Wrap dedicated examples, samples, and templates with `<!-- extract:examples -->`; keep short core snippets, file trees, and marker syntax examples inline.
23
+ - Classify every fenced code block whenever it is added or edited. Wrap dedicated examples, samples, templates, long boilerplate, and every ✅ Good / ❌ Bad pair with `<!-- extract:examples -->`; keep short core snippets, file trees, schemas, diagrams, and marker syntax examples inline when removing them would make the instruction incomplete.
24
+ - For every fenced block that demonstrates a non-obvious code, configuration, naming, folder, or
25
+ structure convention, actively suggest a paired ✅ Good / ❌ Bad example when the counterpart
26
+ would clarify the decision boundary. Give both sides a one-line why and keep the pair inside one
27
+ extracted examples block.
24
28
  - Keep frontmatter complete, stable, and tool-agnostic.
25
29
  - Use `category: team-member`, `workflow`, or `lifecycle` only when the doc represents an AI resource rather than a normal skill/topic. Treat `hook` as a legacy alias for `lifecycle`.
26
30
  - When the user asks for hooks, automatic AI checks, session start/stop behavior, pre/post tool guards, quality closeout, or similar AI-tool automation, propose a `category: lifecycle` doc in `{{PLAYBOOK_PATH}}/lifecycle/` before any tool-native hook edits.
@@ -1,21 +1,17 @@
1
1
  apiVersion: sumr.dev/v1
2
2
  kind: CliModule
3
+
3
4
  metadata:
4
- name: playbook
5
- package: "@sumrco/cli"
6
5
  description: Sync Playbook docs into AI tools (Claude, Cursor, Codex, VS Code)
6
+ name: playbook
7
7
  owners:
8
8
  - team: "@sumr-org/playbook-team"
9
+ package: "@sumrco/cli"
9
10
  tags:
10
11
  - docs
11
12
  - authoring
12
13
  - ai-tools
13
14
  spec:
14
- visibility: public
15
- group: modules
16
- targets:
17
- contractVersion: ^1.0.0
18
- bunVersion: ">=1.1.0"
19
15
  commands:
20
16
  - name: config
21
17
  summary: Manage playbook configuration in sumr.yaml
@@ -42,14 +38,19 @@ spec:
42
38
  summary: Move command-era category workflow docs to command and .wf.md to .cmd.md
43
39
  visibility: public
44
40
  exports:
45
- resources: []
46
- binaries: []
47
41
  aiResources:
42
+ activation:
43
+ mode: always
48
44
  module: playbook
49
45
  roots:
50
46
  - ./resources
51
- activation:
52
- mode: always
47
+ binaries: []
48
+ resources: []
53
49
  flags:
54
- experimental: false
55
50
  deprecated: null
51
+ experimental: false
52
+ group: modules
53
+ targets:
54
+ bunVersion: ">=1.1.0"
55
+ contractVersion: ^1.0.0
56
+ visibility: public
package/ai/registry.json CHANGED
@@ -1,6 +1,4 @@
1
1
  {
2
- "schemaVersion": 1,
3
- "variant": "public",
4
2
  "modules": [
5
3
  {
6
4
  "label": "kontract",
@@ -14,5 +12,7 @@
14
12
  "label": "playbook",
15
13
  "path": "./ai/modules/playbook/resources"
16
14
  }
17
- ]
15
+ ],
16
+ "schemaVersion": 1,
17
+ "variant": "public"
18
18
  }
package/bin/sumr CHANGED
@@ -1,7 +1,22 @@
1
1
  #!/bin/bash
2
- if command -v _sumr_cli >/dev/null 2>&1; then
3
- exec _sumr_cli "$@"
2
+
3
+ # `bun run` prepends the consumer's node_modules/.bin to PATH. Resolve this
4
+ # package's sibling CLI so an older project-pinned `_sumr_cli` cannot take over.
5
+ _sumr_wrapper_path="${BASH_SOURCE[0]}"
6
+ while [ -L "$_sumr_wrapper_path" ]; do
7
+ _sumr_wrapper_dir="$(cd -P "$(dirname "$_sumr_wrapper_path")" >/dev/null 2>&1 && pwd)"
8
+ _sumr_wrapper_path="$(readlink "$_sumr_wrapper_path")"
9
+ case "$_sumr_wrapper_path" in
10
+ /*) ;;
11
+ *) _sumr_wrapper_path="$_sumr_wrapper_dir/$_sumr_wrapper_path" ;;
12
+ esac
13
+ done
14
+ _sumr_wrapper_dir="$(cd -P "$(dirname "$_sumr_wrapper_path")" >/dev/null 2>&1 && pwd)"
15
+ _sumr_cli="$_sumr_wrapper_dir/../index.js"
16
+
17
+ if [ -x "$_sumr_cli" ]; then
18
+ exec "$_sumr_cli" "$@"
4
19
  fi
5
20
 
6
- echo "sumr: _sumr_cli not found. Reinstall SUMR CLI." >&2
21
+ echo "sumr: sibling _sumr_cli not found. Reinstall SUMR CLI." >&2
7
22
  exit 1
@@ -0,0 +1,2 @@
1
+ /** Module-owned ESLint contributions assembled by the SUMR CLI product build. */
2
+ export { kontractPlugin } from './kontract/index.mjs';
@@ -0,0 +1,22 @@
1
+ // Rules are organized by the generator whose output they guard:
2
+ // rules/<generator-type>/<concern>.mjs, mirroring the generator definition
3
+ // modules under src/operations/generators/definitions/. Public rule IDs are
4
+ // customer-facing and stay stable regardless of file layout; each ID leads
5
+ // with the generator shorthand ('nestjs-') followed by the concern it guards.
6
+ import { nestjsOperationContractRule } from './rules/typescript-nestjs/operation-contract.mjs';
7
+
8
+ /**
9
+ * Kontract-owned ESLint plugin. Consumers provide their own parser and choose
10
+ * the controller files to which the rule applies.
11
+ */
12
+ export const kontractPlugin = {
13
+ meta: {
14
+ name: '@sumrco/cli/kontract',
15
+ },
16
+ rules: {
17
+ // typescript-nestjs
18
+ 'nestjs-operation-contract': nestjsOperationContractRule,
19
+ },
20
+ };
21
+
22
+ export default kontractPlugin;