@ainova-systems/intelligence 0.11.0-rc.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/LICENSE +21 -0
- package/README.md +46 -0
- package/bin/intelligence.js +59 -0
- package/cli/commands/add.sh +133 -0
- package/cli/commands/doctor.sh +100 -0
- package/cli/commands/init.sh +96 -0
- package/cli/commands/install.sh +84 -0
- package/cli/commands/list.sh +28 -0
- package/cli/commands/migrate.sh +251 -0
- package/cli/commands/registry.sh +51 -0
- package/cli/commands/remove.sh +39 -0
- package/cli/commands/status.sh +34 -0
- package/cli/commands/sync.sh +22 -0
- package/cli/commands/update.sh +59 -0
- package/cli/commands/upgrade.sh +27 -0
- package/cli/intelligence +71 -0
- package/cli/lib/cli-common.sh +149 -0
- package/cli/lib/lockfile.sh +97 -0
- package/cli/lib/manifest.sh +211 -0
- package/cli/lib/registry.sh +141 -0
- package/cli/lib/semver.sh +127 -0
- package/engine/INIT.md +498 -0
- package/engine/agents/intelligence-architect.md +53 -0
- package/engine/agents/intelligence-operator.md +49 -0
- package/engine/docs/ADAPTERS.md +212 -0
- package/engine/docs/CLI.md +91 -0
- package/engine/docs/CONVENTIONS.md +440 -0
- package/engine/rules/intelligence-authoring.md +114 -0
- package/engine/scripts/VERSION +1 -0
- package/engine/scripts/adapters/_template.sh +86 -0
- package/engine/scripts/adapters/agents.sh +299 -0
- package/engine/scripts/adapters/claude.sh +136 -0
- package/engine/scripts/adapters/codex.sh +118 -0
- package/engine/scripts/adapters/copilot.sh +193 -0
- package/engine/scripts/adapters/cursor.sh +146 -0
- package/engine/scripts/adapters/opencode.sh +200 -0
- package/engine/scripts/adapters/pi.sh +256 -0
- package/engine/scripts/lib/common.sh +1602 -0
- package/engine/scripts/lib/layout.sh +51 -0
- package/engine/scripts/lib/migrations.sh +708 -0
- package/engine/scripts/sync.sh +311 -0
- package/engine/scripts/update.sh +237 -0
- package/engine/skills/intelligence-add-agent/SKILL.md +62 -0
- package/engine/skills/intelligence-add-rule/SKILL.md +54 -0
- package/engine/skills/intelligence-add-skill/SKILL.md +53 -0
- package/engine/skills/intelligence-extract-skill/SKILL.md +47 -0
- package/engine/skills/intelligence-install-adapter/SKILL.md +31 -0
- package/engine/skills/intelligence-learn-from-context/SKILL.md +69 -0
- package/engine/skills/intelligence-review-skills/SKILL.md +86 -0
- package/engine/skills/intelligence-sync/SKILL.md +18 -0
- package/engine/skills/intelligence-uninstall-adapter/SKILL.md +42 -0
- package/engine/skills/intelligence-update/SKILL.md +159 -0
- package/package.json +39 -0
- package/registry/index.yaml +15 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# shellcheck disable=SC2034 # LS_* are this lib's public API, consumed by the scripts that source it
|
|
3
|
+
# intelligence-sync: layout detection
|
|
4
|
+
# Source this file — never execute directly.
|
|
5
|
+
#
|
|
6
|
+
# The intelligence umbrella folder name is NOT hardcoded. It is whatever
|
|
7
|
+
# directory holds config.yaml — `intelligence/`, `Intelligence/`, `prompts/`,
|
|
8
|
+
# anything. The only fixed name is the module's own subfolder (`sync`), which
|
|
9
|
+
# is the module's identity, not the project's choice.
|
|
10
|
+
#
|
|
11
|
+
# Two layouts exist during the 0.3.x transition:
|
|
12
|
+
# legacy : <umbrella>/scripts/ (config.yaml at <umbrella>/config.yaml)
|
|
13
|
+
# modular : <umbrella>/sync/scripts/ (config.yaml at <umbrella>/config.yaml)
|
|
14
|
+
#
|
|
15
|
+
# detect_layout sets these globals:
|
|
16
|
+
# LS_LAYOUT legacy | modular | unknown
|
|
17
|
+
# LS_MODULE_DIR dir that contains scripts/ (legacy: == umbrella; modular: <umbrella>/<module>)
|
|
18
|
+
# LS_MODULE_NAME basename of LS_MODULE_DIR — messages only, never branched on
|
|
19
|
+
# LS_UMBRELLA_DIR dir that holds (or will hold) config.yaml + project content
|
|
20
|
+
# LS_CONFIG_FILE absolute path to config.yaml, or "" if none found yet
|
|
21
|
+
|
|
22
|
+
# detect_layout <scripts_dir>
|
|
23
|
+
detect_layout() {
|
|
24
|
+
local scripts_dir="$1"
|
|
25
|
+
local module_dir
|
|
26
|
+
module_dir="$(cd "$scripts_dir/.." && pwd)"
|
|
27
|
+
|
|
28
|
+
if [ -f "$module_dir/../config.yaml" ]; then
|
|
29
|
+
# <umbrella>/<module>/scripts — umbrella is two levels up.
|
|
30
|
+
LS_LAYOUT="modular"
|
|
31
|
+
LS_UMBRELLA_DIR="$(cd "$module_dir/.." && pwd)"
|
|
32
|
+
elif [ -f "$module_dir/config.yaml" ]; then
|
|
33
|
+
# <umbrella>/scripts — flat pre-0.3.1 layout.
|
|
34
|
+
LS_LAYOUT="legacy"
|
|
35
|
+
LS_UMBRELLA_DIR="$module_dir"
|
|
36
|
+
else
|
|
37
|
+
# No config.yaml yet (upstream repo template, or pre-bootstrap).
|
|
38
|
+
# Assume the umbrella is the module's parent; callers that need a
|
|
39
|
+
# config will error out with their own message.
|
|
40
|
+
LS_LAYOUT="unknown"
|
|
41
|
+
LS_UMBRELLA_DIR="$(cd "$module_dir/.." && pwd)"
|
|
42
|
+
fi
|
|
43
|
+
|
|
44
|
+
LS_MODULE_DIR="$module_dir"
|
|
45
|
+
LS_MODULE_NAME="$(basename "$module_dir")" # messages only
|
|
46
|
+
if [ -f "$LS_UMBRELLA_DIR/config.yaml" ]; then
|
|
47
|
+
LS_CONFIG_FILE="$LS_UMBRELLA_DIR/config.yaml"
|
|
48
|
+
else
|
|
49
|
+
LS_CONFIG_FILE=""
|
|
50
|
+
fi
|
|
51
|
+
}
|