ai-ops-cli 0.1.22 → 0.1.23

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 (2) hide show
  1. package/README.md +92 -49
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -4,53 +4,45 @@ CLI for managing AI tool rules and presets across projects.
4
4
 
5
5
  ## Why this exists
6
6
 
7
- `ai-ops-cli` was created to reduce configuration drift across AI coding tools in a team.
7
+ `ai-ops-cli` reduces configuration drift across AI coding tools.
8
8
 
9
- - Different tools (Claude Code, Codex, Gemini CLI) require different file locations and prompt layouts.
10
- - Tool conventions evolve over time, so manually maintained setup files become inconsistent quickly.
11
- - Teams need a single, repeatable way to install and maintain AI rule scaffolding.
9
+ - Different tools use different file layouts and loading models.
10
+ - Manual sync across tools is error-prone over time.
11
+ - Teams need a deterministic, repeatable setup for AI pair-programming rules.
12
12
 
13
- This project uses a centralized rule source (SSOT) and scaffolds tool-native files into the current project.
14
- For the full product background and architecture intent, see [`docs/plan.md`](../../docs/plan.md).
13
+ The CLI uses centralized YAML rules as SSOT and renders tool-native files into the current project.
15
14
 
16
- ### What this library provides
15
+ > **📌 Core Concept**
16
+ >
17
+ > Instead of directly managing platform-specific files, manage **abstract metadata** as SSOT and achieve **Asset Centralization** across multiple AI environments.
17
18
 
18
- - Interactive installation flow for supported AI tools (`ai-ops init`)
19
- - Managed updates based on installed manifest (`ai-ops update`)
20
- - Drift detection against current source hash (`ai-ops diff`)
21
- - Safe cleanup of installed managed files + manifest (`ai-ops uninstall`)
22
- - Project-local installation and management
19
+ ## What this CLI provides
23
20
 
24
- ### What this library does not provide
21
+ - Interactive installation (`ai-ops init`)
22
+ - Source drift checks (`ai-ops diff`)
23
+ - Deterministic re-apply (`ai-ops update`)
24
+ - Managed cleanup (`ai-ops uninstall`)
25
+ - Project-only operation (no global scope)
25
26
 
26
- - A hosted backend or remote state service
27
- - Rule authoring workflow inside the CLI itself
28
- - IDE-specific plugin management
27
+ ## What this CLI does not provide
29
28
 
30
- ## Supported AI tools and installation model
29
+ - Hosted backend or remote state
30
+ - In-CLI rule authoring UI
31
+ - IDE plugin management
31
32
 
32
- `ai-ops-cli` currently supports:
33
+ ## Supported tools and output layout
33
34
 
34
- - Claude Code (`claude-code`)
35
- - Codex (`codex`)
36
- - Gemini CLI (`gemini`)
35
+ | Tool | Single project output | Monorepo output |
36
+ | --- | --- | --- |
37
+ | Claude Code (`claude-code`) | `.claude/rules/<rule-id>.md` | Shared rules in `.claude/rules/*.md`, domain rules in `<workspace>/CLAUDE.md` |
38
+ | Codex (`codex`) | `AGENTS.md` and `AGENTS.override.md` | Root `AGENTS.md` and `<workspace>/AGENTS.override.md` |
39
+ | Gemini CLI (`gemini`) | `GEMINI.md` | Root `GEMINI.md` and `<workspace>/GEMINI.md` |
37
40
 
38
- ### Tool-specific installation layout
41
+ Optional settings files:
39
42
 
40
- | Tool | Single project | Monorepo | Why this layout (JIT rationale) |
41
- | ----------- | ------------------------------------- | ----------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
42
- | Claude Code | `.claude/rules/<rule-id>.md` per rule | Shared rules in `.claude/rules/*.md`, domain rules in `<workspace>/CLAUDE.md` | Keeps always-on rules stable while loading domain rules only for matching paths/workspaces. |
43
- | Codex | `AGENTS.md` + `AGENTS.override.md` | Root `AGENTS.md` + `<workspace>/AGENTS.override.md` | Uses root baseline + local override so only relevant workspace context is applied at execution time. |
44
- | Gemini CLI | `.gemini/GEMINI.md` | Root `.gemini/GEMINI.md` + `<workspace>/GEMINI.md` | Splits shared defaults and workspace-local context to reduce irrelevant prompt context. |
45
-
46
- Gemini CLI can also install optional runtime settings to `.gemini/settings.json`.
47
-
48
- ### Installation behavior details
49
-
50
- - Rules are split into shared and domain categories and rendered per tool with tool-native file shapes.
51
- - Existing managed files are replaced safely using ai-ops metadata headers.
52
- - Existing non-managed files are preserved and receive an `ai-ops` managed section block instead of full overwrite.
53
- - `update`, `diff`, and `uninstall` operate from the manifest to keep changes deterministic and idempotent.
43
+ - Claude Code: `.claude/settings.local.json`
44
+ - Gemini CLI: `.gemini/settings.json`
45
+ - Formatting protection section: `.prettierignore`
54
46
 
