agconf 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024-2025 Julian Pani
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,150 @@
1
+ ---
2
+ layout: default
3
+ title: agent-conf cli
4
+ nav_order: 8
5
+ ---
6
+
7
+ # agent-conf
8
+
9
+ [![npm version](https://img.shields.io/npm/v/agent-conf.svg)](https://www.npmjs.com/package/agent-conf)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
+
12
+ CLI to sync AI agent configurations across repositories.
13
+
14
+ ## Documentation
15
+
16
+ Full documentation, setup guides, and FAQ available on GitHub:
17
+
18
+ **https://github.com/julian-pani/agent-conf**
19
+
20
+ ## Commands
21
+
22
+ | Command | Description |
23
+ |---------|-------------|
24
+ | `init` | Initialize repo from a canonical source |
25
+ | `sync` | Sync content from canonical repo (fetches latest by default) |
26
+ | `status` | Show current sync status |
27
+ | `check` | Verify managed files are unchanged |
28
+ | `upgrade-cli` | Upgrade the CLI to latest version from npm |
29
+ | `canonical init` | Scaffold a new canonical repository |
30
+ | `canonical update` | Update CLI version in workflow files |
31
+ | `config show` | Show current configuration |
32
+ | `completion install` | Install shell completions |
33
+
34
+
35
+ ## Quick Start
36
+
37
+ ### 1. Create a canonical repository
38
+
39
+ ```bash
40
+ mkdir engineering-standards && cd engineering-standards
41
+ git init
42
+ agent-conf canonical init --name my-standards --org "My Org"
43
+ ```
44
+
45
+ This scaffolds the structure for your standards. Edit `instructions/AGENTS.md` to add your engineering guidelines, then commit and push to GitHub.
46
+
47
+ ### 2. Sync to your projects
48
+
49
+ ```bash
50
+ cd your-project
51
+ agent-conf init --source your-org/engineering-standards
52
+ ```
53
+
54
+ ## Rules
55
+
56
+ Rules are modular, topic-specific project instructions that live in `.claude/rules/` for Claude targets. They allow you to organize standards by topic (security, testing, code style) rather than putting everything in a single AGENTS.md file.
57
+
58
+ ### Configuration
59
+
60
+ Add `rules_dir` to your canonical `agent-conf.yaml`:
61
+
62
+ ```yaml
63
+ version: "1.0.0"
64
+ content:
65
+ instructions: "instructions/AGENTS.md"
66
+ skills_dir: "skills"
67
+ rules_dir: "rules" # Optional - path to rules directory
68
+ targets: ["claude", "codex"]
69
+ ```
70
+
71
+ ### Directory Structure
72
+
73
+ Rules support arbitrary subdirectory nesting:
74
+
75
+ ```
76
+ canonical-repo/
77
+ ├── agent-conf.yaml
78
+ ├── instructions/
79
+ │ └── AGENTS.md
80
+ ├── skills/
81
+ └── rules/
82
+ ├── code-style.md
83
+ ├── security/
84
+ │ ├── api-auth.md
85
+ │ └── data-handling.md
86
+ └── testing/
87
+ └── unit-tests.md
88
+ ```
89
+
90
+ ### Target-Specific Behavior
91
+
92
+ **Claude**: Rules are copied to `.claude/rules/` preserving the directory structure. Each rule file gets metadata added to track sync status.
93
+
94
+ ```
95
+ downstream-repo/
96
+ └── .claude/
97
+ └── rules/
98
+ ├── code-style.md
99
+ ├── security/
100
+ │ └── api-auth.md
101
+ └── testing/
102
+ └── unit-tests.md
103
+ ```
104
+
105
+ **Codex**: Rules are concatenated into AGENTS.md under a `# Project Rules` section. Heading levels are automatically adjusted (h1 becomes h2, etc.) to nest under the section header.
106
+
107
+ ```markdown
108
+ <!-- agent-conf:rules:start -->
109
+ # Project Rules
110
+
111
+ <!-- Rule: code-style.md -->
112
+ ## Code Style Guidelines
113
+ ...
114
+
115
+ <!-- Rule: security/api-auth.md -->
116
+ ## API Authentication
117
+ ...
118
+ <!-- agent-conf:rules:end -->
119
+ ```
120
+
121
+ ### Path-Specific Rules
122
+
123
+ Rules can include `paths` frontmatter for conditional loading (a Claude feature):
124
+
125
+ ```markdown
126
+ ---
127
+ paths:
128
+ - "src/api/**/*.ts"
129
+ - "lib/api/**/*.ts"
130
+ ---
131
+
132
+ # API Authentication Rules
133
+ ...
134
+ ```
135
+
136
+ For Claude targets, the `paths` frontmatter is preserved. For Codex targets (which don't support conditional loading), paths are included as comments in AGENTS.md:
137
+
138
+ ```markdown
139
+ <!-- Rule: security/api-auth.md -->
140
+ <!-- Applies to: src/api/**/*.ts, lib/api/**/*.ts -->
141
+ ## API Authentication Rules
142
+ ```
143
+
144
+ ### Backward Compatibility
145
+
146
+ The `rules_dir` configuration is optional. Existing canonical repositories without rules continue to work unchanged.
147
+
148
+ ## License
149
+
150
+ MIT