agentscfg 0.1.0-alpha.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/EPOCH_SEMVER.md +34 -0
- package/README.md +130 -0
- package/dist/cli.cjs +28490 -0
- package/dist/cli.js +28648 -0
- package/package.json +30 -0
package/EPOCH_SEMVER.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Epoch SemVer
|
|
2
|
+
|
|
3
|
+
This repo uses **epoch semver**: we stay SemVer-compatible while reserving room for
|
|
4
|
+
rare “era” resets.
|
|
5
|
+
|
|
6
|
+
## Format
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
version = (epoch * 1000 + major).minor.patch
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
- `epoch` is an integer >= 0, bumped only for major eras.
|
|
13
|
+
- `major` is 0–999 within an epoch.
|
|
14
|
+
- `minor` and `patch` follow standard SemVer meaning.
|
|
15
|
+
|
|
16
|
+
## Bump rules
|
|
17
|
+
|
|
18
|
+
- **patch**: bug fixes, internal refactors, docs, small behavior fixes.
|
|
19
|
+
- **minor**: backwards-compatible features.
|
|
20
|
+
- **major**: breaking changes within the current epoch.
|
|
21
|
+
- **epoch**: rare, large-scale resets (architecture rewrite, new core goals, etc.).
|
|
22
|
+
When incrementing epoch, reset major/minor/patch to 0.
|
|
23
|
+
|
|
24
|
+
## Examples
|
|
25
|
+
|
|
26
|
+
- epoch 0, major 2, minor 1, patch 0 -> `2.1.0`
|
|
27
|
+
- epoch 1, major 0, minor 0, patch 0 -> `1000.0.0`
|
|
28
|
+
- epoch 1, major 5, minor 2, patch 3 -> `1005.2.3`
|
|
29
|
+
|
|
30
|
+
## Guidance
|
|
31
|
+
|
|
32
|
+
- If an epoch bump is required, document the rationale in release notes.
|
|
33
|
+
- Keep the `major` value within 0–999 to avoid overlapping epochs.
|
|
34
|
+
- This file should be updated when the epoch changes.
|
package/README.md
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# agentscfg
|
|
2
|
+
|
|
3
|
+
Define AI coding agent configuration once in `.agentscfg/`, then generate equivalent
|
|
4
|
+
config for Claude Code, OpenCode, and Codex CLI.
|
|
5
|
+
|
|
6
|
+
## Requirements
|
|
7
|
+
|
|
8
|
+
- Bun (v1.2+)
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
bun install
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Run
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
bun run index.ts <command> [flags]
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Run (npx/bunx)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx agentscfg <command> [flags]
|
|
26
|
+
bunx agentscfg <command> [flags]
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Typical workflow
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
bun run index.ts init
|
|
33
|
+
# edit .agentscfg/instructions/* and .agentscfg/skills/*
|
|
34
|
+
bun run index.ts plan
|
|
35
|
+
bun run index.ts diff
|
|
36
|
+
bun run index.ts sync
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Commands
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
init [--force]
|
|
43
|
+
validate
|
|
44
|
+
plan [--to claude,opencode,codex] [--json]
|
|
45
|
+
diff [--to ...]
|
|
46
|
+
sync [--to ...] [--remove] [--adopt] [--force] [--allow-dirty]
|
|
47
|
+
doctor
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Canonical layout
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
.agentscfg/
|
|
54
|
+
agentscfg.jsonc
|
|
55
|
+
instructions/
|
|
56
|
+
BASE.md
|
|
57
|
+
PROJECT.md
|
|
58
|
+
skills/
|
|
59
|
+
<skill-name>/
|
|
60
|
+
SKILL.md
|
|
61
|
+
scripts/
|
|
62
|
+
references/
|
|
63
|
+
assets/
|
|
64
|
+
targets/
|
|
65
|
+
claude/
|
|
66
|
+
opencode/
|
|
67
|
+
codex/
|
|
68
|
+
mcp/
|
|
69
|
+
mcp.json
|
|
70
|
+
.managed.json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Supported inputs (v0.2)
|
|
74
|
+
|
|
75
|
+
- Instructions: `.agentscfg/instructions/BASE.md` (+ optional `PROJECT.md`)
|
|
76
|
+
- Skills: `.agentscfg/skills/<skill>/SKILL.md` (+ optional resources)
|
|
77
|
+
- Targets (tool settings): `.agentscfg/targets/<tool>/**`
|
|
78
|
+
- MCP config: `.agentscfg/mcp/mcp.json`
|
|
79
|
+
|
|
80
|
+
## Outputs (repo-only)
|
|
81
|
+
|
|
82
|
+
- Claude Code: `CLAUDE.md`, `.claude/skills/<skill>/...`
|
|
83
|
+
- OpenCode: `.opencode/agent/default.md`, `.opencode/skill/<skill>/...`
|
|
84
|
+
- plus a Claude-compatible skills path in `.claude/skills/<skill>/...`
|
|
85
|
+
- Codex CLI: `AGENTS.md`, `.codex/skills/<skill>/...`
|
|
86
|
+
|
|
87
|
+
### Target mappings
|
|
88
|
+
|
|
89
|
+
All files under `.agentscfg/targets/<tool>/` are synced into the tool’s config
|
|
90
|
+
directory:
|
|
91
|
+
|
|
92
|
+
- `.agentscfg/targets/claude/**` → `.claude/**`
|
|
93
|
+
- `.agentscfg/targets/opencode/**` → `.opencode/**`
|
|
94
|
+
- `.agentscfg/targets/codex/**` → `.codex/**`
|
|
95
|
+
|
|
96
|
+
Legacy single-file mappings are also supported:
|
|
97
|
+
|
|
98
|
+
- `.agentscfg/targets/claude.settings.json` → `.claude/settings.json`
|
|
99
|
+
- `.agentscfg/targets/opencode.json` → `opencode.json`
|
|
100
|
+
- `.agentscfg/targets/codex.config.toml` → `.codex/config.toml`
|
|
101
|
+
|
|
102
|
+
MCP is synced separately:
|
|
103
|
+
|
|
104
|
+
- `.agentscfg/mcp/mcp.json` → `.mcp.json`
|
|
105
|
+
|
|
106
|
+
## Managed files + adoption
|
|
107
|
+
|
|
108
|
+
- Generated files include a `agentscfg:generated ... sha256=...` marker.
|
|
109
|
+
- Guided mode (default) will not overwrite unmanaged files unless you pass
|
|
110
|
+
`--adopt` or the file already contains the marker.
|
|
111
|
+
- If a generated file’s hash marker does not match, sync refuses to overwrite
|
|
112
|
+
unless `--force` is provided.
|
|
113
|
+
- `sync` refuses to run on a dirty git working tree unless `--allow-dirty` is set.
|
|
114
|
+
|
|
115
|
+
## Notes
|
|
116
|
+
|
|
117
|
+
- v0.1 is repo-only (no global/HOME sync).
|
|
118
|
+
- `agentscfg init` creates a starter `.agentscfg/` workspace.
|
|
119
|
+
|
|
120
|
+
## Tips
|
|
121
|
+
|
|
122
|
+
- The following paths are managed by agentscfg. Add them to `.gitignore` and use `agentscfg sync` to regenerate them:
|
|
123
|
+
|
|
124
|
+
```text
|
|
125
|
+
.claude/
|
|
126
|
+
.codex/
|
|
127
|
+
.opencode/
|
|
128
|
+
AGENTS.md
|
|
129
|
+
CLAUDE.md
|
|
130
|
+
```
|