enigma-cli 1.15.2 → 1.15.3

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.
@@ -16,7 +16,7 @@
16
16
  - backend-policy, frontend-policy, database-expert, validation-policy: server, client, persistence, and input-validation work.
17
17
  - security-policy: secrets, auth, permissions, crypto, untrusted/tool output, and AI-agent/MCP/tool-use safety.
18
18
  - dependency-policy: adding/upgrading/auditing dependencies, lockfiles, and supply-chain risk.
19
- - testing-policy, test-organization-policy, code-review-policy, debugging-policy, git-policy: tests, test-suite layout (structured subfolders, never a flat tests/ dump), pre-delivery review, debugging, and commits/PRs.
19
+ - testing-policy, code-review-policy, debugging-policy, git-policy: tests and test-suite layout (structured subfolders, never a flat tests/ dump), pre-delivery review, debugging, and commits/PRs.
20
20
  - task-completion-policy: long or multi-item tasks (1:1 ports, migrations, repo-wide changes) - work-unit inventory, persistent coverage ledger, and verified completion before any "done" claim.
21
21
 
22
22
  ### Always-On Rules (never skipped, even if no skill loads)
@@ -16,7 +16,7 @@
16
16
  - backend-policy, frontend-policy, database-expert, validation-policy: server, client, persistence, and input-validation work.
17
17
  - security-policy: secrets, auth, permissions, crypto, untrusted/tool output, and AI-agent/MCP/tool-use safety.
18
18
  - dependency-policy: adding/upgrading/auditing dependencies, lockfiles, and supply-chain risk.
19
- - testing-policy, test-organization-policy, code-review-policy, debugging-policy, git-policy: tests, test-suite layout (structured subfolders, never a flat tests/ dump), pre-delivery review, debugging, and commits/PRs.
19
+ - testing-policy, code-review-policy, debugging-policy, git-policy: tests and test-suite layout (structured subfolders, never a flat tests/ dump), pre-delivery review, debugging, and commits/PRs.
20
20
  - task-completion-policy: long or multi-item tasks (1:1 ports, migrations, repo-wide changes) - work-unit inventory, persistent coverage ledger, and verified completion before any "done" claim.
21
21
 
22
22
  ### Always-On Rules (never skipped, even if no skill loads)
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Minimal-code discipline - YAGNI ladder, deletion over addition, no unrequested abstractions, and the enigma: shortcut-marking convention; intensity via the minimal-code setting.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "297c5d9a0573a319a6f8476f5b1da8cb93e6f3297f13b76ac25d91ce10c7b523"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "On-demand over-engineering review - diff review, whole-repo audit, and enigma: debt-marker ledger (tags delete/stdlib/native/yagni/shrink, line/dep scoring); lists cuts, applies nothing.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "f742a2be3f328b9ea1ff9a35a449177c2cbec35ad16e46f7054b7a873a2ab017"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Backend/API architecture: controller-service-repository layering, API and request optimization, server-side caching (Redis), and Zod boundary validation.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "a46c3cd00aa5f47adb1e7907f1d2bc6f5562f7a272890dee9b1121976ac04ae1"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.1",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Ciphera code style conventions (formatting, naming, imports, comments, code-level anti-patterns; TypeScript-first, language-agnostic).",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "74f638aec13e8c93257fe1ad604c28b07e9a7c456796a4ceefcc99217d9e7039"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Pre-delivery self-review gate, prioritized review dimensions, and change-quality criteria.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "3d3bbe0602d5bbb4afe37648fe3c2fa39376b1bcbac5d8c441f01fad1e866ed0"
8
8
  }
@@ -33,8 +33,7 @@ description: Highest-authority engineering rules - priority hierarchy, modular a
33
33
  - Any dependency added/upgraded/removed/audited, or package manifest/lockfile change -> dependency-policy.
34
34
  - Any UI, client state, data fetching, or client caching -> frontend-policy.
35
35
  - Any API endpoint, service, controller, or server request flow -> backend-policy.
36
- - Any new or changed code that needs verification -> testing-policy.
37
- - Any test file created, moved, or renamed, or a test suite scaffolded/restructured -> test-organization-policy.
36
+ - Any new or changed code that needs verification, or any test file created/moved/renamed or a test suite scaffolded/restructured -> testing-policy.
38
37
  - Any source code written, refactored, or reviewed (formatting, naming, language idioms) -> ciphera-style-policy.
39
38
  - Any implementation code being written or refactored, or any "be lazy"/"simplify"/over-engineering request -> anti-overengineering-policy.
