Skip to content

Commit 988dedf

Browse files
authored
Merge pull request #35 from kodustech/feat/centralized-config
Feat/centralized config
2 parents 65d8fe9 + db9b19c commit 988dedf

18 files changed

Lines changed: 1194 additions & 9 deletions

File tree

.claude/commands/.kodus-managed-skills.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
[
22
"kodus-business-rules-validation",
3+
"kodus-centralized-config",
34
"kodus-kody-rules",
45
"kodus-pr-suggestions-resolver",
56
"kodus-review"
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
name: kodus-centralized-config
3+
description: Use when the user wants to manage centralized configuration via `kodus config centralized` commands (status, init, sync, disable, and download).
4+
---
5+
6+
# Kodus Centralized Config
7+
8+
## Overview
9+
10+
Centralized configuration allows teams to manage their Kodus configuration files in a single repository, providing a single source of truth for their settings. This skill enables users to manage their centralized configuration through Kodus CLI commands, including initializing centralized config, syncing configuration, disabling centralized config, and downloading generated config files.
11+
12+
The configuration files are generated based on the user's current settings, and users have the option to review these changes in a pull request before they are merged into the repository. This approach ensures that teams can maintain control over their configuration while benefiting from the convenience of centralized management.
13+
14+
If the setting is enabled, then any pull request merged to the selected repository will trigger a sync to update the configuration in Kodus. This allows teams to easily manage and update their configuration as needed, without having to manually apply changes in Kodus.
15+
16+
At any time the user can run a manual sync command to pull the latest configuration from the repository, however this is not recommended.
17+
18+
## Goal
19+
20+
Manage centralized configuration through Kodus CLI commands only.
21+
22+
Use this skill when the request involves enabling centralized config, selecting the source repository, syncing configuration, disabling centralized config, or downloading generated config files.
23+
24+
## Trigger Hints
25+
26+
- Mentions of centralized config, centralized configuration, config sync source repo, or source repository for rules.
27+
- Requests to run: `kodus config centralized status|init|sync|disable|download`.
28+
- Requests to enable or disable centralized config from terminal.
29+
30+
## Workflow
31+
32+
Unless specifically stated, YOU must run the Kodus CLI commands on behalf of the user. Do not provide instructions to run commands without also running them yourself.
33+
34+
1. Confirm team-key authentication is available.
35+
36+
- Centralized config commands require team-key auth.
37+
- If missing, instruct the user to run:
38+
39+
```bash
40+
kodus auth team-key --key <your-key>
41+
```
42+
43+
2. Check current centralized status first when context is unclear.
44+
45+
```bash
46+
kodus config centralized status
47+
```
48+
49+
3. Initialize centralized config when requested.
50+
51+
- Preferred command shape:
52+
53+
```bash
54+
kodus config centralized init [owner/repo] --sync-option <pr|manual>
55+
```
56+
57+
ALWAYS run the command `kodus config remote list` first to get the list of repositories the user has access to and their current selection. You must provide the repo in the shape `owner/repo` for example `organization/repository-name`. If you cannot find the repository in the list, then tell the user about it.
58+
59+
- Defaults and behavior:
60+
- `--sync-option` defaults to `pr`. Defines the behaviour of the initial sync after enabling centralized config.
61+
- `pr` creates a pull request with their current config. A link to the PR is provided in the command output. Merging the PR triggers a sync to update the configuration in Kodus.
62+
- `manual` simply enables centralized config without creating a PR, the user will need to create a PR themselves with their desired config or run a manual sync after pushing changes to the repository.
63+
- If repository is omitted in an interactive terminal, CLI prompts repository selection.
64+
- In non-interactive mode, repository must be provided explicitly.
65+
66+
Prefer providing the repository in the command to avoid interactive prompts, especially in non-interactive contexts. If the repository is not provided and the terminal is interactive, the CLI will prompt the user to select a repository from their accessible repositories. If the terminal is non-interactive and the repository is not provided, the command will fail with an error indicating that the repository is required.
67+
68+
4. Sync centralized config on demand.
69+
70+
A sync will pull the latest configuration from the repository and override the user's current configuration defined in the Kodus database with the config from the repository. Syncs happen automatically when a PR is merged regardless of the initial sync option selected, but users can also choose to run a manual sync at any time to pull the latest changes from the repository.
71+
72+
```bash
73+
kodus config centralized sync
74+
```
75+
76+
Avoid running sync automatically after init to give users control over when to pull changes, especially if they want to review or customize the generated config before applying it.
77+
78+
Running sync will override the user's current configuration with the config from the repository, so it's best to let users decide when to do this, be sure to warn them of this when they ask to run sync and recommend downloading the config first as a backup before syncing.
79+
80+
5. Disable centralized config when requested.
81+
82+
```bash
83+
kodus config centralized disable
84+
```
85+
86+
6. Download centralized config zip artifact.
87+
88+
```bash
89+
kodus config centralized download --out <path/to/centralized-config.zip>
90+
```
91+
92+
- `--out` is required.
93+
94+
## Output Guidance
95+
96+
- Prefer using `--json` to receive structured output.
97+
- When providing output to the user, summarize the key information and next steps rather than dumping raw command output.
98+
99+
## Safety Notes
100+
101+
- Do not suggest manually editing backend parameters for centralized config when CLI commands exist.
102+
- If repository selection fails, verify the repository is already selected in Kodus (`kodus config remote list`).

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kodus/cli",
3-
"version": "0.4.11",
3+
"version": "0.4.12",
44
"description": "Kodus CLI - AI-powered code review from your terminal",
55
"type": "module",
66
"bin": {
@@ -84,4 +84,4 @@
8484
"dist",
8585
"skills"
8686
]
87-
}
87+
}

