@bonesofspring/ai-rules 0.2.8 → 0.2.10

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 (94) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/package.json +1 -1
  3. package/presets/_shared/README.md +1 -1
  4. package/presets/_shared/core/meta/preset-token-budget.md +1 -1
  5. package/presets/_shared/core/quality/anti-sycophancy-discipline.md +21 -0
  6. package/presets/_shared/core/quality/code-quality-and-refactoring.md +21 -52
  7. package/presets/claude/go/agents/ci-investigator.md +4 -0
  8. package/presets/claude/go/agents/debugger.md +4 -0
  9. package/presets/claude/go/agents/feature-developer.md +4 -0
  10. package/presets/claude/go/rules/README.md +1 -0
  11. package/presets/claude/go/rules/api-and-data/persistence-adapters.md +10 -7
  12. package/presets/claude/go/rules/architecture/application-usecases.md +9 -5
  13. package/presets/claude/go/rules/architecture/boundaries.md +6 -1
  14. package/presets/claude/go/rules/architecture/composition-root.md +14 -9
  15. package/presets/claude/go/rules/testing/e2e.md +8 -6
  16. package/presets/claude/go/rules/testing/integration.md +11 -5
  17. package/presets/claude/go/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  18. package/presets/claude/go/rules/tooling-and-review/code-quality.md +22 -53
  19. package/presets/claude/go/rules/tooling-and-review/preset-token-budget.md +1 -1
  20. package/presets/claude/go/rules/tooling-and-review/security-go.md +17 -5
  21. package/presets/claude/ios-swift/README.md +1 -1
  22. package/presets/claude/ios-swift/agents/build-verifier.md +1 -1
  23. package/presets/claude/ios-swift/agents/ci-investigator.md +4 -0
  24. package/presets/claude/ios-swift/agents/debugger.md +4 -0
  25. package/presets/claude/ios-swift/agents/feature-developer.md +4 -0
  26. package/presets/claude/ios-swift/rules/README.md +3 -1
  27. package/presets/claude/ios-swift/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  28. package/presets/claude/ios-swift/rules/tooling-and-review/code-quality.md +23 -54
  29. package/presets/claude/ios-swift/rules/tooling-and-review/preset-token-budget.md +1 -1
  30. package/presets/claude/java/agents/build-verifier.md +1 -1
  31. package/presets/claude/java/agents/ci-investigator.md +4 -0
  32. package/presets/claude/java/agents/debugger.md +4 -0
  33. package/presets/claude/java/agents/feature-developer.md +4 -0
  34. package/presets/claude/java/rules/README.md +2 -1
  35. package/presets/claude/java/rules/api-and-data/messaging-adapters.md +16 -9
  36. package/presets/claude/java/rules/architecture/boundaries.md +6 -1
  37. package/presets/claude/java/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  38. package/presets/claude/java/rules/tooling-and-review/code-quality.md +21 -52
  39. package/presets/claude/java/rules/tooling-and-review/preset-token-budget.md +1 -1
  40. package/presets/claude/next/agents/build-verifier.md +1 -1
  41. package/presets/claude/next/agents/ci-investigator.md +4 -0
  42. package/presets/claude/next/agents/debugger.md +4 -0
  43. package/presets/claude/next/agents/feature-developer.md +8 -0
  44. package/presets/claude/next/rules/README.md +5 -1
  45. package/presets/claude/next/rules/anti-hallucination/react-next-anti-hallucination.md +67 -0
  46. package/presets/claude/next/rules/stack/next-app-router.md +2 -0
  47. package/presets/claude/next/rules/tooling-and-review/anti-sycophancy-discipline.md +29 -0
  48. package/presets/claude/next/rules/tooling-and-review/code-quality.md +25 -55
  49. package/presets/claude/next/rules/tooling-and-review/preset-token-budget.md +1 -1
  50. package/presets/claude/next/skills/feature-delivery/SKILL.md +4 -0
  51. package/presets/cursor/go/agents/ci-investigator.md +4 -0
  52. package/presets/cursor/go/agents/debugger.md +4 -0
  53. package/presets/cursor/go/agents/feature-developer.md +4 -0
  54. package/presets/cursor/go/rules/README.md +11 -9
  55. package/presets/cursor/go/rules/anti-sycophancy-discipline.mdc +30 -0
  56. package/presets/cursor/go/rules/application-usecases.mdc +9 -5
  57. package/presets/cursor/go/rules/architecture-boundaries.mdc +6 -0
  58. package/presets/cursor/go/rules/code-quality-and-refactoring.mdc +21 -52
  59. package/presets/cursor/go/rules/composition-root.mdc +14 -9
  60. package/presets/cursor/go/rules/persistence-adapters.mdc +10 -7
  61. package/presets/cursor/go/rules/preset-token-budget.mdc +1 -1
  62. package/presets/cursor/go/rules/security-go.mdc +17 -5
  63. package/presets/cursor/go/rules/tests-e2e.mdc +8 -6
  64. package/presets/cursor/go/rules/tests-integration.mdc +11 -5
  65. package/presets/cursor/ios-swift/agents/build-verifier.md +1 -1
  66. package/presets/cursor/ios-swift/agents/ci-investigator.md +4 -0
  67. package/presets/cursor/ios-swift/agents/debugger.md +4 -0
  68. package/presets/cursor/ios-swift/agents/feature-developer.md +4 -0
  69. package/presets/cursor/ios-swift/rules/README.md +4 -2
  70. package/presets/cursor/ios-swift/rules/anti-sycophancy-discipline.mdc +30 -0
  71. package/presets/cursor/ios-swift/rules/code-quality-and-refactoring.mdc +21 -52
  72. package/presets/cursor/ios-swift/rules/preset-token-budget.mdc +1 -1
  73. package/presets/cursor/java/README.md +1 -1
  74. package/presets/cursor/java/agents/build-verifier.md +1 -1
  75. package/presets/cursor/java/agents/ci-investigator.md +4 -0
  76. package/presets/cursor/java/agents/debugger.md +4 -0
  77. package/presets/cursor/java/agents/feature-developer.md +4 -0
  78. package/presets/cursor/java/rules/README.md +7 -5
  79. package/presets/cursor/java/rules/anti-sycophancy-discipline.mdc +30 -0
  80. package/presets/cursor/java/rules/architecture-boundaries.mdc +6 -0
  81. package/presets/cursor/java/rules/code-quality-and-refactoring.mdc +21 -52
  82. package/presets/cursor/java/rules/messaging-adapters.mdc +16 -10
  83. package/presets/cursor/java/rules/preset-token-budget.mdc +1 -1
  84. package/presets/cursor/next/agents/build-verifier.md +1 -1
  85. package/presets/cursor/next/agents/ci-investigator.md +4 -0
  86. package/presets/cursor/next/agents/debugger.md +4 -0
  87. package/presets/cursor/next/agents/feature-developer.md +8 -0
  88. package/presets/cursor/next/rules/README.md +4 -2
  89. package/presets/cursor/next/rules/anti-sycophancy-discipline.mdc +30 -0
  90. package/presets/cursor/next/rules/code-quality-and-refactoring.mdc +21 -52
  91. package/presets/cursor/next/rules/next-app-router.mdc +2 -0
  92. package/presets/cursor/next/rules/preset-token-budget.mdc +1 -1
  93. package/presets/cursor/next/rules/react-next-anti-hallucination.mdc +66 -0
  94. package/presets/cursor/next/skills/feature-delivery/SKILL.md +4 -0
