omgkit 2.25.0 → 2.25.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/README.md +32 -0
- package/bin/omgkit.js +82 -0
- package/lib/cli.js +250 -0
- package/package.json +1 -1
- package/plugin/registry.yaml +2 -2
package/README.md
CHANGED
|
@@ -794,6 +794,38 @@ OMGKIT's upgrade system is designed with safety first:
|
|
|
794
794
|
| **settings.json** | Version updated, structure preserved |
|
|
795
795
|
| **Your files** | NEVER touched (config.yaml, sprints, artifacts, devlogs) |
|
|
796
796
|
|
|
797
|
+
### Config Commands (New)
|
|
798
|
+
|
|
799
|
+
Configure workflow settings via CLI:
|
|
800
|
+
|
|
801
|
+
```bash
|
|
802
|
+
# Get a config value
|
|
803
|
+
omgkit config get testing.enforcement.level
|
|
804
|
+
omgkit config get testing.coverage_gates.unit
|
|
805
|
+
|
|
806
|
+
# Set a config value
|
|
807
|
+
omgkit config set testing.enforcement.level strict
|
|
808
|
+
omgkit config set testing.auto_generate_tasks true
|
|
809
|
+
omgkit config set testing.coverage_gates.unit.minimum 90
|
|
810
|
+
|
|
811
|
+
# List all config or specific section
|
|
812
|
+
omgkit config list
|
|
813
|
+
omgkit config list testing
|
|
814
|
+
|
|
815
|
+
# Reset to default value
|
|
816
|
+
omgkit config reset testing.enforcement.level
|
|
817
|
+
```
|
|
818
|
+
|
|
819
|
+
#### Supported Value Types
|
|
820
|
+
|
|
821
|
+
| Type | Example |
|
|
822
|
+
|------|---------|
|
|
823
|
+
| **String** | `omgkit config set git.main_branch develop` |
|
|
824
|
+
| **Boolean** | `omgkit config set testing.auto_generate_tasks true` |
|
|
825
|
+
| **Number** | `omgkit config set testing.coverage_gates.unit.minimum 90` |
|
|
826
|
+
|
|
827
|
+
**Note**: For arrays, edit `.omgkit/workflow.yaml` directly.
|
|
828
|
+
|
|
797
829
|
---
|
|
798
830
|
|
|
799
831
|
## Documentation Sync Automation
|
package/bin/omgkit.js
CHANGED
|
@@ -25,6 +25,10 @@ import {
|
|
|
25
25
|
rollbackProject,
|
|
26
26
|
listProjectBackups,
|
|
27
27
|
getProjectVersion,
|
|
28
|
+
getConfig,
|
|
29
|
+
setConfig,
|
|
30
|
+
listConfig,
|
|
31
|
+
resetConfig,
|
|
28
32
|
COLORS,
|
|
29
33
|
BANNER,
|
|
30
34
|
log
|
|
@@ -57,6 +61,12 @@ ${COLORS.bright}PROJECT COMMANDS${COLORS.reset}
|
|
|
57
61
|
${COLORS.cyan}project:backups${COLORS.reset} List available project backups
|
|
58
62
|
${COLORS.cyan}project:version${COLORS.reset} Show project's OMGKIT version
|
|
59
63
|
|
|
64
|
+
${COLORS.bright}CONFIG COMMANDS${COLORS.reset}
|
|
65
|
+
${COLORS.cyan}config get <key>${COLORS.reset} Get config value (e.g., testing.enforcement.level)
|
|
66
|
+
${COLORS.cyan}config set <key> <val>${COLORS.reset} Set config value
|
|
67
|
+
${COLORS.cyan}config list [section]${COLORS.reset} List all config or specific section
|
|
68
|
+
${COLORS.cyan}config reset <key>${COLORS.reset} Reset config key to default
|
|
69
|
+
|
|
60
70
|
${COLORS.bright}UPGRADE OPTIONS${COLORS.reset}
|
|
61
71
|
--dry Show what would change without applying
|
|
62
72
|
--force Skip confirmation prompts
|
|
@@ -69,6 +79,14 @@ ${COLORS.bright}EXAMPLES${COLORS.reset}
|
|
|
69
79
|
omgkit project:rollback # Rollback to last backup
|
|
70
80
|
omgkit doctor # Check status
|
|
71
81
|
|
|
82
|
+
${COLORS.bright}CONFIG EXAMPLES${COLORS.reset}
|
|
83
|
+
omgkit config set testing.enforcement.level strict
|
|
84
|
+
omgkit config set testing.auto_generate_tasks true
|
|
85
|
+
omgkit config set testing.coverage_gates.unit.minimum 90
|
|
86
|
+
omgkit config get testing
|
|
87
|
+
omgkit config list testing
|
|
88
|
+
omgkit config reset testing.enforcement.level
|
|
89
|
+
|
|
72
90
|
${COLORS.bright}AFTER INSTALLATION${COLORS.reset}
|
|
73
91
|
In Claude Code, type / to see all OMGKIT commands:
|
|
74
92
|
|
|
@@ -156,6 +174,70 @@ switch (command) {
|
|
|
156
174
|
}
|
|
157
175
|
break;
|
|
158
176
|
}
|
|
177
|
+
case 'config': {
|
|
178
|
+
const subCommand = args[0];
|
|
179
|
+
switch (subCommand) {
|
|
180
|
+
case 'get': {
|
|
181
|
+
const key = args[1];
|
|
182
|
+
if (!key) {
|
|
183
|
+
log.error('Usage: omgkit config get <key>');
|
|
184
|
+
log.info('Example: omgkit config get testing.enforcement.level');
|
|
185
|
+
process.exit(1);
|
|
186
|
+
}
|
|
187
|
+
const result = getConfig(key);
|
|
188
|
+
if (!result.success) process.exit(1);
|
|
189
|
+
break;
|
|
190
|
+
}
|
|
191
|
+
case 'set': {
|
|
192
|
+
const key = args[1];
|
|
193
|
+
const value = args[2];
|
|
194
|
+
if (!key || value === undefined) {
|
|
195
|
+
log.error('Usage: omgkit config set <key> <value>');
|
|
196
|
+
log.info('Example: omgkit config set testing.enforcement.level strict');
|
|
197
|
+
process.exit(1);
|
|
198
|
+
}
|
|
199
|
+
const result = setConfig(key, value);
|
|
200
|
+
if (!result.success) process.exit(1);
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
case 'list': {
|
|
204
|
+
const section = args[1];
|
|
205
|
+
const result = listConfig({ section });
|
|
206
|
+
if (!result.success) process.exit(1);
|
|
207
|
+
break;
|
|
208
|
+
}
|
|
209
|
+
case 'reset': {
|
|
210
|
+
const key = args[1];
|
|
211
|
+
if (!key) {
|
|
212
|
+
log.error('Usage: omgkit config reset <key>');
|
|
213
|
+
log.info('Example: omgkit config reset testing.enforcement.level');
|
|
214
|
+
process.exit(1);
|
|
215
|
+
}
|
|
216
|
+
const result = resetConfig(key);
|
|
217
|
+
if (!result.success) process.exit(1);
|
|
218
|
+
break;
|
|
219
|
+
}
|
|
220
|
+
default: {
|
|
221
|
+
log.error(`Unknown config subcommand: ${subCommand || '(none)'}`);
|
|
222
|
+
console.log(`
|
|
223
|
+
${COLORS.bright}Config Commands:${COLORS.reset}
|
|
224
|
+
omgkit config get <key> Get config value
|
|
225
|
+
omgkit config set <key> <val> Set config value
|
|
226
|
+
omgkit config list [section] List all config
|
|
227
|
+
omgkit config reset <key> Reset to default
|
|
228
|
+
|
|
229
|
+
${COLORS.bright}Examples:${COLORS.reset}
|
|
230
|
+
omgkit config get testing.enforcement.level
|
|
231
|
+
omgkit config set testing.enforcement.level strict
|
|
232
|
+
omgkit config set testing.auto_generate_tasks true
|
|
233
|
+
omgkit config list testing
|
|
234
|
+
omgkit config reset testing.enforcement.level
|
|
235
|
+
`);
|
|
236
|
+
process.exit(1);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
159
241
|
case 'version':
|
|
160
242
|
case '-v':
|
|
161
243
|
case '--version': {
|
package/lib/cli.js
CHANGED
|
@@ -1633,3 +1633,253 @@ ${COLORS.magenta}🔮 Think Omega. Build Omega. Be Omega.${COLORS.reset}
|
|
|
1633
1633
|
backupPath: backup.path
|
|
1634
1634
|
};
|
|
1635
1635
|
}
|
|
1636
|
+
|
|
1637
|
+
// =============================================================================
|
|
1638
|
+
// WORKFLOW CONFIG MANAGEMENT
|
|
1639
|
+
// =============================================================================
|
|
1640
|
+
|
|
1641
|
+
/**
|
|
1642
|
+
* Get nested value from object using dot notation
|
|
1643
|
+
* @param {Object} obj - Object to get value from
|
|
1644
|
+
* @param {string} path - Dot-separated path (e.g., 'testing.enforcement.level')
|
|
1645
|
+
* @returns {*} Value at path or undefined
|
|
1646
|
+
*/
|
|
1647
|
+
function getNestedValue(obj, path) {
|
|
1648
|
+
return path.split('.').reduce((current, key) => current?.[key], obj);
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Set nested value in object using dot notation
|
|
1653
|
+
* @param {Object} obj - Object to set value in
|
|
1654
|
+
* @param {string} path - Dot-separated path
|
|
1655
|
+
* @param {*} value - Value to set
|
|
1656
|
+
*/
|
|
1657
|
+
function setNestedValue(obj, path, value) {
|
|
1658
|
+
const keys = path.split('.');
|
|
1659
|
+
const lastKey = keys.pop();
|
|
1660
|
+
const target = keys.reduce((current, key) => {
|
|
1661
|
+
if (!(key in current)) current[key] = {};
|
|
1662
|
+
return current[key];
|
|
1663
|
+
}, obj);
|
|
1664
|
+
target[lastKey] = value;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Delete nested key from object using dot notation
|
|
1669
|
+
* @param {Object} obj - Object to delete from
|
|
1670
|
+
* @param {string} path - Dot-separated path
|
|
1671
|
+
*/
|
|
1672
|
+
function deleteNestedValue(obj, path) {
|
|
1673
|
+
const keys = path.split('.');
|
|
1674
|
+
const lastKey = keys.pop();
|
|
1675
|
+
const target = keys.reduce((current, key) => current?.[key], obj);
|
|
1676
|
+
if (target && lastKey in target) {
|
|
1677
|
+
delete target[lastKey];
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/**
|
|
1682
|
+
* Parse value string to appropriate type
|
|
1683
|
+
* @param {string} value - Value string
|
|
1684
|
+
* @returns {*} Parsed value
|
|
1685
|
+
*/
|
|
1686
|
+
function parseConfigValue(value) {
|
|
1687
|
+
// Boolean
|
|
1688
|
+
if (value === 'true') return true;
|
|
1689
|
+
if (value === 'false') return false;
|
|
1690
|
+
|
|
1691
|
+
// Number
|
|
1692
|
+
if (/^\d+$/.test(value)) return parseInt(value, 10);
|
|
1693
|
+
if (/^\d+\.\d+$/.test(value)) return parseFloat(value);
|
|
1694
|
+
|
|
1695
|
+
// String (arrays should be edited directly in workflow.yaml)
|
|
1696
|
+
return value;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/**
|
|
1700
|
+
* Read workflow.yaml config
|
|
1701
|
+
* @param {string} cwd - Project directory
|
|
1702
|
+
* @returns {Object|null} Config object or null
|
|
1703
|
+
*/
|
|
1704
|
+
export function readWorkflowConfig(cwd = process.cwd()) {
|
|
1705
|
+
const workflowPath = join(cwd, '.omgkit', 'workflow.yaml');
|
|
1706
|
+
if (!existsSync(workflowPath)) return null;
|
|
1707
|
+
|
|
1708
|
+
try {
|
|
1709
|
+
const content = readFileSync(workflowPath, 'utf8');
|
|
1710
|
+
return parseSimpleYaml(content);
|
|
1711
|
+
} catch (e) {
|
|
1712
|
+
return null;
|
|
1713
|
+
}
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
/**
|
|
1717
|
+
* Write workflow.yaml config
|
|
1718
|
+
* @param {Object} config - Config object
|
|
1719
|
+
* @param {string} cwd - Project directory
|
|
1720
|
+
*/
|
|
1721
|
+
function writeWorkflowConfig(config, cwd = process.cwd()) {
|
|
1722
|
+
const workflowPath = join(cwd, '.omgkit', 'workflow.yaml');
|
|
1723
|
+
const yaml = toSimpleYaml(config);
|
|
1724
|
+
writeFileSync(workflowPath, yaml);
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
/**
|
|
1728
|
+
* Get a config value from workflow.yaml
|
|
1729
|
+
* @param {string} key - Dot-separated key (e.g., 'testing.enforcement.level')
|
|
1730
|
+
* @param {Object} options - Options
|
|
1731
|
+
* @returns {Object} Result with success and value
|
|
1732
|
+
*/
|
|
1733
|
+
export function getConfig(key, options = {}) {
|
|
1734
|
+
const { cwd = process.cwd(), silent = false } = options;
|
|
1735
|
+
|
|
1736
|
+
const omgkitDir = join(cwd, '.omgkit');
|
|
1737
|
+
if (!existsSync(omgkitDir)) {
|
|
1738
|
+
if (!silent) log.error('Not an OMGKIT project. Run: omgkit init');
|
|
1739
|
+
return { success: false, error: 'NOT_INITIALIZED' };
|
|
1740
|
+
}
|
|
1741
|
+
|
|
1742
|
+
const config = readWorkflowConfig(cwd);
|
|
1743
|
+
if (!config) {
|
|
1744
|
+
if (!silent) log.error('workflow.yaml not found');
|
|
1745
|
+
return { success: false, error: 'NO_WORKFLOW' };
|
|
1746
|
+
}
|
|
1747
|
+
|
|
1748
|
+
const value = getNestedValue(config, key);
|
|
1749
|
+
|
|
1750
|
+
if (value === undefined) {
|
|
1751
|
+
if (!silent) log.warn(`Key '${key}' not found`);
|
|
1752
|
+
return { success: false, error: 'KEY_NOT_FOUND' };
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
if (!silent) {
|
|
1756
|
+
if (typeof value === 'object') {
|
|
1757
|
+
console.log(`${COLORS.cyan}${key}:${COLORS.reset}`);
|
|
1758
|
+
console.log(toSimpleYaml(value).split('\n').map(l => ' ' + l).join('\n'));
|
|
1759
|
+
} else {
|
|
1760
|
+
console.log(`${COLORS.cyan}${key}${COLORS.reset} = ${COLORS.green}${value}${COLORS.reset}`);
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
return { success: true, value };
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
/**
|
|
1768
|
+
* Set a config value in workflow.yaml
|
|
1769
|
+
* @param {string} key - Dot-separated key
|
|
1770
|
+
* @param {string} value - Value to set
|
|
1771
|
+
* @param {Object} options - Options
|
|
1772
|
+
* @returns {Object} Result
|
|
1773
|
+
*/
|
|
1774
|
+
export function setConfig(key, value, options = {}) {
|
|
1775
|
+
const { cwd = process.cwd(), silent = false } = options;
|
|
1776
|
+
|
|
1777
|
+
const omgkitDir = join(cwd, '.omgkit');
|
|
1778
|
+
if (!existsSync(omgkitDir)) {
|
|
1779
|
+
if (!silent) log.error('Not an OMGKIT project. Run: omgkit init');
|
|
1780
|
+
return { success: false, error: 'NOT_INITIALIZED' };
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
let config = readWorkflowConfig(cwd);
|
|
1784
|
+
if (!config) {
|
|
1785
|
+
if (!silent) log.error('workflow.yaml not found. Run: omgkit project:upgrade');
|
|
1786
|
+
return { success: false, error: 'NO_WORKFLOW' };
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
const parsedValue = parseConfigValue(value);
|
|
1790
|
+
const oldValue = getNestedValue(config, key);
|
|
1791
|
+
|
|
1792
|
+
setNestedValue(config, key, parsedValue);
|
|
1793
|
+
writeWorkflowConfig(config, cwd);
|
|
1794
|
+
|
|
1795
|
+
if (!silent) {
|
|
1796
|
+
if (oldValue !== undefined) {
|
|
1797
|
+
log.success(`Updated: ${key}`);
|
|
1798
|
+
console.log(` ${COLORS.red}${oldValue}${COLORS.reset} → ${COLORS.green}${parsedValue}${COLORS.reset}`);
|
|
1799
|
+
} else {
|
|
1800
|
+
log.success(`Set: ${key} = ${parsedValue}`);
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
return { success: true, key, value: parsedValue, oldValue };
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
/**
|
|
1808
|
+
* List all config from workflow.yaml
|
|
1809
|
+
* @param {Object} options - Options
|
|
1810
|
+
* @returns {Object} Result with config
|
|
1811
|
+
*/
|
|
1812
|
+
export function listConfig(options = {}) {
|
|
1813
|
+
const { cwd = process.cwd(), silent = false, section = null } = options;
|
|
1814
|
+
|
|
1815
|
+
const omgkitDir = join(cwd, '.omgkit');
|
|
1816
|
+
if (!existsSync(omgkitDir)) {
|
|
1817
|
+
if (!silent) log.error('Not an OMGKIT project. Run: omgkit init');
|
|
1818
|
+
return { success: false, error: 'NOT_INITIALIZED' };
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
const config = readWorkflowConfig(cwd);
|
|
1822
|
+
if (!config) {
|
|
1823
|
+
if (!silent) log.error('workflow.yaml not found');
|
|
1824
|
+
return { success: false, error: 'NO_WORKFLOW' };
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
const displayConfig = section ? { [section]: getNestedValue(config, section) } : config;
|
|
1828
|
+
|
|
1829
|
+
if (!silent) {
|
|
1830
|
+
console.log(BANNER);
|
|
1831
|
+
console.log(`${COLORS.bright}Workflow Configuration${COLORS.reset}\n`);
|
|
1832
|
+
console.log(toSimpleYaml(displayConfig));
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
return { success: true, config: displayConfig };
|
|
1836
|
+
}
|
|
1837
|
+
|
|
1838
|
+
/**
|
|
1839
|
+
* Reset a config key to default value
|
|
1840
|
+
* @param {string} key - Dot-separated key to reset
|
|
1841
|
+
* @param {Object} options - Options
|
|
1842
|
+
* @returns {Object} Result
|
|
1843
|
+
*/
|
|
1844
|
+
export function resetConfig(key, options = {}) {
|
|
1845
|
+
const { cwd = process.cwd(), silent = false } = options;
|
|
1846
|
+
|
|
1847
|
+
const omgkitDir = join(cwd, '.omgkit');
|
|
1848
|
+
if (!existsSync(omgkitDir)) {
|
|
1849
|
+
if (!silent) log.error('Not an OMGKIT project. Run: omgkit init');
|
|
1850
|
+
return { success: false, error: 'NOT_INITIALIZED' };
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
// Load default template
|
|
1854
|
+
const templatePath = join(getPackageRoot(), 'templates', 'omgkit', 'workflow.yaml');
|
|
1855
|
+
if (!existsSync(templatePath)) {
|
|
1856
|
+
if (!silent) log.error('Default template not found');
|
|
1857
|
+
return { success: false, error: 'NO_TEMPLATE' };
|
|
1858
|
+
}
|
|
1859
|
+
|
|
1860
|
+
const templateContent = readFileSync(templatePath, 'utf8');
|
|
1861
|
+
const templateConfig = parseSimpleYaml(templateContent);
|
|
1862
|
+
const defaultValue = getNestedValue(templateConfig, key);
|
|
1863
|
+
|
|
1864
|
+
if (defaultValue === undefined) {
|
|
1865
|
+
if (!silent) log.error(`Key '${key}' not found in default config`);
|
|
1866
|
+
return { success: false, error: 'KEY_NOT_IN_DEFAULT' };
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
let config = readWorkflowConfig(cwd);
|
|
1870
|
+
if (!config) {
|
|
1871
|
+
if (!silent) log.error('workflow.yaml not found');
|
|
1872
|
+
return { success: false, error: 'NO_WORKFLOW' };
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
const oldValue = getNestedValue(config, key);
|
|
1876
|
+
setNestedValue(config, key, defaultValue);
|
|
1877
|
+
writeWorkflowConfig(config, cwd);
|
|
1878
|
+
|
|
1879
|
+
if (!silent) {
|
|
1880
|
+
log.success(`Reset: ${key}`);
|
|
1881
|
+
console.log(` ${COLORS.red}${JSON.stringify(oldValue)}${COLORS.reset} → ${COLORS.green}${JSON.stringify(defaultValue)}${COLORS.reset}`);
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
return { success: true, key, value: defaultValue, oldValue };
|
|
1885
|
+
}
|
package/package.json
CHANGED
package/plugin/registry.yaml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# OMGKIT Component Registry
|
|
2
2
|
# Single Source of Truth for Agents, Skills, Commands, Workflows, and MCPs
|
|
3
|
-
# Version: 2.25.
|
|
3
|
+
# Version: 2.25.1
|
|
4
4
|
# Updated: 2026-01-06
|
|
5
5
|
|
|
6
|
-
version: "2.25.
|
|
6
|
+
version: "2.25.1"
|
|
7
7
|
|
|
8
8
|
# =============================================================================
|
|
9
9
|
# OPTIMIZED ALIGNMENT PRINCIPLE (OAP)
|