@akm1923main/init-project 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 (36) hide show
  1. package/QUICKSTART_CREATE_AI_PROJECT.md +52 -0
  2. package/README.md +48 -0
  3. package/index.js +219 -0
  4. package/package.json +24 -0
  5. package/templates/02_Skills/Legacy_Prompts/Architecture.md +72 -0
  6. package/templates/02_Skills/Legacy_Prompts/Coding_Discipline.md +283 -0
  7. package/templates/02_Skills/Legacy_Prompts/Generate_prd.md +129 -0
  8. package/templates/02_Skills/Legacy_Prompts/IDEA.md +188 -0
  9. package/templates/02_Skills/Legacy_Prompts/Sharder.md +359 -0
  10. package/templates/02_Skills/agents/Architect.md +453 -0
  11. package/templates/02_Skills/agents/Business_Analyst.md +341 -0
  12. package/templates/02_Skills/agents/Deployment_Engineer.md +371 -0
  13. package/templates/02_Skills/agents/DevOps_Engineer.md +356 -0
  14. package/templates/02_Skills/agents/Documentation_Writer.md +371 -0
  15. package/templates/02_Skills/agents/Idea_Analyst.md +334 -0
  16. package/templates/02_Skills/agents/Master_Orchestrator.md +197 -0
  17. package/templates/02_Skills/agents/Performance_Engineer.md +316 -0
  18. package/templates/02_Skills/agents/Product_Manager.md +344 -0
  19. package/templates/02_Skills/agents/Refactor_Specialist.md +8 -0
  20. package/templates/02_Skills/agents/Security_Engineer.md +360 -0
  21. package/templates/02_Skills/agents/Staff_Engineer.md +306 -0
  22. package/templates/02_Skills/agents/Testing_Engineer.md +312 -0
  23. package/templates/02_Skills/workflows/architecture_generation_workflow.md +73 -0
  24. package/templates/02_Skills/workflows/business_analysis_workflow.md +70 -0
  25. package/templates/02_Skills/workflows/deployment_workflow.md +31 -0
  26. package/templates/02_Skills/workflows/devops_setup_workflow.md +30 -0
  27. package/templates/02_Skills/workflows/documentation_workflow.md +352 -0
  28. package/templates/02_Skills/workflows/idea_refinement_workflow.md +106 -0
  29. package/templates/02_Skills/workflows/performance_review_workflow.md +29 -0
  30. package/templates/02_Skills/workflows/prd_generation_workflow.md +83 -0
  31. package/templates/02_Skills/workflows/refactor_workflow.md +35 -0
  32. package/templates/02_Skills/workflows/security_audit_workflow.md +30 -0
  33. package/templates/02_Skills/workflows/task_execution_workflow.md +33 -0
  34. package/templates/02_Skills/workflows/task_generation_workflow.md +61 -0
  35. package/templates/02_Skills/workflows/testing_workflow.md +31 -0
  36. package/templates/02_Skills/workflows/workflow_governance_rules.md +112 -0
