create-agentic-lemon 0.1.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 (50) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +61 -0
  3. package/bin/agentic-lemon.js +167 -0
  4. package/package.json +41 -0
  5. package/templates/AGENTS.md +40 -0
  6. package/templates/PROJECT_CONTEXT.md +29 -0
  7. package/templates/README.md +23 -0
  8. package/templates/context/architecture.md +19 -0
  9. package/templates/context/coding-style.md +18 -0
  10. package/templates/context/constraints.md +19 -0
  11. package/templates/context/database-schema.md +28 -0
  12. package/templates/context/glossary.md +5 -0
  13. package/templates/context/project-overview.md +21 -0
  14. package/templates/context/systems.md +17 -0
  15. package/templates/memory/changelog.md +5 -0
  16. package/templates/memory/decisions.md +13 -0
  17. package/templates/memory/preferences.md +19 -0
  18. package/templates/memory/recurring-corrections.md +7 -0
  19. package/templates/outputs/approved/.gitkeep +1 -0
  20. package/templates/outputs/debug-notes/.gitkeep +1 -0
  21. package/templates/outputs/drafts/.gitkeep +1 -0
  22. package/templates/outputs/snippets/.gitkeep +1 -0
  23. package/templates/references/external-docs.md +5 -0
  24. package/templates/references/links.md +5 -0
  25. package/templates/references/sources.md +5 -0
  26. package/templates/skills/database-work/common-errors.md +8 -0
  27. package/templates/skills/database-work/examples.md +12 -0
  28. package/templates/skills/database-work/learnings.md +5 -0
  29. package/templates/skills/database-work/query-patterns.md +12 -0
  30. package/templates/skills/database-work/skill.md +21 -0
  31. package/templates/skills/debugging/checklist.md +10 -0
  32. package/templates/skills/debugging/common-errors.md +7 -0
  33. package/templates/skills/debugging/examples.md +15 -0
  34. package/templates/skills/debugging/learnings.md +7 -0
  35. package/templates/skills/debugging/skill.md +22 -0
  36. package/templates/skills/documentation/examples.md +9 -0
  37. package/templates/skills/documentation/learnings.md +5 -0
  38. package/templates/skills/documentation/skill.md +19 -0
  39. package/templates/skills/documentation/style-guide.md +8 -0
  40. package/templates/skills/documentation/templates.md +16 -0
  41. package/templates/skills/report-generation/checklist.md +9 -0
  42. package/templates/skills/report-generation/examples.md +11 -0
  43. package/templates/skills/report-generation/learnings.md +5 -0
  44. package/templates/skills/report-generation/skill.md +19 -0
  45. package/templates/skills/report-generation/templates.md +11 -0
  46. package/templates/skills/software-development/checklist.md +10 -0
  47. package/templates/skills/software-development/examples.md +17 -0
  48. package/templates/skills/software-development/learnings.md +7 -0
  49. package/templates/skills/software-development/skill.md +26 -0
  50. package/templates/skills/software-development/templates.md +19 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ethereal Lemons
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,61 @@
1
+ # create-agentic-lemon
2
+
3
+ An agent-agnostic workspace generator that creates a reusable AI operating system folder structure.
4
+
5
+ Treat your AI assistant context as files and folders instead of transient, ephemeral chat history. This workspace structure helps any file-reading AI coding tool (ChatGPT, Claude, Cursor, Windsurf, Copilot, etc.) understand your project context, guidelines, workflows, decisions, and learnings instantly.
6
+
7
+ ## Usage
8
+
9
+ You can generate a workspace with a single command without installing the package:
10
+
11
+ ```bash
12
+ npm create agentic-lemon@latest my-workspace
13
+ ```
14
+
15
+ Or using `npx`:
16
+
17
+ ```bash
18
+ npx create-agentic-lemon@latest my-workspace
19
+ ```
20
+
21
+ Or install it globally and use either command alias:
22
+
23
+ ```bash
24
+ npm i -g create-agentic-lemon
25
+ agentic-lemon my-workspace
26
+ create-agentic-lemon my-workspace
27
+ ```
28
+
29
+ ### Options
30
+
31
+ * `--force`: Overwrite existing template files in the workspace (leaves other files intact).
32
+
33
+ ---
34
+
35
+ ## Workspace Structure
36
+
37
+ The generated workspace structure includes:
38
+
39
+ * **`AGENTS.md`**: Global operating rules for the AI.
40
+ * **`PROJECT_CONTEXT.md`**: High-level metadata about project scope, users, systems, constraints, and styling preferences.
41
+ * **`context/`**: Stable knowledge files (e.g. database schema, systems documentation, coding styles).
42
+ * **`skills/`**: Repeatable workflows documented as reusable playbooks (e.g. software development, debugging, reports).
43
+ * **`memory/`**: High-level cross-skill memory files including decisions, preferences, and recurring corrections.
44
+ * **`outputs/`**: Dedicated subdirectories for drafts, approved content, snippets, and debug notes.
45
+ * **`references/`**: Links to external documentation and sources.
46
+
47
+ ---
48
+
49
+ ## How to use with an AI Assistant
50
+
51
+ Open the generated workspace in your editor. In your AI chat window, prompt the AI:
52
+
53
+ > "Read AGENTS.md first, then PROJECT_CONTEXT.md, then any relevant files under context/ and skills/ before answering."
54
+
55
+ When the AI makes a mistake or you correct something reusable, save that learning in the respective skill's `learnings.md` or global `memory/recurring-corrections.md` so the AI remembers it next time!
56
+
57
+ ---
58
+
59
+ ## License
60
+
61
+ MIT
@@ -0,0 +1,167 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from 'fs';
4
+ import path from 'path';
5
+ import { fileURLToPath } from 'url';
6
+
7
+ const __filename = fileURLToPath(import.meta.url);
8
+ const __dirname = path.dirname(__filename);
9
+
10
+ // Helper to print usage/help
11
+ function printUsage() {
12
+ console.log(`
13
+ Usage:
14
+ npm create agentic-lemon@latest <workspace-name> [options]
15
+ npx create-agentic-lemon@latest <workspace-name> [options]
16
+ agentic-lemon <workspace-name> [options]
17
+ create-agentic-lemon <workspace-name> [options]
18
+
19
+ Options:
20
+ --force Overwrite existing files in the workspace (doesn't delete other files)
21
+ -h, --help Show this help message
22
+ `);
23
+ }
24
+
25
+ function logError(msg) {
26
+ console.error(`\x1b[31mError:\x1b[0m ${msg}`);
27
+ }
28
+
29
+ function logSuccess(msg) {
30
+ console.log(`\x1b[32mSuccess:\x1b[0m ${msg}`);
31
+ }
32
+
33
+ function logInfo(msg) {
34
+ console.log(msg);
35
+ }
36
+
37
+ function validateTargetPath(targetPath) {
38
+ if (fs.existsSync(targetPath)) {
39
+ if (!fs.statSync(targetPath).isDirectory()) {
40
+ throw new Error(`Target path exists and is not a directory: ${targetPath}`);
41
+ }
42
+
43
+ return;
44
+ }
45
+
46
+ let currentPath = path.dirname(targetPath);
47
+
48
+ while (currentPath !== path.dirname(currentPath)) {
49
+ if (fs.existsSync(currentPath)) {
50
+ if (!fs.statSync(currentPath).isDirectory()) {
51
+ throw new Error(`Cannot create workspace because parent path is not a directory: ${currentPath}`);
52
+ }
53
+
54
+ return;
55
+ }
56
+
57
+ currentPath = path.dirname(currentPath);
58
+ }
59
+ }
60
+
61
+ async function main() {
62
+ const args = process.argv.slice(2);
63
+
64
+ // Parse arguments
65
+ let targetDirName = null;
66
+ let force = false;
67
+ let showHelp = false;
68
+
69
+ for (const arg of args) {
70
+ if (arg === '--force') {
71
+ force = true;
72
+ } else if (arg === '--help' || arg === '-h') {
73
+ showHelp = true;
74
+ } else if (arg.startsWith('-')) {
75
+ logError(`Unknown option ${arg}`);
76
+ printUsage();
77
+ process.exit(1);
78
+ } else {
79
+ if (targetDirName === null) {
80
+ targetDirName = arg;
81
+ } else {
82
+ logError(`Unexpected argument: ${arg}`);
83
+ printUsage();
84
+ process.exit(1);
85
+ }
86
+ }
87
+ }
88
+
89
+ if (showHelp) {
90
+ printUsage();
91
+ process.exit(0);
92
+ }
93
+
94
+ // If targetDirName is omitted, default to 'agentic-os'
95
+ if (!targetDirName) {
96
+ targetDirName = 'agentic-os';
97
+ }
98
+
99
+ const targetPath = path.resolve(process.cwd(), targetDirName);
100
+ const templatesPath = path.resolve(__dirname, '../templates');
101
+
102
+ if (!fs.existsSync(templatesPath)) {
103
+ logError(`Templates directory not found at ${templatesPath}. Please ensure the package is installed correctly.`);
104
+ process.exit(1);
105
+ }
106
+
107
+ try {
108
+ validateTargetPath(targetPath);
109
+ } catch (err) {
110
+ logError(err.message);
111
+ process.exit(1);
112
+ }
113
+
114
+ logInfo(`Initializing Agentic OS workspace at \x1b[36m${targetPath}\x1b[0m...`);
115
+ if (force) {
116
+ logInfo('Running in force mode: existing template files will be overwritten.');
117
+ }
118
+
119
+ try {
120
+ // Recursive directory walker and copier
121
+ function copyRecursive(src, dest) {
122
+ const stats = fs.statSync(src);
123
+ if (stats.isDirectory()) {
124
+ if (!fs.existsSync(dest)) {
125
+ fs.mkdirSync(dest, { recursive: true });
126
+ }
127
+ const entries = fs.readdirSync(src);
128
+ for (const entry of entries) {
129
+ copyRecursive(path.join(src, entry), path.join(dest, entry));
130
+ }
131
+ } else {
132
+ const destDir = path.dirname(dest);
133
+ if (!fs.existsSync(destDir)) {
134
+ fs.mkdirSync(destDir, { recursive: true });
135
+ }
136
+
137
+ if (fs.existsSync(dest)) {
138
+ if (force) {
139
+ fs.copyFileSync(src, dest);
140
+ console.log(` \x1b[33m[Overwritten]\x1b[0m ${path.relative(targetPath, dest)}`);
141
+ } else {
142
+ console.log(` \x1b[90m[Skipped]\x1b[0m ${path.relative(targetPath, dest)} (already exists)`);
143
+ }
144
+ } else {
145
+ fs.copyFileSync(src, dest);
146
+ console.log(` \x1b[32m[Created]\x1b[0m ${path.relative(targetPath, dest)}`);
147
+ }
148
+ }
149
+ }
150
+
151
+ copyRecursive(templatesPath, targetPath);
152
+
153
+ logSuccess(`\nSuccessfully generated Agentic OS workspace!`);
154
+ logInfo(`
155
+ Next steps:
156
+ 1. cd ${targetDirName}
157
+ 2. Open AGENTS.md and PROJECT_CONTEXT.md to customize your workspace
158
+ 3. Reference AGENTS.md in your AI assistant chats to start using the OS
159
+ `);
160
+ process.exit(0);
161
+ } catch (err) {
162
+ logError(`Failed to generate workspace: ${err.message}`);
163
+ process.exit(1);
164
+ }
165
+ }
166
+
167
+ main();
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "create-agentic-lemon",
3
+ "version": "0.1.0",
4
+ "description": "Create an agent-agnostic AI operating system folder structure.",
5
+ "type": "module",
6
+ "bin": {
7
+ "agentic-lemon": "bin/agentic-lemon.js",
8
+ "create-agentic-lemon": "bin/agentic-lemon.js"
9
+ },
10
+ "scripts": {
11
+ "test": "node scripts/test.js",
12
+ "release:check": "node scripts/release-check.js",
13
+ "prepublishOnly": "node scripts/release-check.js --publish"
14
+ },
15
+ "files": [
16
+ "bin",
17
+ "templates"
18
+ ],
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/Ethereal-Lemons/agentic-lemon.git"
22
+ },
23
+ "bugs": {
24
+ "url": "https://github.com/Ethereal-Lemons/agentic-lemon/issues"
25
+ },
26
+ "homepage": "https://github.com/Ethereal-Lemons/agentic-lemon#readme",
27
+ "packageManager": "npm@11.13.0",
28
+ "engines": {
29
+ "node": ">=18.0.0"
30
+ },
31
+ "keywords": [
32
+ "ai",
33
+ "agents",
34
+ "agentic-os",
35
+ "agentic-lemon",
36
+ "ai-workspace",
37
+ "context-engineering",
38
+ "prompt-engineering"
39
+ ],
40
+ "license": "MIT"
41
+ }
@@ -0,0 +1,40 @@
1
+ # AI Operating Rules
2
+
3
+ This workspace is agent-agnostic. Any AI assistant can use it by reading these files before performing work.
4
+
5
+ ## How to Use This Workspace
6
+
7
+ 1. Read this file first.
8
+ 2. Read `PROJECT_CONTEXT.md`.
9
+ 3. Read relevant files inside `context/`.
10
+ 4. Choose the most relevant skill inside `skills/`.
11
+ 5. Check that skill's `learnings.md` before answering.
12
+ 6. Produce the requested output.
13
+ 7. When the user corrects something reusable, suggest adding it to the relevant `learnings.md` file.
14
+
15
+ ## Global Rules
16
+
17
+ - Be direct and practical.
18
+ - Prefer complete, usable outputs over partial suggestions.
19
+ - Preserve existing project structure unless the user asks for refactoring.
20
+ - Do not remove existing filters, rules, or validations unless explicitly requested.
21
+ - State assumptions when information is missing.
22
+ - Do not expose secrets, credentials, tokens, private keys, or sensitive data.
23
+ - Use project terminology from `context/glossary.md` when available.
24
+ - Check `memory/recurring-corrections.md` before finalizing technical work.
25
+
26
+ ## Output Rules
27
+
28
+ - For code, provide complete files or clear replacement blocks.
29
+ - For SQL, provide runnable queries or procedures.
30
+ - For documentation, use clean Markdown.
31
+ - For debugging, explain the root cause and the fix.
32
+ - For reports, clarify date ranges, sorting, and filters.
33
+
34
+ ## Learning Rules
35
+
36
+ When a correction is likely to matter again:
37
+
38
+ - Add it to the related skill's `learnings.md`.
39
+ - If it applies globally, add it to `memory/recurring-corrections.md`.
40
+ - If it records a major direction, add it to `memory/decisions.md`.
@@ -0,0 +1,29 @@
1
+ # Project Context
2
+
3
+ ## Project Name
4
+
5
+ <!-- Add project name here -->
6
+
7
+ ## Purpose
8
+
9
+ <!-- Explain what this workspace is for -->
10
+
11
+ ## Main Users
12
+
13
+ <!-- Who uses this project/system/workflow? -->
14
+
15
+ ## Main Systems
16
+
17
+ <!-- List important systems, apps, databases, websites, services, or workflows -->
18
+
19
+ ## Important Constraints
20
+
21
+ <!-- Add constraints the AI must respect -->
22
+
23
+ ## Preferred Style
24
+
25
+ <!-- Explain preferred tone, detail level, formatting, and output style -->
26
+
27
+ ## Things the AI Should Avoid
28
+
29
+ <!-- Add common mistakes or things not to do -->
@@ -0,0 +1,23 @@
1
+ # AI Agentic OS Workspace
2
+
3
+ Welcome to your Agentic OS workspace! This folder structure is designed to organize context, workflows, rules, and memory for any AI assistant (ChatGPT, Claude, Cursor, Windsurf, Copilot, etc.) that you pair program or collaborate with.
4
+
5
+ ## Directory Structure Overview
6
+
7
+ - **`AGENTS.md`**: Global operating rules for the AI.
8
+ - **`PROJECT_CONTEXT.md`**: High-level details about the project, target audience, systems, and guidelines.
9
+ - **`context/`**: Slow-changing, stable knowledge about database schemas, system architecture, API guidelines, glossary, etc.
10
+ - **`skills/`**: Repeatable workflows (software development, database queries, report generation, debugging, etc.). Each skill contains its process guidelines, examples, templates, checklists, and persistent learnings.
11
+ - **`memory/`**: High-level cross-skill memory including architecture decisions, preferences, and recurring corrections.
12
+ - **`outputs/`**: Workspace for AI-generated drafts, approved deliverables, code snippets, and debugging notes.
13
+ - **`references/`**: Links to external documentation, source references, and APIs.
14
+
15
+ ## How to use with an AI Assistant
16
+
17
+ Start your conversation or chat session by prompting the AI:
18
+
19
+ ```txt
20
+ Read AGENTS.md first, then PROJECT_CONTEXT.md, then any relevant files under context/ and skills/ before answering.
21
+ ```
22
+
23
+ When you correct an AI's behavior or logic, save that learning in the respective skill's `learnings.md` or the global `memory/recurring-corrections.md` file so the AI remembers it next time!
@@ -0,0 +1,19 @@
1
+ # Architecture
2
+
3
+ ## Overview
4
+
5
+ <!-- Describe the architecture at a high level -->
6
+
7
+ ## Components
8
+
9
+ | Component | Purpose | Notes |
10
+ |---|---|---|
11
+ | | | |
12
+
13
+ ## Data Flow
14
+
15
+ <!-- Describe how data moves through the system -->
16
+
17
+ ## Integrations
18
+
19
+ <!-- List external services, APIs, databases, or tools -->
@@ -0,0 +1,18 @@
1
+ # Coding Style
2
+
3
+ ## General
4
+
5
+ - Keep code readable.
6
+ - Prefer explicit names.
7
+ - Avoid unnecessary abstractions.
8
+ - Preserve existing behavior unless asked to change it.
9
+
10
+ ## Error Handling
11
+
12
+ - Handle missing or null values safely.
13
+ - Avoid undefined indexes or unsafe assumptions.
14
+
15
+ ## Formatting
16
+
17
+ - Keep indentation consistent with the existing file.
18
+ - Return complete replacement code when requested.
@@ -0,0 +1,19 @@
1
+ # Constraints
2
+
3
+ ## Technical Constraints
4
+
5
+ -
6
+
7
+ ## Business Constraints
8
+
9
+ -
10
+
11
+ ## Security Constraints
12
+
13
+ - Do not expose credentials.
14
+ - Do not log secrets.
15
+ - Do not commit private keys or tokens.
16
+
17
+ ## Output Constraints
18
+
19
+ -
@@ -0,0 +1,28 @@
1
+ # Database Schema
2
+
3
+ ## Databases
4
+
5
+ | Database | Purpose | Notes |
6
+ |---|---|---|
7
+ | | | |
8
+
9
+ ## Tables
10
+
11
+ ### Example Table
12
+
13
+ ```sql
14
+ example_table
15
+ - id
16
+ - name
17
+ - created_at
18
+ ```
19
+
20
+ ## Relationships
21
+
22
+ -
23
+
24
+ ## Query Rules
25
+
26
+ - Be careful with date sorting.
27
+ - Preserve existing filters unless explicitly asked to remove them.
28
+ - Prefer clear aliases.
@@ -0,0 +1,5 @@
1
+ # Glossary
2
+
3
+ | Term | Meaning | Notes |
4
+ |---|---|---|
5
+ | | | |
@@ -0,0 +1,21 @@
1
+ # Project Overview
2
+
3
+ ## Summary
4
+
5
+ This folder contains reusable context for AI-assisted work.
6
+
7
+ ## Goals
8
+
9
+ - Reduce repeated explanations.
10
+ - Keep AI output consistent.
11
+ - Document repeatable workflows.
12
+ - Preserve useful corrections.
13
+ - Store approved outputs.
14
+
15
+ ## Current Priorities
16
+
17
+ -
18
+
19
+ ## Known Risks
20
+
21
+ -
@@ -0,0 +1,17 @@
1
+ # Systems
2
+
3
+ Document important systems here.
4
+
5
+ ## System Template
6
+
7
+ ### System Name
8
+
9
+ Purpose:
10
+
11
+ Main files:
12
+
13
+ Main database tables:
14
+
15
+ Known issues:
16
+
17
+ Important rules:
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## YYYY-MM-DD
4
+
5
+ -
@@ -0,0 +1,13 @@
1
+ # Decisions
2
+
3
+ Track important decisions here.
4
+
5
+ ## Format
6
+
7
+ ### YYYY-MM-DD — Decision Title
8
+
9
+ Decision:
10
+
11
+ Reason:
12
+
13
+ Impact:
@@ -0,0 +1,19 @@
1
+ # Preferences
2
+
3
+ Track user or team preferences here.
4
+
5
+ ## Communication
6
+
7
+ -
8
+
9
+ ## Code
10
+
11
+ -
12
+
13
+ ## Documentation
14
+
15
+ -
16
+
17
+ ## Reports
18
+
19
+ -
@@ -0,0 +1,7 @@
1
+ # Recurring Corrections
2
+
3
+ Track corrections that apply across the whole workspace.
4
+
5
+ ## Corrections
6
+
7
+ -
@@ -0,0 +1 @@
1
+ # Keep directory in git
@@ -0,0 +1 @@
1
+ # Keep directory in git
@@ -0,0 +1 @@
1
+ # Keep directory in git
@@ -0,0 +1 @@
1
+ # Keep directory in git
@@ -0,0 +1,5 @@
1
+ # External Documentation
2
+
3
+ Summaries or references to external library/framework documentation.
4
+
5
+ -
@@ -0,0 +1,5 @@
1
+ # Links
2
+
3
+ A directory of useful URLs and portals for the project.
4
+
5
+ - [Main Repository](https://github.com/Ethereal-Lemons)
@@ -0,0 +1,5 @@
1
+ # Sources
2
+
3
+ Documentation, technical specifications, and reference materials.
4
+
5
+ -
@@ -0,0 +1,8 @@
1
+ # Common Database Errors
2
+
3
+ Keep track of query errors and performance pitfalls.
4
+
5
+ ## Pitfall: Implicit Type Conversion
6
+ - **Symptom:** Index is ignored, leading to slow queries.
7
+ - **Cause:** Comparing numeric field to string value or vice-versa.
8
+ - **Fix:** Ensure matching data types.
@@ -0,0 +1,12 @@
1
+ # Database Work Examples
2
+
3
+ Approved examples of high-performing and correct queries.
4
+
5
+ ## Example: Inclusive Date Filtering
6
+
7
+ ```sql
8
+ SELECT id, email, created_at
9
+ FROM users
10
+ WHERE created_at >= '2026-01-01 00:00:00'
11
+ AND created_at < '2026-02-01 00:00:00'; -- Note: Exclusive upper bound to capture entire last day safely
12
+ ```
@@ -0,0 +1,5 @@
1
+ # Database Work Learnings
2
+
3
+ Record resolved DB issues and learnings.
4
+
5
+ -
@@ -0,0 +1,12 @@
1
+ # Database Query Patterns
2
+
3
+ Common query templates for analytics, reporting, and management.
4
+
5
+ ## Pattern: Pagination
6
+
7
+ ```sql
8
+ SELECT id, name
9
+ FROM products
10
+ ORDER BY name ASC
11
+ LIMIT :limit OFFSET :offset;
12
+ ```
@@ -0,0 +1,21 @@
1
+ # Skill: Database Work
2
+
3
+ Use this skill when creating, fixing, or reviewing SQL queries, stored procedures, reports, migrations, or database-related logic.
4
+
5
+ ## Process
6
+
7
+ 1. Identify the database engine.
8
+ 2. Identify the target tables and columns.
9
+ 3. Preserve filters unless the user asks to remove them.
10
+ 4. Check joins carefully.
11
+ 5. Check date handling carefully.
12
+ 6. Avoid sorting formatted date strings.
13
+ 7. Return complete runnable SQL when requested.
14
+
15
+ ## Common Mistakes
16
+
17
+ - Ordering formatted dates as strings.
18
+ - Missing join conditions.
19
+ - Filtering after a left join in a way that turns it into an inner join.
20
+ - Forgetting null handling.
21
+ - Removing business filters accidentally.
@@ -0,0 +1,10 @@
1
+ # Debugging Checklist
2
+
3
+ Follow these steps when diagnosing an issue:
4
+
5
+ - [ ] Replicate the bug: Can you trigger it reliably?
6
+ - [ ] Read the logs: Check stack traces, console messages, network calls, and database logs.
7
+ - [ ] Isolate the cause: Is the issue frontend, backend, database, network, or environment?
8
+ - [ ] Confirm inputs: Are variables or params formatted correctly?
9
+ - [ ] Formulate fix: Implement a minimal, safe, targeted fix.
10
+ - [ ] Double-check: Make sure the fix doesn't break related modules.
@@ -0,0 +1,7 @@
1
+ # Common Errors
2
+
3
+ A list of frequently occurring errors and their general resolution guides.
4
+
5
+ ## Error: Permission Denied on File Write
6
+ - **Cause:** Process does not have write permissions for the target directory.
7
+ - **Fix:** Verify user permissions, check ownership of folder, or run with appropriate elevated context.
@@ -0,0 +1,15 @@
1
+ # Debugging Examples
2
+
3
+ Store examples of successfully debugged issues, detailing the symptoms, root cause, and fix.
4
+
5
+ ## Example: Null Pointer Exception on User profile
6
+
7
+ ### Symptoms
8
+ - 500 error when clicking Profile page.
9
+ - Console error: `Cannot read properties of undefined (reading 'name')`.
10
+
11
+ ### Root Cause
12
+ - Profile data loader was returning `null` for users without complete profiles, and the UI was trying to read `user.name` without a safety check.
13
+
14
+ ### Fix
15
+ - Used optional chaining (`user?.name`) and loaded fallback default details.
@@ -0,0 +1,7 @@
1
+ # Debugging Learnings
2
+
3
+ Keep track of learnings from resolved debugging sessions.
4
+
5
+ ## Debugging History & Tips
6
+
7
+ -
@@ -0,0 +1,22 @@
1
+ # Skill: Debugging
2
+
3
+ Use this skill when investigating errors, broken behavior, missing UI elements, incorrect results, or failed commands.
4
+
5
+ ## Process
6
+
7
+ 1. Identify the expected behavior.
8
+ 2. Identify the actual behavior.
9
+ 3. Locate the most likely failure point.
10
+ 4. Check conditions, permissions, paths, imports, sessions, and data inputs.
11
+ 5. Propose the smallest safe fix.
12
+ 6. Include verification steps.
13
+
14
+ ## Common Checks
15
+
16
+ - Is the condition true?
17
+ - Is the variable defined?
18
+ - Is the file loaded?
19
+ - Is the query returning data?
20
+ - Is the user allowed to see the element?
21
+ - Is the date being treated as a string?
22
+ - Is an old cached file being used?
@@ -0,0 +1,9 @@
1
+ # Documentation Examples
2
+
3
+ Examples of well-formatted markdown.
4
+
5
+ ## Example: Inline Alerts
6
+ Use alerts to highlight critical information:
7
+
8
+ > [!IMPORTANT]
9
+ > Always verify database credentials before deploying changes to staging or production.
@@ -0,0 +1,5 @@
1
+ # Documentation Learnings
2
+
3
+ History of feedback and modifications made to formatting rules.
4
+
5
+ -
@@ -0,0 +1,19 @@
1
+ # Skill: Documentation
2
+
3
+ Use this skill when writing README files, specs, guides, implementation notes, SOPs, or handoff documents.
4
+
5
+ ## Process
6
+
7
+ 1. Identify the audience.
8
+ 2. Identify the purpose.
9
+ 3. Organize information by task or concept.
10
+ 4. Use headings and examples.
11
+ 5. Keep instructions actionable.
12
+ 6. Include assumptions and limitations.
13
+
14
+ ## Style
15
+
16
+ - Clear.
17
+ - Practical.
18
+ - Structured.
19
+ - Easy to scan.
@@ -0,0 +1,8 @@
1
+ # Style Guide
2
+
3
+ Guidelines for tone, layout, and visual formatting in documents.
4
+
5
+ ## Markdown Guidelines
6
+ - Always use a single `#` header per page.
7
+ - Keep list items concise.
8
+ - Use code fences with appropriate language markers (e.g. ` ```js `).
@@ -0,0 +1,16 @@
1
+ # Documentation Templates
2
+
3
+ Templates for different kinds of documents.
4
+
5
+ ## Template: Guide / SOP
6
+
7
+ ```markdown
8
+ # SOP: [Title]
9
+
10
+ ## Purpose
11
+ [State the purpose of this SOP]
12
+
13
+ ## Step-by-Step Instructions
14
+ 1. Step 1
15
+ 2. Step 2
16
+ ```
@@ -0,0 +1,9 @@
1
+ # Report Generation Checklist
2
+
3
+ Verify report correctness using the checklist below:
4
+
5
+ - [ ] Is the timezone specified (e.g. UTC, EST)?
6
+ - [ ] Are date ranges explicitly stated?
7
+ - [ ] Are column names clear and formatted consistently?
8
+ - [ ] Is the sorting correct?
9
+ - [ ] Have you verified the query or source calculations?
@@ -0,0 +1,11 @@
1
+ # Report Generation Examples
2
+
3
+ Examples of clear report formatting.
4
+
5
+ ## Example: Weekly Active Users
6
+
7
+ Period: 2026-06-01 to 2026-06-07 (inclusive)
8
+
9
+ | Week | Active Users | Change |
10
+ |---|---|---|
11
+ | Week 22 | 1,420 | +12% |
@@ -0,0 +1,5 @@
1
+ # Report Generation Learnings
2
+
3
+ Record learnings and feedback from reports.
4
+
5
+ -
@@ -0,0 +1,19 @@
1
+ # Skill: Report Generation
2
+
3
+ Use this skill when creating reports, exports, summaries, dashboards, or spreadsheet-ready outputs.
4
+
5
+ ## Process
6
+
7
+ 1. Confirm the report period.
8
+ 2. Confirm sorting direction.
9
+ 3. Identify required filters.
10
+ 4. Identify required columns.
11
+ 5. Check date boundaries.
12
+ 6. Make output easy to export or paste.
13
+
14
+ ## Report Rules
15
+
16
+ - Always clarify whether dates are inclusive or exclusive.
17
+ - Use real date values for sorting.
18
+ - Use clear column names.
19
+ - Preserve important filters.
@@ -0,0 +1,11 @@
1
+ # Report Generation Templates
2
+
3
+ Standard templates for dashboards and documents.
4
+
5
+ ## Template: CSV / Table format
6
+
7
+ ```markdown
8
+ | Date | User ID | Action | Status |
9
+ |---|---|---|---|
10
+ | YYYY-MM-DD | 12345 | Action Name | Success |
11
+ ```
@@ -0,0 +1,10 @@
1
+ # Software Development Checklist
2
+
3
+ Run this checklist before submitting or approving any code changes:
4
+
5
+ - [ ] Does the code build and compile without errors/warnings?
6
+ - [ ] Are all variables, modules, and dependencies correctly imported?
7
+ - [ ] Have you preserved existing code style and naming conventions?
8
+ - [ ] Does it work correctly for edge cases (null inputs, empty lists, extreme values)?
9
+ - [ ] Are secrets or config tokens properly externalized instead of hardcoded?
10
+ - [ ] Have you tested the changes?
@@ -0,0 +1,17 @@
1
+ # Software Development Examples
2
+
3
+ This file contains approved examples of high-quality code patterns, design solutions, and before/after diffs.
4
+
5
+ ## Example 1: Clear, Small Functions
6
+
7
+ ### Good Pattern
8
+ Keep functions single-purpose and check inputs early:
9
+
10
+ ```js
11
+ function calculateTotal(items) {
12
+ if (!Array.isArray(items)) {
13
+ throw new TypeError('Expected items to be an array');
14
+ }
15
+ return items.reduce((sum, item) => sum + (item.price * item.quantity), 0);
16
+ }
17
+ ```
@@ -0,0 +1,7 @@
1
+ # Software Development Learnings
2
+
3
+ Document persistent corrections, preferences, and lessons learned from past mistakes here.
4
+
5
+ ## General Learnings
6
+
7
+ -
@@ -0,0 +1,26 @@
1
+ # Skill: Software Development
2
+
3
+ Use this skill when writing, modifying, reviewing, or explaining code.
4
+
5
+ ## Required Inputs
6
+
7
+ - Target language or framework.
8
+ - Existing code or expected behavior.
9
+ - Error message, if available.
10
+ - Constraints or compatibility requirements.
11
+
12
+ ## Process
13
+
14
+ 1. Read relevant project context.
15
+ 2. Identify the exact requested change.
16
+ 3. Preserve existing behavior unless asked otherwise.
17
+ 4. Make the smallest safe change that solves the issue.
18
+ 5. Check for syntax errors and obvious runtime issues.
19
+ 6. Provide complete code or a clear replacement block.
20
+
21
+ ## Output Format
22
+
23
+ - Explain the issue briefly.
24
+ - Provide the fixed code.
25
+ - Mention any assumptions.
26
+ - Mention any follow-up checks only when needed.
@@ -0,0 +1,19 @@
1
+ # Software Development Templates
2
+
3
+ Store common boilerplate files or standard templates here.
4
+
5
+ ## Template: New JavaScript Module
6
+
7
+ ```js
8
+ /**
9
+ * Module description goes here.
10
+ */
11
+
12
+ /**
13
+ * Main function.
14
+ * @returns {void}
15
+ */
16
+ export function init() {
17
+ // logic here
18
+ }
19
+ ```