@nitra/cursor 3.19.0 → 3.21.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 (49) hide show
  1. package/.claude-template/hooks/capture-decisions.sh +1 -1
  2. package/.claude-template/hooks/normalize-decisions.sh +8 -4
  3. package/CHANGELOG.md +33 -0
  4. package/bin/n-cursor.js +53 -0
  5. package/package.json +1 -1
  6. package/rules/adr/adr.mdc +5 -5
  7. package/rules/adr/js/templates/hooks/.gitignore.snippet +1 -0
  8. package/rules/changelog/changelog.mdc +1 -1
  9. package/rules/changelog/js/consistency.mjs +69 -12
  10. package/rules/ci4/ci4.mdc +2 -2
  11. package/rules/docker/docker.mdc +3 -3
  12. package/rules/docker/js/lint.mjs +1 -1
  13. package/rules/docker/lib/docker-hadolint.mjs +27 -55
  14. package/rules/ga/lint/lint.mjs +18 -54
  15. package/rules/js-run/js/runtime.mjs +32 -0
  16. package/rules/js-run/js-run.mdc +6 -0
  17. package/rules/js-run/lib/temporal-scan.mjs +52 -0
  18. package/rules/k8s/lint/lint.mjs +3 -10
  19. package/rules/nginx-default-tpl/js/template.mjs +39 -1
  20. package/rules/nginx-default-tpl/nginx-default-tpl.mdc +3 -1
  21. package/rules/npm-module/js/skill_meta.mjs +12 -0
  22. package/rules/npm-module/npm-module.mdc +1 -1
  23. package/rules/npm-module/policy/npm_publish_yml/target.json +1 -0
  24. package/rules/rego/lint/lint.mjs +10 -55
  25. package/rules/release/change.mjs +34 -5
  26. package/rules/release/lib/change-file.mjs +26 -11
  27. package/rules/text/lint/lint.mjs +11 -40
  28. package/rules/worktree/policy/vscode_settings/target.json +5 -0
  29. package/rules/worktree/policy/vscode_settings/template/settings.json.snippet.json +8 -0
  30. package/rules/worktree/policy/zed_settings/target.json +5 -0
  31. package/rules/worktree/policy/zed_settings/template/settings.json.snippet.json +12 -0
  32. package/rules/worktree/worktree.mdc +52 -0
  33. package/schemas/target.json +5 -0
  34. package/scripts/lib/assert-project-root.mjs +80 -0
  35. package/scripts/lib/ensure-tool.mjs +352 -0
  36. package/scripts/lib/root-notice.mjs +64 -0
  37. package/scripts/lib/run-conftest-batch.mjs +6 -28
  38. package/scripts/lib/run-rule.mjs +61 -5
  39. package/scripts/lib/skill-meta.mjs +16 -2
  40. package/scripts/lib/template.mjs +29 -3
  41. package/scripts/lib/worktree-notice.mjs +121 -73
  42. package/scripts/sync-claude-config.mjs +2 -2
  43. package/skills/fix/SKILL.md +4 -4
  44. package/skills/llm-patch/meta.json +1 -1
  45. package/skills/publish-telegram/meta.json +1 -1
  46. package/skills/start-check/meta.json +1 -1
  47. package/skills/worktree/meta.json +1 -1
  48. package/types/bin/n-cursor.d.ts +1 -1
  49. package/rules/npm-module/policy/npm_publish_yml/npm_publish_yml.rego +0 -87
@@ -1 +1 @@
1
- { "auto": "завжди", "worktree": false }
1
+ { "auto": "завжди", "worktree": false, "requireRoot": true }
@@ -1 +1 @@
1
- { "auto": "завжди", "worktree": false }
1
+ { "auto": "завжди", "worktree": false, "requireRoot": false }
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- export {}
2
+ export {};
@@ -1,87 +0,0 @@
1
- # Перевірка `.github/workflows/npm-publish.yml` (npm-module.mdc).
2
- #
3
- # Канон надходить через --data: { "template": { "snippet": ... } }
4
- # Структура --data сформована з template/npm-publish.yml.snippet.yml.
5
- # Per-concern field-by-field: path/substring-маркери з expected_uses_set читаються
6
- # зі steps template, експектації branches/paths — subset-of.
7
- #
8
- # Універсальні workflow-перевірки (concurrency, заборонені setup-bun/cache/install,
9
- # shell line-continuation) — у `ga.workflow_common`.
10
- package npm_module.npm_publish_yml
11
-
12
- import rego.v1
13
-
14
- # YAML 1.1 quirk: ключ `on:` → boolean true → у конфтесті ключ "true".
15
- gha_on := input["true"]
16
-
17
- # Required marker — substring у `uses` для ідентифікації npm-publish кроку.
18
- publish_action_marker := "JS-DevTools/npm-publish"
19
-
20
- # Очікувані літерали з template.
21
- expected_paths := {p | some p in data.template.snippet.on.push.paths}
22
-
23
- expected_branches := {b | some b in data.template.snippet.on.push.branches}
24
-
25
- expected_permissions := data.template.snippet.jobs["release-publish"].permissions
26
-
27
- # Required publish-step (за маркером): expected `with.package` value з template.
28
- expected_publish_with_package := s.with.package if {
29
- some s in data.template.snippet.jobs["release-publish"].steps
30
- contains(object.get(s, "uses", ""), publish_action_marker)
31
- }
32
-
33
- # ── deny: paths містить кожне з expected_paths (subset-of) ───────────────
34
-
35
- deny contains msg if {
36
- some required_path in expected_paths
37
- not path_present(required_path)
38
- msg := sprintf("npm-publish.yml: у on.push.paths має бути `%s` (npm-module.mdc)", [required_path])
39
- }
40
-
41
- # ── deny: branches містить кожне з expected_branches (subset-of) ─────────
42
-
43
- deny contains msg if {
44
- some required_branch in expected_branches
45
- not required_branch in {b | some b in gha_on.push.branches}
46
- msg := sprintf("npm-publish.yml: on.push.branches має містити `%s` (npm-module.mdc)", [required_branch])
47
- }
48
-
49
- # ── deny: id-token: write у permissions хоч одного job ────────────────────
50
-
51
- deny contains msg if {
52
- required := expected_permissions["id-token"]
53
- not any_job_has_id_token(required)
54
- msg := sprintf("npm-publish.yml: permissions має містити `id-token: %s` (OIDC) (npm-module.mdc)", [required])
55
- }
56
-
57
- # ── deny: крок з uses-маркером npm-publish та канонічним with.package ────
58
-
59
- deny contains msg if {
60
- not has_npm_publish_step
61
- msg := sprintf(
62
- "npm-publish.yml: очікується `uses: %s` з `with.package: %s` (npm-module.mdc)",
63
- [publish_action_marker, expected_publish_with_package],
64
- )
65
- }
66
-
67
- # ── helpers ────────────────────────────────────────────────────────────────
68
-
69
- # Path присутній, якщо хоч один шлях у actual містить required як substring
70
- # (npm/** glob у workflow може бути записаний як `npm/**` або `'npm/**'`).
71
- path_present(required) if {
72
- some p in gha_on.push.paths
73
- is_string(p)
74
- contains(p, required)
75
- }
76
-
77
- any_job_has_id_token(required) if {
78
- some job in object.get(input, "jobs", {})
79
- job.permissions["id-token"] == required
80
- }
81
-
82
- has_npm_publish_step if {
83
- some job in object.get(input, "jobs", {})
84
- some step in object.get(job, "steps", [])
85
- contains(object.get(step, "uses", ""), publish_action_marker)
86
- step.with.package == expected_publish_with_package
87
- }