omgkit 2.17.0 → 2.19.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.
- package/README.md +33 -0
- package/lib/cli.js +2 -1
- package/package.json +1 -1
- package/plugin/agents/brainstormer.md +1 -1
- package/plugin/agents/project-manager.md +31 -0
- package/plugin/commands/git/cm.md +4 -0
- package/plugin/commands/sprint/sprint-new.md +1 -1
- package/plugin/registry.yaml +4 -4
- package/plugin/stdrules/omgkit/OMGKIT_BEFORE_COMMIT_RULES.md +367 -0
- package/templates/stdrules/BEFORE_COMMIT.md +232 -0
- /package/plugin/stdrules/{ALIGNMENT_PRINCIPLE.md → omgkit/ALIGNMENT_PRINCIPLE.md} +0 -0
package/README.md
CHANGED
|
@@ -424,6 +424,38 @@ omgkit uninstall # Remove plugin
|
|
|
424
424
|
omgkit help # Show help
|
|
425
425
|
```
|
|
426
426
|
|
|
427
|
+
## ✅ Before-Commit Validation
|
|
428
|
+
|
|
429
|
+
OMGKIT provides two types of before-commit rules:
|
|
430
|
+
|
|
431
|
+
| Rule Type | Location | Purpose |
|
|
432
|
+
|-----------|----------|---------|
|
|
433
|
+
| **OMGKIT Internal** | `plugin/stdrules/omgkit/` | For OMGKIT contributors |
|
|
434
|
+
| **Project Rules** | `.omgkit/stdrules/BEFORE_COMMIT.md` | For your projects |
|
|
435
|
+
|
|
436
|
+
### For OMGKIT Contributors
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
npm test # Run all 4800+ validation tests
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
| Category | Requirement |
|
|
443
|
+
|----------|-------------|
|
|
444
|
+
| **Agents** | 50+ lines, valid frontmatter, skills/commands arrays |
|
|
445
|
+
| **Commands** | 15+ lines, description, registered as slash command |
|
|
446
|
+
| **Skills** | 30+ lines, name/description if frontmatter present |
|
|
447
|
+
| **Workflows** | 50+ lines, description, agents array |
|
|
448
|
+
|
|
449
|
+
### For Project Developers
|
|
450
|
+
|
|
451
|
+
When you run `omgkit init`, a comprehensive `BEFORE_COMMIT.md` is created with:
|
|
452
|
+
- Code quality checks
|
|
453
|
+
- Git commit standards
|
|
454
|
+
- Security guidelines
|
|
455
|
+
- Documentation requirements
|
|
456
|
+
|
|
457
|
+
See [full documentation](https://omgkit.mintlify.app/resources/before-commit).
|
|
458
|
+
|
|
427
459
|
## 📁 Project Structure
|
|
428
460
|
|
|
429
461
|
After `omgkit init`:
|
|
@@ -441,6 +473,7 @@ your-project/
|
|
|
441
473
|
│ ├── logs/ # Activity logs
|
|
442
474
|
│ ├── devlogs/ # Development logs, planning, tracking (git-ignored)
|
|
443
475
|
│ └── stdrules/ # Standards & rules for the project
|
|
476
|
+
│ ├── BEFORE_COMMIT.md # Before-commit checklist
|
|
444
477
|
│ └── SKILL_STANDARDS.md
|
|
445
478
|
└── OMEGA.md # Project context
|
|
446
479
|
```
|
package/lib/cli.js
CHANGED
|
@@ -395,7 +395,8 @@ export function initProject(options = {}) {
|
|
|
395
395
|
{ src: 'settings.json', dest: '.omgkit/settings.json' },
|
|
396
396
|
{ src: 'devlogs/README.md', dest: '.omgkit/devlogs/README.md' },
|
|
397
397
|
{ src: 'stdrules/README.md', dest: '.omgkit/stdrules/README.md' },
|
|
398
|
-
{ src: 'stdrules/SKILL_STANDARDS.md', dest: '.omgkit/stdrules/SKILL_STANDARDS.md' }
|
|
398
|
+
{ src: 'stdrules/SKILL_STANDARDS.md', dest: '.omgkit/stdrules/SKILL_STANDARDS.md' },
|
|
399
|
+
{ src: 'stdrules/BEFORE_COMMIT.md', dest: '.omgkit/stdrules/BEFORE_COMMIT.md' }
|
|
399
400
|
];
|
|
400
401
|
|
|
401
402
|
templates.forEach(({ src, dest }) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: brainstormer
|
|
3
|
-
description: Creative exploration
|
|
3
|
+
description: Creative exploration agent specialized for ideation, brainstorming sessions, and systematic option generation for complex problems.
|
|
4
4
|
tools: Read, WebSearch, Glob
|
|
5
5
|
model: inherit
|
|
6
6
|
skills:
|
|
@@ -44,3 +44,34 @@ You coordinate and track progress.
|
|
|
44
44
|
- Track dependencies
|
|
45
45
|
- Manage blockers
|
|
46
46
|
- Report progress
|
|
47
|
+
|
|
48
|
+
## Project Tracking Process
|
|
49
|
+
|
|
50
|
+
### Daily Standup Template
|
|
51
|
+
```markdown
|
|
52
|
+
## Daily Update: [Date]
|
|
53
|
+
|
|
54
|
+
### Yesterday
|
|
55
|
+
- Completed: [List completed tasks]
|
|
56
|
+
- Agents involved: [Names]
|
|
57
|
+
|
|
58
|
+
### Today
|
|
59
|
+
- Planned: [List planned tasks]
|
|
60
|
+
- Assigned to: [Agent names]
|
|
61
|
+
|
|
62
|
+
### Blockers
|
|
63
|
+
- [Issue]: [Proposed resolution]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Sprint Planning
|
|
67
|
+
1. Review backlog
|
|
68
|
+
2. Estimate complexity
|
|
69
|
+
3. Assign to agents
|
|
70
|
+
4. Set success criteria
|
|
71
|
+
5. Track progress daily
|
|
72
|
+
|
|
73
|
+
## Decision Log
|
|
74
|
+
Track key decisions with:
|
|
75
|
+
- Context and options
|
|
76
|
+
- Decision rationale
|
|
77
|
+
- Owner and date
|
package/plugin/registry.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# OMGKIT Component Registry
|
|
2
2
|
# Single Source of Truth for Agents, Skills, Commands, Workflows, and MCPs
|
|
3
|
-
# Version: 2.
|
|
3
|
+
# Version: 2.19.0
|
|
4
4
|
# Updated: 2026-01-02
|
|
5
5
|
|
|
6
|
-
version: "2.
|
|
6
|
+
version: "2.19.0"
|
|
7
7
|
|
|
8
8
|
# =============================================================================
|
|
9
9
|
# OPTIMIZED ALIGNMENT PRINCIPLE (OAP)
|
|
10
10
|
# =============================================================================
|
|
11
11
|
# Core architectural rule defining component relationships.
|
|
12
|
-
# See: plugin/stdrules/ALIGNMENT_PRINCIPLE.md for full documentation.
|
|
12
|
+
# See: plugin/stdrules/omgkit/ALIGNMENT_PRINCIPLE.md for full documentation.
|
|
13
13
|
#
|
|
14
14
|
# Hierarchy (lower levels are used by higher levels):
|
|
15
15
|
# Level 0: MCPs → Foundation layer
|
|
@@ -29,7 +29,7 @@ version: "2.17.0"
|
|
|
29
29
|
alignment_principle:
|
|
30
30
|
version: "1.0.0"
|
|
31
31
|
enforced: true
|
|
32
|
-
documentation: "plugin/stdrules/ALIGNMENT_PRINCIPLE.md"
|
|
32
|
+
documentation: "plugin/stdrules/omgkit/ALIGNMENT_PRINCIPLE.md"
|
|
33
33
|
hierarchy:
|
|
34
34
|
- level: 0
|
|
35
35
|
type: mcp
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
# OMGKIT Before-Commit Rules v1.0
|
|
2
|
+
|
|
3
|
+
> Comprehensive quality gates that MUST pass before any commit to OMGKIT.
|
|
4
|
+
> Run `npm test` to validate all rules automatically.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This document defines the mandatory validation checks that must pass before committing changes to OMGKIT. These rules ensure system integrity, documentation quality, and proper command registration.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Test Validation (MANDATORY)
|
|
15
|
+
|
|
16
|
+
All commits MUST pass the complete test suite:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npm test
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Minimum Requirements:**
|
|
23
|
+
- All tests must pass (0 failures)
|
|
24
|
+
- Current baseline: 3700+ tests
|
|
25
|
+
- Coverage must not decrease
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## 2. Registry Integrity
|
|
30
|
+
|
|
31
|
+
### 2.1 Registry Sync
|
|
32
|
+
|
|
33
|
+
The `registry.yaml` file must be synchronized with actual component files:
|
|
34
|
+
|
|
35
|
+
| Check | Description |
|
|
36
|
+
|-------|-------------|
|
|
37
|
+
| Agent Sync | All registered agents exist as `.md` files in `plugin/agents/` |
|
|
38
|
+
| Workflow Sync | All registered workflows exist as `.md` files in `plugin/workflows/` |
|
|
39
|
+
| Namespace Sync | All command namespaces in registry exist as directories |
|
|
40
|
+
| Category Sync | All skill categories in registry exist as directories |
|
|
41
|
+
|
|
42
|
+
**Validation Command:**
|
|
43
|
+
```bash
|
|
44
|
+
npm test -- tests/validation/registry-sync.test.js
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 2.2 Dependency Graph Integrity
|
|
48
|
+
|
|
49
|
+
All component references must be valid:
|
|
50
|
+
|
|
51
|
+
| Reference Type | Format | Example |
|
|
52
|
+
|----------------|--------|---------|
|
|
53
|
+
| Skill | `category/skill-name` | `methodology/writing-plans` |
|
|
54
|
+
| Command | `/namespace:command-name` | `/dev:feature` |
|
|
55
|
+
| Agent | `kebab-case` | `fullstack-developer` |
|
|
56
|
+
| Workflow | `category/workflow-name` | `development/feature` |
|
|
57
|
+
|
|
58
|
+
**Validation Command:**
|
|
59
|
+
```bash
|
|
60
|
+
npm test -- tests/validation/dependency-graph.test.js
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 3. Command Registration (CRITICAL)
|
|
66
|
+
|
|
67
|
+
### 3.1 Slash Command Requirements
|
|
68
|
+
|
|
69
|
+
Every command in OMGKIT MUST be registered as a Claude Code slash command. This means:
|
|
70
|
+
|
|
71
|
+
**File Location:**
|
|
72
|
+
- Commands must be in `plugin/commands/<namespace>/<command-name>.md`
|
|
73
|
+
- Namespace directory must exist
|
|
74
|
+
|
|
75
|
+
**Format Requirements:**
|
|
76
|
+
- Command ID format: `/namespace:command-name`
|
|
77
|
+
- All lowercase, hyphens for word separation
|
|
78
|
+
- Namespace must be registered in `registry.yaml` under `command_namespaces`
|
|
79
|
+
|
|
80
|
+
**Frontmatter Requirements:**
|
|
81
|
+
```yaml
|
|
82
|
+
---
|
|
83
|
+
description: Clear description of what the command does
|
|
84
|
+
argument-hint: <optional argument format>
|
|
85
|
+
allowed-tools: List, Of, Allowed, Tools
|
|
86
|
+
---
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### 3.2 Command Registration Checklist
|
|
90
|
+
|
|
91
|
+
| Requirement | Description |
|
|
92
|
+
|-------------|-------------|
|
|
93
|
+
| **File exists** | `plugin/commands/<namespace>/<name>.md` exists |
|
|
94
|
+
| **Namespace registered** | Namespace in `registry.yaml` `command_namespaces` |
|
|
95
|
+
| **Valid frontmatter** | Has `description` field |
|
|
96
|
+
| **Content present** | Body has usage instructions |
|
|
97
|
+
| **Format compliance** | Follows `/namespace:command-name` format |
|
|
98
|
+
|
|
99
|
+
### 3.3 Current Command Namespaces
|
|
100
|
+
|
|
101
|
+
All commands must belong to one of these registered namespaces:
|
|
102
|
+
|
|
103
|
+
| Namespace | Purpose |
|
|
104
|
+
|-----------|---------|
|
|
105
|
+
| `dev` | Development commands (feature, fix, test, tdd, review) |
|
|
106
|
+
| `planning` | Planning commands (plan, brainstorm, research, doc) |
|
|
107
|
+
| `git` | Git operations (commit, ship, pr, deploy) |
|
|
108
|
+
| `quality` | Quality commands (security-scan, refactor, optimize) |
|
|
109
|
+
| `omega` | Omega thinking (10x, 100x, 1000x, principles) |
|
|
110
|
+
| `sprint` | Sprint management (sprint-new, team-run, backlog) |
|
|
111
|
+
| `workflow` | Workflow triggers (feature, bug-fix, rag-development) |
|
|
112
|
+
| `auto` | Autonomous mode (init, start, approve, reject) |
|
|
113
|
+
| `context` | Context management (mode, index, load, checkpoint) |
|
|
114
|
+
| `design` | UI/UX design (screenshot, enhance, cro) |
|
|
115
|
+
| `alignment` | System alignment (health, deps) |
|
|
116
|
+
| `security` | Security commands (scan, audit) |
|
|
117
|
+
| `data` | Data commands (pipeline, quality) |
|
|
118
|
+
| `ml` | ML commands (train, evaluate) |
|
|
119
|
+
| `game` | Game dev commands (balance, optimize) |
|
|
120
|
+
| `iot` | IoT commands (provision) |
|
|
121
|
+
| `perf` | Performance commands (profile, benchmark) |
|
|
122
|
+
| `domain` | Domain modeling (analyze, map) |
|
|
123
|
+
| `platform` | Platform engineering (blueprint) |
|
|
124
|
+
| `sre` | SRE commands (dashboard) |
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 4. Documentation Quality Standards
|
|
129
|
+
|
|
130
|
+
### 4.1 Agent Documentation
|
|
131
|
+
|
|
132
|
+
**Minimum Requirements:**
|
|
133
|
+
|
|
134
|
+
| Field | Requirement |
|
|
135
|
+
|-------|-------------|
|
|
136
|
+
| File location | `plugin/agents/<agent-name>.md` |
|
|
137
|
+
| Frontmatter | `skills` and `commands` arrays |
|
|
138
|
+
| Description | 50-200 words explaining purpose |
|
|
139
|
+
| Responsibilities | 3-5 primary, 2-4 secondary |
|
|
140
|
+
| Minimum lines | 50+ lines of content |
|
|
141
|
+
|
|
142
|
+
**Required Sections:**
|
|
143
|
+
- Description/Overview
|
|
144
|
+
- Primary Responsibilities
|
|
145
|
+
- Skills Used
|
|
146
|
+
- Commands Triggered
|
|
147
|
+
- Usage Examples
|
|
148
|
+
|
|
149
|
+
### 4.2 Command Documentation
|
|
150
|
+
|
|
151
|
+
**Minimum Requirements:**
|
|
152
|
+
|
|
153
|
+
| Field | Requirement |
|
|
154
|
+
|-------|-------------|
|
|
155
|
+
| File location | `plugin/commands/<namespace>/<name>.md` |
|
|
156
|
+
| Frontmatter | `description`, `allowed-tools` |
|
|
157
|
+
| Description | Clear, actionable description |
|
|
158
|
+
| Minimum lines | 15+ lines of content |
|
|
159
|
+
|
|
160
|
+
**Required Frontmatter Fields:**
|
|
161
|
+
```yaml
|
|
162
|
+
---
|
|
163
|
+
description: What the command does (required)
|
|
164
|
+
argument-hint: Expected arguments (recommended)
|
|
165
|
+
allowed-tools: Comma-separated tool list (required)
|
|
166
|
+
---
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### 4.3 Skill Documentation
|
|
170
|
+
|
|
171
|
+
**Minimum Requirements:**
|
|
172
|
+
|
|
173
|
+
| Field | Requirement |
|
|
174
|
+
|-------|-------------|
|
|
175
|
+
| File location | `plugin/skills/<category>/<name>/SKILL.md` |
|
|
176
|
+
| Frontmatter | `name`, `description` |
|
|
177
|
+
| Description | Third-person, 50-150 words |
|
|
178
|
+
| Minimum lines | 30+ lines of content |
|
|
179
|
+
|
|
180
|
+
**Must Follow:** `plugin/stdrules/SKILL_STANDARDS.md`
|
|
181
|
+
|
|
182
|
+
### 4.4 Workflow Documentation
|
|
183
|
+
|
|
184
|
+
**Minimum Requirements:**
|
|
185
|
+
|
|
186
|
+
| Field | Requirement |
|
|
187
|
+
|-------|-------------|
|
|
188
|
+
| File location | `plugin/workflows/<category>/<name>.md` |
|
|
189
|
+
| Frontmatter | name, description, category, complexity, agents, skills, commands |
|
|
190
|
+
| Steps | Clear step-by-step process |
|
|
191
|
+
| Quality Gates | Completion checklist |
|
|
192
|
+
| Minimum lines | 50+ lines of content |
|
|
193
|
+
|
|
194
|
+
**Required Frontmatter Fields:**
|
|
195
|
+
```yaml
|
|
196
|
+
---
|
|
197
|
+
name: workflow-name
|
|
198
|
+
description: What the workflow accomplishes
|
|
199
|
+
category: workflow-category
|
|
200
|
+
complexity: low|medium|high|very-high
|
|
201
|
+
estimated-time: Time estimate
|
|
202
|
+
agents:
|
|
203
|
+
- agent-name
|
|
204
|
+
skills:
|
|
205
|
+
- category/skill-name
|
|
206
|
+
commands:
|
|
207
|
+
- /namespace:command-name
|
|
208
|
+
prerequisites:
|
|
209
|
+
- Prerequisite 1
|
|
210
|
+
---
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 5. Content Quality Rules
|
|
216
|
+
|
|
217
|
+
### 5.1 Prohibited Content
|
|
218
|
+
|
|
219
|
+
- No placeholder text: `TODO`, `FIXME`, `XXX`, `HACK`
|
|
220
|
+
- No empty sections
|
|
221
|
+
- No broken internal links
|
|
222
|
+
- No duplicate content across components
|
|
223
|
+
|
|
224
|
+
### 5.2 Required Content Elements
|
|
225
|
+
|
|
226
|
+
**Code Blocks:**
|
|
227
|
+
- Must have language specifier
|
|
228
|
+
- Must be properly indented
|
|
229
|
+
- Must be functional examples
|
|
230
|
+
|
|
231
|
+
**Links:**
|
|
232
|
+
- Internal links must be relative
|
|
233
|
+
- External links must be valid
|
|
234
|
+
- All referenced files must exist
|
|
235
|
+
|
|
236
|
+
### 5.3 Formatting Standards
|
|
237
|
+
|
|
238
|
+
- Use proper Markdown heading hierarchy (h1 > h2 > h3)
|
|
239
|
+
- Use consistent list formatting
|
|
240
|
+
- Use tables for structured data
|
|
241
|
+
- Use code blocks for commands/examples
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## 6. Cross-Reference Validation
|
|
246
|
+
|
|
247
|
+
### 6.1 Forward References (dependsOn)
|
|
248
|
+
|
|
249
|
+
All references in component frontmatter must point to existing components:
|
|
250
|
+
|
|
251
|
+
| Source | Reference Type | Target |
|
|
252
|
+
|--------|---------------|--------|
|
|
253
|
+
| Agent | skills | Skill files |
|
|
254
|
+
| Agent | commands | Command files |
|
|
255
|
+
| Workflow | agents | Agent files |
|
|
256
|
+
| Workflow | skills | Skill files |
|
|
257
|
+
| Workflow | commands | Command files |
|
|
258
|
+
|
|
259
|
+
### 6.2 Reverse References (usedBy)
|
|
260
|
+
|
|
261
|
+
The dependency graph must correctly compute:
|
|
262
|
+
|
|
263
|
+
| Component | usedBy |
|
|
264
|
+
|-----------|--------|
|
|
265
|
+
| Skill | Agents that use it, Workflows that include it |
|
|
266
|
+
| Command | Agents that trigger it, Workflows that include it |
|
|
267
|
+
| Agent | Workflows that orchestrate it |
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## 7. Version Management
|
|
272
|
+
|
|
273
|
+
### 7.1 Version Bump Requirements
|
|
274
|
+
|
|
275
|
+
When releasing:
|
|
276
|
+
- Bump `package.json` version
|
|
277
|
+
- Bump `plugin/registry.yaml` version
|
|
278
|
+
- Update version comment in registry header
|
|
279
|
+
|
|
280
|
+
### 7.2 Changelog
|
|
281
|
+
|
|
282
|
+
Document changes in commit message following conventional commits:
|
|
283
|
+
- `feat:` New features
|
|
284
|
+
- `fix:` Bug fixes
|
|
285
|
+
- `docs:` Documentation changes
|
|
286
|
+
- `chore:` Maintenance tasks
|
|
287
|
+
- `refactor:` Code refactoring
|
|
288
|
+
- `test:` Test additions/changes
|
|
289
|
+
|
|
290
|
+
---
|
|
291
|
+
|
|
292
|
+
## 8. Pre-Commit Checklist
|
|
293
|
+
|
|
294
|
+
### Quick Validation
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# Run all tests
|
|
298
|
+
npm test
|
|
299
|
+
|
|
300
|
+
# Check specific validations
|
|
301
|
+
npm test -- tests/validation/registry-sync.test.js
|
|
302
|
+
npm test -- tests/validation/dependency-graph.test.js
|
|
303
|
+
npm test -- tests/validation/before-commit.test.js
|
|
304
|
+
npm test -- tests/validation/doc-quality.test.js
|
|
305
|
+
npm test -- tests/validation/command-registration.test.js
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Manual Checklist
|
|
309
|
+
|
|
310
|
+
- [ ] All tests pass (`npm test`)
|
|
311
|
+
- [ ] Registry.yaml synced with actual files
|
|
312
|
+
- [ ] All commands registered as slash commands
|
|
313
|
+
- [ ] All command namespaces in registry
|
|
314
|
+
- [ ] Documentation meets quality standards
|
|
315
|
+
- [ ] No broken internal links
|
|
316
|
+
- [ ] Dependency graph valid
|
|
317
|
+
- [ ] Version bumped (if releasing)
|
|
318
|
+
- [ ] Docs regenerated (`npm run docs:generate`)
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## 9. Automated Validation
|
|
323
|
+
|
|
324
|
+
### Test Files
|
|
325
|
+
|
|
326
|
+
| Test File | Purpose |
|
|
327
|
+
|-----------|---------|
|
|
328
|
+
| `registry-sync.test.js` | Registry matches actual files |
|
|
329
|
+
| `dependency-graph.test.js` | Dependency references valid |
|
|
330
|
+
| `before-commit.test.js` | All pre-commit rules |
|
|
331
|
+
| `doc-quality.test.js` | Documentation quality |
|
|
332
|
+
| `command-registration.test.js` | Command slash registration |
|
|
333
|
+
| `format.test.js` | Format compliance |
|
|
334
|
+
| `alignment.test.js` | Alignment principle |
|
|
335
|
+
|
|
336
|
+
### Running Validation
|
|
337
|
+
|
|
338
|
+
```bash
|
|
339
|
+
# Full validation
|
|
340
|
+
npm test
|
|
341
|
+
|
|
342
|
+
# Quick validation (key tests only)
|
|
343
|
+
npm test -- tests/validation/before-commit.test.js
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## 10. Enforcement
|
|
349
|
+
|
|
350
|
+
### CI/CD Integration
|
|
351
|
+
|
|
352
|
+
These rules are enforced in CI:
|
|
353
|
+
- All tests must pass before merge
|
|
354
|
+
- Documentation must be regenerated
|
|
355
|
+
- Version must be bumped for releases
|
|
356
|
+
|
|
357
|
+
### Local Development
|
|
358
|
+
|
|
359
|
+
Before committing:
|
|
360
|
+
1. Run `npm test`
|
|
361
|
+
2. Fix any failures
|
|
362
|
+
3. Re-run until all pass
|
|
363
|
+
4. Commit with proper message
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
*Think Omega. Build Omega. Be Omega.*
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
# Before-Commit Checklist
|
|
2
|
+
|
|
3
|
+
This checklist defines validation rules and quality standards that must be met before committing changes to this project.
|
|
4
|
+
|
|
5
|
+
## Quick Check
|
|
6
|
+
|
|
7
|
+
Run before every commit:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Run tests
|
|
11
|
+
npm test
|
|
12
|
+
|
|
13
|
+
# Check for linting errors
|
|
14
|
+
npm run lint
|
|
15
|
+
|
|
16
|
+
# Build the project
|
|
17
|
+
npm run build
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 1. Code Quality
|
|
23
|
+
|
|
24
|
+
### 1.1 Tests
|
|
25
|
+
- [ ] All existing tests pass
|
|
26
|
+
- [ ] New code has appropriate tests
|
|
27
|
+
- [ ] Test coverage meets project threshold
|
|
28
|
+
- [ ] No skipped tests without documented reason
|
|
29
|
+
|
|
30
|
+
### 1.2 Linting & Formatting
|
|
31
|
+
- [ ] No linting errors (`npm run lint`)
|
|
32
|
+
- [ ] Code follows project style guide
|
|
33
|
+
- [ ] Consistent formatting applied
|
|
34
|
+
- [ ] No unused imports or variables
|
|
35
|
+
|
|
36
|
+
### 1.3 Type Safety (if applicable)
|
|
37
|
+
- [ ] No TypeScript errors (`tsc --noEmit`)
|
|
38
|
+
- [ ] Proper types for function parameters and returns
|
|
39
|
+
- [ ] No `any` types without justification
|
|
40
|
+
- [ ] Interface definitions for complex objects
|
|
41
|
+
|
|
42
|
+
### 1.4 Build
|
|
43
|
+
- [ ] Project builds successfully (`npm run build`)
|
|
44
|
+
- [ ] No build warnings (or documented exceptions)
|
|
45
|
+
- [ ] Bundle size within acceptable limits
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 2. Git Standards
|
|
50
|
+
|
|
51
|
+
### 2.1 Conventional Commits
|
|
52
|
+
Use the format: `type(scope): description`
|
|
53
|
+
|
|
54
|
+
| Type | Description |
|
|
55
|
+
|------|-------------|
|
|
56
|
+
| `feat` | New feature |
|
|
57
|
+
| `fix` | Bug fix |
|
|
58
|
+
| `docs` | Documentation only |
|
|
59
|
+
| `style` | Formatting, no code change |
|
|
60
|
+
| `refactor` | Code restructuring |
|
|
61
|
+
| `perf` | Performance improvement |
|
|
62
|
+
| `test` | Adding tests |
|
|
63
|
+
| `chore` | Maintenance tasks |
|
|
64
|
+
| `ci` | CI/CD changes |
|
|
65
|
+
| `revert` | Revert previous commit |
|
|
66
|
+
|
|
67
|
+
**Examples:**
|
|
68
|
+
```
|
|
69
|
+
feat(auth): add social login support
|
|
70
|
+
fix(api): handle null response from server
|
|
71
|
+
docs(readme): update installation instructions
|
|
72
|
+
refactor(utils): simplify date formatting logic
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 2.2 Commit Message Guidelines
|
|
76
|
+
- [ ] First line under 72 characters
|
|
77
|
+
- [ ] Use imperative mood ("add" not "added")
|
|
78
|
+
- [ ] Reference issues when applicable (`#123`)
|
|
79
|
+
- [ ] Separate subject from body with blank line
|
|
80
|
+
- [ ] Explain "what" and "why" (not "how")
|
|
81
|
+
|
|
82
|
+
### 2.3 Branch Hygiene
|
|
83
|
+
- [ ] Working on correct branch
|
|
84
|
+
- [ ] Branch is up-to-date with main/master
|
|
85
|
+
- [ ] No merge conflicts
|
|
86
|
+
- [ ] Feature branch naming: `feature/description`
|
|
87
|
+
- [ ] Fix branch naming: `fix/description`
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 3. Security
|
|
92
|
+
|
|
93
|
+
### 3.1 Credentials & Secrets
|
|
94
|
+
- [ ] No API keys in code
|
|
95
|
+
- [ ] No passwords in code
|
|
96
|
+
- [ ] No tokens in code
|
|
97
|
+
- [ ] `.env` files not committed
|
|
98
|
+
- [ ] Secrets in environment variables only
|
|
99
|
+
|
|
100
|
+
### 3.2 Dependencies
|
|
101
|
+
- [ ] No known vulnerabilities (`npm audit`)
|
|
102
|
+
- [ ] Dependencies from trusted sources
|
|
103
|
+
- [ ] Lock file (`package-lock.json`) updated
|
|
104
|
+
- [ ] No unnecessary dependencies added
|
|
105
|
+
|
|
106
|
+
### 3.3 Input Validation
|
|
107
|
+
- [ ] User inputs sanitized
|
|
108
|
+
- [ ] SQL injection prevented
|
|
109
|
+
- [ ] XSS vulnerabilities addressed
|
|
110
|
+
- [ ] CSRF protection in place (if applicable)
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 4. Documentation
|
|
115
|
+
|
|
116
|
+
### 4.1 Code Documentation
|
|
117
|
+
- [ ] Complex logic has comments
|
|
118
|
+
- [ ] Public APIs have JSDoc/docstrings
|
|
119
|
+
- [ ] README updated for new features
|
|
120
|
+
- [ ] Breaking changes documented
|
|
121
|
+
|
|
122
|
+
### 4.2 Changelog
|
|
123
|
+
- [ ] CHANGELOG.md updated for user-facing changes
|
|
124
|
+
- [ ] Version number updated if releasing
|
|
125
|
+
- [ ] Migration guide for breaking changes
|
|
126
|
+
|
|
127
|
+
### 4.3 API Documentation
|
|
128
|
+
- [ ] New endpoints documented
|
|
129
|
+
- [ ] Request/response examples provided
|
|
130
|
+
- [ ] Error responses documented
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## 5. Performance
|
|
135
|
+
|
|
136
|
+
### 5.1 Code Efficiency
|
|
137
|
+
- [ ] No obvious performance regressions
|
|
138
|
+
- [ ] Database queries optimized
|
|
139
|
+
- [ ] No N+1 query problems
|
|
140
|
+
- [ ] Appropriate caching in place
|
|
141
|
+
|
|
142
|
+
### 5.2 Assets
|
|
143
|
+
- [ ] Images optimized
|
|
144
|
+
- [ ] Large files not committed (use LFS if needed)
|
|
145
|
+
- [ ] Bundle size checked
|
|
146
|
+
- [ ] Lazy loading where appropriate
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## 6. Review Checklist
|
|
151
|
+
|
|
152
|
+
### 6.1 Self-Review
|
|
153
|
+
- [ ] Code reviewed by yourself
|
|
154
|
+
- [ ] Changes match requirements
|
|
155
|
+
- [ ] Edge cases handled
|
|
156
|
+
- [ ] Error handling in place
|
|
157
|
+
- [ ] Logging appropriate (not excessive)
|
|
158
|
+
|
|
159
|
+
### 6.2 Code Smell Check
|
|
160
|
+
- [ ] No duplicate code
|
|
161
|
+
- [ ] Functions are single-purpose
|
|
162
|
+
- [ ] Naming is clear and consistent
|
|
163
|
+
- [ ] No magic numbers/strings
|
|
164
|
+
- [ ] Appropriate abstraction level
|
|
165
|
+
|
|
166
|
+
### 6.3 Testing Mindset
|
|
167
|
+
- [ ] "What could go wrong?" considered
|
|
168
|
+
- [ ] Boundary conditions tested
|
|
169
|
+
- [ ] Error paths tested
|
|
170
|
+
- [ ] Happy path works
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## 7. Environment-Specific
|
|
175
|
+
|
|
176
|
+
### 7.1 Development
|
|
177
|
+
- [ ] Works in development environment
|
|
178
|
+
- [ ] Dev dependencies separate from prod
|
|
179
|
+
|
|
180
|
+
### 7.2 Production Readiness
|
|
181
|
+
- [ ] Feature flags for incomplete features
|
|
182
|
+
- [ ] Backwards compatibility maintained
|
|
183
|
+
- [ ] Rollback plan exists
|
|
184
|
+
- [ ] Monitoring in place for new features
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Quick Reference Commands
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# Run all checks
|
|
192
|
+
npm test && npm run lint && npm run build
|
|
193
|
+
|
|
194
|
+
# Check for security issues
|
|
195
|
+
npm audit
|
|
196
|
+
|
|
197
|
+
# Format code
|
|
198
|
+
npm run format
|
|
199
|
+
|
|
200
|
+
# Type check (TypeScript)
|
|
201
|
+
npx tsc --noEmit
|
|
202
|
+
|
|
203
|
+
# Git status
|
|
204
|
+
git status
|
|
205
|
+
|
|
206
|
+
# Stage changes
|
|
207
|
+
git add -A
|
|
208
|
+
|
|
209
|
+
# Commit with conventional format
|
|
210
|
+
git commit -m "type(scope): description"
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## AI-Assisted Development
|
|
216
|
+
|
|
217
|
+
When using OMGKIT AI agents:
|
|
218
|
+
|
|
219
|
+
1. **Review AI-generated code** before committing
|
|
220
|
+
2. **Run tests** after AI modifications
|
|
221
|
+
3. **Check for sensitive data** in AI outputs
|
|
222
|
+
4. **Validate logic** - AI can make mistakes
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Customization
|
|
227
|
+
|
|
228
|
+
Add project-specific rules below this line:
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
<!-- PROJECT-SPECIFIC RULES -->
|
|
File without changes
|