@@ -0,0 +1,52 @@
1
+ # create-ai-project โ€” Quickstart (AI-OS)
2
+
3
+ ## 1) Local development (you on this machine)
4
+
5
+ ```bash
6
+ cd "C:\Users\hp\Desktop\New folder\create-ai-project"
7
+ npm link
8
+ create-ai-project my-greenfield-project
9
+ ```
10
+
11
+ ## 2) Publish + use via npx (your target)
12
+
13
+ ### A) Publish to npm
14
+ 1) Create an npm account and login:
15
+
16
+ ```bash
17
+ npm login
18
+ ```
19
+
20
+ 2) Publish:
21
+
22
+ ```bash
23
+ npm publish
24
+ ```
25
+
26
+ > If the name `create-ai-project` is already taken on npm, rename the package (e.g., `@akm/create-ai-project`) and then use:
27
+ >
28
+ > - `npx @akm/create-ai-project my-project`
29
+
30
+ ### B) Use anywhere with one command
31
+
32
+ ```bash
33
+ npx create-ai-project my-project
34
+ ```
35
+
36
+ ## 3) Standard Skills are bundled
37
+
38
+ This CLI ships the canonical skills at:
39
+
40
+ - `templates/02_Skills/`
41
+
42
+ On init, it copies them into your new project at:
43
+
44
+ - `<project>/02_Skills/`
45
+
46
+ No external paths.
47
+
48
+ ## 4) Notes
49
+ - Generated projects ignore `02_Skills/` via `.gitignore` (your preference)
50
+ - State folder is `07_state/`
51
+ - Python workflow recommendation is `uv` (see `05_Project/README.md`)
52
+ - `03_Project_Info/` + `06_Documentation/` files are generated later by agents (folders only at init)
package/README.md ADDED
@@ -0,0 +1,48 @@
1
+ # create-ai-project
2
+
3
+ A CLI that scaffolds an **AI-OS** project structure.
4
+
5
+ ## Key guarantee (your requirement)
6
+
7
+ When you initialize a project, the generated project will contain **02_Skills/** with the **exact same files and content** that ship inside this CLI package.
8
+
9
+ - No external copy paths
10
+ - No tiny placeholders
11
+ - The standard skills are bundled under: `templates/02_Skills/`
12
+
13
+ > Note: By your preference, generated projects include `02_Skills/` in `.gitignore`.
14
+
15
+ ## Usage (local dev)
16
+
17
+ ```bash
18
+ cd "C:\Users\hp\Desktop\New folder\create-ai-project"
19
+ npm link
20
+ create-ai-project my-project
21
+ ```
22
+
23
+ ## Usage (npx โ€” the way you want)
24
+
25
+ After you publish this package to npm:
26
+
27
+ ```bash
28
+ npx create-ai-project my-project
29
+ ```
30
+
31
+ ## Options
32
+
33
+ ```bash
34
+ create-ai-project <project-name> [--path <targetDir>] [--force]
35
+ ```
36
+
37
+ ## What gets created at init
38
+ - Folder skeleton (AI-OS)
39
+ - `PROJECT_STATE.md`, `.gitignore`, `.env.example`, `VERSION.md`
40
+ - `04_Tasks/*` and `07_state/*`
41
+ - **02_Skills/** copied from bundled templates
42
+
43
+ ### Empty docs behavior (by design)
44
+ Initializer creates folders but does NOT create empty markdown files under:
45
+ - `03_Project_Info/*` (folders only)
46
+ - `06_Documentation/*` (folder only)
47
+
48
+ Agents/workflows generate/update those later.
package/index.js ADDED
@@ -0,0 +1,219 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * create-ai-project
5
+ * AI-OS project initializer.
6
+ *
7
+ * GOALS (as requested):
8
+ * - Preserve command interface
9
+ * - Preserve npm link behavior (package.json bin)
10
+ * - Ship a STANDARD, bundled 02_Skills/ inside this CLI package (no external copy paths)
11
+ * - 02_Skills in generated projects must match the bundled version EXACTLY (no tiny placeholders)
12
+ * - Keep 02_Skills ignored in generated project's .gitignore (user preference)
13
+ * - Rename state/ -> 07_state/
14
+ * - Recommend uv as default Python tooling
15
+ * - Do NOT create empty Project_Info/Documentation markdown files at init (folders only)
16
+ *
17
+ * Usage:
18
+ * create-ai-project <project-name> [--path <targetDir>] [--force]
19
+ */
20
+
21
+ const fs = require('fs');
22
+ const path = require('path');
23
+
24
+ function die(msg, code = 1) {
25
+ console.error(msg);
26
+ process.exit(code);
27
+ }
28
+
29
+ function parseArgs(argv) {
30
+ const args = { name: null, targetDir: process.cwd(), force: false };
31
+
32
+ const positionals = [];
33
+ for (let i = 2; i < argv.length; i++) {
34
+ const a = argv[i];
35
+ if (a === '--path' || a === '-p') {
36
+ const v = argv[++i];
37
+ if (!v) die('โŒ Missing value for --path');
38
+ args.targetDir = v;
39
+ } else if (a === '--force' || a === '-f') {
40
+ args.force = true;
41
+ } else if (a === '--help' || a === '-h') {
42
+ args.help = true;
43
+ } else {
44
+ positionals.push(a);
45
+ }
46
+ }
47
+
48
+ args.name = positionals[0] || null;
49
+ return args;
50
+ }
51
+
52
+ function ensureDir(p) {
53
+ fs.mkdirSync(p, { recursive: true });
54
+ }
55
+
56
+ function writeFileIfNotExists(filePath, content) {
57
+ if (fs.existsSync(filePath)) return;
58
+ ensureDir(path.dirname(filePath));
59
+ fs.writeFileSync(filePath, content, 'utf8');
60
+ }
61
+
62
+ function copyRecursiveNoClobber(src, dest) {
63
+ const stat = fs.statSync(src);
64
+ if (stat.isDirectory()) {
65
+ ensureDir(dest);
66
+ for (const entry of fs.readdirSync(src)) {
67
+ copyRecursiveNoClobber(path.join(src, entry), path.join(dest, entry));
68
+ }
69
+ return;
70
+ }
71
+
72
+ // file
73
+ if (fs.existsSync(dest)) return;
74
+ ensureDir(path.dirname(dest));
75
+ fs.copyFileSync(src, dest);
76
+ }
77
+
78
+ function safeCreateProjectRoot(projectPath, force) {
79
+ if (fs.existsSync(projectPath)) {
80
+ if (!force) die('โŒ Folder already exists. Use --force to proceed.');
81
+ } else {
82
+ fs.mkdirSync(projectPath, { recursive: true });
83
+ }
84
+ }
85
+
86
+ function normalizeLines(s) {
87
+ return (s || '').replace(/\r\n/g, '\n');
88
+ }
89
+
90
+ function main() {
91
+ const args = parseArgs(process.argv);
92
+
93
+ if (args.help || !args.name) {
94
+ console.log(
95
+ normalizeLines(
96
+ `create-ai-project - AI-OS project initializer\n\n` +
97
+ `Usage:\n create-ai-project <project-name> [--path <targetDir>] [--force]\n\n` +
98
+ `Options:\n` +
99
+ ` --path, -p Target directory (default: current directory)\n` +
100
+ ` --force, -f Allow existing folder (will only add missing items)\n` +
101
+ ` --help, -h Show help\n`
102
+ )
103
+ );
104
+ process.exit(args.help ? 0 : 1);
105
+ }
106
+
107
+ const projectName = args.name;
108
+ const targetDir = path.resolve(args.targetDir);
109
+ const projectPath = path.join(targetDir, projectName);
110
+
111
+ safeCreateProjectRoot(projectPath, args.force);
112
+
113
+ // Bundled skills source (ships with the CLI)
114
+ const SKILLS_TEMPLATE_SOURCE = path.join(__dirname, 'templates', '02_Skills');
115
+
116
+ // Folder skeleton
117
+ const folders = [
118
+ '01_Knowledge',
119
+ '02_Skills',
120
+
121
+ '03_Project_Info',
122
+ '03_Project_Info/Idea_Analyst',
123
+ '03_Project_Info/Business_Analyst',
124
+ '03_Project_Info/Product_Manager',
125
+ '03_Project_Info/Architect',
126
+ '03_Project_Info/Testing_Engineer',
127
+ '03_Project_Info/Performance_Engineer',
128
+ '03_Project_Info/Security_Engineer',
129
+ '03_Project_Info/DevOps_Engineer',
130
+
131
+ '04_Tasks',
132
+ '04_Tasks/TASKS',
133
+ '04_Tasks/ARCHIVE',
134
+
135
+ '05_Project',
136
+
137
+ '06_Documentation',
138
+
139
+ '07_state'
140
+ ];
141
+
142
+ for (const f of folders) ensureDir(path.join(projectPath, f));
143
+
144
+ const now = new Date().toISOString();
145
+
146
+ // Root files
147
+ writeFileIfNotExists(path.join(projectPath, 'VERSION.md'), `# VERSION\n\n0.1.0\n`);
148
+
149
+ writeFileIfNotExists(
150
+ path.join(projectPath, 'PROJECT_STATE.md'),
151
+ `# PROJECT_STATE\n\nCreated: ${now}\n\n## Purpose\n- \n\n## Current status\n- Phase: discovery / build / test / ship\n\n## Top priorities\n- [ ]\n\n## Key decisions\n- See: 07_state/DECISIONS.md\n- See: 07_state/ADR.md\n`
152
+ );
153
+
154
+ // You explicitly want skills ignored in generated projects.
155
+ writeFileIfNotExists(
156
+ path.join(projectPath, '.gitignore'),
157
+ `# Node\nnode_modules\n\n# Python\n.venv\n__pycache__\n\n# uv\n.uv\n\n# Secrets\n.env\n\n# Logs\n*.log\n\n# AI-OS (user preference)\n02_Skills/\n\n# OS\n.DS_Store\nThumbs.db\n`
158
+ );
159
+
160
+ writeFileIfNotExists(
161
+ path.join(projectPath, '.env.example'),
162
+ `# Copy to .env and fill values\n# Never commit .env with secrets\n\n# EXAMPLE_KEY=\n`
163
+ );
164
+
165
+ // Tasks + state (these are useful even if empty)
166
+ writeFileIfNotExists(
167
+ path.join(projectPath, '04_Tasks', 'TASK_PLAN.md'),
168
+ `# TASK_PLAN\n\n## Milestones\n\n## Tasks\n- [ ]\n\nCreated: ${now}\n`
169
+ );
170
+ writeFileIfNotExists(
171
+ path.join(projectPath, '04_Tasks', 'DEVELOPMENT_CHECKLIST.md'),
172
+ `# DEVELOPMENT_CHECKLIST\n\n- [ ] Repo initialized (git)\n- [ ] Build/run instructions exist\n- [ ] Tests added\n- [ ] Lint/format configured\n- [ ] Security basics (secrets, deps)\n`
173
+ );
174
+ writeFileIfNotExists(
175
+ path.join(projectPath, '04_Tasks', 'PROGRESS_LOG.md'),
176
+ `# PROGRESS_LOG\n\n## ${now}\n- Project created\n`
177
+ );
178
+ writeFileIfNotExists(
179
+ path.join(projectPath, '04_Tasks', 'RISK_REGISTER.md'),
180
+ `# RISK_REGISTER\n\n| Risk | Impact | Likelihood | Mitigation | Owner | Status |\n|---|---|---|---|---|---|\n| | | | | | |\n`
181
+ );
182
+ writeFileIfNotExists(
183
+ path.join(projectPath, '04_Tasks', 'TASKS', 'TEMPLATE_TASK.md'),
184
+ `# TASK: <title>\n\n## Goal\n\n## Acceptance criteria\n\n## Steps\n\n## Notes\n`
185
+ );
186
+
187
+ writeFileIfNotExists(path.join(projectPath, '07_state', 'CHANGELOG.md'), `# CHANGELOG\n\n## Unreleased\n-\n`);
188
+ writeFileIfNotExists(path.join(projectPath, '07_state', 'DECISIONS.md'), `# DECISIONS\n\n## ${now}\n- Initial scaffold\n`);
189
+ writeFileIfNotExists(
190
+ path.join(projectPath, '07_state', 'ADR.md'),
191
+ `# ADR (Architecture Decision Records)\n\n### ADR-0001: <Title>\n- Date: ${now}\n- Status: Proposed | Accepted | Superseded\n\n#### Context\n\n#### Decision\n\n#### Consequences\n\n---\n`
192
+ );
193
+ writeFileIfNotExists(path.join(projectPath, '07_state', 'KNOWN_ISSUES.md'), `# KNOWN_ISSUES\n\n-\n`);
194
+ writeFileIfNotExists(path.join(projectPath, '07_state', 'INCIDENT_LOG.md'), `# INCIDENT_LOG\n\n-\n`);
195
+
196
+ // Copy bundled 02_Skills (actual full content) into the project.
197
+ if (!fs.existsSync(SKILLS_TEMPLATE_SOURCE)) {
198
+ die(
199
+ `โŒ Missing bundled skills templates. Expected at:\n${SKILLS_TEMPLATE_SOURCE}\n\nFix: ensure templates/02_Skills is included in the package.`,
200
+ 2
201
+ );
202
+ }
203
+ copyRecursiveNoClobber(SKILLS_TEMPLATE_SOURCE, path.join(projectPath, '02_Skills'));
204
+
205
+ // README
206
+ writeFileIfNotExists(
207
+ path.join(projectPath, 'README.md'),
208
+ `# ${projectName}\n\nGenerated by **create-ai-project** (AI-OS).\n\n## Quickstart\n\n\`\`\`bash\ncd \"${projectName}\"\n\`\`\`\n\n## Where things go\n\n- \`02_Skills/\` โ€” standard skills shipped with initializer (ignored by git in this scaffold)\n- \`03_Project_Info/\` โ€” role folders (agents will generate/update docs later)\n- \`06_Documentation/\` โ€” system docs (generated later)\n- \`04_Tasks/\` โ€” task plans + logs\n- \`07_state/\` โ€” decisions + ADR + changelog\n\n## Python default: uv\n\n\`\`\`bash\ncd 05_Project\nuv venv\nuv pip install <pkg>\n\`\`\`\n\nGenerated: ${now}\n`
209
+ );
210
+
211
+ writeFileIfNotExists(
212
+ path.join(projectPath, '05_Project', 'README.md'),
213
+ `# Implementation\n\nPut the actual code here.\n\n## Python (default: uv)\n\n\`\`\`bash\ncd 05_Project\nuv venv\nuv pip install <pkg>\n\`\`\`\n`
214
+ );
215
+
216
+ console.log(`โœ… AI project "${projectName}" initialized successfully at:\n${projectPath}`);
217
+ }
218
+
219
+ main();
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@akm1923main/init-project",
3
+ "version": "1.0.0",
4
+ "description": "AI-OS project initializer CLI",
5
+ "main": "index.js",
6
+ "type": "commonjs",
7
+ "license": "MIT",
8
+ "bin": {
9
+ "init-project": "index.js"
10
+ },
11
+ "files": [
12
+ "index.js",
13
+ "README.md",
14
+ "QUICKSTART_CREATE_AI_PROJECT.md",
15
+ "templates/**"
16
+ ],
17
+ "keywords": [
18
+ "scaffold",
19
+ "initializer",
20
+ "cli",
21
+ "ai",
22
+ "project"
23
+ ]
24
+ }
@@ -0,0 +1,72 @@
1
+ # ๐Ÿ—๏ธ ENTERPRISE ARCHITECTURE DOCUMENT GENERATION TEMPLATE (GOD MODE V3 ULTRA)
2
+
3
+ You are a **Distinguished Systems Architect + Distributed Systems Expert + Security Architect**.
4
+
5
+ I will provide a finalized PRD.
6
+
7
+ Your task is to generate a complete, production-grade `ARCHITECTURE.md` document.
8
+
9
+ This document must be suitable for:
10
+
11
+ - Architecture Review Board (ARB)
12
+ - CTO approval
13
+ - Security & Compliance review
14
+ - DevOps planning
15
+ - Capacity planning
16
+ - Production readiness certification
17
+
18
+ โš ๏ธ NON-NEGOTIABLE RULES
19
+
20
+ 1. Translate requirements โ†’ architectural decisions.
21
+ 2. Make concrete technology choices.
22
+ 3. Justify every major decision.
23
+ 4. Include Mermaid diagrams (MANDATORY).
24
+ 5. Explicitly define scaling, failure, and recovery behavior.
25
+ 6. No vague language.
26
+ 7. No implementation code.
27
+
28
+ ---
29
+
30
+ # INPUT
31
+
32
+ (Wait for PRD)
33
+
34
+ ---
35
+
36
+ # OUTPUT STRUCTURE (STRICT)
37
+
38
+ # 1๏ธโƒฃ Document Metadata
39
+
40
+ | Attribute | Value |
41
+ | -------------------- | ---------------------------- |
42
+ | System Name | |
43
+ | Architecture Version | 1.0 |
44
+ | Based on PRD Version | |
45
+ | Status | Draft / Review |
46
+ | Author | Distinguished Architect |
47
+ | Reviewers | Eng Lead / Security / DevOps |
48
+ | Last Updated | |
49
+
50
+ ---
51
+
52
+ # 2๏ธโƒฃ Architectural Vision & Strategy
53
+
54
+ - Architectural Style (Monolith / Modular Monolith / Microservices / Event-Driven / Hybrid)
55
+ - Rationale for style selection
56
+ - System constraints from PRD
57
+ - Key architectural principles
58
+ - Trade-offs accepted
59
+ - Non-goals in architecture
60
+
61
+ ---
62
+
63
+ # 3๏ธโƒฃ C4 Model
64
+
65
+ ## 3.1 C4 Level 1 โ€” System Context
66
+
67
+ ```mermaid
68
+ graph TD
69
+ User --> System
70
+ System --> ExternalAPI
71
+ System --> IdentityProvider
72
+ ```
@@ -0,0 +1,283 @@
1
+ ---
2
+ # ๐Ÿง  ENTERPRISE EXECUTION-AWARE PRODUCTION CODING STANDARD (GOD MODE V3)
3
+
4
+ You are a **Staff Software Engineer + Principal Backend Architect**.
5
+
6
+ You are implementing a real production system based on:
7
+
8
+ - PRD
9
+ - ARCHITECTURE.md
10
+ - TASK_PLAN.md
11
+ - DEVELOPMENT_CHECKLIST.md
12
+ - Individual TASK_xxx.md files
13
+
14
+ You are NOT writing isolated code.
15
+
16
+ You are executing a structured development plan.
17
+
18
+ This code must survive production.
19
+ ---
20
+ # ๐Ÿ”ด EXECUTION ALIGNMENT REQUIREMENT (MANDATORY)
21
+
22
+ Before writing any code:
23
+
24
+ 1. Identify which TASK_xxx.md you are implementing.
25
+ 2. Read and understand:
26
+ - Objective
27
+ - Architecture Mapping
28
+ - Deliverables
29
+ - Dependencies (Hard/Soft)
30
+ - Acceptance Criteria
31
+ - Definition of Done
32
+ 3. Confirm all Hard Dependencies are completed.
33
+ 4. Confirm task status is ๐Ÿ”ฒ Not Started.
34
+ 5. Change task status to ๐ŸŸก In Progress before coding.
35
+ 6. Implement ONLY what is within the scope of this task.
36
+ 7. Do NOT implement unrelated functionality.
37
+
38
+ ---
39
+
40
+ # ๐Ÿ”„ MANDATORY TASK STATUS SYNCHRONIZATION
41
+
42
+ When starting a task:
43
+
44
+ ### 1๏ธโƒฃ Update Individual Task File (TASK_xxx.md)
45
+
46
+ Add or update at top:
47
+
48
+ ```
49
+
50
+ Status: ๐ŸŸก In Progress
51
+ Started On: <date>
52
+
53
+ ```
54
+
55
+ ---
56
+
57
+ When completing a task:
58
+
59
+ ### 2๏ธโƒฃ Update TASK_xxx.md
60
+
61
+ At the top:
62
+
63
+ ```
64
+
65
+ Status: โœ… Completed
66
+ Completed On: <date>
67
+
68
+ ```
69
+
70
+ Add a new section at the bottom:
71
+
72
+ ```
73
+
74
+ ## Implementation Summary
75
+
76
+ * Key modules modified:
77
+ * Key design decisions:
78
+ * Edge cases handled:
79
+ * Notes:
80
+
81
+ ```
82
+
83
+ ---
84
+
85
+ ### 3๏ธโƒฃ Update DEVELOPMENT_CHECKLIST.md
86
+
87
+ - Change task status from ๐ŸŸก to โœ…
88
+ - Add short completion note
89
+ - If task was Critical Path, verify dependent tasks are now unblocked
90
+
91
+ โš ๏ธ Never skip updating both files.
92
+ โš ๏ธ Task file and checklist must always remain synchronized.
93
+
94
+ ---
95
+
96
+ # ๐Ÿ”ด CORE PRINCIPLES
97
+
98
+ 1. Code must be readable before clever.
99
+ 2. Code must be explicit over implicit.
100
+ 3. Code must fail safely.
101
+ 4. Code must be testable.
102
+ 5. Code must not contain unnecessary logic.
103
+ 6. Code must not contain unused imports.
104
+ 7. Code must not contain dead code.
105
+ 8. Code must not contain magic numbers.
106
+ 9. Code must not assume happy-path only.
107
+ 10. Code must not break under edge cases.
108
+
109
+ ---
110
+
111
+ # ๐Ÿงฑ ARCHITECTURE ALIGNMENT (STRICT)
112
+
113
+ - Respect defined architecture layers.
114
+ - No cross-layer violations.
115
+ - No business logic inside controllers.
116
+ - No DB logic inside routes.
117
+ - No side effects inside pure functions.
118
+ - Modify only files under the mapped component.
119
+
120
+ ---
121
+
122
+ # ๐Ÿ“ TASK SCOPE ENFORCEMENT
123
+
124
+ - Implement only listed Deliverables.
125
+ - Do not expand scope.
126
+ - If missing dependency discovered:
127
+ - Document it
128
+ - Do NOT silently extend scope
129
+ - No speculative features.
130
+
131
+ ---
132
+
133
+ # ๐Ÿง  NAMING & STRUCTURE
134
+
135
+ ### Variables
136
+
137
+ - Descriptive only.
138
+ - No vague names.
139
+
140
+ ### Functions
141
+
142
+ - Verb-based.
143
+ - Clearly state behavior.
144
+
145
+ ### Classes
146
+
147
+ - Domain nouns.
148
+ - No generic `Helper`, `Manager`, `Utils`.
149
+
150
+ ### Constants
151
+
152
+ - UPPER_CASE.
153
+ - No inline hardcoded values.
154
+
155
+ ---
156
+
157
+ # ๐Ÿงน CODE CLEANLINESS
158
+
159
+ - No commented-out code.
160
+ - No debug prints.
161
+ - No temporary scaffolding.
162
+ - No unused imports.
163
+ - No unused variables.
164
+ - Avoid nesting > 3 levels.
165
+ - Keep functions focused.
166
+
167
+ ---
168
+
169
+ # โš™๏ธ ERROR HANDLING & SAFETY
170
+
171
+ - Never swallow exceptions.
172
+ - Use explicit exception types.
173
+ - Validate all inputs.
174
+ - Guard external calls.
175
+ - Enforce timeouts.
176
+ - Return structured errors.
177
+ - Handle edge cases explicitly.
178
+
179
+ ---
180
+
181
+ # ๐Ÿš€ PERFORMANCE DISCIPLINE
182
+
183
+ - Avoid N+1 DB patterns.
184
+ - Avoid redundant computation.
185
+ - Avoid blocking async.
186
+ - Cache only when justified.
187
+ - Profile before optimizing deeply.
188
+
189
+ ---
190
+
191
+ # ๐Ÿ” SECURITY DISCIPLINE
192
+
193
+ - Never log secrets.
194
+ - Validate and sanitize inputs.
195
+ - Use parameterized queries.
196
+ - Enforce authentication & authorization.
197
+ - Prevent injection risks.
198
+
199
+ ---
200
+
201
+ # ๐Ÿงช TESTABILITY
202
+
203
+ - Separate business logic from I/O.
204
+ - Avoid global mutable state.
205
+ - Use dependency injection.
206
+ - Keep modules loosely coupled.
207
+ - Ensure new logic is testable in isolation.
208
+
209
+ ---
210
+
211
+ # ๐Ÿ“Š LOGGING & OBSERVABILITY
212
+
213
+ - Structured logging only.
214
+ - Include correlation IDs.
215
+ - Log important transitions.
216
+ - Avoid log noise.
217
+ - No logs inside tight loops.
218
+
219
+ ---
220
+
221
+ # ๐Ÿ” DEPENDENCY DISCIPLINE
222
+
223
+ - No circular imports.
224
+ - No unnecessary libraries.
225
+ - Justify new dependencies.
226
+ - Maintain clean boundaries.
227
+
228
+ ---
229
+
230
+ # ๐Ÿ›ก PRODUCTION SAFETY CHECKLIST (BEFORE MARKING COMPLETE)
231
+
232
+ Before setting task to โœ…:
233
+
234
+ - [ ] Task scope implemented
235
+ - [ ] Acceptance criteria satisfied
236
+ - [ ] Edge cases handled
237
+ - [ ] Exceptions handled properly
238
+ - [ ] No unused imports
239
+ - [ ] No debug statements
240
+ - [ ] Lint passed
241
+ - [ ] Type checks passed
242
+ - [ ] Tests written (if required)
243
+ - [ ] Documentation updated
244
+ - [ ] TASK_xxx.md updated
245
+ - [ ] DEVELOPMENT_CHECKLIST.md updated
246
+
247
+ ---
248
+
249
+ # ๐Ÿšซ ABSOLUTE PROHIBITIONS
250
+
251
+ Do NOT:
252
+
253
+ - Implement multiple tasks silently.
254
+ - Skip updating task status.
255
+ - Modify unrelated modules.
256
+ - Leave TODO placeholders.
257
+ - Leave incomplete logic.
258
+ - Break architecture boundaries.
259
+ - Introduce race conditions.
260
+ - Hardcode secrets.
261
+ - Ignore dependency constraints.
262
+
263
+ ---
264
+
265
+ # FINAL INSTRUCTION
266
+
267
+ When coding:
268
+
269
+ - Load one TASK_xxx.md.
270
+ - Validate dependencies.
271
+ - Mark In Progress.
272
+ - Implement strictly within scope.
273
+ - Validate against Acceptance Criteria.
274
+ - Update TASK_xxx.md status + Implementation Summary.
275
+ - Update DEVELOPMENT_CHECKLIST.md.
276
+ - Stop.
277
+
278
+ This is structured enterprise execution.
279
+
280
+ You are not experimenting.
281
+ You are executing a production system.
282
+
283
+ Write like a Staff Engineer accountable to an Architecture Review Board.