40
39
  - A one-shot complexity-only review/audit, "what can we delete", "find bloat", or an enigma: debt-marker ledger -> anti-overengineering-review.
@@ -82,8 +81,7 @@ This core policy owns orchestration, architecture, and the global rules. Each co
82
81
  - validation-policy: strict frontend + backend schema validation (Zod), schema consistency, client-facing error handling.
83
82
  - frontend-policy: frontend structure, reusable components, abstraction threshold, client-side caching, optimistic UI and rollback.
84
83
  - backend-policy: API/service architecture, controller-service-repository layering, API/request optimization, server-side caching (Redis).
85
- - testing-policy: test strategy, coverage gates, deterministic tests, test/regression-first discipline.
86
- - test-organization-policy: test-suite layout - structure by test type and domain, mirrored source paths, file naming, fixture/helper/factory placement.
84
+ - testing-policy: test strategy, coverage gates, deterministic tests, test/regression-first discipline, and test-suite layout (structure by type and domain, mirrored source paths, file naming, fixture/helper/factory placement).
87
85
  - code-review-policy: self-review before delivery, review dimensions, change-quality gates.
88
86
  - debugging-policy: reproduce-isolate-fix methodology and root-cause discipline.
89
87
  - git-policy: commits, branches, and pull request standards.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "core-engineering-policy",
3
- "version": "1.8.0",
3
+ "version": "1.9.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Core engineering execution policy and harness orchestration (highest-authority rules).",
6
- "cliVersion": "1.15.2",
7
- "sha": "54144f87e477c4b1c004abf2268d9294778e1e96e634bb837b4b1717aa1b7b16"
6
+ "cliVersion": "1.15.3",
7
+ "sha": "82d246faa4770248a36f143926fbf06bd3ffc082959014184548b57193770fab"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Senior database architecture policy: query optimization, anti-duplication/normalization, scalability, and RGPD/GDPR encryption.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "2883bcecb3202683ae6f81b073c3d6a9cec9c55029e011bdd06ba7ac3537297e"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Reproduce-isolate-fix debugging methodology with root-cause discipline and regression verification.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "14b0064c8b33a0dc85e51464b05005cf5801c756b1101789a6924b9548420f6b"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Dependency and supply-chain security: lockfiles and reproducible installs, version pinning, vulnerability auditing, vetting/minimizing packages, vendoring, and SBOM/provenance.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "6375d835c2aef2c9bd31ce116444dc3d796f510f9970a213aa3ac4696d7e21b9"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "431645565aec8a4ab4cd17247139f78c377a9bcfcfc4ee1d6f252199c332d86f"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.3.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Frontend architecture: reusable components, abstraction thresholds, state management, no-op save detection, large-list rendering (infinite scroll/pagination, virtualization, skeletons, progressive loading), and optimistic UI with rollback.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "26962db5a8b607e95098a6d88977aee59a10bd14e03afe97245f2b013fd21a9a"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.3.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Git & contribution policy (senior engineering standards).",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "73a978ef11f4def067f9252fc3e2e6aa737a08b6d58ad8a2a45cbcd4b02813f6"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Application and AI-agent security: secrets, authn/authz (least privilege), OWASP Top 10, transport/crypto baseline, secure logging, and agent/MCP/tool-use safety.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "9971e9d9127397d0152e89d24aad3191e2935e55a8483db7fd15f5d4d7a60e7a"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Create new skills, modify and improve existing skills, and measure skill performance with evals and benchmarks.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "699586cce82ec0a5458288b598ee7e5ebdddb3dfcf19db354d8bc5e85e47c1c7"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.1.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Exhaustive completion discipline for long/multi-item tasks - inventory, coverage ledger, verified done.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "6e3facba307eb2b55cefbab2e4b2a346a2b82f93c3ef47e11ebeb78c3c9453a8"
8
8
  }
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: testing-policy
3
- description: Test strategy (test pyramid), coverage gates, deterministic tests, mocking discipline, and regression-first bug fixing. Use when writing or changing code that needs tests, when asked to add or fix tests, or after fixing a bug to add a regression test.
3
+ description: Test strategy (test pyramid), coverage gates, deterministic tests, mocking discipline, regression-first bug fixing, and test-suite organization (directory structure by test type and domain, mirrored source paths, file naming, fixture/helper/factory placement). Use when writing or changing code that needs tests, when asked to add or fix tests, after fixing a bug to add a regression test, or when creating, moving, renaming, or structuring test files - never dump tests flat into a single tests/ folder.
4
4
  ---
5
5
 
6
6
  # Testing Policy (Senior Engineering Standards)