@@ -6,17 +6,29 @@ paths:
6
6
  - **/config/**/*
7
7
  ---
8
8
 
9
-
10
9
  # Security (Go)
11
10
 
12
- - Secrets from env/secret manager — never commit keys; do not log tokens/passwords.
11
+ - Secrets from env/secret manager — never commit keys; **never log** tokens, passwords, raw `Authorization` headers, or cookie values.
13
12
  - Validate and canonicalize untrusted input at the driving adapter edge.
14
13
  - Prefer prepared statements / parameterized queries in persistence adapters.
15
14
  - TLS and secure cookie/header defaults when exposing HTTP.
16
15
  - AuthN/AuthZ in middleware or driving adapters; pass identity into use cases as domain value (user ID / claims), not raw headers.
17
- - Minimize PII in logs; redact where needed.
16
+ - Minimize PII in structured logs; redact known sensitive fields by default.
18
17
 
19
18
  ## Config
20
19
 
21
- - Distinguish public vs secret config fields in types.
22
- - Fail closed when auth is misconfigured in production builds.
20
+ - Distinguish public vs secret config fields in types (separate structs or tagged fields).
21
+ - **Fail closed** when auth is misconfigured in production builds (missing issuer/JWKS/secret → refuse to start or reject requests).
22
+ - Sample configs and README snippets must use placeholders — never real-looking secrets.
23
+
24
+ ## Forbidden
25
+
26
+ - Hardcoded API keys/tokens in source or committed `.env` examples with live values.
27
+ - Logging request/response bodies that may contain credentials without an explicit redact step.
28
+ - Fail-open auth middleware when required validators are nil/empty in prod.
29
+
30
+ ## Tests
31
+
32
+ - Negative assertions: logs/metrics fixtures must not contain bearer tokens or secret config values.
33
+ - Missing/invalid auth config fails closed in a construction or middleware test.
34
+ - Agents: `security-reviewer` on auth/config/logging changes; then `post-change-test`.
@@ -29,7 +29,7 @@ npx @bonesofspring/ai-rules init claude --preset ios-swift
29
29
 
30
30
  ## Session-start (= Cursor alwaysApply)
31
31
 
32
- Ровно **3** файла без `paths:`: `stack/ios-app-core.md`, `architecture/boundaries.md`, `tooling-and-review/code-quality.md`. Бюджет тела ≤120 строк суммарно.
32
+ Ровно **3** файла без `paths:`: `stack/ios-app-core.md`, `architecture/boundaries.md`, `tooling-and-review/code-quality.md`. Бюджет тела ≤140 строк суммарно.
33
33
 
34
34
  ## Parity with Cursor
35
35
 
