omgkit 2.23.0 → 2.24.1
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/bin/omgkit.js +5 -4
- package/lib/cli.js +62 -32
- package/package.json +2 -2
- package/plugin/commands/hooks/run.md +144 -0
- package/plugin/commands/hooks/setup.md +174 -0
- package/plugin/commands/workflow/init.md +143 -0
- package/plugin/commands/workflow/status.md +126 -0
- package/plugin/commands/workflow/trunk-based.md +175 -0
- package/plugin/registry.yaml +16 -3
- package/plugin/skills/devops/git-hooks/SKILL.md +526 -0
- package/plugin/skills/devops/workflow-config/SKILL.md +581 -0
- package/plugin/workflows/git/trunk-based.md +447 -0
- package/templates/omgkit/workflow-gitflow.yaml +128 -0
- package/templates/omgkit/workflow-github.yaml +100 -0
- package/templates/omgkit/workflow-trunk.yaml +105 -0
- package/templates/omgkit/workflow.yaml +145 -0
package/bin/omgkit.js
CHANGED
|
@@ -56,12 +56,13 @@ ${COLORS.bright}EXAMPLES${COLORS.reset}
|
|
|
56
56
|
${COLORS.bright}AFTER INSTALLATION${COLORS.reset}
|
|
57
57
|
In Claude Code, type / to see all OMGKIT commands:
|
|
58
58
|
|
|
59
|
-
Core: /feature, /fix, /plan, /test, /review
|
|
60
|
-
Omega: /10x, /100x, /1000x, /principles
|
|
61
|
-
Sprint: /vision
|
|
59
|
+
Core: /dev:feature, /dev:fix, /planning:plan, /quality:test, /dev:review
|
|
60
|
+
Omega: /omega:10x, /omega:100x, /omega:1000x, /omega:principles
|
|
61
|
+
Sprint: /sprint:vision-set, /sprint:sprint-new, /sprint:team-run
|
|
62
|
+
Workflow: /workflow:init, /workflow:status, /hooks:setup
|
|
62
63
|
|
|
63
64
|
${COLORS.bright}DOCUMENTATION${COLORS.reset}
|
|
64
|
-
https://
|
|
65
|
+
https://omg.mintlify.app
|
|
65
66
|
`);
|
|
66
67
|
}
|
|
67
68
|
|
package/lib/cli.js
CHANGED
|
@@ -51,7 +51,7 @@ ${COLORS.magenta}╔════════════════════
|
|
|
51
51
|
║ ║
|
|
52
52
|
║ 🔮 OMGKIT - Omega-Level Development Kit ║
|
|
53
53
|
║ ║
|
|
54
|
-
║
|
|
54
|
+
║ 41 Agents • 156 Commands • 159 Skills • 10 Modes ║
|
|
55
55
|
║ "Think Omega. Build Omega. Be Omega." ║
|
|
56
56
|
║ ║
|
|
57
57
|
╚════════════════════════════════════════════════════════════╝${COLORS.reset}
|
|
@@ -499,7 +499,15 @@ export function doctor(options = {}) {
|
|
|
499
499
|
|
|
500
500
|
// Count commands
|
|
501
501
|
if (existsSync(commandsDir)) {
|
|
502
|
-
const commandPrefixes = [
|
|
502
|
+
const commandPrefixes = [
|
|
503
|
+
// All command namespaces
|
|
504
|
+
'alignment:', 'auto:', 'context:', 'data:', 'design:', 'dev:', 'domain:',
|
|
505
|
+
'game:', 'git:', 'hooks:', 'iot:', 'ml:', 'omega:', 'omgdata:', 'omgdeploy:',
|
|
506
|
+
'omgfeature:', 'omgml:', 'omgops:', 'omgoptim:', 'omgtrain:', 'perf:',
|
|
507
|
+
'planning:', 'platform:', 'quality:', 'security:', 'sprint:', 'sre:', 'workflow:',
|
|
508
|
+
// Modes
|
|
509
|
+
'mode:'
|
|
510
|
+
];
|
|
503
511
|
const files = readdirSync(commandsDir).filter(f =>
|
|
504
512
|
f.endsWith('.md') && commandPrefixes.some(p => f.startsWith(p))
|
|
505
513
|
);
|
|
@@ -517,7 +525,14 @@ export function doctor(options = {}) {
|
|
|
517
525
|
|
|
518
526
|
// Count skills
|
|
519
527
|
if (existsSync(skillsDir)) {
|
|
520
|
-
const skillPrefixes = [
|
|
528
|
+
const skillPrefixes = [
|
|
529
|
+
// All skill categories
|
|
530
|
+
'ai-engineering-', 'ai-ml-', 'autonomous-', 'backend-', 'databases-',
|
|
531
|
+
'devops-', 'event-driven-', 'frameworks-', 'frontend-', 'game-',
|
|
532
|
+
'integrations-', 'iot-', 'languages-', 'methodology-', 'microservices-',
|
|
533
|
+
'ml-systems-', 'mobile-', 'mobile-advanced-', 'omega-', 'security-',
|
|
534
|
+
'simulation-', 'testing-', 'tools-'
|
|
535
|
+
];
|
|
521
536
|
const dirs = readdirSync(skillsDir).filter(f => {
|
|
522
537
|
const fullPath = join(skillsDir, f);
|
|
523
538
|
return statSync(fullPath).isDirectory() && skillPrefixes.some(p => f.startsWith(p));
|
|
@@ -537,13 +552,19 @@ export function doctor(options = {}) {
|
|
|
537
552
|
// Count agents
|
|
538
553
|
if (existsSync(agentsDir)) {
|
|
539
554
|
const agentFiles = [
|
|
540
|
-
|
|
541
|
-
'
|
|
542
|
-
'
|
|
543
|
-
'
|
|
544
|
-
'
|
|
545
|
-
'
|
|
546
|
-
'
|
|
555
|
+
// All 41 agents
|
|
556
|
+
'ai-architect-agent.md', 'api-designer.md', 'architect.md', 'brainstormer.md',
|
|
557
|
+
'cicd-manager.md', 'code-reviewer.md', 'copywriter.md', 'data-engineer.md',
|
|
558
|
+
'data-scientist-agent.md', 'database-admin.md', 'debugger.md', 'devsecops.md',
|
|
559
|
+
'docs-manager.md', 'domain-decomposer.md', 'embedded-systems.md',
|
|
560
|
+
'experiment-analyst-agent.md', 'fullstack-developer.md', 'game-systems-designer.md',
|
|
561
|
+
'git-manager.md', 'journal-writer.md', 'ml-engineer-agent.md', 'ml-engineer.md',
|
|
562
|
+
'mlops-engineer-agent.md', 'model-optimizer-agent.md', 'observability-engineer.md',
|
|
563
|
+
'oracle.md', 'performance-engineer.md', 'pipeline-architect.md', 'planner.md',
|
|
564
|
+
'platform-engineer.md', 'production-engineer-agent.md', 'project-manager.md',
|
|
565
|
+
'research-scientist-agent.md', 'researcher.md', 'scientific-computing.md',
|
|
566
|
+
'scout.md', 'security-auditor.md', 'sprint-master.md', 'tester.md',
|
|
567
|
+
'ui-ux-designer.md', 'vulnerability-scanner.md'
|
|
547
568
|
];
|
|
548
569
|
const installed = agentFiles.filter(f => existsSync(join(agentsDir, f)));
|
|
549
570
|
result.claudeCode.agents = installed.length;
|
|
@@ -663,31 +684,40 @@ export function uninstallPlugin(options = {}) {
|
|
|
663
684
|
agents: 0
|
|
664
685
|
};
|
|
665
686
|
|
|
666
|
-
// Command prefixes from our categories
|
|
687
|
+
// Command prefixes from our categories
|
|
667
688
|
const commandPrefixes = [
|
|
668
|
-
|
|
669
|
-
'
|
|
670
|
-
|
|
671
|
-
'
|
|
672
|
-
'
|
|
689
|
+
// All command namespaces
|
|
690
|
+
'alignment:', 'auto:', 'context:', 'data:', 'design:', 'dev:', 'domain:',
|
|
691
|
+
'game:', 'git:', 'hooks:', 'iot:', 'ml:', 'omega:', 'omgdata:', 'omgdeploy:',
|
|
692
|
+
'omgfeature:', 'omgml:', 'omgops:', 'omgoptim:', 'omgtrain:', 'perf:',
|
|
693
|
+
'planning:', 'platform:', 'quality:', 'security:', 'sprint:', 'sre:', 'workflow:',
|
|
694
|
+
// Modes
|
|
695
|
+
'mode:'
|
|
673
696
|
];
|
|
674
697
|
|
|
675
698
|
// Skill prefixes from our categories
|
|
676
699
|
const skillPrefixes = [
|
|
677
|
-
'
|
|
678
|
-
'
|
|
679
|
-
'
|
|
700
|
+
'ai-engineering-', 'ai-ml-', 'autonomous-', 'backend-', 'databases-',
|
|
701
|
+
'devops-', 'event-driven-', 'frameworks-', 'frontend-', 'game-',
|
|
702
|
+
'integrations-', 'iot-', 'languages-', 'methodology-', 'microservices-',
|
|
703
|
+
'ml-systems-', 'mobile-', 'mobile-advanced-', 'omega-', 'security-',
|
|
704
|
+
'simulation-', 'testing-', 'tools-'
|
|
680
705
|
];
|
|
681
706
|
|
|
682
|
-
// Agent files we installed
|
|
707
|
+
// Agent files we installed (all 41 agents)
|
|
683
708
|
const agentFiles = [
|
|
684
|
-
'
|
|
685
|
-
'
|
|
686
|
-
'
|
|
687
|
-
'
|
|
688
|
-
'
|
|
689
|
-
'git-manager.md', '
|
|
690
|
-
'
|
|
709
|
+
'ai-architect-agent.md', 'api-designer.md', 'architect.md', 'brainstormer.md',
|
|
710
|
+
'cicd-manager.md', 'code-reviewer.md', 'copywriter.md', 'data-engineer.md',
|
|
711
|
+
'data-scientist-agent.md', 'database-admin.md', 'debugger.md', 'devsecops.md',
|
|
712
|
+
'docs-manager.md', 'domain-decomposer.md', 'embedded-systems.md',
|
|
713
|
+
'experiment-analyst-agent.md', 'fullstack-developer.md', 'game-systems-designer.md',
|
|
714
|
+
'git-manager.md', 'journal-writer.md', 'ml-engineer-agent.md', 'ml-engineer.md',
|
|
715
|
+
'mlops-engineer-agent.md', 'model-optimizer-agent.md', 'observability-engineer.md',
|
|
716
|
+
'oracle.md', 'performance-engineer.md', 'pipeline-architect.md', 'planner.md',
|
|
717
|
+
'platform-engineer.md', 'production-engineer-agent.md', 'project-manager.md',
|
|
718
|
+
'research-scientist-agent.md', 'researcher.md', 'scientific-computing.md',
|
|
719
|
+
'scout.md', 'security-auditor.md', 'sprint-master.md', 'tester.md',
|
|
720
|
+
'ui-ux-designer.md', 'vulnerability-scanner.md'
|
|
691
721
|
];
|
|
692
722
|
|
|
693
723
|
// Remove backup location
|
|
@@ -805,10 +835,10 @@ export function listComponents(type, options = {}) {
|
|
|
805
835
|
}
|
|
806
836
|
|
|
807
837
|
const componentTypes = {
|
|
808
|
-
commands: { title: 'Commands'
|
|
809
|
-
agents: { title: 'Agents'
|
|
810
|
-
skills: { title: 'Skills'
|
|
811
|
-
modes: { title: 'Modes'
|
|
838
|
+
commands: { title: 'Commands' },
|
|
839
|
+
agents: { title: 'Agents' },
|
|
840
|
+
skills: { title: 'Skills' },
|
|
841
|
+
modes: { title: 'Modes' }
|
|
812
842
|
};
|
|
813
843
|
|
|
814
844
|
const result = { success: true, components: {} };
|
|
@@ -818,7 +848,7 @@ export function listComponents(type, options = {}) {
|
|
|
818
848
|
typesToList.forEach(key => {
|
|
819
849
|
if (!componentTypes[key]) return;
|
|
820
850
|
|
|
821
|
-
const { title
|
|
851
|
+
const { title } = componentTypes[key];
|
|
822
852
|
const dir = join(pluginDir, key);
|
|
823
853
|
|
|
824
854
|
if (existsSync(dir)) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omgkit",
|
|
3
|
-
"version": "2.
|
|
4
|
-
"description": "Omega-Level Development Kit - AI Team System for Claude Code. 41 agents,
|
|
3
|
+
"version": "2.24.1",
|
|
4
|
+
"description": "Omega-Level Development Kit - AI Team System for Claude Code. 41 agents, 156 commands, 159 skills, 68 workflows.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
7
7
|
"ai",
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hooks:run
|
|
3
|
+
description: Manually run Git hook actions for testing or debugging, without triggering an actual Git operation.
|
|
4
|
+
category: hooks
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /hooks:run
|
|
8
|
+
|
|
9
|
+
Manually execute Git hook actions for testing or debugging.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Run all actions for a hook
|
|
15
|
+
/hooks:run pre-commit
|
|
16
|
+
/hooks:run commit-msg
|
|
17
|
+
/hooks:run pre-push
|
|
18
|
+
|
|
19
|
+
# Run specific action only
|
|
20
|
+
/hooks:run pre-commit --action=lint
|
|
21
|
+
/hooks:run pre-commit --action=format
|
|
22
|
+
/hooks:run pre-push --action=test
|
|
23
|
+
|
|
24
|
+
# Run on specific files
|
|
25
|
+
/hooks:run pre-commit --files="src/app.ts,src/utils.ts"
|
|
26
|
+
|
|
27
|
+
# Verbose output
|
|
28
|
+
/hooks:run pre-commit --verbose
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Available Hooks
|
|
32
|
+
|
|
33
|
+
### pre-commit
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
/hooks:run pre-commit
|
|
37
|
+
|
|
38
|
+
# Actions:
|
|
39
|
+
# - lint: Run linter on staged files
|
|
40
|
+
# - format: Format staged files
|
|
41
|
+
# - type-check: Run type checker
|
|
42
|
+
# - secrets-check: Detect leaked secrets
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### commit-msg
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
/hooks:run commit-msg
|
|
49
|
+
|
|
50
|
+
# Validates last commit message
|
|
51
|
+
# Or provide message:
|
|
52
|
+
/hooks:run commit-msg --message="feat: add login"
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### pre-push
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
/hooks:run pre-push
|
|
59
|
+
|
|
60
|
+
# Actions:
|
|
61
|
+
# - test: Run test suite
|
|
62
|
+
# - security-scan: Run security audit
|
|
63
|
+
# - build: Verify build works
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Output
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Running pre-commit hooks
|
|
70
|
+
========================
|
|
71
|
+
|
|
72
|
+
Action: lint
|
|
73
|
+
Running: npx eslint src/
|
|
74
|
+
✓ Passed (0 errors, 2 warnings)
|
|
75
|
+
|
|
76
|
+
Action: format
|
|
77
|
+
Running: npx prettier --check src/
|
|
78
|
+
✓ All files formatted
|
|
79
|
+
|
|
80
|
+
Action: type-check
|
|
81
|
+
Running: npx tsc --noEmit
|
|
82
|
+
✓ No type errors
|
|
83
|
+
|
|
84
|
+
Summary: 3/3 actions passed
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Use Cases
|
|
88
|
+
|
|
89
|
+
### Test Before Commit
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Make sure hooks will pass
|
|
93
|
+
/hooks:run pre-commit
|
|
94
|
+
|
|
95
|
+
# Then commit
|
|
96
|
+
git commit -m "feat: add feature"
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Debug Failing Hook
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
# Run with verbose output
|
|
103
|
+
/hooks:run pre-commit --verbose
|
|
104
|
+
|
|
105
|
+
# Run specific failing action
|
|
106
|
+
/hooks:run pre-commit --action=lint
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Validate Commit Message
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# Check if message is valid
|
|
113
|
+
/hooks:run commit-msg --message="fix: resolve bug"
|
|
114
|
+
|
|
115
|
+
# Output:
|
|
116
|
+
# ✓ Valid conventional commit
|
|
117
|
+
# Type: fix
|
|
118
|
+
# Subject: resolve bug
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Run Tests Before Push
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Full pre-push check
|
|
125
|
+
/hooks:run pre-push
|
|
126
|
+
|
|
127
|
+
# Just tests
|
|
128
|
+
/hooks:run pre-push --action=test
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Exit Codes
|
|
132
|
+
|
|
133
|
+
| Code | Meaning |
|
|
134
|
+
|------|---------|
|
|
135
|
+
| 0 | All actions passed |
|
|
136
|
+
| 1 | One or more actions failed |
|
|
137
|
+
| 2 | Config error or invalid hook |
|
|
138
|
+
|
|
139
|
+
## Related Commands
|
|
140
|
+
|
|
141
|
+
- `/hooks:setup` - Install/update hooks
|
|
142
|
+
- `/workflow:status` - Check workflow status
|
|
143
|
+
- `/dev:test` - Run tests
|
|
144
|
+
- `/quality:lint` - Run linter
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hooks:setup
|
|
3
|
+
description: Install or update Git hooks based on workflow configuration, creating executable hook scripts in .git/hooks/.
|
|
4
|
+
category: hooks
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /hooks:setup
|
|
8
|
+
|
|
9
|
+
Install Git hooks from your workflow configuration.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Install all hooks from config
|
|
15
|
+
/hooks:setup
|
|
16
|
+
|
|
17
|
+
# Install specific hook only
|
|
18
|
+
/hooks:setup --hook=pre-commit
|
|
19
|
+
/hooks:setup --hook=commit-msg
|
|
20
|
+
/hooks:setup --hook=pre-push
|
|
21
|
+
|
|
22
|
+
# Force overwrite existing hooks
|
|
23
|
+
/hooks:setup --force
|
|
24
|
+
|
|
25
|
+
# Dry run (show what would be created)
|
|
26
|
+
/hooks:setup --dry-run
|
|
27
|
+
|
|
28
|
+
# Remove all hooks
|
|
29
|
+
/hooks:setup --remove
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## What It Does
|
|
33
|
+
|
|
34
|
+
1. **Reads config** from `.omgkit/workflow.yaml`
|
|
35
|
+
2. **Generates hook scripts** based on settings
|
|
36
|
+
3. **Installs to `.git/hooks/`** with execute permissions
|
|
37
|
+
4. **Validates installation**
|
|
38
|
+
|
|
39
|
+
## Generated Hooks
|
|
40
|
+
|
|
41
|
+
### pre-commit
|
|
42
|
+
|
|
43
|
+
Runs before each commit:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
hooks:
|
|
47
|
+
pre_commit:
|
|
48
|
+
enabled: true
|
|
49
|
+
actions:
|
|
50
|
+
- lint # ESLint, Pylint, etc.
|
|
51
|
+
- format # Prettier, Black, etc.
|
|
52
|
+
- type-check # TypeScript, mypy, etc.
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### commit-msg
|
|
56
|
+
|
|
57
|
+
Validates commit message:
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
hooks:
|
|
61
|
+
commit_msg:
|
|
62
|
+
enabled: true
|
|
63
|
+
validate_conventional: true
|
|
64
|
+
max_length: 72
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### pre-push
|
|
68
|
+
|
|
69
|
+
Runs before push:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
hooks:
|
|
73
|
+
pre_push:
|
|
74
|
+
enabled: true
|
|
75
|
+
actions:
|
|
76
|
+
- test # Run tests
|
|
77
|
+
- security-scan # npm audit, safety
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### post-merge
|
|
81
|
+
|
|
82
|
+
Runs after git pull/merge:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
hooks:
|
|
86
|
+
post_merge:
|
|
87
|
+
enabled: true
|
|
88
|
+
actions:
|
|
89
|
+
- install # npm install
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Output
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
Installing Git Hooks
|
|
96
|
+
====================
|
|
97
|
+
|
|
98
|
+
Reading config from .omgkit/workflow.yaml...
|
|
99
|
+
|
|
100
|
+
Creating hooks:
|
|
101
|
+
✓ pre-commit (lint, format, type-check)
|
|
102
|
+
✓ commit-msg (conventional validation)
|
|
103
|
+
✓ pre-push (test, security-scan)
|
|
104
|
+
- post-merge (disabled in config)
|
|
105
|
+
|
|
106
|
+
Setting permissions...
|
|
107
|
+
✓ .git/hooks/pre-commit (755)
|
|
108
|
+
✓ .git/hooks/commit-msg (755)
|
|
109
|
+
✓ .git/hooks/pre-push (755)
|
|
110
|
+
|
|
111
|
+
Done! 3 hooks installed.
|
|
112
|
+
|
|
113
|
+
Test with: /hooks:run pre-commit
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Auto-Detection
|
|
117
|
+
|
|
118
|
+
Hooks auto-detect your project type:
|
|
119
|
+
|
|
120
|
+
| Project | Lint | Format | Test |
|
|
121
|
+
|---------|------|--------|------|
|
|
122
|
+
| Node.js | `npx eslint` | `npx prettier` | `npm test` |
|
|
123
|
+
| Python | `ruff check` | `black` | `pytest` |
|
|
124
|
+
| Go | `golangci-lint` | `gofmt` | `go test` |
|
|
125
|
+
| Rust | `cargo clippy` | `cargo fmt` | `cargo test` |
|
|
126
|
+
|
|
127
|
+
## Examples
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
# Initial setup
|
|
131
|
+
/workflow:init
|
|
132
|
+
/hooks:setup
|
|
133
|
+
|
|
134
|
+
# Update after config change
|
|
135
|
+
/hooks:setup --force
|
|
136
|
+
|
|
137
|
+
# Check what would be created
|
|
138
|
+
/hooks:setup --dry-run
|
|
139
|
+
|
|
140
|
+
# Remove hooks
|
|
141
|
+
/hooks:setup --remove
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Troubleshooting
|
|
145
|
+
|
|
146
|
+
### Permission Denied
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
chmod +x .git/hooks/*
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Hook Not Running
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Check hook exists and is executable
|
|
156
|
+
ls -la .git/hooks/pre-commit
|
|
157
|
+
|
|
158
|
+
# Regenerate
|
|
159
|
+
/hooks:setup --force
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Bypass Temporarily
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
SKIP_HOOKS=1 git commit -m "message"
|
|
166
|
+
# or
|
|
167
|
+
git commit --no-verify -m "message"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Related Commands
|
|
171
|
+
|
|
172
|
+
- `/hooks:run` - Manually run hook actions
|
|
173
|
+
- `/workflow:init` - Initialize workflow config
|
|
174
|
+
- `/workflow:status` - Check workflow status
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: workflow:init
|
|
3
|
+
description: Initialize workflow configuration with interactive setup or preset templates for trunk-based, gitflow, or github-flow development.
|
|
4
|
+
category: workflow
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# /workflow:init
|
|
8
|
+
|
|
9
|
+
Initialize the OMGKIT workflow configuration system in your project.
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
# Interactive setup
|
|
15
|
+
/workflow:init
|
|
16
|
+
|
|
17
|
+
# Use specific workflow preset
|
|
18
|
+
/workflow:init --workflow=trunk-based
|
|
19
|
+
/workflow:init --workflow=gitflow
|
|
20
|
+
/workflow:init --workflow=github-flow
|
|
21
|
+
|
|
22
|
+
# Use all defaults (trunk-based)
|
|
23
|
+
/workflow:init --defaults
|
|
24
|
+
|
|
25
|
+
# Force overwrite existing config
|
|
26
|
+
/workflow:init --force
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What It Does
|
|
30
|
+
|
|
31
|
+
1. **Creates `.omgkit/` directory** if not exists
|
|
32
|
+
2. **Generates `workflow.yaml`** with your preferences
|
|
33
|
+
3. **Sets up Git hooks** based on configuration
|
|
34
|
+
4. **Validates existing setup** and suggests improvements
|
|
35
|
+
|
|
36
|
+
## Interactive Setup
|
|
37
|
+
|
|
38
|
+
When run without arguments, guides you through:
|
|
39
|
+
|
|
40
|
+
1. **Workflow Type**
|
|
41
|
+
- Trunk-based (recommended for CI/CD)
|
|
42
|
+
- GitHub Flow (simple, PR-based)
|
|
43
|
+
- GitFlow (release-based)
|
|
44
|
+
|
|
45
|
+
2. **Branch Settings**
|
|
46
|
+
- Main branch name
|
|
47
|
+
- Branch prefixes
|
|
48
|
+
|
|
49
|
+
3. **Commit Conventions**
|
|
50
|
+
- Conventional commits (recommended)
|
|
51
|
+
- Scope requirements
|
|
52
|
+
|
|
53
|
+
4. **PR Settings**
|
|
54
|
+
- Review requirements
|
|
55
|
+
- Auto-labeling
|
|
56
|
+
|
|
57
|
+
5. **Hooks**
|
|
58
|
+
- Pre-commit actions
|
|
59
|
+
- Pre-push actions
|
|
60
|
+
|
|
61
|
+
6. **Deployment**
|
|
62
|
+
- Provider (Vercel, Netlify, etc.)
|
|
63
|
+
- Auto-deploy settings
|
|
64
|
+
|
|
65
|
+
## Output Files
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
.omgkit/
|
|
69
|
+
└── workflow.yaml # Main configuration
|
|
70
|
+
|
|
71
|
+
.git/hooks/
|
|
72
|
+
├── pre-commit # Lint, format, type-check
|
|
73
|
+
├── commit-msg # Validate conventional commits
|
|
74
|
+
└── pre-push # Tests, security scan
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Workflow Presets
|
|
78
|
+
|
|
79
|
+
### Trunk-Based (Default)
|
|
80
|
+
|
|
81
|
+
Best for: Teams practicing continuous deployment.
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
git:
|
|
85
|
+
workflow: trunk-based
|
|
86
|
+
max_branch_age_days: 2
|
|
87
|
+
hooks:
|
|
88
|
+
pre_commit: [lint, format, type-check]
|
|
89
|
+
pre_push: [test, security-scan]
|
|
90
|
+
feature_flags:
|
|
91
|
+
provider: vercel-edge
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### GitHub Flow
|
|
95
|
+
|
|
96
|
+
Best for: Teams with regular releases, focus on code review.
|
|
97
|
+
|
|
98
|
+
```yaml
|
|
99
|
+
git:
|
|
100
|
+
workflow: github-flow
|
|
101
|
+
max_branch_age_days: 7
|
|
102
|
+
hooks:
|
|
103
|
+
pre_commit: [lint, format]
|
|
104
|
+
pre_push: [test]
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### GitFlow
|
|
108
|
+
|
|
109
|
+
Best for: Teams with scheduled releases, multiple environments.
|
|
110
|
+
|
|
111
|
+
```yaml
|
|
112
|
+
git:
|
|
113
|
+
workflow: gitflow
|
|
114
|
+
develop_branch: develop
|
|
115
|
+
hooks:
|
|
116
|
+
pre_commit: [lint, format, type-check]
|
|
117
|
+
pre_push: [test, build]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Examples
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
# Quick setup for a new project
|
|
124
|
+
/workflow:init --workflow=trunk-based
|
|
125
|
+
|
|
126
|
+
# Setup for enterprise project
|
|
127
|
+
/workflow:init --workflow=gitflow
|
|
128
|
+
|
|
129
|
+
# Reconfigure existing project
|
|
130
|
+
/workflow:init --force
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## After Initialization
|
|
134
|
+
|
|
135
|
+
1. **Review generated config**: `.omgkit/workflow.yaml`
|
|
136
|
+
2. **Commit config to repo**: `git add .omgkit && git commit -m "chore: add workflow config"`
|
|
137
|
+
3. **Team syncs and runs**: `/hooks:setup`
|
|
138
|
+
|
|
139
|
+
## Related Commands
|
|
140
|
+
|
|
141
|
+
- `/workflow:status` - Check current workflow status
|
|
142
|
+
- `/workflow:trunk-based` - Execute trunk-based workflow
|
|
143
|
+
- `/hooks:setup` - Setup/update Git hooks
|