@@ -8,8 +8,9 @@ description: Test strategy (test pyramid), coverage gates, deterministic tests,
8
8
  ## Activation Scope
9
9
 
10
10
  - Apply whenever code is written, changed, or fixed, and whenever the user asks for tests.
11
- - Owns test strategy, coverage expectations, determinism, and test-first discipline.
12
- - Test file placement, suite layout, naming of test files, and fixture/helper organization live in test-organization-policy; apply it alongside this skill when creating or moving test files.
11
+ - Apply whenever a test file is created, moved, or renamed, and whenever a test suite is scaffolded or restructured.
12
+ - Owns test strategy, coverage expectations, determinism, mocking discipline, and test-first discipline.
13
+ - Owns test-suite layout: directory structure, subfolders, file naming, and placement of fixtures, helpers, factories, and mocks.
13
14
 
14
15
  ---
15
16
 
@@ -70,8 +71,84 @@ description: Test strategy (test pyramid), coverage gates, deterministic tests,
70
71
 
71
72
  ---
72
73
 
74
+ ## Suite Organization: Core Principle
75
+
76
+ - A test suite is navigable code: anyone must find the tests for a module in seconds from the module's path alone, and find the module from its test's path.
77
+ - Never dump test files flat into a single tests/ folder. Flat suites hide coverage gaps, cause name collisions, and stop scaling past a handful of files.
78
+ - Organize from the first test file. Structure is cheapest at file creation and most expensive after the folder is a mess.
79
+
80
+ ---
81
+
82
+ ## Framework Convention First
83
+
84
+ - Every ecosystem has an established convention; it beats any custom layout:
85
+ - JS/TS (Vitest, Jest, Bun): colocated `*.test.ts` next to the source file, a `__tests__/` folder per directory, or a mirrored `tests/` tree - follow whichever the repo already uses.
86
+ - Python (pytest): a `tests/` package mirroring the source package; shared fixtures in `conftest.py` at the narrowest directory that covers their users.
87
+ - Go: `_test.go` colocated in the same package (mandated by the toolchain); black-box tests use the `_test` package suffix.
88
+ - Rust: unit tests in `#[cfg(test)] mod tests` inside the module; integration tests as separate files under the crate-root `tests/`.
89
+ - Java/Kotlin: `src/test/<lang>/` mirroring the `src/main/<lang>/` package path exactly.
90
+ - In an existing repo, detect the established layout and extend it; never introduce a second competing layout. Migrations to a better layout are proposed explicitly, not done by stealth.
91
+
92
+ ---
93
+
94
+ ## Structure by Test Type, Then by Domain
95
+
96
+ - When more than one test type exists, separate types at the top level - they differ in speed, dependencies, and CI stage:
97
+
98
+ ```text
99
+ tests/
100
+ unit/ fast, isolated, no I/O
101
+ integration/ module boundaries, DB, contracts
102
+ e2e/ critical user flows only
103
+ fixtures/ shared static data
104
+ helpers/ shared builders, factories, fakes
105
+ ```
106
+
107
+ - Inside each type, mirror the source tree: tests for `src/<domain>/<module>` live at `tests/<type>/<domain>/<module>.<suffix>`.
108
+ - Group e2e tests by user flow (e.g. `e2e/checkout/`), not by source module - flows cross modules.
109
+ - Default to one test file per module under test; split a large file by scenario, never by arbitrary size cuts.
110
+ - Keep the test runner's discovery config (`testMatch`, `testpaths`, includes) in sync with the layout; a test the runner cannot find is dead code.
111
+
112
+ ---
113
+
114
+ ## Naming Conventions
115
+
116
+ - Test file name = module under test + the framework's suffix: `parser.test.ts`, `test_parser.py`, `parser_test.go`.
117
+ - When splitting by scenario, encode the scenario in the name: `parser.errors.test.ts`, `auth.session-expiry.test.ts`.
118
+ - Suite and case names describe behavior, not implementation - name tests by the behavior they verify, consistent with the Test Quality Rules above.
119
+ - Forbidden names: `test1`, `misc`, `temp`, `new`, `utils-tests`, or any name that does not identify what is verified.
120
+
121
+ ---
122
+
123
+ ## Shared Test Code Placement
124
+
125
+ - Fixtures (static data), factories/builders (object construction), helpers (setup/assertion logic), and fakes each get their own folder; do not mix them in one grab-bag file.
126
+ - Place shared test code at the narrowest scope that covers its users; promote it upward only when a second consumer appears (same reuse rule as production code).
127
+ - Test helpers are production code: deduplicate, name well, and review them like any other module.
128
+ - Never import from another test file; extract the shared piece into a helper module instead.
129
+ - Large fixtures live as data files under `fixtures/`, named after the scenario they encode, not inlined into test bodies.
130
+
131
+ ---
132
+
133
+ ## Scaling & Maintenance
134
+
135
+ - When adding a test to an existing flat or misplaced suite: place the new test correctly and surface the layout debt; do not extend the mess to match it.
136
+ - Layout migrations are pure moves: never change test logic in the same commit as a file move (atomic-commit rule in git-policy).
137
+ - After any move, run the affected suite to prove discovery still works, and delete emptied folders.
138
+ - If two layouts coexist after a partial migration, finish the migration or document the boundary; a half-migrated suite is worse than either layout.
139
+
140
+ ---
141
+
142
+ ## Decision Rule: Colocated vs Centralized
143
+
144
+ - Colocated tests (next to source) fit unit tests in ecosystems that idiomatically support it (JS/TS, Go, Rust) - shortest navigation distance, moves with the code.
145
+ - A centralized `tests/` tree fits integration/e2e tests, packages that must exclude tests from the published artifact, and ecosystems whose tooling expects it (Python, Java).
146
+ - Mixing is fine when each side follows its rule (e.g. colocated unit + centralized integration); mixing within the same test type is not.
147
+
148
+ ---
149
+
73
150
  ## Reporting
