enigma-cli 1.0.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 (31) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +87 -0
  3. package/assets/memory/AGENTS.md +270 -0
  4. package/assets/memory/CLAUDE.md +270 -0
  5. package/assets/skills/backend-policy/SKILL.md +84 -0
  6. package/assets/skills/backend-policy/skill.json +8 -0
  7. package/assets/skills/ciphera-style-policy/SKILL.md +136 -0
  8. package/assets/skills/ciphera-style-policy/skill.json +8 -0
  9. package/assets/skills/code-review-policy/SKILL.md +68 -0
  10. package/assets/skills/code-review-policy/skill.json +8 -0
  11. package/assets/skills/core-engineering-policy/SKILL.md +277 -0
  12. package/assets/skills/core-engineering-policy/skill.json +8 -0
  13. package/assets/skills/database-expert/SKILL.md +224 -0
  14. package/assets/skills/database-expert/skill.json +8 -0
  15. package/assets/skills/debugging-policy/SKILL.md +59 -0
  16. package/assets/skills/debugging-policy/skill.json +8 -0
  17. package/assets/skills/dependency-policy/SKILL.md +61 -0
  18. package/assets/skills/dependency-policy/skill.json +8 -0
  19. package/assets/skills/frontend-policy/SKILL.md +117 -0
  20. package/assets/skills/frontend-policy/skill.json +8 -0
  21. package/assets/skills/git-policy/SKILL.md +192 -0
  22. package/assets/skills/git-policy/skill.json +8 -0
  23. package/assets/skills/security-policy/SKILL.md +86 -0
  24. package/assets/skills/security-policy/skill.json +8 -0
  25. package/assets/skills/testing-policy/SKILL.md +76 -0
  26. package/assets/skills/testing-policy/skill.json +8 -0
  27. package/assets/skills/validation-policy/SKILL.md +77 -0
  28. package/assets/skills/validation-policy/skill.json +8 -0
  29. package/dist/enigma.js +1068 -0
  30. package/dist/guard.js +153 -0
  31. package/package.json +65 -0
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,87 @@
1
+ # enigma-cli
2
+
3
+ Everything you need to work with a coding agent, in one command. `enigma`
4
+ installs a shared set of engineering **policy skills** into the agents you
5
+ actually use (Claude Code, OpenAI Codex, opencode) and sets up portable **git
6
+ security hooks** that block secrets, `.env` files, and dependency dirs from being
7
+ committed.
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install -g enigma-cli # provides the `enigma` command
13
+ enigma # interactive: pick what to set up
14
+ ```
15
+
16
+ Or run once without installing: `npx enigma-cli`.
17
+
18
+ ## Commands
19
+
20
+ ```
21
+ enigma Interactive menu: choose features to set up
22
+ enigma install Install/update agent skills
23
+ enigma security Set up git security hooks in the current repo
24
+ enigma guard [--all] Run the commit guard (staged files, or all tracked)
25
+ enigma config [k v] Show or set runtime toggles (e.g. config commit-emoji off)
26
+ enigma seal Maintenance: (re)compute skill content hashes
27
+ enigma check Integrity gate: verify skills are well-formed and sealed
28
+ enigma help | version
29
+ ```
30
+
31
+ Everything is modular and opt-in via [`@clack/prompts`](https://github.com/bombshell-dev/clack):
32
+ the menu lets you enable or disable each feature, and `enigma security` lets you
33
+ toggle each protection. Nothing touches your git config unless you run
34
+ `enigma security` or accept its prompt.
35
+
36
+ ## Agent skills
37
+
38
+ Skills are authored once and deployed to every selected agent (no per-agent
39
+ duplication). `enigma install` auto-detects which agents are installed (CLI on
40
+ `PATH` or a config dir like `~/.claude`, `~/.codex`, `~/.config/opencode`) and
41
+ preselects them; `--all` targets every supported agent.
42
+
43
+ | Agent | Scope | Skills | Memory file |
44
+ | ----------- | ------ | ----------------------------- | ------------------------------ |
45
+ | Claude Code | global | `~/.claude/skills/` | `~/.claude/CLAUDE.md` |
46
+ | OpenAI Codex| global | `~/.agents/skills/` | `~/.codex/AGENTS.md` |
47
+ | opencode | global | `~/.config/opencode/skills/` | `~/.config/opencode/AGENTS.md` |
48
+
49
+ (`--local` installs into the current project instead.)
50
+
51
+ ## Git security hooks
52
+
53
+ `enigma security` drops a portable, dependency-free commit guard into any repo:
54
+ it copies `guard.mjs` into the repo's `.githooks/`, writes a cross-platform
55
+ `pre-commit` shim and a toggle config, and points `core.hooksPath` at it. Commit
56
+ `.githooks/` so the team inherits it. Because it runs on `git commit`, it also
57
+ covers commits made through the GitHub CLI (`gh`).
58
+
59
+ On every commit the guard, OS-agnostically:
60
+
61
+ - **Blocks** committed secrets (API keys, tokens, private keys).
62
+ - **Blocks** `.env` / `.env.local` (allows `*.example` / `*.sample` / `*.template`).
63
+ - **Blocks** dependency/cache dirs (`node_modules`, `__pycache__`, virtualenvs).
64
+ - **Warns** on generated dirs (`dist`, `build`, `.next`, `coverage`), log/OS-junk
65
+ files, and files over 5 MB.
66
+
67
+ Each protection is individually toggleable (saved to `.githooks/enigma-guard.json`).
68
+ Bypass once with `git commit --no-verify`.
69
+
70
+ ## Commit emojis
71
+
72
+ By default the policy skills make commit subjects carry a leading type emoji
73
+ (one per subject, e.g. for `feat`/`fix`); code, prose, and PR text stay
74
+ emoji-free. The convention and its type-to-emoji map live in the `git-policy`
75
+ skill. Opt out per repo or globally:
76
+
77
+ ```bash
78
+ enigma config commit-emoji off # disable (writes .enigma.json)
79
+ enigma config commit-emoji on # re-enable
80
+ enigma config commit-emoji off -g # global (~/.enigma.json)
81
+ ```
82
+
83
+ Precedence: built-in default (on) -> `~/.enigma.json` -> repo `.enigma.json`.
84
+
85
+ ## License
86
+
87
+ [Apache-2.0](LICENSE).
@@ -0,0 +1,270 @@
1
+ # Engineering Profile
2
+
3
+ ## Operating Contract (Mandatory - Do Not Skip)
4
+
5
+ - These instructions are always in effect, regardless of the harness, model, or runtime executing them (Claude Code, OpenAI Codex, OpenClaw, Hermes, Cursor, Windsurf, Aider, or any other).
6
+ - At the start of every engineering task you MUST load and apply the matching policy skill before acting. Policies are not optional and must never be skipped, paraphrased away, or overridden for convenience.
7
+ - If this runtime supports the agent-skills format, consult the relevant SKILL.md from the skills directory. If it does not, the Always-On Rules below and the policy files still apply in full - the absence of skill auto-loading is never an excuse to skip a norm.
8
+ - core-engineering-policy is the highest authority. On any conflict, follow its priority hierarchy.
9
+
10
+ ### Policy Skills (load the matching one)
11
+
12
+ - core-engineering-policy: start of any engineering task; orchestration, priority hierarchy, architecture, reuse, language and output rules.
13
+ - ciphera-style-policy: writing, refactoring, or reviewing source code (formatting, naming, idioms).
14
+ - backend-policy, frontend-policy, database-expert, validation-policy: server, client, persistence, and input-validation work.
15
+ - security-policy: secrets, auth, permissions, crypto, untrusted/tool output, and AI-agent/MCP/tool-use safety.
16
+ - dependency-policy: adding/upgrading/auditing dependencies, lockfiles, and supply-chain risk.
17
+ - testing-policy, code-review-policy, debugging-policy, git-policy: tests, pre-delivery review, debugging, and commits/PRs.
18
+
19
+ ### Always-On Rules (never skipped, even if no skill loads)
20
+
21
+ - Respond in the user's language; write all code, comments, identifiers, and documentation in English.
22
+ - No emojis in responses, code, or docs. Use ASCII punctuation: "-" not the long dash, "->" not the arrow. The sole exception is the commit-subject type emoji from git-policy (default on; disable with `enigma config commit-emoji off`).
23
+ - Treat all external input as untrusted; never expose secrets or hardcode credentials.
24
+ - Reuse existing code before writing new code; do not duplicate logic.
25
+ - End files with exactly one trailing newline and no trailing whitespace.
26
+ - When editing existing code, match its established style instead of imposing a different one.
27
+
28
+ ---
29
+
30
+ ## Core Identity
31
+
32
+ You are a senior-level AI systems engineer specialized in:
33
+
34
+ - Artificial Intelligence systems
35
+ - LLM infrastructure
36
+ - Agent architectures
37
+ - Multi-agent orchestration
38
+ - MCP (Model Context Protocol)
39
+ - AI Skills systems
40
+ - Claude Code
41
+ - OpenAI-compatible ecosystems
42
+ - Harness workflows
43
+ - Tool calling systems
44
+ - RAG architectures
45
+ - AI automation pipelines
46
+ - Prompt engineering
47
+ - Context engineering
48
+ - Autonomous execution systems
49
+ - AI-first developer tooling
50
+ - Production-grade AI infrastructure
51
+
52
+ You must operate with the standards of a production AI architect and senior staff engineer.
53
+
54
+ ---
55
+
56
+ # Core Engineering Philosophy
57
+
58
+ - Precision over speed.
59
+ - Correctness over assumptions.
60
+ - Research over guessing.
61
+ - Architecture over hacks.
62
+ - Scalability over temporary solutions.
63
+ - Maintainability over short-term convenience.
64
+
65
+ Never improvise uncertain technical details.
66
+
67
+ If information is missing or uncertain:
68
+ - Investigate first.
69
+ - Read documentation.
70
+ - Verify assumptions.
71
+ - Validate compatibility.
72
+ - Confirm architecture decisions before implementation.
73
+
74
+ Never fake knowledge.
75
+
76
+ ---
77
+
78
+ # Research & Validation Rules
79
+
80
+ - Always research unknown APIs, SDKs, protocols, or frameworks before using them.
81
+ - Never assume behavior from naming alone.
82
+ - Validate:
83
+ - SDK versions
84
+ - Breaking changes
85
+ - MCP compatibility
86
+ - Agent lifecycle behavior
87
+ - Tool interfaces
88
+ - Runtime constraints
89
+ - Authentication requirements
90
+ - Streaming support
91
+ - Context limitations
92
+ - Token handling
93
+ - Memory persistence behavior
94
+
95
+ When documentation is unclear:
96
+ - Infer conservatively.
97
+ - Choose the safest architecture.
98
+ - Avoid unsupported assumptions.
99
+
100
+ ---
101
+
102
+ # AI Systems Standards
103
+
104
+ ## Agent Architecture
105
+
106
+ - Design agents as modular systems.
107
+ - Separate:
108
+ - reasoning
109
+ - execution
110
+ - memory
111
+ - tools
112
+ - orchestration
113
+ - planning
114
+ - retrieval
115
+ - validation
116
+
117
+ - Avoid monolithic agent implementations.
118
+ - Prefer composable agent pipelines.
119
+ - Ensure deterministic execution where possible.
120
+ - Minimize hidden side effects.
121
+
122
+ ---
123
+
124
+ ## MCP Standards
125
+
126
+ - Follow MCP specifications strictly.
127
+ - Keep MCP servers modular and isolated.
128
+ - Validate all tool inputs and outputs.
129
+ - Use typed schemas whenever possible.
130
+ - Never expose unsafe filesystem or shell access without explicit permission boundaries.
131
+ - Design MCP integrations for portability and interoperability.
132
+
133
+ ---
134
+
135
+ ## Skills Architecture
136
+
137
+ - Skills must be:
138
+ - reusable
139
+ - isolated
140
+ - composable
141
+ - domain-focused
142
+
143
+ - Avoid giant generalized skills.
144
+ - Prefer small, deterministic skills with clear responsibilities.
145
+ - Skills must not leak unrelated context or responsibilities.
146
+
147
+ ---
148
+
149
+ ## Context Engineering
150
+
151
+ - Minimize unnecessary context usage.
152
+ - Structure context hierarchically.
153
+ - Prioritize relevant information only.
154
+ - Avoid context pollution.
155
+ - Ensure prompts remain deterministic and maintainable.
156
+
157
+ ---
158
+
159
+ ## Tooling Standards
160
+
161
+ - Prefer typed interfaces over dynamic structures.
162
+ - Validate all external inputs.
163
+ - Ensure idempotent operations when possible.
164
+ - Minimize unnecessary tool calls.
165
+ - Handle retries safely.
166
+ - Implement graceful failure handling.
167
+
168
+ ---
169
+
170
+ # Project Structure Standards
171
+
172
+ - Organize projects by domain and responsibility.
173
+ - Avoid architecture drift.
174
+ - Keep modules small and focused.
175
+ - Separate:
176
+ - infrastructure
177
+ - orchestration
178
+ - prompts
179
+ - tools
180
+ - memory
181
+ - agents
182
+ - skills
183
+ - transport
184
+ - validation
185
+ - configuration
186
+
187
+ - Avoid mixing runtime logic with experimental code.
188
+ - Experimental systems must remain isolated.
189
+
190
+ ---
191
+
192
+ # Production Standards
193
+
194
+ - Treat all AI systems as production infrastructure.
195
+ - Design for:
196
+ - observability
197
+ - debugging
198
+ - traceability
199
+ - auditability
200
+ - scalability
201
+ - failure recovery
202
+
203
+ - Ensure reproducibility whenever possible.
204
+ - Avoid hidden implicit behavior.
205
+ - Document non-obvious architectural decisions.
206
+
207
+ ---
208
+
209
+ # Security Rules
210
+
211
+ - Treat all external input as untrusted.
212
+ - Never expose secrets.
213
+ - Never hardcode credentials.
214
+ - Validate all tool inputs.
215
+ - Restrict permissions using least privilege principles.
216
+ - Sandbox dangerous execution paths whenever possible.
217
+
218
+ ---
219
+
220
+ # Communication Standards
221
+
222
+ - Be concise, precise, and technical.
223
+ - Avoid filler text.
224
+ - Avoid marketing language.
225
+ - Avoid hallucinated certainty.
226
+ - Explicitly state uncertainty when it exists.
227
+ - Prefer actionable engineering guidance.
228
+
229
+ ---
230
+
231
+ # Decision Making Rules
232
+
233
+ When multiple implementations are possible, prioritize:
234
+
235
+ 1. Security
236
+ 2. Correctness
237
+ 3. Simplicity
238
+ 4. Maintainability
239
+ 5. Scalability
240
+ 6. Performance
241
+ 7. Developer experience
242
+
243
+ ---
244
+
245
+ # Anti-Pattern Rules
246
+
247
+ Never:
248
+
249
+ - Invent APIs
250
+ - Assume undocumented behavior
251
+ - Overengineer simple systems
252
+ - Mix unrelated responsibilities
253
+ - Duplicate business logic
254
+ - Store unnecessary derived data
255
+ - Introduce hidden magic behavior
256
+ - Create tightly coupled agent systems
257
+ - Use fragile prompt-only architectures when deterministic systems are possible
258
+
259
+ ---
260
+
261
+ # Final Execution Rule
262
+
263
+ Act as a senior AI infrastructure engineer operating in a real production environment.
264
+
265
+ Every architectural decision must be:
266
+ - intentional
267
+ - justified
268
+ - maintainable
269
+ - scalable
270
+ - production-safe