@ainova-systems/intelligence 0.11.0-rc.1 → 0.11.0-rc.10
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/README.md +19 -16
- package/cli/commands/adapter.sh +153 -0
- package/cli/commands/init.sh +171 -34
- package/cli/commands/package.sh +30 -0
- package/cli/commands/registry.sh +65 -30
- package/cli/commands/status.sh +20 -11
- package/cli/commands/sync.sh +9 -4
- package/cli/commands/update.sh +80 -46
- package/cli/engine-package.yaml +14 -0
- package/cli/intelligence +37 -26
- package/cli/internal/align-project.sh +134 -0
- package/cli/internal/check.sh +128 -0
- package/cli/internal/convert-legacy.sh +400 -0
- package/cli/{commands/add.sh → internal/package-add.sh} +37 -19
- package/cli/{commands/list.sh → internal/package-list.sh} +10 -5
- package/cli/{commands/remove.sh → internal/package-remove.sh} +16 -4
- package/cli/internal/package-search.sh +83 -0
- package/cli/internal/package-update.sh +103 -0
- package/cli/internal/restore.sh +130 -0
- package/cli/internal/target-state.sh +57 -0
- package/cli/lib/cli-common.sh +213 -63
- package/cli/lib/lockfile.sh +15 -9
- package/cli/lib/manifest.sh +257 -4
- package/cli/lib/registry.sh +96 -47
- package/cli/lib/semver.sh +12 -4
- package/engine/ENGINE_SHA +1 -0
- package/engine/{scripts/adapters → adapters}/_template.sh +10 -9
- package/engine/{scripts/adapters → adapters}/agents.sh +20 -25
- package/engine/{scripts/adapters → adapters}/opencode.sh +1 -1
- package/engine/{scripts/lib → lib}/common.sh +30 -538
- package/engine/lib/contract.sh +120 -0
- package/engine/sync.sh +238 -0
- package/package.json +5 -5
- package/{engine → packages/sync}/agents/intelligence-architect.md +5 -3
- package/{engine → packages/sync}/agents/intelligence-operator.md +10 -13
- package/packages/sync/references/adapters.md +252 -0
- package/packages/sync/references/conventions.md +385 -0
- package/{engine → packages/sync}/rules/intelligence-authoring.md +7 -7
- package/{engine → packages/sync}/skills/intelligence-add-agent/SKILL.md +7 -7
- package/{engine → packages/sync}/skills/intelligence-add-rule/SKILL.md +5 -5
- package/{engine → packages/sync}/skills/intelligence-add-skill/SKILL.md +5 -5
- package/{engine → packages/sync}/skills/intelligence-extract-skill/SKILL.md +2 -2
- package/packages/sync/skills/intelligence-install-adapter/SKILL.md +38 -0
- package/{engine → packages/sync}/skills/intelligence-learn-from-context/SKILL.md +3 -3
- package/packages/sync/skills/intelligence-learn-from-repository/SKILL.md +55 -0
- package/{engine → packages/sync}/skills/intelligence-review-skills/SKILL.md +7 -7
- package/packages/sync/skills/intelligence-sync/SKILL.md +20 -0
- package/packages/sync/skills/intelligence-uninstall-adapter/SKILL.md +24 -0
- package/packages/sync/skills/intelligence-update/SKILL.md +43 -0
- package/cli/commands/doctor.sh +0 -100
- package/cli/commands/install.sh +0 -84
- package/cli/commands/migrate.sh +0 -251
- package/cli/commands/upgrade.sh +0 -27
- package/engine/INIT.md +0 -498
- package/engine/docs/ADAPTERS.md +0 -212
- package/engine/docs/CLI.md +0 -91
- package/engine/docs/CONVENTIONS.md +0 -440
- package/engine/scripts/lib/layout.sh +0 -51
- package/engine/scripts/lib/migrations.sh +0 -708
- package/engine/scripts/sync.sh +0 -311
- package/engine/scripts/update.sh +0 -237
- package/engine/skills/intelligence-install-adapter/SKILL.md +0 -31
- package/engine/skills/intelligence-sync/SKILL.md +0 -18
- package/engine/skills/intelligence-uninstall-adapter/SKILL.md +0 -42
- package/engine/skills/intelligence-update/SKILL.md +0 -159
- package/registry/index.yaml +0 -15
- /package/engine/{scripts/VERSION → VERSION} +0 -0
- /package/engine/{scripts/adapters → adapters}/claude.sh +0 -0
- /package/engine/{scripts/adapters → adapters}/codex.sh +0 -0
- /package/engine/{scripts/adapters → adapters}/copilot.sh +0 -0
- /package/engine/{scripts/adapters → adapters}/cursor.sh +0 -0
- /package/engine/{scripts/adapters → adapters}/pi.sh +0 -0
|
@@ -13,25 +13,20 @@
|
|
|
13
13
|
|
|
14
14
|
source "$(dirname "${BASH_SOURCE[0]}")/../lib/common.sh"
|
|
15
15
|
|
|
16
|
-
# Repo-relative paths to the
|
|
17
|
-
# never hardcoded. The
|
|
18
|
-
# `
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
local repo_root="$1" rel="${IS_UMBRELLA_REL:-}"
|
|
27
|
-
[ -n "$rel" ] || rel="$(repo_rel_dir "$repo_root" "${LS_UMBRELLA_DIR:-$repo_root/intelligence}")"
|
|
28
|
-
printf '%s' "${rel:-intelligence}"
|
|
16
|
+
# Repo-relative paths to the project's content dir and to the installed sync
|
|
17
|
+
# package, taken from the env contract — never hardcoded. The content dir is
|
|
18
|
+
# named by the project (`intelligence/`, a codename) and the package sits in
|
|
19
|
+
# the store; a literal path here would print a sync command that does not
|
|
20
|
+
# exist, and would be wrong outright on a case-sensitive filesystem — in the
|
|
21
|
+
# one document Cursor, Copilot and Codex all read as canonical.
|
|
22
|
+
# The defaults only cover an adapter driven directly (tests); sync.sh always
|
|
23
|
+
# exports both.
|
|
24
|
+
agents_md_content_rel() {
|
|
25
|
+
printf '%s' "${IS_CONTENT_REL:-intelligence}"
|
|
29
26
|
}
|
|
30
27
|
|
|
31
28
|
agents_md_module_rel() {
|
|
32
|
-
|
|
33
|
-
[ -n "$rel" ] || rel="$(repo_rel_dir "$repo_root" "${LS_MODULE_DIR:-$repo_root/intelligence/sync}")"
|
|
34
|
-
printf '%s' "${rel:-intelligence/sync}"
|
|
29
|
+
printf '%s' "${IS_MODULE_REL:-.intelligence/packages/@ainova-systems/sync}"
|
|
35
30
|
}
|
|
36
31
|
|
|
37
32
|
# Append the static header block from config.yaml (or a fallback).
|
|
@@ -201,14 +196,14 @@ agents_md_append_rules_list() {
|
|
|
201
196
|
# Path-scoped rules stay in tool-specific channels (.cursor/rules/,
|
|
202
197
|
# .github/instructions/) so monorepo scoping is preserved.
|
|
203
198
|
if [ "${#global_rule_files[@]}" -gt 0 ]; then
|
|
204
|
-
local
|
|
205
|
-
|
|
199
|
+
local content_rel
|
|
200
|
+
content_rel="$(agents_md_content_rel "$repo_root")"
|
|
206
201
|
{
|
|
207
202
|
echo "---"
|
|
208
203
|
echo ""
|
|
209
204
|
echo "## Project Context"
|
|
210
205
|
echo ""
|
|
211
|
-
echo "<!-- Inlined from always-on rules in $
|
|
206
|
+
echo "<!-- Inlined from always-on rules in $content_rel/rules/ -->"
|
|
212
207
|
echo ""
|
|
213
208
|
} >> "$output"
|
|
214
209
|
local rf
|
|
@@ -245,17 +240,17 @@ sync_to_agents() {
|
|
|
245
240
|
|
|
246
241
|
mkdir -p "$(dirname "$output_file")"
|
|
247
242
|
|
|
248
|
-
local
|
|
249
|
-
|
|
243
|
+
local content_rel module_rel
|
|
244
|
+
content_rel="$(agents_md_content_rel "$repo_root")"
|
|
250
245
|
module_rel="$(agents_md_module_rel "$repo_root")"
|
|
251
246
|
|
|
252
247
|
# These two strings are written into a COMMITTED file. An absolute path here
|
|
253
248
|
# means the derivation failed, and a machine-specific path in AGENTS.md is
|
|
254
249
|
# worse than a failed sync — fail loudly instead.
|
|
255
|
-
case "$
|
|
250
|
+
case "$content_rel$module_rel" in
|
|
256
251
|
/*|*:[\\/]*)
|
|
257
252
|
echo " ERROR: AGENTS.md paths did not resolve relative to the repo root:" >&2
|
|
258
|
-
echo "
|
|
253
|
+
echo " content='$content_rel' module='$module_rel' repo_root='$repo_root'" >&2
|
|
259
254
|
return 1
|
|
260
255
|
;;
|
|
261
256
|
esac
|
|
@@ -266,7 +261,7 @@ sync_to_agents() {
|
|
|
266
261
|
|
|
267
262
|
{
|
|
268
263
|
echo "<!-- Generated by intelligence-sync. Do not edit manually. -->"
|
|
269
|
-
echo "<!-- Source: $
|
|
264
|
+
echo "<!-- Source: $content_rel/ | Sync: $sync_cmd -->"
|
|
270
265
|
echo ""
|
|
271
266
|
} > "$output_file"
|
|
272
267
|
|
|
@@ -275,7 +270,7 @@ sync_to_agents() {
|
|
|
275
270
|
{
|
|
276
271
|
echo "## Intelligence"
|
|
277
272
|
echo ""
|
|
278
|
-
echo "Source of truth: \`$
|
|
273
|
+
echo "Source of truth: \`$content_rel/\` | Sync: \`$sync_cmd\`"
|
|
279
274
|
echo ""
|
|
280
275
|
} >> "$output_file"
|
|
281
276
|
|
|
@@ -29,7 +29,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../lib/common.sh"
|
|
|
29
29
|
# Strip frontmatter, return body only.
|
|
30
30
|
# Direct call to the shared `strip_frontmatter` helper in lib/common.sh —
|
|
31
31
|
# duplicating the awk block here would violate the "all parsing in common.sh"
|
|
32
|
-
# convention (see CLAUDE.md /
|
|
32
|
+
# convention (see CLAUDE.md / packages/sync/references/conventions.md).
|
|
33
33
|
|
|
34
34
|
sync_opencode_skills() {
|
|
35
35
|
local repo_root="$1"
|