74
151
 
75
152
  - State plainly what was tested and the actual result.
76
153
  - If tests fail, report the failure with output; do not claim success.
77
- - If testing was skipped or partial, say so explicitly and why.
154
+ - If testing was skipped or partial, say so explicitly and why.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "testing-policy",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "provider": "FJRG2007/enigma",
5
- "description": "Test strategy, coverage gates, deterministic tests, mocking discipline, and regression-first bug fixing.",
6
- "cliVersion": "1.15.2",
7
- "sha": "dd5c0bb67aba7f31b2f520e626a9df512b5ad2d2e7baf5567fe64d9e28a437db"
5
+ "description": "Test strategy, coverage gates, deterministic tests, mocking discipline, regression-first bug fixing, and test-suite organization (layout by type/domain, mirrored paths, file naming, fixture/helper placement).",
6
+ "cliVersion": "1.15.3",
7
+ "sha": "3bdf591057b760f674fb2b1425f63acb426cda2c4f042e1a74c5a5d3807df664"
8
8
  }
@@ -3,6 +3,6 @@
3
3
  "version": "1.0.0",
4
4
  "provider": "FJRG2007/enigma",
5
5
  "description": "Strict frontend + backend schema validation, schema consistency, and safe client-facing error handling.",
6
- "cliVersion": "1.15.2",
6
+ "cliVersion": "1.15.3",
7
7
  "sha": "a33622a2f810ee4cea39824cb1a7ca34b355a917d4224025df50d77dd74f0b3a"
8
8
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "enigma-cli",
3
- "version": "1.15.2",
3
+ "version": "1.15.3",
4
4
  "description": "Everything you need to work with a coding agent: install shared policy skills for Claude Code, OpenAI Codex and opencode, and set up portable git security hooks.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,88 +0,0 @@