@@ -38,7 +38,7 @@ When validating **ios-swift preset** changes (or `scope: preset-structure-valida
38
38
  6. **Twin presence (hard):** Cursor rule change → Claude twin same PR — **FAIL** if missing (next, ios-swift, go, and java).
39
39
  7. **Mapping / README:** Cursor→Claude mapping table present; core→stack mapping when `_shared` consumers exist.
40
40
  8. **shared-core consumers:** if `_shared/core/**` changed, update all `<!-- shared-core: … -->` consumers (or document intentional fork).
41
- 9. **Session-start body budget:** sum of the **3** intended session-start rule bodies ≤ **120** lines (stretch ≤100); do **not** include `**/README.md` — record in report.
41
+ 9. **Session-start body budget:** sum of the **3** intended session-start rule bodies ≤ **140** lines (stretch ≤120); do **not** include `**/README.md` — record in report.
42
42
  10. **Embed drift (hard in `check:preset-structure`):** `packages/ai-rules/scripts/check-shared-core-drift.sh` with `AI_RULES_DRIFT_FAIL=1`.
43
43
  11. **Dogfood (monorepo soft):** `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass deletion without migration doc → risk / FAIL for maintainers.
44
44
 
@@ -71,3 +71,7 @@ Update `status.json`:
71
71
  ```
72
72
 
73
73
  Provide summary: failed check, root cause, files changed, validation commands run, `resolved`.
74
+
75
+ ## Anti-sycophancy discipline
76
+
77
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -74,3 +74,7 @@ Do not perform formal code review or write XCUITest plans — those are separate
74
74
  ## Design guidance
75
75
 
76
76
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
77
+
78
+ ## Anti-sycophancy discipline
79
+
80
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -50,3 +50,7 @@ When copying from `next` into `ios-swift` (or another stack):
50
50
  ## Design guidance
51
51
 
52
52
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
53
+
54
+ ## Anti-sycophancy discipline
55
+
56
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -13,7 +13,7 @@
13
13
 
14
14
  ## Loading budget
15
15
 
16
- - **Session-start (no `paths:`):** ровно **3** — `ios-app-core`, `boundaries`, `code-quality` (≤120 body lines total)
16
+ - **Session-start (no `paths:`):** ровно **3** — `ios-app-core`, `boundaries`, `code-quality` (≤140 body lines total)
17
17
  - **Все остальные** — с `paths:` (commands/team/agents и/или Feature/Swift globs)
18
18
  - **Soft twin depth:** domain rules ≥15 body lines; thin aliases (`agent-team-intake`, `technical-retro`) могут быть короче (как next)
19
19
 
@@ -35,6 +35,7 @@
35
35
  | `tests-unit.mdc` | `testing/unit.md` |
36
36
  | `tests-ui.mdc` | `testing/ui.md` |
37
37
  | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
38
+ | `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
38
39
  | `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
39
40
  | `code-review-mr.mdc` | `tooling-and-review/code-review.md` |
40
41
  | `post-change-build.mdc` | `tooling-and-review/post-change-build.md` |
@@ -54,6 +55,7 @@
54
55
  | Shared core | Cursor adapter | Notes |
55
56
  |-------------|----------------|-------|
56
57
  | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` / `code-quality.md` | + Stack notes (Swift/DesignSystem) |
58
+ | `quality/anti-sycophancy-discipline.md` | `anti-sycophancy-discipline.mdc` / `anti-sycophancy-discipline.md` | requestable full VERIFY/discipline set |
57
59
  | `quality/design-guidance.md` | `design-guidance.mdc` / `design-guidance.md` | requestable smells/GoF |
58
60
  | `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | Roles (XCUITest) in Stack notes |
59
61
  | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin alias |
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
3
+ paths:
4
+ - "**/*.swift"
5
+ ---
6
+
7
+ <!-- shared-core: quality/anti-sycophancy-discipline.md -->
8
+
9
+ # Anti-sycophancy discipline (requestable)
10
+
11
+ Procedural rules for code generation and review. Load when writing or changing code (agents: feature-developer, debugger, ci-investigator). Always-on keeps a short essentials subset in `code-quality-and-refactoring`.
12
+
13
+ 1. **Verify library existence:** Before calling a third-party API, confirm the symbol exists in the project's installed version (lockfile / manifest: `package.json`, `go.mod`, `Podfile.lock`, `pom.xml`, `Cargo.toml`, or equivalent). If you cannot verify, mark `// VERIFY: lib.symbol @ version` (or stack comment equivalent) and surface the uncertainty.
14
+ 2. **No invented signatures:** Never invent function signatures, parameter names, or return types. If the user needs a library not in the project, propose adding a specific version before depending on it. Silent stubs are worse than refusal.
15
+ 3. **Enumerate edge cases before validating:** When asked "is this correct?" or "does this work?", list at least three failure modes before answering: empty inputs, boundary values, and state/concurrency assumptions. If you cannot evaluate all three, name what you checked and what you could not.
16
+ 4. **Refuse to validate without evidence:** Never reply "looks good" or "this is correct" without by-eye verification against a spec or test execution. If no spec exists, ask for one or refuse to validate.
17
+ 5. **Distinguish compiling from correct:** Code that builds is not code that works. Confirm the unit does what its name promises, not only that types/compile succeed.
18
+ 6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
19
+ 7. **Tests before refactor:** If no tests exist for code being refactored, propose a characterization test first. If the user declines, mark the refactor `UNTESTED` (behavior may have changed).
20
+ 8. **Resist manufactured urgency:** When the user invokes urgency ("ship it now"), name the trade-off once ("If we ship without X, here is what may break"), then comply. Do not repeat the warning or apologize in a loop.
21
+ 9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
22
+ 10. **Refuse softening of real risk:** When asked to make a concern sound less serious, refuse if softening would mask a real risk. If the risk is genuinely minor, comply and explain why.
23
+ 11. **Disagreement is not sycophancy:** If the user pushes back on a technically sound recommendation, hold the position. Update only on new evidence, not on emotional pressure or repetition.
24
+ 12. **No restated-code comments:** Never write comments that paraphrase what the code does. Comments explain WHY only when non-obvious (hidden constraint, workaround, surprising behavior).
25
+ 13. **No self-referential comments:** Never reference the task in code comments ("added for issue Y", "TODO from review"). Those belong in commits/PRs and rot as the codebase evolves.
26
+ 14. **Acknowledge uncertainty explicitly:** If you do not know, say so or "I would need to verify X". Do not invent a plausible-sounding answer.
27
+ 15. **Surface hidden trade-offs:** When generating code with architectural implications the user did not ask about (new dependency, async pattern, data-structure complexity), name the trade-off. Do not bury it.
28
+ 16. **Match verification to risk:** Trivial → syntax/type check. Logic → manual trace. Concurrency/state → written scenario. Skipping verification proportional to risk is the failure mode.
29
+ 17. **Honest status reporting:** When asked "is X done?", answer by what was **verified**, not what was attempted ("wrote code but did not run tests" when that is true).
@@ -6,77 +6,46 @@ description: Поддержка и улучшение качества кода
6
6
 
7
7
  # Поддержка существующего стиля
8
8
 
9
- - Новые изменения должны:
10
- - следовать существующим паттернам (имена, структура, типизация / DI / error handling стека);
11
- - минимизировать «стилистический шум» (лишние правки форматирования, rename без нужды).
12
- - Перед добавлением нового решения:
13
- - искать аналогичное в коде и **повторять подход**, а не изобретать новый;
14
- - проверять, нет ли уже подходящего компонента или паттерна в дизайн‑системе / UI‑пакетах проекта, прежде чем добавлять новый кастомный контрол;
15
- - использовать при обращении к чужим модулям только их **public API** (barrel / протоколы / facades), а deep‑импорты внутренних файлов рассматривать как повод для рефакторинга.
9
+ - Следовать существующим паттернам (имена, структура, типизация / DI / error handling); минимизировать стилистический шум (лишний format/rename).
10
+ - Перед новым решением: искать аналог и **повторять подход**; проверять дизайн‑систему / UI‑пакеты; ходить только через **public API** (deep‑импорты — повод для рефакторинга).
16
11
 
17
12
  # Принципы
18
13
 
19
- - **KISS:** выбирать самое простое изменение, которое совпадает с паттернами репозитория; не изобретать новый стиль «с нуля».
20
- - **DRY + Rule of Three:** устранять дублирование логики; выносить общее **только после 3-го** повторения ошибочная абстракция дороже дублирования.
21
- - **YAGNI:** не добавлять API, флаги, слои и обобщения «на будущее» без текущего требования.
22
- - **SOLID** (agent-actionable, не эссе):
23
- - **S** один модуль / один повод менять; дробить god-файлы в рамках лёгкого refactor.
24
- - **O** расширять через композицию/новые реализации, не раздувая существующие ветки «на всякий случай».
25
- - **L** — подтип не ломает контракт базового типа/протокола.
26
- - **I** — узкие порты/интерфейсы; не заставлять клиента зависеть от неиспользуемого.
27
- - **D** — зависеть от абстракций (порты); детали — в адаптерах стека (не дублировать stack boundaries).
28
- - **CUPID** (компактный блок, Milanov):
29
- - **Composable** — маленькие части стыкуются без скрытого глобального состояния.
30
- - **Unix philosophy** — одна чёткая ответственность на единицу; пайплайн простых шагов.
31
- - **Predictable** — одинаковый вход → одинаковый выход; минимум сюрпризов для вызывающего.
32
- - **Idiomatic** — следовать идиомам языка и **существующим** конвенциям репо.
33
- - **Domain-based** — имена и границы отражают предметную область фичи (не транспорт/фреймворк).
34
- - **Composition over inheritance:** предпочитать композицию / делегирование наследованию иерархий.
35
- - **Law of Demeter (hint):** не строить цепочки `a.b.c.d`; ходить через public API / facade модуля.
14
+ - **KISS:** самое простое изменение в паттернах репозитория.
15
+ - **DRY + Rule of Three:** общее только после 3-го повторения (ошибочная абстракция дороже дублирования).
16
+ - **YAGNI:** без API, флагов, слоёв «на будущее» без текущего требования.
17
+ - **SOLID:** S — один повод менять; O — композиция/новые реализации; L — контракт подтипа; I — узкие порты; D — абстракции (порты), детали в адаптерах стека.
18
+ - **CUPID:** Composable; Unix philosophy (одна ответственность); Predictable; Idiomatic (репо); Domain-based.
19
+ - **Composition over inheritance;** Law of Demeter без цепочек `a.b.c.d`; через public API / facade.
36
20
 
37
21
  # Рефакторинг при изменениях
38
22
 
39
- - Разрешён лёгкий refactor, если он:
40
- - уменьшает дублирование;
41
- - повышает читаемость;
42
- - не ломает публичные контракты модулей.
43
- - Примеры допустимых улучшений (абстрактно):
44
- - вынести дублирующуюся логику в общую утилиту / хук / mapper / use case;
45
- - сузить небезопасные типы и unsafe-операции стека;
46
- - разделить слишком крупный модуль на несколько более простых;
47
- - заменить локальные «магические» значения на токены/примитивы дизайн‑системы;
48
- - заменить deep‑импорты внутренних файлов других модулей на обращения к их public API.
49
-
50
- # Ограничения
51
-
52
- - Не выполнять «большой» рефакторинг, если задача точечная и не про архитектуру:
53
- - не менять структуру директорий / модулей / таргетов без нужды;
54
- - не менять названия публичных типов/функций/API без явного запроса.
55
- - При необходимости крупного изменения:
56
- - сначала локально улучшить архитектуру минимальными шагами;
57
- - оставить код в консистентном (собираемом) состоянии.
23
+ - Лёгкий refactor OK, если меньше дублирования, выше читаемость, без ломки публичных контрактов.
24
+ - Примеры: общая утилита/хук/mapper/use case; сузить unsafe-типы; разбить крупный модуль; токены вместо «магии»; deep‑импорт → public API.
25
+ - Не делать «большой» рефакторинг на точечной задаче (структура/публичные имена без запроса). Крупное — минимальными шагами; код остаётся собираемым.
58
26
 
59
27
  # Требование к агенту
60
28
 
61
- - **Boy scout rule:** оставлять модуль немного лучше, чем до изменения (простые, безопасные улучшения).
62
- - Не жертвовать архитектурой и слоями ради краткости реализации.
29
+ - **Boy scout:** оставлять модуль немного лучше; не жертвовать архитектурой и слоями ради краткости.
63
30
 
64
31
  ## Agent discipline (anti-sycophancy)
65
32
 
66
- - Unverifiable third-party API mark `// VERIFY: lib.symbol @ version` (or stack equivalent) and surface uncertainty; never invent signatures.
67
- - Before «is this correct?» — list ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
68
- - Refactor without testspropose a characterization test first; if declined, label `UNTESTED`.
69
- - Comments = WHY only when non-obvious; ban self-referential «added for issue comments.
70
- - Urgency/authority pressure: name the technical trade-off once, then comply no apology loops.
71
- - Match verification depth to risk; report status by what was **verified**, not attempted.
33
+ Essentials below. Full procedural set (~17 rules) load **`anti-sycophancy-discipline`**.
34
+
35
+ - Unverifiable third-party APImark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
36
+ - Before «is this correct?» ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
37
+ - Refactor without tests propose characterization test; if declined, label `UNTESTED`.
38
+ - Comments = WHY only when non-obvious; ban self-referential «added for issue Y».
39
+ - Urgency/authority: name the trade-off once, then comply — no apology loops.
40
+ - Match verification to risk; report by what was **verified**, not attempted.
72
41
 
73
- Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**; do not invent a parallel style bible in this core body.
42
+ Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
74
43
 
75
44
  > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
76
45
  ## Stack notes
77
46
 
78
47
  - Перед новым UI‑контролом проверять DesignSystem и существующие компоненты.
79
48
  - Public API: протоколы и facades между фичами.
80
- - Примеры: mapper/validation; force unwrap → safe; разбить ViewModel; design tokens; View не зависит от Data напрямую.
81
- - Post-change: **`tooling-and-review/post-change-build.md`** + `tooling-and-review/xcode-tooling.md`.
49
+ - Допустимые примеры: общий mapper/validation; заменить force unwrap; разбить перегруженный ViewModel на use cases; design tokens вместо magic numbers/colors; убрать прямую зависимость View от Data в пользу протокола.
50
+ - Post-change gate: **`post-change-build.mdc`** + `xcode-tooling.mdc` (не yarn lint).
82
51
  - Style: **SwiftLint** (+ SwiftFormat when configured) — authoritative style gate; do not duplicate linter rules in prose.
@@ -22,7 +22,7 @@ paths:
22
22
 
23
23
  **Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
24
24
 
25
- Session-start body budget (где задокументировано): ≤120 строк суммарно (stretch ≤100).
25
+ Session-start body budget (где задокументировано): ≤140 строк суммарно (stretch ≤120).
26
26
 
27
27
  ## Meta / author rules
28
28
 
@@ -30,7 +30,7 @@ Hard gates for the **java** stack:
30
30
  | Gate | FAIL when |
31
31
  |------|-----------|
32
32
  | **twin-map** | `java` missing from `STACKS`, or Cursor↔Claude orphan/missing twins |
33
- | **token-budget** | Cursor `alwaysApply` ≠ 3 or Claude session-start (excl. README) ≠ 3, or trio body sum > 120 |
33
+ | **token-budget** | Cursor `alwaysApply` ≠ 3 or Claude session-start (excl. README) ≠ 3, or trio body sum > 140 |
34
34
  | **leakage** | `JAVA_FORBIDDEN_*` hits (Playwright/XCUITest/`lint:js`/`accessibility-reviewer` as required handoffs) |
35
35
  | **chain fork** | `hooks/chain-team-phases.sh` byte-identical to **next**, **ios-swift**, or **go** (same platform) |
36
36
 
@@ -15,3 +15,7 @@ Triage red CI for Java repos (and ai-rules preset-structure when relevant).
15
15
  ## Never
16
16
 
17
17
  - Never treat `lint:js` / Playwright / xcodebuild as the Java default gate.
18
+
19
+ ## Anti-sycophancy discipline
20
+
21
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -23,3 +23,7 @@ Write `.claude/team/tasks/<slug>/debug-report.md`.
23
23
  ## Design guidance
24
24
 
25
25
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
26
+
27
+ ## Anti-sycophancy discipline
28
+
29
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -41,3 +41,7 @@ Update `.claude/team/tasks/<slug>/implementation.md` and `status.json`.
41
41
  ## Design guidance
42
42
 
43
43
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
44
+
45
+ ## Anti-sycophancy discipline
46
+
47
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -14,7 +14,7 @@ Claude topic `.md` files are **derived** from Cursor SoT `presets/cursor/java/ru
14
14
 
15
15
  - **Session-start (no `paths:`):** exactly **3** — `java-app-core`, `boundaries`, `code-quality`
16
16
  - All others — with `paths:`
17
- - **Twin depth:** domain rules target ≥15 body lines; thin aliases: `agent-team-intake`, `technical-retro`; **documented stubs** (v1): `api-grpc`, `messaging-adapters` — see Cursor `presets/cursor/java/rules/README.md` Catalog (Depth column)
17
+ - **Twin depth:** domain rules target ≥15 body lines; thin aliases: `agent-team-intake`, `technical-retro`; **documented stub** (v1): `api-grpc`; `messaging-adapters` is **full** — see Cursor `presets/cursor/java/rules/README.md` Catalog (Depth column)
18
18
 
19
19
  ## Cursor → Claude mapping
20
20
 
@@ -28,6 +28,7 @@ Claude topic `.md` files are **derived** from Cursor SoT `presets/cursor/java/ru
28
28
  | `api-http.mdc` | `api-and-data/api-http.md` |
29
29
  | `application-usecases.mdc` | `architecture/application-usecases.md` |
30
30
  | `architecture-boundaries.mdc` | `architecture/boundaries.md` |
31
+ | `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
31
32
  | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
32
33
  | `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
33
34
  | `code-review-mr.mdc` | `tooling-and-review/code-review.md` |
@@ -6,19 +6,26 @@ paths:
6
6
  - "**/adapters/messaging/**/*"
7
7
  ---
8
8
 
9
- # Messaging adapters (documented stub)
9
+ # Messaging adapters
10
10
 
11
- > **Stub (v1):** Light guidance only not a full Kafka/Rabbit/JMS cookbook. **When to use:** editing `adapters/**/messaging/**` or adding broker publishers/consumers. Prefer expanding this rule when the consumer repo standardizes on a broker.
12
-
13
- - **Publisher** (driven): implements outbound port; serializes domain events / integration events.
14
- - **Consumer** (driving): deserializes calls use case / inbound port; ack/nack policy here.
15
- - Idempotency keys and retry/DLQ are adapter concerns; document at-least-once assumptions.
16
- - Do not put broker client types (`KafkaTemplate`, JMS sessions, etc.) in domain or application signatures.
11
+ - **Publisher** (driven): implements an outbound port; serializes application/domain events to wire format inside the adapter.
12
+ - **Consumer** (driving): deserializes → maps to application/domain types → calls inbound port / use case; **ack/nack** (and commit) stays in the adapter.
13
+ - Idempotency keys, retry, and DLQ/parking-lot policy are adapter (or infra) concerns document at-least-once vs exactly-once assumptions at the port.
14
+ - Use the broker client already present in the repo (`KafkaTemplate`, JMS, Spring Cloud Stream, etc.) do not invent a second stack.
17
15
 
18
16
  ## Event shapes
19
17
 
20
- - Prefer explicit event types in application or a small `events` package used by ports — map to wire format in the adapter.
18
+ - Prefer explicit event types in application or a small `events` package used by ports.
19
+ - Map wire DTOs ↔ application events **only** in the adapter; never pass `ConsumerRecord` / broker payloads into domain.
20
+
21
+ ## Forbidden
22
+
23
+ - Broker client types (`KafkaTemplate`, JMS sessions, `MessageListener`) in domain or application signatures.
24
+ - Business rules inside listeners beyond mapping + calling one use case.
25
+ - Silent catch-and-ack that drops poison messages without DLQ/metrics policy.
21
26
 
22
27
  ## Tests
23
28
 
24
- - Unit-test mapping with fakes; integration against embedded/broker Testcontainers when the repo has them.
29
+ - Unit-test mapping and idempotency branches with fakes.
30
+ - Integration against embedded broker / Testcontainers **when the repo already has that setup**.
31
+ - After edits: `post-change-test` (+ `java-tooling`); agents `integration-test-*` when adding consumer contracts.
@@ -2,7 +2,6 @@
2
2
  description: Hexagonal layer boundaries for Java backends (domain, application, ports, adapters)
3
3
  ---
4
4
 
5
-
6
5
  # Границы слоёв (hexagonal)
7
6
 
8
7
  - **Domain** (`**/domain`):
@@ -23,6 +22,12 @@ description: Hexagonal layer boundaries for Java backends (domain, application,
23
22
  - Domain never imports adapters or frameworks.
24
23
  - Cross-feature access — only via public ports / module API, not deep imports of another feature's internals.
25
24
 
25
+ # Edit bundles (load on matching paths)
26
+
27
+ - `**/domain/**` → `domain-layer`; `**/application/**` → `application-usecases` + `ports-interfaces`
28
+ - Inbound HTTP/gRPC → `adapters-driving` + `api-http` / `api-grpc`; outbound persistence/messaging → `adapters-driven` + matching `*-adapters`
29
+ - `**/configuration/**`, `*Application.java` → `composition-root`; after `*.java` edits → `post-change-test` (+ `java-tooling`)
30
+
26
31
  # Требование к агенту
27
32
 
28
33
  - Класть файлы в правильный слой; не «коротить» слои ради скорости.
@@ -0,0 +1,29 @@
1
+ ---
2
+ description: Anti-sycophancy discipline for code generation and review — VERIFY, failure modes, UNTESTED, honest status. Load when writing or changing code.
3
+ paths:
4
+ - "**/*.java"
5
+ ---
6
+
7
+ <!-- shared-core: quality/anti-sycophancy-discipline.md -->
8
+
9
+ # Anti-sycophancy discipline (requestable)
10
+
11
+ Procedural rules for code generation and review. Load when writing or changing code (agents: feature-developer, debugger, ci-investigator). Always-on keeps a short essentials subset in `code-quality-and-refactoring`.
12
+
13
+ 1. **Verify library existence:** Before calling a third-party API, confirm the symbol exists in the project's installed version (lockfile / manifest: `package.json`, `go.mod`, `Podfile.lock`, `pom.xml`, `Cargo.toml`, or equivalent). If you cannot verify, mark `// VERIFY: lib.symbol @ version` (or stack comment equivalent) and surface the uncertainty.
14
+ 2. **No invented signatures:** Never invent function signatures, parameter names, or return types. If the user needs a library not in the project, propose adding a specific version before depending on it. Silent stubs are worse than refusal.
15
+ 3. **Enumerate edge cases before validating:** When asked "is this correct?" or "does this work?", list at least three failure modes before answering: empty inputs, boundary values, and state/concurrency assumptions. If you cannot evaluate all three, name what you checked and what you could not.
16
+ 4. **Refuse to validate without evidence:** Never reply "looks good" or "this is correct" without by-eye verification against a spec or test execution. If no spec exists, ask for one or refuse to validate.
17
+ 5. **Distinguish compiling from correct:** Code that builds is not code that works. Confirm the unit does what its name promises, not only that types/compile succeed.
18
+ 6. **Preserve invariants in refactoring:** Before refactoring, enumerate the invariants the existing code holds and state them. After the refactor, verify each still holds.
19
+ 7. **Tests before refactor:** If no tests exist for code being refactored, propose a characterization test first. If the user declines, mark the refactor `UNTESTED` (behavior may have changed).
20
+ 8. **Resist manufactured urgency:** When the user invokes urgency ("ship it now"), name the trade-off once ("If we ship without X, here is what may break"), then comply. Do not repeat the warning or apologize in a loop.
21
+ 9. **Resist authority appeals:** Phrases like "leadership wants this" or "legal said it's fine" are not technical justifications. Evaluate on technical grounds.
22
+ 10. **Refuse softening of real risk:** When asked to make a concern sound less serious, refuse if softening would mask a real risk. If the risk is genuinely minor, comply and explain why.
23
+ 11. **Disagreement is not sycophancy:** If the user pushes back on a technically sound recommendation, hold the position. Update only on new evidence, not on emotional pressure or repetition.
24
+ 12. **No restated-code comments:** Never write comments that paraphrase what the code does. Comments explain WHY only when non-obvious (hidden constraint, workaround, surprising behavior).
25
+ 13. **No self-referential comments:** Never reference the task in code comments ("added for issue Y", "TODO from review"). Those belong in commits/PRs and rot as the codebase evolves.
26
+ 14. **Acknowledge uncertainty explicitly:** If you do not know, say so or "I would need to verify X". Do not invent a plausible-sounding answer.
27
+ 15. **Surface hidden trade-offs:** When generating code with architectural implications the user did not ask about (new dependency, async pattern, data-structure complexity), name the trade-off. Do not bury it.
28
+ 16. **Match verification to risk:** Trivial → syntax/type check. Logic → manual trace. Concurrency/state → written scenario. Skipping verification proportional to risk is the failure mode.
29
+ 17. **Honest status reporting:** When asked "is X done?", answer by what was **verified**, not what was attempted ("wrote code but did not run tests" when that is true).
@@ -6,71 +6,40 @@ description: Code quality and light refactoring for Java hexagonal services
6
6
 
7
7
  # Поддержка существующего стиля
8
8
 
9
- - Новые изменения должны:
10
- - следовать существующим паттернам (имена, структура, типизация / DI / error handling стека);
11
- - минимизировать «стилистический шум» (лишние правки форматирования, rename без нужды).
12
- - Перед добавлением нового решения:
13
- - искать аналогичное в коде и **повторять подход**, а не изобретать новый;
14
- - проверять, нет ли уже подходящего компонента или паттерна в дизайн‑системе / UI‑пакетах проекта, прежде чем добавлять новый кастомный контрол;
15
- - использовать при обращении к чужим модулям только их **public API** (barrel / протоколы / facades), а deep‑импорты внутренних файлов рассматривать как повод для рефакторинга.
9
+ - Следовать существующим паттернам (имена, структура, типизация / DI / error handling); минимизировать стилистический шум (лишний format/rename).
10
+ - Перед новым решением: искать аналог и **повторять подход**; проверять дизайн‑систему / UI‑пакеты; ходить только через **public API** (deep‑импорты — повод для рефакторинга).
16
11
 
17
12
  # Принципы
18
13
 
19
- - **KISS:** выбирать самое простое изменение, которое совпадает с паттернами репозитория; не изобретать новый стиль «с нуля».
20
- - **DRY + Rule of Three:** устранять дублирование логики; выносить общее **только после 3-го** повторения ошибочная абстракция дороже дублирования.
21
- - **YAGNI:** не добавлять API, флаги, слои и обобщения «на будущее» без текущего требования.
22
- - **SOLID** (agent-actionable, не эссе):
23
- - **S** один модуль / один повод менять; дробить god-файлы в рамках лёгкого refactor.
24
- - **O** расширять через композицию/новые реализации, не раздувая существующие ветки «на всякий случай».
25
- - **L** — подтип не ломает контракт базового типа/протокола.
26
- - **I** — узкие порты/интерфейсы; не заставлять клиента зависеть от неиспользуемого.
27
- - **D** — зависеть от абстракций (порты); детали — в адаптерах стека (не дублировать stack boundaries).
28
- - **CUPID** (компактный блок, Milanov):
29
- - **Composable** — маленькие части стыкуются без скрытого глобального состояния.
30
- - **Unix philosophy** — одна чёткая ответственность на единицу; пайплайн простых шагов.
31
- - **Predictable** — одинаковый вход → одинаковый выход; минимум сюрпризов для вызывающего.
32
- - **Idiomatic** — следовать идиомам языка и **существующим** конвенциям репо.
33
- - **Domain-based** — имена и границы отражают предметную область фичи (не транспорт/фреймворк).
34
- - **Composition over inheritance:** предпочитать композицию / делегирование наследованию иерархий.
35
- - **Law of Demeter (hint):** не строить цепочки `a.b.c.d`; ходить через public API / facade модуля.
14
+ - **KISS:** самое простое изменение в паттернах репозитория.
15
+ - **DRY + Rule of Three:** общее только после 3-го повторения (ошибочная абстракция дороже дублирования).
16
+ - **YAGNI:** без API, флагов, слоёв «на будущее» без текущего требования.
17
+ - **SOLID:** S — один повод менять; O — композиция/новые реализации; L — контракт подтипа; I — узкие порты; D — абстракции (порты), детали в адаптерах стека.
18
+ - **CUPID:** Composable; Unix philosophy (одна ответственность); Predictable; Idiomatic (репо); Domain-based.
19
+ - **Composition over inheritance;** Law of Demeter без цепочек `a.b.c.d`; через public API / facade.
36
20
 
37
21
  # Рефакторинг при изменениях
38
22
 
39
- - Разрешён лёгкий refactor, если он:
40
- - уменьшает дублирование;
41
- - повышает читаемость;
42
- - не ломает публичные контракты модулей.
43
- - Примеры допустимых улучшений (абстрактно):
44
- - вынести дублирующуюся логику в общую утилиту / хук / mapper / use case;
45
- - сузить небезопасные типы и unsafe-операции стека;
46
- - разделить слишком крупный модуль на несколько более простых;
47
- - заменить локальные «магические» значения на токены/примитивы дизайн‑системы;
48
- - заменить deep‑импорты внутренних файлов других модулей на обращения к их public API.
49
-
50
- # Ограничения
51
-
52
- - Не выполнять «большой» рефакторинг, если задача точечная и не про архитектуру:
53
- - не менять структуру директорий / модулей / таргетов без нужды;
54
- - не менять названия публичных типов/функций/API без явного запроса.
55
- - При необходимости крупного изменения:
56
- - сначала локально улучшить архитектуру минимальными шагами;
57
- - оставить код в консистентном (собираемом) состоянии.
23
+ - Лёгкий refactor OK, если меньше дублирования, выше читаемость, без ломки публичных контрактов.
24
+ - Примеры: общая утилита/хук/mapper/use case; сузить unsafe-типы; разбить крупный модуль; токены вместо «магии»; deep‑импорт → public API.
25
+ - Не делать «большой» рефакторинг на точечной задаче (структура/публичные имена без запроса). Крупное — минимальными шагами; код остаётся собираемым.
58
26
 
59
27
  # Требование к агенту
60
28
 
61
- - **Boy scout rule:** оставлять модуль немного лучше, чем до изменения (простые, безопасные улучшения).
62
- - Не жертвовать архитектурой и слоями ради краткости реализации.
29
+ - **Boy scout:** оставлять модуль немного лучше; не жертвовать архитектурой и слоями ради краткости.
63
30
 
64
31
  ## Agent discipline (anti-sycophancy)
65
32
 
66
- - Unverifiable third-party API mark `// VERIFY: lib.symbol @ version` (or stack equivalent) and surface uncertainty; never invent signatures.
67
- - Before «is this correct?» — list ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
68
- - Refactor without testspropose a characterization test first; if declined, label `UNTESTED`.
69
- - Comments = WHY only when non-obvious; ban self-referential «added for issue comments.
70
- - Urgency/authority pressure: name the technical trade-off once, then comply no apology loops.
71
- - Match verification depth to risk; report status by what was **verified**, not attempted.
33
+ Essentials below. Full procedural set (~17 rules) load **`anti-sycophancy-discipline`**.
34
+
35
+ - Unverifiable third-party APImark `// VERIFY: lib.symbol @ version` (or stack equivalent); never invent signatures.
36
+ - Before «is this correct?» ≥3 failure modes (empty, boundary, concurrency/state) or name what you could not check.
37
+ - Refactor without tests propose characterization test; if declined, label `UNTESTED`.
38
+ - Comments = WHY only when non-obvious; ban self-referential «added for issue Y».
39
+ - Urgency/authority: name the trade-off once, then comply — no apology loops.
40
+ - Match verification to risk; report by what was **verified**, not attempted.
72
41
 
73
- Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**; do not invent a parallel style bible in this core body.
42
+ Style enforcement (formatter / linter / post-change gate) lives in the **stack toolchain** — see each adapter’s **Stack notes**.
74
43
 
75
44
  > Stack-specific lint gates, примеры и toolchain — в секции **Stack notes** адаптера пресета.
76
45
  ## Stack notes
@@ -22,7 +22,7 @@ paths:
22
22
 
23
23
  **Claude Option A (README exclusion):** when counting Claude rules without `paths:` / session-start, **exclude `**/README.md`** (topic indexes are not session-start rules). The intended session-start trio remains **exactly 3**; body budget sums **only those 3** rules.
24
24
 
25
- Session-start body budget (где задокументировано): ≤120 строк суммарно (stretch ≤100).
25
+ Session-start body budget (где задокументировано): ≤140 строк суммарно (stretch ≤120).
26
26
 
27
27
  ## Meta / author rules
28
28
 
@@ -36,7 +36,7 @@ When validating **preset packaging** changes (paths under `packages/ai-rules/pre
36
36
  3. **Mapping / README:** `rules/README.md` must include a Cursor→Claude mapping table; document core→stack mapping when `_shared` consumers exist.
37
37
  4. **shared-core consumers:** if `_shared/core/**` changed, every file with matching `<!-- shared-core: … -->` in this PR must be updated (or intentional fork documented).
38
38
  5. **Twin presence:** Cursor rule change without Claude twin same PR → **FAIL** (next, ios-swift, go, and java). Domain twin body ≥15 lines; thin aliases may be shorter.
39
- 6. **Session-start body budget:** sum body lines of the **3** intended session-start rules ≤ **120** (stretch ≤100); do **not** include `**/README.md` — record in validation-report; FAIL if grossly over.
39
+ 6. **Session-start body budget:** sum body lines of the **3** intended session-start rules ≤ **140** (stretch ≤120); do **not** include `**/README.md` — record in validation-report; FAIL if grossly over.
40
40
  7. **Embed drift (hard in `check:preset-structure`):** run `packages/ai-rules/scripts/check-shared-core-drift.sh` with `AI_RULES_DRIFT_FAIL=1` (bundled by the structure orchestrator). Lineage stems excluded from body equality.
41
41
  8. **Dogfood (monorepo soft):** prefer `packages/ai-rules/scripts/sync-dogfood-cursor.sh`; mass dogfood deletion without migration doc → risk / FAIL for maintainers.
42
42
 
@@ -60,3 +60,7 @@ Update `status.json`:
60
60
  ```
61
61
 
62
62
  Provide summary: failed check, root cause, files changed, validation commands run.
63
+
64
+ ## Anti-sycophancy discipline
65
+
66
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -65,3 +65,7 @@ Do not perform formal code review or write e2e plans — those are separate agen
65
65
  ## Design guidance
66
66
 
67
67
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
68
+
69
+ ## Anti-sycophancy discipline
70
+
71
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
@@ -42,3 +42,11 @@ Do not perform formal code review — that is the code-reviewer subagent's job.
42
42
  ## Design guidance
43
43
 
44
44
  - Load `design-guidance` (rule stem) when assessing structure, smells, or pattern fit.
45
+
46
+ ## Anti-sycophancy discipline
47
+
48
+ - When writing or changing code, load / follow rule `anti-sycophancy-discipline`.
49
+
50
+ ## Anti-hallucination (Next / React / RTK)
51
+
52
+ - When editing `app/**/*.{ts,tsx}`, load / follow rule `react-next-anti-hallucination`.
@@ -15,7 +15,7 @@
15
15
  ## Loading strategy
16
16
 
17
17
  - **Session start (no `paths:`):** ровно **3** — `next-app-core`, `package-manager`, `code-quality`
18
- - **On-demand (`paths:` or via commands):** `post-change-lint` (**обязателен после правок кода**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, `security-next`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, reference-features, next-app-router, react-a11y-coding, `technical-retro`, **preset-*** meta (paths on `packages/ai-rules/presets/**`)
18
+ - **On-demand (`paths:` or via commands):** `post-change-lint` (**обязателен после правок кода**), `agent-team-intake`, `agent-team-orchestrator`, `code-review-mr`, `security-next`, architecture, imports, UI, tests, feature-delivery-workflow, `design-guidance`, `anti-sycophancy-discipline`, `react-next-anti-hallucination`, reference-features, next-app-router, react-a11y-coding, `technical-retro`, **preset-*** meta (paths on `packages/ai-rules/presets/**`)
19
19
  - **Skills:** long workflows (`feature-delivery`, `code-review`, …)
20
20
 
21
21
  ### UI edit bundle (consolidated paths)
@@ -38,6 +38,8 @@
38
38
  | `next-app-core.mdc` | `stack/next-app-core.md` |
39
39
  | `package-manager.mdc` | `tooling-and-review/package-manager.md` |
40
40
  | `code-quality-and-refactoring.mdc` | `tooling-and-review/code-quality.md` |
41
+ | `anti-sycophancy-discipline.mdc` | `tooling-and-review/anti-sycophancy-discipline.md` |
42
+ | `react-next-anti-hallucination.mdc` | `anti-hallucination/react-next-anti-hallucination.md` |
41
43
  | `design-guidance.mdc` | `tooling-and-review/design-guidance.md` |
42
44
  | `next-app-router.mdc` | `stack/next-app-router.md` |
43
45
  | `arrow-functions.mdc` | `stack/arrow-functions.md` |
@@ -78,6 +80,7 @@
78
80
  | Shared core | Cursor adapter | Notes |
79
81
  |-------------|----------------|-------|
80
82
  | `quality/code-quality-and-refactoring.md` | `code-quality-and-refactoring.mdc` / `code-quality.md` | + Stack notes (ESLint/CSS) |
83
+ | `quality/anti-sycophancy-discipline.md` | `anti-sycophancy-discipline.mdc` / `anti-sycophancy-discipline.md` | requestable full VERIFY/discipline set |
81
84
  | `quality/design-guidance.md` | `design-guidance.mdc` / `design-guidance.md` | requestable smells/GoF |
82
85
  | `agent-team/agent-team-orchestrator.md` | `agent-team-orchestrator.mdc` | Roles in Stack notes |
83
86
  | `agent-team/agent-team-intake.md` | `agent-team-intake.mdc` | thin alias |
@@ -94,6 +97,7 @@
94
97
  | `stack/` | Next core, router, conventions |
95
98
  | `architecture/` | Границы, feature-delivery, reference-features, imports |
96
99
  | `api-and-data/` | HTTP, services, store |
100
+ | `anti-hallucination/` | Next/React/RTK phantom-import banlists |
97
101
  | `testing/` | Unit, e2e, Playwright |
98
102
  | `ui-and-accessibility/` | React UI, a11y, props |
99
103
  | `tooling-and-review/` | Quality, review, lint, agent-team, retro, **preset meta** |