skills/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ This directory contains the agent skills shipped with the Kodus CLI repository.
1212
- Canonical skill name for business rules validation in installers and multi-agent integrations.
1313
- `kodus-pr-suggestions-resolver`
1414
- Fetch PR suggestions and apply fixes with judgment.
15+
- `kodus-centralized-config`
16+
- Manage centralized config from CLI (status, init, sync, disable, download).
1517

1618
## Trigger Map (recommended)
1719

@@ -26,6 +28,8 @@ This directory contains the agent skills shipped with the Kodus CLI repository.
2628
- Use `kodus-pr-suggestions-resolver`.
2729
- User asks to validate local implementation against a task, acceptance criteria, or business rules
2830
- Use `kodus-business-rules-validation`.
31+
- User asks to enable/disable/sync/download centralized config or choose centralized config source repository
32+
- Use `kodus-centralized-config`.
2933

3034
## Notes
3135

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
name: kodus-centralized-config
3+
description: Use when the user wants to manage centralized configuration via `kodus config centralized` commands (status, init, sync, disable, and download).
4+
---
5+
6+
# Kodus Centralized Config
7+
8+
## Overview
9+
10+
Centralized configuration allows teams to manage their Kodus configuration files in a single repository, providing a single source of truth for their settings. This skill enables users to manage their centralized configuration through Kodus CLI commands, including initializing centralized config, syncing configuration, disabling centralized config, and downloading generated config files.
11+
12+
The configuration files are generated based on the user's current settings, and users have the option to review these changes in a pull request before they are merged into the repository. This approach ensures that teams can maintain control over their configuration while benefiting from the convenience of centralized management.
13+
14+
If the setting is enabled, then any pull request merged to the selected repository will trigger a sync to update the configuration in Kodus. This allows teams to easily manage and update their configuration as needed, without having to manually apply changes in Kodus.
15+
16+
At any time the user can run a manual sync command to pull the latest configuration from the repository, however this is not recommended.
17+
18+
## Goal
19+
20+
Manage centralized configuration through Kodus CLI commands only.
21+
22+
Use this skill when the request involves enabling centralized config, selecting the source repository, syncing configuration, disabling centralized config, or downloading generated config files.
23+
24+
## Trigger Hints
25+
26+
- Mentions of centralized config, centralized configuration, config sync source repo, or source repository for rules.
27+
- Requests to run: `kodus config centralized status|init|sync|disable|download`.
28+
- Requests to enable or disable centralized config from terminal.
29+
30+
## Workflow
31+
32+
Unless specifically stated, YOU must run the Kodus CLI commands on behalf of the user. Do not provide instructions to run commands without also running them yourself.
33+
34+
1. Confirm team-key authentication is available.
35+
36+
- Centralized config commands require team-key auth.
37+
- If missing, instruct the user to run:
38+
39+
```bash
40+
kodus auth team-key --key <your-key>
41+
```
42+
43+
2. Check current centralized status first when context is unclear.
44+
45+
```bash
46+
kodus config centralized status
47+
```
48+
49+
3. Initialize centralized config when requested.
50+
51+
- Preferred command shape:
52+
53+
```bash
54+
kodus config centralized init [owner/repo] --sync-option <pr|manual>
55+
```
56+
57+
ALWAYS run the command `kodus config remote list` first to get the list of repositories the user has access to and their current selection. You must provide the repo in the shape `owner/repo` for example `organization/repository-name`. If you cannot find the repository in the list, then tell the user about it.
58+
59+
- Defaults and behavior:
60+
- `--sync-option` defaults to `pr`. Defines the behaviour of the initial sync after enabling centralized config.
61+
- `pr` creates a pull request with their current config. A link to the PR is provided in the command output. Merging the PR triggers a sync to update the configuration in Kodus.
62+
- `manual` simply enables centralized config without creating a PR, the user will need to create a PR themselves with their desired config or run a manual sync after pushing changes to the repository.
63+
- If repository is omitted in an interactive terminal, CLI prompts repository selection.
64+
- In non-interactive mode, repository must be provided explicitly.
65+
66+
Prefer providing the repository in the command to avoid interactive prompts, especially in non-interactive contexts. If the repository is not provided and the terminal is interactive, the CLI will prompt the user to select a repository from their accessible repositories. If the terminal is non-interactive and the repository is not provided, the command will fail with an error indicating that the repository is required.
67+
68+
4. Sync centralized config on demand.
69+
70+
A sync will pull the latest configuration from the repository and override the user's current configuration defined in the Kodus database with the config from the repository. Syncs happen automatically when a PR is merged regardless of the initial sync option selected, but users can also choose to run a manual sync at any time to pull the latest changes from the repository.
71+
72+
```bash
73+
kodus config centralized sync
74+
```
75+
76+
Avoid running sync automatically after init to give users control over when to pull changes, especially if they want to review or customize the generated config before applying it.
77+
78+
Running sync will override the user's current configuration with the config from the repository, so it's best to let users decide when to do this, be sure to warn them of this when they ask to run sync and recommend downloading the config first as a backup before syncing.
79+
80+
5. Disable centralized config when requested.
81+
82+
```bash
83+
kodus config centralized disable
84+
```
85+
86+
6. Download centralized config zip artifact.
87+
88+
```bash
89+
kodus config centralized download --out <path/to/centralized-config.zip>
90+
```
91+
92+
- `--out` is required.
93+
94+
## Output Guidance
95+
96+
- Prefer using `--json` to receive structured output.
97+
- When providing output to the user, summarize the key information and next steps rather than dumping raw command output.
98+
99+
## Safety Notes
100+
101+
- Do not suggest manually editing backend parameters for centralized config when CLI commands exist.
102+
- If repository selection fails, verify the repository is already selected in Kodus (`kodus config remote list`).

0 commit comments

Comments
 (0)