1
- ---
2
- name: test-organization-policy
3
- description: Expert test-suite organization - directory structure by test type and domain, mirrored source paths, file naming conventions, and fixture/helper/factory placement. Use when creating, moving, or renaming test files, scaffolding or restructuring a test suite, or deciding where a new test lives - never dump tests flat into a single tests/ folder.
4
- ---
5
-
6
- # Test Organization Policy (Senior Engineering Standards)
7
-
8
- ## Activation Scope
9
-
10
- - Apply whenever a test file is created, moved, or renamed, and whenever a test suite is scaffolded or restructured.
11
- - Owns test-suite layout: directory structure, subfolders, file naming, and placement of fixtures, helpers, factories, and mocks.
12
- - Test strategy, coverage, determinism, and mocking discipline live in testing-policy; compose with it, never restate it.
13
-
14
- ---
15
-
16
- ## Core Principle
17
-
18
- - A test suite is navigable code: anyone must find the tests for a module in seconds from the module's path alone, and find the module from its test's path.
19
- - Never dump test files flat into a single tests/ folder. Flat suites hide coverage gaps, cause name collisions, and stop scaling past a handful of files.
20
- - Organize from the first test file. Structure is cheapest at file creation and most expensive after the folder is a mess.
21
-
22
- ---
23
-
24
- ## Framework Convention First
25
-
26
- - Every ecosystem has an established convention; it beats any custom layout:
27
- - JS/TS (Vitest, Jest, Bun): colocated `*.test.ts` next to the source file, a `__tests__/` folder per directory, or a mirrored `tests/` tree - follow whichever the repo already uses.
28
- - Python (pytest): a `tests/` package mirroring the source package; shared fixtures in `conftest.py` at the narrowest directory that covers their users.
29
- - Go: `_test.go` colocated in the same package (mandated by the toolchain); black-box tests use the `_test` package suffix.
30
- - Rust: unit tests in `#[cfg(test)] mod tests` inside the module; integration tests as separate files under the crate-root `tests/`.
31
- - Java/Kotlin: `src/test/<lang>/` mirroring the `src/main/<lang>/` package path exactly.
32
- - In an existing repo, detect the established layout and extend it; never introduce a second competing layout. Migrations to a better layout are proposed explicitly, not done by stealth.
33
-
34
- ---
35
-
36
- ## Structure by Test Type, Then by Domain
37
-
38
- - When more than one test type exists, separate types at the top level - they differ in speed, dependencies, and CI stage:
39
-
40
- ```text
41
- tests/
42
- unit/ fast, isolated, no I/O
43
- integration/ module boundaries, DB, contracts
44
- e2e/ critical user flows only
45
- fixtures/ shared static data
46
- helpers/ shared builders, factories, fakes
47
- ```
48
-
49
- - Inside each type, mirror the source tree: tests for `src/<domain>/<module>` live at `tests/<type>/<domain>/<module>.<suffix>`.
50
- - Group e2e tests by user flow (e.g. `e2e/checkout/`), not by source module - flows cross modules.
51
- - Default to one test file per module under test; split a large file by scenario, never by arbitrary size cuts.
52
- - Keep the test runner's discovery config (`testMatch`, `testpaths`, includes) in sync with the layout; a test the runner cannot find is dead code.
53
-
54
- ---
55
-
56
- ## Naming Conventions
57
-
58
- - Test file name = module under test + the framework's suffix: `parser.test.ts`, `test_parser.py`, `parser_test.go`.
59
- - When splitting by scenario, encode the scenario in the name: `parser.errors.test.ts`, `auth.session-expiry.test.ts`.
60
- - Suite and case names describe behavior, not implementation (naming-by-behavior rules live in testing-policy).
61
- - Forbidden names: `test1`, `misc`, `temp`, `new`, `utils-tests`, or any name that does not identify what is verified.
62
-
63
- ---
64
-
65
- ## Shared Test Code Placement
66
-
67
- - Fixtures (static data), factories/builders (object construction), helpers (setup/assertion logic), and fakes each get their own folder; do not mix them in one grab-bag file.
68
- - Place shared test code at the narrowest scope that covers its users; promote it upward only when a second consumer appears (same reuse rule as production code).
69
- - Test helpers are production code: deduplicate, name well, and review them like any other module.
70
- - Never import from another test file; extract the shared piece into a helper module instead.
71
- - Large fixtures live as data files under `fixtures/`, named after the scenario they encode, not inlined into test bodies.
72
-
73
- ---
74
-
75
- ## Scaling & Maintenance
76
-
77
- - When adding a test to an existing flat or misplaced suite: place the new test correctly and surface the layout debt; do not extend the mess to match it.
78
- - Layout migrations are pure moves: never change test logic in the same commit as a file move (atomic-commit rule in git-policy).
79
- - After any move, run the affected suite to prove discovery still works, and delete emptied folders.
80
- - If two layouts coexist after a partial migration, finish the migration or document the boundary; a half-migrated suite is worse than either layout.
81
-
82
- ---
83
-
84
- ## Decision Rule: Colocated vs Centralized
85
-
86
- - Colocated tests (next to source) fit unit tests in ecosystems that idiomatically support it (JS/TS, Go, Rust) - shortest navigation distance, moves with the code.
87
- - A centralized `tests/` tree fits integration/e2e tests, packages that must exclude tests from the published artifact, and ecosystems whose tooling expects it (Python, Java).
88
- - Mixing is fine when each side follows its rule (e.g. colocated unit + centralized integration); mixing within the same test type is not.
@@ -1,8 +0,0 @@
1
- {
2
- "name": "test-organization-policy",
3
- "version": "1.0.0",
4
- "provider": "FJRG2007/enigma",
5
- "description": "Expert test-suite organization: structure by test type and domain, mirrored source paths, naming conventions, and fixture/helper placement.",
6
- "cliVersion": "1.15.2",
7
- "sha": "09184beb8e423efd26fce0221cd374d41b6ba0bb3d223d7edce250d9d978767e"
8
- }