@ainova-systems/intelligence 0.11.9 → 0.12.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/cli/commands/init.sh +12 -1
- package/cli/lib/cli-common.sh +1 -0
- package/cli/lib/gitignore.sh +45 -19
- package/engine/ENGINE_SHA +1 -1
- package/engine/VERSION +1 -1
- package/engine/adapters/antigravity.sh +197 -0
- package/engine/lib/common.sh +5 -0
- package/package.json +1 -1
- package/packages/sync/references/adapters.md +3 -1
- package/packages/sync/references/conventions.md +12 -7
- package/packages/sync/rules/intelligence-authoring.md +2 -2
- package/packages/sync/skills/intelligence-add-agent/SKILL.md +1 -1
package/cli/commands/init.sh
CHANGED
|
@@ -224,9 +224,20 @@ if [ -n "$targets_arg" ]; then
|
|
|
224
224
|
else
|
|
225
225
|
if [ -d "$root/.claude" ] || [ -f "$root/CLAUDE.md" ]; then targets="$targets claude"; fi
|
|
226
226
|
if [ -d "$root/.cursor" ] || [ -f "$root/.cursorrules" ]; then targets="$targets cursor"; fi
|
|
227
|
-
|
|
227
|
+
# `.agents/skills` is the only part of the shared root Codex reads, so it is
|
|
228
|
+
# the only part that may imply Codex. `.agents/` as a whole cannot: its
|
|
229
|
+
# `rules/`, `agents/` and `workflows/` siblings belong to Antigravity, and
|
|
230
|
+
# treating them as a Codex marker would invent a tool the project shows no
|
|
231
|
+
# trace of.
|
|
232
|
+
if [ -d "$root/.codex" ] || [ -d "$root/.agents/skills" ]; then targets="$targets codex"; fi
|
|
228
233
|
[ -d "$root/.pi" ] && targets="$targets pi"
|
|
229
234
|
[ -d "$root/.opencode" ] && targets="$targets opencode"
|
|
235
|
+
if [ -f "$root/GEMINI.md" ] \
|
|
236
|
+
|| [ -d "$root/.agents/rules" ] \
|
|
237
|
+
|| [ -d "$root/.agents/agents" ] \
|
|
238
|
+
|| [ -d "$root/.agents/workflows" ]; then
|
|
239
|
+
targets="$targets antigravity"
|
|
240
|
+
fi
|
|
230
241
|
if [ -f "$root/.github/copilot-instructions.md" ] \
|
|
231
242
|
|| [ -d "$root/.github/instructions" ] \
|
|
232
243
|
|| [ -d "$root/.github/agents" ] \
|
package/cli/lib/cli-common.sh
CHANGED
package/cli/lib/gitignore.sh
CHANGED
|
@@ -15,34 +15,60 @@ gitignore_path_is_ignored() {
|
|
|
15
15
|
git -C "$root" check-ignore -q --no-index -- "$path"
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
#
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
# True when the file's last lines are exactly these, in order.
|
|
19
|
+
gitignore_tail_is() {
|
|
20
|
+
local file="$1"; shift
|
|
21
|
+
[ -f "$file" ] || return 1
|
|
22
|
+
local want tail_lines
|
|
23
|
+
want="$(printf '%s\n' "$@")"
|
|
24
|
+
tail_lines="$(tail -n "$#" -- "$file")"
|
|
25
|
+
[ "$tail_lines" = "$want" ]
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
# Git cannot re-include a child of an excluded directory, so an include needs an
|
|
29
|
+
# explicit negation for every parent. A negation only wins when it comes after
|
|
30
|
+
# the rule excluding the parent, and the only repair an append can make is to
|
|
31
|
+
# move the whole chain last — so the repair runs when, and only when, the chain
|
|
32
|
+
# is not already there.
|
|
33
|
+
#
|
|
34
|
+
# Probe the include TARGET, never a parent with a trailing slash: `dir/*` — the
|
|
35
|
+
# ignore this very policy writes — matches `dir/` because `*` matches the empty
|
|
36
|
+
# string, so a parent probe answers "still ignored" in the healthy end state.
|
|
37
|
+
# Keyed on that, the repair re-appended a line already last, which cannot change
|
|
38
|
+
# the answer, and the file grew by one line on every run.
|
|
22
39
|
gitignore_add_effective_include() {
|
|
23
|
-
local root="$1" value="${2#./}" dir parent="" part rc
|
|
40
|
+
local root="$1" value="${2#./}" dir parent="" part line rc
|
|
41
|
+
local -a negations=()
|
|
24
42
|
dir="${value%/*}"
|
|
25
43
|
if [ "$dir" != "$value" ]; then
|
|
26
44
|
while IFS= read -r part; do
|
|
27
45
|
[ -n "$part" ] || continue
|
|
28
46
|
if [ -n "$parent" ]; then parent="$parent/$part"; else parent="$part"; fi
|
|
29
|
-
|
|
30
|
-
if gitignore_path_is_ignored "$root" "$parent/"; then
|
|
31
|
-
printf '!%s/\n' "$parent" >> "$root/.gitignore"
|
|
32
|
-
else
|
|
33
|
-
rc=$?
|
|
34
|
-
[ "$rc" -eq 1 ] || [ "$rc" -eq 2 ] || return "$rc"
|
|
35
|
-
fi
|
|
47
|
+
negations+=("!$parent/")
|
|
36
48
|
done < <(printf '%s\n' "$dir" | tr '/' '\n')
|
|
37
49
|
fi
|
|
50
|
+
negations+=("!$value")
|
|
38
51
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
for line in "${negations[@]}"; do
|
|
53
|
+
gitignore_add_line "$root" "$line"
|
|
54
|
+
done
|
|
55
|
+
|
|
56
|
+
# `|| rc=$?` keeps the probe out of `set -e`'s reach: its honest "not
|
|
57
|
+
# ignored" is exit 1, and a bare call would abort the whole command there.
|
|
58
|
+
rc=0
|
|
59
|
+
gitignore_path_is_ignored "$root" "$value" || rc=$?
|
|
60
|
+
case "$rc" in
|
|
61
|
+
0) ;;
|
|
62
|
+
1|2) return 0 ;;
|
|
63
|
+
*) return "$rc" ;;
|
|
64
|
+
esac
|
|
65
|
+
|
|
66
|
+
# Still ignored: an earlier negation is shadowed by a later rule. Move the
|
|
67
|
+
# chain last. Already last means appending cannot help — leave it, and let
|
|
68
|
+
# `status --check` report the re-inclusion this policy could not make
|
|
69
|
+
# effective rather than growing the file forever.
|
|
70
|
+
gitignore_tail_is "$root/.gitignore" "${negations[@]}" && return 0
|
|
71
|
+
printf '%s\n' "${negations[@]}" >> "$root/.gitignore"
|
|
46
72
|
}
|
|
47
73
|
|
|
48
74
|
ensure_gitignore_header() {
|
package/engine/ENGINE_SHA
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9a4af90d8c755b5486a4a67af7c53c1be23f4641
|
package/engine/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.12.1
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# intelligence-sync: Google Antigravity adapter
|
|
3
|
+
# Transforms source prompts to Antigravity's native resource model.
|
|
4
|
+
#
|
|
5
|
+
# Rules:
|
|
6
|
+
# - Always-on (no `paths:`) -> SKIPPED here. Antigravity reads AGENTS.md
|
|
7
|
+
# natively at the workspace root, and the `agents` adapter inlines
|
|
8
|
+
# always-on rule content into it. Emitting copies under .agents/rules/
|
|
9
|
+
# would double-load the same text.
|
|
10
|
+
# - Path-scoped (with `paths:`) -> .agents/rules/<name>.md carrying
|
|
11
|
+
# `trigger: glob` and `globs:` (activation modes: always_on, manual,
|
|
12
|
+
# model_decision, glob). Antigravity documents a 12,000-character limit
|
|
13
|
+
# per rule file, so scoped rules stay short.
|
|
14
|
+
# - GEMINI.md outranks AGENTS.md in Antigravity's rule precedence, so the
|
|
15
|
+
# contract quarantines it at onboarding: left in place it would silently
|
|
16
|
+
# override every synced rule.
|
|
17
|
+
# Skills:
|
|
18
|
+
# - Copied to .agents/skills/ (Agent Skills open standard, shared with
|
|
19
|
+
# Codex, Pi and opencode). Antigravity reads that fixed workspace path,
|
|
20
|
+
# never the configured output, and selects skills by description.
|
|
21
|
+
# Agents:
|
|
22
|
+
# - Converted to .agents/agents/<name>.md. `name` and `description` are
|
|
23
|
+
# required; `model` accepts only inherit|flash|pro; `subagent: true` with
|
|
24
|
+
# `mainAgent: false` matches how every other adapter exposes Intelligence
|
|
25
|
+
# agents — as delegates, not as chat personas. A readonly agent gets an
|
|
26
|
+
# explicit `tools:` allowlist.
|
|
27
|
+
#
|
|
28
|
+
# Every per-file loop batches its work into one awk process (see the batched
|
|
29
|
+
# helpers in lib/common.sh): process spawns dominate sync time on Windows.
|
|
30
|
+
|
|
31
|
+
source "$(dirname "${BASH_SOURCE[0]}")/../lib/common.sh"
|
|
32
|
+
|
|
33
|
+
adapter_contract_antigravity() {
|
|
34
|
+
local output="${1%/}"
|
|
35
|
+
adapter_contract_version 1
|
|
36
|
+
adapter_contract_requires agents
|
|
37
|
+
adapter_contract_owned "$output/rules"
|
|
38
|
+
adapter_contract_owned "$output/agents"
|
|
39
|
+
adapter_contract_managed ".agents/skills"
|
|
40
|
+
adapter_contract_legacy "GEMINI.md"
|
|
41
|
+
adapter_contract_ignore "GEMINI.md"
|
|
42
|
+
adapter_contract_ignore "$output/rules/"
|
|
43
|
+
adapter_contract_ignore "$output/agents/"
|
|
44
|
+
adapter_contract_ignore ".agents/skills/"
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
sync_antigravity_rules() {
|
|
48
|
+
local repo_root="$1"
|
|
49
|
+
local config_file="$2"
|
|
50
|
+
local output_dir="$3"
|
|
51
|
+
|
|
52
|
+
local src f
|
|
53
|
+
local -a files=()
|
|
54
|
+
load_yaml_list "$config_file" "rules"
|
|
55
|
+
local list="$IS_YAML_LIST"
|
|
56
|
+
while IFS= read -r src; do
|
|
57
|
+
[ -z "$src" ] && continue
|
|
58
|
+
local dir="$repo_root/$src"
|
|
59
|
+
[ -d "$dir" ] || continue
|
|
60
|
+
for f in "$dir"/*.md; do
|
|
61
|
+
[ -f "$f" ] || continue
|
|
62
|
+
files+=("$f")
|
|
63
|
+
done
|
|
64
|
+
done <<< "$list"
|
|
65
|
+
|
|
66
|
+
# Skip always-on rules: AGENTS.md (canonical) carries them.
|
|
67
|
+
local path hp base
|
|
68
|
+
local -a scoped=()
|
|
69
|
+
if [ "${#files[@]}" -gt 0 ]; then
|
|
70
|
+
while IFS=$'\x1f' read -r path hp; do
|
|
71
|
+
[ -n "$path" ] || continue
|
|
72
|
+
[ "$hp" -eq 0 ] && continue
|
|
73
|
+
scoped+=("$path")
|
|
74
|
+
done < <(frontmatter_index "paths#" "${files[@]}")
|
|
75
|
+
fi
|
|
76
|
+
if [ "${#scoped[@]}" -eq 0 ]; then
|
|
77
|
+
echo " -> Rules: 0 scoped (AGENTS.md carries always-on)"
|
|
78
|
+
return 0
|
|
79
|
+
fi
|
|
80
|
+
|
|
81
|
+
# Path-scoped rule -> Glob activation (paths -> globs)
|
|
82
|
+
is_fin_awk_vars
|
|
83
|
+
awk "${IS_FIN_V[@]}" -v dst="$output_dir/rules" "$IS_AWK_LIB"'
|
|
84
|
+
FNR == 1 {
|
|
85
|
+
if (out != "") close(out)
|
|
86
|
+
out = dst "/" base_name(FILENAME)
|
|
87
|
+
}
|
|
88
|
+
{
|
|
89
|
+
sub(/\r$/, "")
|
|
90
|
+
sub(/^paths:/, "globs:")
|
|
91
|
+
}
|
|
92
|
+
FNR == 1 {
|
|
93
|
+
print fin_line($0) > out
|
|
94
|
+
print fin_line("trigger: glob") > out
|
|
95
|
+
next
|
|
96
|
+
}
|
|
97
|
+
{ print fin_line($0) > out }
|
|
98
|
+
END { if (out != "") close(out) }
|
|
99
|
+
' "${scoped[@]}"
|
|
100
|
+
|
|
101
|
+
for f in "${scoped[@]}"; do
|
|
102
|
+
base="${f##*/}"
|
|
103
|
+
echo " rule: $base (scoped)"
|
|
104
|
+
done
|
|
105
|
+
echo " -> Rules: ${#scoped[@]} scoped"
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
sync_antigravity_agents() {
|
|
109
|
+
local repo_root="$1"
|
|
110
|
+
local config_file="$2"
|
|
111
|
+
local agents_dir="$3"
|
|
112
|
+
|
|
113
|
+
local src f
|
|
114
|
+
local -a files=()
|
|
115
|
+
load_yaml_list "$config_file" "agents"
|
|
116
|
+
local list="$IS_YAML_LIST"
|
|
117
|
+
while IFS= read -r src; do
|
|
118
|
+
[ -z "$src" ] && continue
|
|
119
|
+
local dir="$repo_root/$src"
|
|
120
|
+
[ -d "$dir" ] || continue
|
|
121
|
+
for f in "$dir"/*.md; do
|
|
122
|
+
[ -f "$f" ] || continue
|
|
123
|
+
files+=("$f")
|
|
124
|
+
done
|
|
125
|
+
done <<< "$list"
|
|
126
|
+
|
|
127
|
+
local count=0
|
|
128
|
+
if [ "${#files[@]}" -gt 0 ]; then
|
|
129
|
+
load_model_tiers "$config_file" "antigravity"
|
|
130
|
+
|
|
131
|
+
local path tier access description name spec="" report="" LS=$'\x1e'
|
|
132
|
+
while IFS=$'\x1f' read -r path tier access description; do
|
|
133
|
+
[ -n "$path" ] || continue
|
|
134
|
+
name="${path##*/}"; name="${name%.md}"
|
|
135
|
+
resolve_model_var "$tier"
|
|
136
|
+
|
|
137
|
+
local header
|
|
138
|
+
yaml_dq_escape_var "$name"
|
|
139
|
+
header="${LS}---"
|
|
140
|
+
header+="${LS}name: \"$IS_YAML_ESCAPED\""
|
|
141
|
+
yaml_dq_escape_var "$description"
|
|
142
|
+
header+="${LS}description: \"$IS_YAML_ESCAPED\""
|
|
143
|
+
if [ -n "$IS_MODEL" ]; then
|
|
144
|
+
yaml_dq_escape_var "$IS_MODEL"
|
|
145
|
+
header+="${LS}model: \"$IS_YAML_ESCAPED\""
|
|
146
|
+
fi
|
|
147
|
+
header+="${LS}subagent: true"
|
|
148
|
+
header+="${LS}mainAgent: false"
|
|
149
|
+
# A readonly agent gets an explicit allowlist. It holds only tool
|
|
150
|
+
# identifiers the official docs name, because an unknown entry in
|
|
151
|
+
# an allowlist silently removes a capability rather than failing:
|
|
152
|
+
# a directory-listing tool is left out until one is documented.
|
|
153
|
+
# An unrestricted agent declares no list and inherits the main
|
|
154
|
+
# agent's tools, which is Antigravity's default.
|
|
155
|
+
if [ "$access" = "readonly" ]; then
|
|
156
|
+
header+="${LS}tools:"
|
|
157
|
+
header+="${LS} - view_file"
|
|
158
|
+
header+="${LS} - grep_search"
|
|
159
|
+
header+="${LS} - search_web"
|
|
160
|
+
header+="${LS} - read_url_content"
|
|
161
|
+
fi
|
|
162
|
+
header+="${LS}---"
|
|
163
|
+
header+="${LS}"
|
|
164
|
+
header+="${LS}<!-- Generated by intelligence-sync. Do not edit manually. -->"
|
|
165
|
+
header+="${LS}"
|
|
166
|
+
|
|
167
|
+
spec+="$path"$'\x1f'"$agents_dir/$name.md"$'\x1f'"strip"$'\x1f'"1"$'\x1f'"none"$'\x1f'"$header"$'\x1f\n'
|
|
168
|
+
report+=" agent: $name.md"$'\n'
|
|
169
|
+
count=$((count + 1))
|
|
170
|
+
done < <(frontmatter_index "tier,access,description" "${files[@]}")
|
|
171
|
+
|
|
172
|
+
emit_wrapped_bodies "$spec"
|
|
173
|
+
printf '%s' "$report"
|
|
174
|
+
fi
|
|
175
|
+
|
|
176
|
+
echo " -> Agents: $count"
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
sync_to_antigravity() {
|
|
180
|
+
local repo_root="$1"
|
|
181
|
+
local config_file="$2"
|
|
182
|
+
local output_dir="$3"
|
|
183
|
+
|
|
184
|
+
echo "=== Antigravity ==="
|
|
185
|
+
|
|
186
|
+
rm -rf "$output_dir/rules" "$output_dir/agents"
|
|
187
|
+
mkdir -p "$output_dir/rules" "$output_dir/agents"
|
|
188
|
+
|
|
189
|
+
sync_antigravity_rules "$repo_root" "$config_file" "$output_dir"
|
|
190
|
+
|
|
191
|
+
# Skills -> .agents/skills/ (open standard; Antigravity reads that fixed
|
|
192
|
+
# workspace path). `sync_open_skill_dirs` owns clean + populate of this
|
|
193
|
+
# shared dir, and replays it when Codex, Pi or opencode already filled it.
|
|
194
|
+
sync_open_skill_dirs "$repo_root" "$config_file" "$repo_root/.agents/skills"
|
|
195
|
+
|
|
196
|
+
sync_antigravity_agents "$repo_root" "$config_file" "$output_dir/agents"
|
|
197
|
+
}
|
package/engine/lib/common.sh
CHANGED
|
@@ -830,6 +830,11 @@ get_model_default() {
|
|
|
830
830
|
codex:heavy) echo "gpt-5.6-sol" ;;
|
|
831
831
|
codex:standard) echo "gpt-5.6-terra" ;;
|
|
832
832
|
codex:light) echo "gpt-5.6-luna" ;;
|
|
833
|
+
# Antigravity accepts only inherit|flash|pro, so standard and light
|
|
834
|
+
# share `flash` — there is no third tier to map onto.
|
|
835
|
+
antigravity:heavy) echo "pro" ;;
|
|
836
|
+
antigravity:standard) echo "flash" ;;
|
|
837
|
+
antigravity:light) echo "flash" ;;
|
|
833
838
|
opencode:heavy) echo "anthropic/claude-opus-4-8" ;;
|
|
834
839
|
opencode:standard) echo "anthropic/claude-sonnet-5" ;;
|
|
835
840
|
opencode:light) echo "anthropic/claude-haiku-4-5-20251001" ;;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ainova-systems/intelligence",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Build, version and distribute AI agent intelligence across your organization — one CLI, versioned Intelligence Packages, and a sync engine for Claude Code, Cursor, Copilot, Codex, Pi and OpenCode.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"intelligence": "bin/intelligence.js"
|
|
@@ -163,6 +163,7 @@ Intelligence routes always-on rules once through `AGENTS.md` for tools that cons
|
|
|
163
163
|
| Built-in | Always-on rules | Scoped rules |
|
|
164
164
|
|---|---|---|
|
|
165
165
|
| `agents` | Inline in `AGENTS.md` | List with links |
|
|
166
|
+
| `antigravity` | Omit; reads `AGENTS.md` | `.agents/rules/*.md` with `trigger: glob` and `globs:` |
|
|
166
167
|
| `claude` | Copy | Copy with `paths:` preserved |
|
|
167
168
|
| `cursor` | Omit; reads `AGENTS.md` | `.mdc` with `globs:` |
|
|
168
169
|
| `copilot` | Omit; reads `AGENTS.md` | `.instructions.md` with `applyTo:` |
|
|
@@ -186,7 +187,7 @@ copy_skill_bundle "$source_skill_dir" "$output_dir/skills/$skill_name"
|
|
|
186
187
|
|
|
187
188
|
Do not use plain `cp` for skill bundles. `copy_skill_bundle` preserves non-Markdown assets, avoids materializing symlink targets, normalizes Markdown, expands layout tokens and quotes `description` and `argument-hint` where strict YAML readers require strings.
|
|
188
189
|
|
|
189
|
-
Codex, Pi and OpenCode share `.agents/skills/`. Any adapter writing that open-standard directory must call `sync_open_skill_dirs`; it is the single lifecycle owner for immediate skill subdirectories.
|
|
190
|
+
Antigravity, Codex, Pi and OpenCode share `.agents/skills/`. Any adapter writing that open-standard directory must call `sync_open_skill_dirs`; it is the single lifecycle owner for immediate skill subdirectories.
|
|
190
191
|
|
|
191
192
|
### Agents
|
|
192
193
|
|
|
@@ -300,6 +301,7 @@ For a built-in adapter, add the same assertions to the repository's smoke or lif
|
|
|
300
301
|
| Adapter | Primary output |
|
|
301
302
|
|---|---|
|
|
302
303
|
| `agents` | `AGENTS.md` |
|
|
304
|
+
| `antigravity` | `.agents/rules`, `.agents/agents`, `.agents/skills` |
|
|
303
305
|
| `claude` | `.claude/rules`, `.claude/agents`, `.claude/skills` |
|
|
304
306
|
| `cursor` | `.cursor/rules`, `.cursor/agents`, `.cursor/skills` |
|
|
305
307
|
| `copilot` | `.github/instructions`, `.github/agents`, `.github/skills` |
|
|
@@ -156,7 +156,7 @@ Agent instructions in Markdown.
|
|
|
156
156
|
|
|
157
157
|
An agent stays thin: **Expertise** → **Boundaries** → **Build & Verify**. Its role, limits and proof of completion belong here; reusable constraints belong in rules and reusable procedures belong in skills.
|
|
158
158
|
|
|
159
|
-
Do not instruct an agent to read rules or restate their content. Claude loads its generated rules for its subagents, while Cursor, Copilot, Codex, Pi and
|
|
159
|
+
Do not instruct an agent to read rules or restate their content. Claude loads its generated rules for its subagents, while Cursor, Copilot, Codex, Pi, OpenCode and Antigravity receive always-on rules through `AGENTS.md`. Duplicating a rule in an agent spends context twice and creates a copy that drifts.
|
|
160
160
|
|
|
161
161
|
### Tier mappings
|
|
162
162
|
|
|
@@ -196,12 +196,12 @@ Rule content in Markdown.
|
|
|
196
196
|
|
|
197
197
|
### Routing
|
|
198
198
|
|
|
199
|
-
| Source rule | Claude | Cursor | Copilot | Codex / Pi / OpenCode / `AGENTS.md` |
|
|
200
|
-
|
|
201
|
-
| Scoped | copied with `paths:` | `.mdc` with `globs:` | `.instructions.md` with `applyTo:` | listed in `AGENTS.md`; Pi also gets on-demand files and an extension |
|
|
202
|
-
| Always-on | copied | omitted | omitted | inlined once into `AGENTS.md` |
|
|
199
|
+
| Source rule | Claude | Cursor | Antigravity | Copilot | Codex / Pi / OpenCode / `AGENTS.md` |
|
|
200
|
+
|---|---|---|---|---|---|
|
|
201
|
+
| Scoped | copied with `paths:` | `.mdc` with `globs:` | `.md` with `trigger: glob` and `globs:` | `.instructions.md` with `applyTo:` | listed in `AGENTS.md`; Pi also gets on-demand files and an extension |
|
|
202
|
+
| Always-on | copied | omitted | omitted | omitted | inlined once into `AGENTS.md` |
|
|
203
203
|
|
|
204
|
-
Cursor, Copilot, Codex, Pi and
|
|
204
|
+
Cursor, Copilot, Codex, Pi, OpenCode and Antigravity consume `AGENTS.md`, so always-on rules are not duplicated in their tool-specific channels. Claude does not consume `AGENTS.md`, so it receives the full rule set. OpenCode and Codex have no generated path-scoped rule channel; OpenCode users may configure `instructions:` globs themselves.
|
|
205
205
|
|
|
206
206
|
Keep always-on rules small. Put narrow framework or component guidance behind `paths:` so unrelated tasks do not pay its context cost.
|
|
207
207
|
|
|
@@ -288,6 +288,7 @@ Every line enters a finite context budget. Prefer subtraction, consolidation and
|
|
|
288
288
|
| Target | Rules | Skills | Agents |
|
|
289
289
|
|---|---|---|---|
|
|
290
290
|
| `agents` | Always-on inlined; scoped listed in `AGENTS.md` | Listed | Listed |
|
|
291
|
+
| Antigravity | `AGENTS.md` plus scoped `.agents/rules/*.md` | `.agents/skills/` | `.agents/agents/*.md` |
|
|
291
292
|
| Claude | `.claude/rules/` | `.claude/skills/` | `.claude/agents/` |
|
|
292
293
|
| Cursor | scoped `.cursor/rules/*.mdc` | `.cursor/skills/` | `.cursor/agents/` |
|
|
293
294
|
| Copilot | scoped `.github/instructions/*.instructions.md` | `.github/skills/` | `.github/agents/` |
|
|
@@ -306,6 +307,7 @@ By default, commit the manifest, lock, project-owned content, `AGENTS.md`, and s
|
|
|
306
307
|
# Local root instructions migrate into project rules; local preferences stay ignored
|
|
307
308
|
CLAUDE.md
|
|
308
309
|
.cursorrules
|
|
310
|
+
GEMINI.md
|
|
309
311
|
|
|
310
312
|
# Generated Claude and Cursor content; shared settings remain trackable
|
|
311
313
|
.claude/*
|
|
@@ -315,8 +317,11 @@ CLAUDE.md
|
|
|
315
317
|
!.cursor/
|
|
316
318
|
!.cursor/settings.json
|
|
317
319
|
|
|
318
|
-
# Generated open-standard and
|
|
320
|
+
# Generated open-standard, Codex and Antigravity content. `.agents/` is a
|
|
321
|
+
# shared workspace root, so only the generated subdirectories are ignored.
|
|
319
322
|
.agents/skills/
|
|
323
|
+
.agents/rules/
|
|
324
|
+
.agents/agents/
|
|
320
325
|
.codex/agents/
|
|
321
326
|
|
|
322
327
|
# Generated Pi content
|
|
@@ -25,7 +25,7 @@ Three ways to shorten, in order of what they are worth:
|
|
|
25
25
|
|
|
26
26
|
## Source of truth
|
|
27
27
|
|
|
28
|
-
Edit the project-owned sources listed in `<manifest>` — the `rules/`, `agents/` and `skills/` directories it names — and `<manifest>` itself. An installed package source is replaced by CLI lifecycle/package operations; change it in its own repository. Everything else is derived: `.claude/`, `.cursor/`, `.github/{instructions,agents,skills}/`, `.codex/`, `.agents/skills/`, `.pi/`, `.opencode/` and `AGENTS.md` are **generated output**, and a hand edit there survives exactly until the next sync.
|
|
28
|
+
Edit the project-owned sources listed in `<manifest>` — the `rules/`, `agents/` and `skills/` directories it names — and `<manifest>` itself. An installed package source is replaced by CLI lifecycle/package operations; change it in its own repository. Everything else is derived: `.claude/`, `.cursor/`, `.github/{instructions,agents,skills}/`, `.codex/`, `.agents/{rules,agents,skills}/`, `.pi/`, `.opencode/` and `AGENTS.md` are **generated output**, and a hand edit there survives exactly until the next sync.
|
|
29
29
|
|
|
30
30
|
`<module>/` is the installed sync package's content. Package operations replace it, so a local edit there is lost. Fix it upstream instead.
|
|
31
31
|
|
|
@@ -68,7 +68,7 @@ The mistakes that actually happen, in order of frequency:
|
|
|
68
68
|
|
|
69
69
|
An agent is **thin**: who it is, where it stops, how it verifies. Nothing else.
|
|
70
70
|
|
|
71
|
-
- **Do not list rules for an agent to read.** They load on their own — Claude Code loads `.claude/rules/` into every custom subagent's startup context, and Cursor, Copilot, Codex, Pi and
|
|
71
|
+
- **Do not list rules for an agent to read.** They load on their own — Claude Code loads `.claude/rules/` into every custom subagent's startup context, and Cursor, Copilot, Codex, Pi, OpenCode and Antigravity receive always-on rules inlined in `AGENTS.md`. Naming a rule is fine; copying it is duplication that drifts.
|
|
72
72
|
- **Point at a rule, do not restate it.** Wanting to copy a rule into an agent means the rule is in the wrong place — move it.
|
|
73
73
|
- **Do carry** what is genuinely the agent's own: its boundaries ("if the app will not start, stop — do not hand-write the output"), its verification commands, its definition of done.
|
|
74
74
|
|
|
@@ -52,7 +52,7 @@ argument-hint: <domain> [description]
|
|
|
52
52
|
|
|
53
53
|
6. **Write body** with sections: **Expertise** -> **Boundaries** -> **Build & Verify**
|
|
54
54
|
- An agent is **thin**: who it is, where it stops, how it verifies. Everything else already reaches it.
|
|
55
|
-
- **Do not tell the agent to read the rules.** Rules load on their own: Claude Code loads `.claude/rules/` into every custom subagent's startup context alongside `CLAUDE.md` (*Subagents → What loads at startup*), and Cursor / Copilot / Codex / Pi / opencode receive always-on rules inlined in `AGENTS.md`. A `Read <content-dir>/rules/<domain>.md before starting` line duplicates content the agent already has — double the tokens, and a second copy that drifts from the rule it copied.
|
|
55
|
+
- **Do not tell the agent to read the rules.** Rules load on their own: Claude Code loads `.claude/rules/` into every custom subagent's startup context alongside `CLAUDE.md` (*Subagents → What loads at startup*), and Cursor / Copilot / Codex / Pi / opencode / Antigravity receive always-on rules inlined in `AGENTS.md`. A `Read <content-dir>/rules/<domain>.md before starting` line duplicates content the agent already has — double the tokens, and a second copy that drifts from the rule it copied.
|
|
56
56
|
- **Point at a rule, never restate it.** If you want to copy a rule into the agent, the rule is in the wrong place — move it, do not clone it.
|
|
57
57
|
- **Do carry** what is genuinely the agent's own: its boundaries ("if the app is not running, stop — do not hand-write the output"), its verification commands, its definition of done.
|
|
58
58
|
- All content must come from actual codebase analysis.
|