55
47
  ## Install
56
48
 
@@ -64,33 +56,84 @@ npm install -g ai-ops-cli
64
56
  # Initialize rules for the current project
65
57
  ai-ops init
66
58
 
67
- # Check for updates
59
+ # Check drift against current source hash
68
60
  ai-ops diff
69
61
 
70
- # Apply updates
62
+ # Re-apply installed rules (or force)
71
63
  ai-ops update
64
+ ai-ops update --force
72
65
 
73
- # Remove installed managed files and manifest
66
+ # Remove installed files and manifest
74
67
  ai-ops uninstall
75
68
  ```
76
69
 
77
- ## Options
70
+ ## CLI surface
78
71
 
79
- ```
80
- ai-ops [command] [options]
72
+ ```text
73
+ ai-ops [command]
81
74
 
82
75
  Commands:
83
- init Initialize AI tool rules for a project
84
- update Update installed rules
85
- diff Show diff between installed and current rules
86
- uninstall Remove installed rules and manifest
76
+ init Initialize AI tool rules for a project
77
+ update Update installed rules
78
+ diff Show diff between installed and current rules
79
+ uninstall Remove installed rules and manifest
87
80
 
88
81
  Options:
89
- --force Force update even when no changes detected
90
- -V, --version Output the version number
91
- -h, --help Display help
82
+ --force Force update even when no changes are detected (update only)
83
+ -V, --version Output version number
84
+ -h, --help Display help
85
+ ```
86
+
87
+ Notes:
88
+
89
+ - `--scope` is deprecated and explicitly rejected. The CLI is project-only.
90
+ - The installation state is tracked in `.ai-ops-manifest.json` at project root.
91
+
92
+ ## How install/update/uninstall behave
93
+
94
+ - Managed files are wrapped in an `ai-ops` section with metadata (`sourceHash`, `generatedAt`).
95
+ - If a file already has an `ai-ops` section, only that section is replaced.
96
+ - If a file has no managed section, generated content is appended and user content is preserved.
97
+ - `uninstall` removes only managed sections for appended files and keeps user-authored content.
98
+
99
+ ## Init flow summary
100
+
101
+ `ai-ops init` prompts for:
102
+
103
+ 1. Tool selection (`claude-code`, `codex`, `gemini`)
104
+ 2. Monorepo confirmation
105
+ 3. Preset selection per workspace
106
+ 4. Domain rule fine-tuning per workspace
107
+ 5. Optional settings installation
108
+
109
+ Preset and rules are loaded from:
110
+
111
+ - `apps/cli/data/presets.yaml`
112
+ - `apps/cli/data/rules/*.yaml`
113
+
114
+ ## Local development
115
+
116
+ From repo root:
117
+
118
+ ```bash
119
+ npm install
120
+ npm run build
121
+ npm run compile
122
+ npm test
92
123
  ```
93
124
 
125
+ From `apps/cli` workspace:
126
+
127
+ ```bash
128
+ npm run build --workspace=apps/cli
129
+ npm run test --workspace=apps/cli
130
+ ```
131
+
132
+ ## Related docs
133
+
134
+ - Master blueprint: [`docs/plan.md`](../../docs/plan.md)
135
+ - Implementation playbook: [`docs/implementation-playbook.md`](../../docs/implementation-playbook.md)
136
+
94
137
  ## License
95
138
 
96
139
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-ops-cli",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "CLI for ai-ops scaffolding — manage AI tool rules and presets",
5
5
  "license": "MIT",
6
6
  "repository": {