@ainova-systems/intelligence 0.11.0-rc.6 → 0.11.0-rc.8
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 +15 -16
- package/cli/commands/adapter.sh +153 -0
- package/cli/commands/init.sh +113 -22
- package/cli/commands/package.sh +30 -0
- package/cli/commands/registry.sh +5 -2
- package/cli/commands/status.sh +12 -4
- package/cli/commands/sync.sh +8 -21
- package/cli/commands/update.sh +76 -61
- package/cli/engine-package.yaml +4 -4
- package/cli/intelligence +37 -27
- package/cli/{commands/doctor.sh → internal/check.sh} +32 -14
- package/cli/{commands/migrate.sh → internal/migrate-v1.sh} +161 -42
- package/cli/{commands/add.sh → internal/package-add.sh} +11 -10
- package/cli/{commands/list.sh → internal/package-list.sh} +9 -4
- package/cli/{commands/remove.sh → internal/package-remove.sh} +3 -3
- package/cli/{commands/search.sh → internal/package-search.sh} +4 -4
- package/cli/internal/package-update.sh +97 -0
- package/cli/{commands/install.sh → internal/restore.sh} +11 -4
- package/cli/internal/target-state.sh +57 -0
- package/cli/{commands/upgrade.sh → internal/upgrade-v2.sh} +48 -8
- package/cli/lib/cli-common.sh +167 -14
- package/cli/lib/lockfile.sh +15 -9
- package/cli/lib/manifest.sh +106 -1
- package/cli/lib/registry.sh +29 -15
- package/cli/lib/semver.sh +4 -2
- 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 +29 -541
- package/engine/lib/contract.sh +120 -0
- package/engine/sync.sh +238 -0
- package/package.json +6 -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 +6 -6
- package/{engine → packages/sync}/skills/intelligence-add-agent/SKILL.md +5 -5
- package/{engine → packages/sync}/skills/intelligence-add-rule/SKILL.md +3 -3
- package/{engine → packages/sync}/skills/intelligence-add-skill/SKILL.md +3 -3
- 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 +6 -6
- 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/engine/INIT.md +0 -500
- package/engine/docs/ADAPTERS.md +0 -214
- package/engine/docs/CLI.md +0 -90
- package/engine/docs/CONVENTIONS.md +0 -456
- package/engine/scripts/ENGINE_SHA +0 -1
- 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 -16
- package/engine/skills/intelligence-uninstall-adapter/SKILL.md +0 -42
- package/engine/skills/intelligence-update/SKILL.md +0 -165
- /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
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
name: intelligence-authoring
|
|
3
3
|
description: "Authoring discipline for the intelligence layer - subtraction first, rule vs skill vs agent, scoping, size"
|
|
4
4
|
paths:
|
|
5
|
-
- "<
|
|
5
|
+
- "<content-dir>/**"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Authoring the intelligence layer
|
|
9
9
|
|
|
10
|
-
Applies when writing or changing anything under `<
|
|
10
|
+
Applies when writing or changing anything under `<content-dir>/`. The mechanics — frontmatter fields, tier and access vocabulary, how each tool is fed — live in `<module>/references/conventions.md`. This rule is the judgement that sits on top of them.
|
|
11
11
|
|
|
12
12
|
## Subtraction is the job
|
|
13
13
|
|
|
@@ -25,9 +25,9 @@ Three ways to shorten, in order of what they are worth:
|
|
|
25
25
|
|
|
26
26
|
## Source of truth
|
|
27
27
|
|
|
28
|
-
Edit the sources listed in `<manifest>` — the `rules/`, `agents/` and `skills/` directories it names — and `<manifest>` itself.
|
|
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.
|
|
29
29
|
|
|
30
|
-
`<module>/` is the
|
|
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
|
|
|
32
32
|
After any change: `<sync-cmd>`. A change that was not synced does not exist for any tool.
|
|
33
33
|
|
|
@@ -84,7 +84,7 @@ The verb just names the action — `add-`, `run-`, `review-`, `extract-`, `plan-
|
|
|
84
84
|
|
|
85
85
|
Two verbs are told apart by what already exists. **`add-` puts one new member into a set that is already there** — a field on an existing type, a record among records, a component in the inventory the project keeps — so the noun names the member, and the number of files it takes to land is not the point. **`create-` brings the container itself into existence**, where nothing hosted it before. Neither verb describes how a skill is factored inside, so splitting a skill's internals never renames it.
|
|
86
86
|
|
|
87
|
-
`intelligence-` is **reserved** for the
|
|
87
|
+
`intelligence-` is **reserved** for the sync package's own artifacts. A project skill carrying that prefix collides with package-owned meta-skills in generated outputs — rename it.
|
|
88
88
|
|
|
89
89
|
### Shape
|
|
90
90
|
|
|
@@ -109,6 +109,6 @@ The goal is subtraction, above. These are only the line past which something is
|
|
|
109
109
|
|
|
110
110
|
## Verifying a change to this layer
|
|
111
111
|
|
|
112
|
-
The per-artifact checks are a procedure, not a constraint to hold in mind while doing other work — so they live in the meta-skills, not here. Invoke the one that matches what you are doing: `intelligence-add-rule`, `intelligence-add-agent`, `intelligence-add-skill`, `intelligence-extract-skill`, `intelligence-review-skills`, `intelligence-learn-from-context`, `intelligence-sync`, `intelligence-update`, `intelligence-install-adapter`, `intelligence-uninstall-adapter`.
|
|
112
|
+
The per-artifact checks are a procedure, not a constraint to hold in mind while doing other work — so they live in the meta-skills, not here. Invoke the one that matches what you are doing: `intelligence-add-rule`, `intelligence-add-agent`, `intelligence-add-skill`, `intelligence-extract-skill`, `intelligence-review-skills`, `intelligence-learn-from-repository`, `intelligence-learn-from-context`, `intelligence-sync`, `intelligence-update`, `intelligence-install-adapter`, `intelligence-uninstall-adapter`.
|
|
113
113
|
|
|
114
114
|
A change to this layer is done when `<sync-cmd>` reports `IS_STATUS=ok` and the skill you invoked reports clean.
|
|
@@ -9,7 +9,7 @@ argument-hint: <domain> [description]
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
11
|
1. **Determine domain prefix** (the scope is required):
|
|
12
|
-
- **Reuse the existing domain when one fits**: list `<
|
|
12
|
+
- **Reuse the existing domain when one fits**: list `<content-dir>/agents/` and `<content-dir>/skills/`. If a domain prefix is already established for the target area (`backend-`, `frontend-`, `devops-`), use it. Introduce a new domain only when the scope is materially different from all existing ones.
|
|
13
13
|
- **When no existing domain fits**, derive from repo structure:
|
|
14
14
|
- Single / root project → use the project codename from `<manifest>` → `project.name`
|
|
15
15
|
- Backend service / API component → `backend-`
|
|
@@ -21,7 +21,7 @@ argument-hint: <domain> [description]
|
|
|
21
21
|
- If the repo is a monorepo with named components (e.g., `apps/billing`, `services/auth`), prefer the component name as the domain (`billing-`, `auth-`).
|
|
22
22
|
- **Every agent needs a domain prefix.** If the scope is unclear, ask the user before proceeding.
|
|
23
23
|
|
|
24
|
-
2. **Check existing agents**: Read `<
|
|
24
|
+
2. **Check existing agents**: Read `<content-dir>/agents/` to avoid duplicates. If an agent for this domain exists, ask user whether to update it instead.
|
|
25
25
|
|
|
26
26
|
3. **Determine tier and access**:
|
|
27
27
|
- Developer agents: `tier: heavy`, `access: full`
|
|
@@ -36,7 +36,7 @@ argument-hint: <domain> [description]
|
|
|
36
36
|
- Build and test commands
|
|
37
37
|
- Key conventions and forbidden patterns
|
|
38
38
|
|
|
39
|
-
5. **Create agent**: Write `<
|
|
39
|
+
5. **Create agent**: Write `<content-dir>/agents/<domain>-<role>.md` (create the directory if missing) with frontmatter:
|
|
40
40
|
```yaml
|
|
41
41
|
---
|
|
42
42
|
name: <domain>-<role>
|
|
@@ -52,11 +52,11 @@ 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 <
|
|
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.
|
|
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.
|
|
59
59
|
|
|
60
|
-
7. **Link existing skills**: Find skills in `<
|
|
60
|
+
7. **Link existing skills**: Find skills in `<content-dir>/skills/` matching this domain prefix and add them to the agent's `skills:` frontmatter.
|
|
61
61
|
|
|
62
62
|
8. **Run `/intelligence-sync`** to distribute to all enabled IDE targets.
|
|
@@ -9,7 +9,7 @@ argument-hint: <name> [paths-glob]
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
11
|
1. **Determine rule name from domain** (the scope is required):
|
|
12
|
-
- **Reuse the existing domain when one fits**: list `<
|
|
12
|
+
- **Reuse the existing domain when one fits**: list `<content-dir>/rules/`. If a rule file covers the target area (e.g., `backend.md`, `frontend.md`), extend it. Introduce a new domain only when the scope is materially different from all existing rules.
|
|
13
13
|
- **When no existing rule fits**, derive the filename from repo structure:
|
|
14
14
|
- Single / root project → use the project codename from `<manifest>` → `project.name` (e.g., `<codename>.md`)
|
|
15
15
|
- Backend service / API component → `backend.md`
|
|
@@ -21,7 +21,7 @@ argument-hint: <name> [paths-glob]
|
|
|
21
21
|
- If the repo is a monorepo with named components (e.g., `apps/billing`, `services/auth`), prefer the component name as the rule name (`billing.md`, `auth.md`).
|
|
22
22
|
- **Rule filenames match the domain used by skills/agents.** If the scope is unclear, ask the user before proceeding.
|
|
23
23
|
|
|
24
|
-
2. **Check existing rules**: Read `<
|
|
24
|
+
2. **Check existing rules**: Read `<content-dir>/rules/` to detect overlapping scope — favor extending an existing rule over creating a new one.
|
|
25
25
|
|
|
26
26
|
3. **Determine scope**:
|
|
27
27
|
- If paths glob provided — scoped rule with `paths:` frontmatter
|
|
@@ -34,7 +34,7 @@ argument-hint: <name> [paths-glob]
|
|
|
34
34
|
- Build and test commands specific to this scope
|
|
35
35
|
- Anti-patterns observed in code, each paired with the positive replacement that should adopt instead
|
|
36
36
|
|
|
37
|
-
5. **Create rule**: Write `<
|
|
37
|
+
5. **Create rule**: Write `<content-dir>/rules/<name>.md` (create the directory if it does not exist — the sources list already covers it):
|
|
38
38
|
```yaml
|
|
39
39
|
---
|
|
40
40
|
paths:
|
|
@@ -9,7 +9,7 @@ argument-hint: <domain> <verb-noun> [description]
|
|
|
9
9
|
## Steps
|
|
10
10
|
|
|
11
11
|
1. **Determine domain prefix** (the scope is required):
|
|
12
|
-
- **Reuse the existing domain when one fits**: list `<
|
|
12
|
+
- **Reuse the existing domain when one fits**: list `<content-dir>/skills/` and `<content-dir>/agents/`. If a domain prefix is already established for the target area (`backend-`, `frontend-`, `devops-`), use it. Introduce a new domain only when the scope is materially different from all existing ones.
|
|
13
13
|
- **When no existing domain fits**, derive from repo structure:
|
|
14
14
|
- Single / root project → use the project codename from `<manifest>` → `project.name`
|
|
15
15
|
- Backend service / API component → `backend-`
|
|
@@ -28,13 +28,13 @@ argument-hint: <domain> <verb-noun> [description]
|
|
|
28
28
|
- `run-` — executes an operation (tests, build, sync)
|
|
29
29
|
- `review-` — read-only analysis
|
|
30
30
|
|
|
31
|
-
3. **Check for existing agent**: Find an agent in `<
|
|
31
|
+
3. **Check for existing agent**: Find an agent in `<content-dir>/agents/` matching the domain
|
|
32
32
|
- If found — this skill will be linked to that agent
|
|
33
33
|
- If not — ask user whether to create a new agent via `/intelligence-add-agent` first
|
|
34
34
|
|
|
35
35
|
4. **Analyze codebase patterns**: Read existing implementations to extract the repeatable steps this skill should automate. Each step must come from actual code patterns, not generic knowledge.
|
|
36
36
|
|
|
37
|
-
5. **Create skill**: Write `<
|
|
37
|
+
5. **Create skill**: Write `<content-dir>/skills/<full-name>/SKILL.md` (create the directory if missing — no config edit needed) with frontmatter:
|
|
38
38
|
```yaml
|
|
39
39
|
---
|
|
40
40
|
name: <full-name>
|
|
@@ -26,7 +26,7 @@ Both end at the same artifact format. Extract starts from observed behavior, so
|
|
|
26
26
|
- Behavioral preference / constraint / pattern to default to → **rule** (use `intelligence-learn-from-context` for single preferences from session)
|
|
27
27
|
- Knowledge area / persona / expertise scope → **agent**
|
|
28
28
|
|
|
29
|
-
4. **Determine domain prefix** (for skill / agent): reuse the existing domain when one fits — list `<
|
|
29
|
+
4. **Determine domain prefix** (for skill / agent): reuse the existing domain when one fits — list `<content-dir>/skills/` and `<content-dir>/agents/`. Derive from repo structure only when no existing domain matches.
|
|
30
30
|
|
|
31
31
|
5. **Determine naming** (for skill): `<domain>-<verb>-<noun>` with convention verbs — `add-` (one new member of a set that already exists), `create-` (the container itself, where nothing hosted it), `update-` (revise what is there), `run-` (execute), `review-` (read-only analysis).
|
|
32
32
|
|
|
@@ -38,7 +38,7 @@ Both end at the same artifact format. Extract starts from observed behavior, so
|
|
|
38
38
|
|
|
39
39
|
## Authoring guidance
|
|
40
40
|
|
|
41
|
-
Follow the **Authoring Discipline** section in `<module>/
|
|
41
|
+
Follow the **Authoring Discipline** section in `<module>/references/conventions.md` when writing the artifact body — size budgets (<500 lines for SKILL.md body), imperative form, explain WHY, reserve absolute language for true invariants, lead with positive defaults.
|
|
42
42
|
|
|
43
43
|
## Related skills
|
|
44
44
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intelligence-install-adapter
|
|
3
|
+
description: "Research, implement, and enable a tool adapter"
|
|
4
|
+
argument-hint: <adapter-name>
|
|
5
|
+
agent: intelligence-operator
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Install an adapter
|
|
9
|
+
|
|
10
|
+
The CLI owns adapter inventory, scaffolding, target state, and sync. This skill
|
|
11
|
+
owns the judgement a program cannot infer: how the target tool represents
|
|
12
|
+
rules, agents, and skills.
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
1. Run `intelligence adapter list`. If `$ARGUMENTS` already exists, enable it
|
|
17
|
+
with `intelligence adapter enable $ARGUMENTS`; that command also runs a full
|
|
18
|
+
sync. Continue at verification.
|
|
19
|
+
|
|
20
|
+
2. For a missing adapter, research the tool's current authoritative
|
|
21
|
+
documentation: discovery paths, frontmatter/schema, scoping, naming,
|
|
22
|
+
agents, skills, and whether it reads `AGENTS.md`. Record links and separate
|
|
23
|
+
verified behavior from assumptions.
|
|
24
|
+
|
|
25
|
+
3. Run `intelligence adapter create $ARGUMENTS`, then implement
|
|
26
|
+
`sync_to_$ARGUMENTS()` in the scaffolded project adapter. Follow
|
|
27
|
+
`<module>/references/adapters.md` and the closest built-in. Keep writes beneath
|
|
28
|
+
the configured output, make reruns idempotent, and make owned cleanup paths
|
|
29
|
+
explicit. Ignore only those owned paths; shared roots remain trackable.
|
|
30
|
+
|
|
31
|
+
4. Run `bash -n` on the project adapter, then
|
|
32
|
+
`intelligence adapter enable $ARGUMENTS`. If the CLI says the adapter
|
|
33
|
+
requires `agents`, enable that adapter first.
|
|
34
|
+
|
|
35
|
+
5. Require `IS_STATUS=ok`, inspect generated files against the researched
|
|
36
|
+
format, run the tool's validator when one exists, and finish with
|
|
37
|
+
`intelligence status --check`. Report evidence, output paths, and any
|
|
38
|
+
unsupported artifact type.
|
|
@@ -21,7 +21,7 @@ The original negative pattern stays in the rule body as an illustrative example
|
|
|
21
21
|
|
|
22
22
|
## Phase A — Analyze (read-only)
|
|
23
23
|
|
|
24
|
-
1. **Read authoring conventions first.** The paths below are localized to this project at sync time: `<
|
|
24
|
+
1. **Read authoring conventions first.** The paths below are localized to this project at sync time: `<content-dir>/` is the project content directory, `<module>/` the installed sync package, and `<manifest>` the root manifest. The meta-skills live in `<module>/skills/`, not directly under the content directory. Load `<module>/skills/intelligence-add-rule/SKILL.md`, `<module>/skills/intelligence-add-skill/SKILL.md`, `<module>/skills/intelligence-add-agent/SKILL.md`, and `<module>/references/conventions.md` (Authoring Discipline section). This skill writes nothing on its own — it delegates to the add-* skills, which carry the authoring conventions.
|
|
25
25
|
|
|
26
26
|
2. **Capture the lesson** from session context or user input. Strip session-specific detail, keep the underlying pattern.
|
|
27
27
|
|
|
@@ -32,7 +32,7 @@ The original negative pattern stays in the rule body as an illustrative example
|
|
|
32
32
|
Confirm the translation with the user if removing the negation changes meaning.
|
|
33
33
|
|
|
34
34
|
4. **Route to the right artifact type**:
|
|
35
|
-
- Behavioral preference, tone, communication style → **rule** (`<
|
|
35
|
+
- Behavioral preference, tone, communication style → **rule** (`<content-dir>/rules/<name>.md`)
|
|
36
36
|
- Multi-step repeatable workflow → use `intelligence-extract-skill` instead
|
|
37
37
|
- Knowledge scope / persona / expertise area → **agent**
|
|
38
38
|
- Project-specific context tied to a path → scoped rule with `paths:` frontmatter
|
|
@@ -58,7 +58,7 @@ Present the proposal list to the user. User accepts or rejects per item. Only ac
|
|
|
58
58
|
- `CREATE` skill → call `intelligence-add-skill`
|
|
59
59
|
- `CREATE` agent → call `intelligence-add-agent`
|
|
60
60
|
- `UPDATE` existing artifact → edit the file directly, applying the proposed change
|
|
61
|
-
- `ARCHIVE` → move to `<
|
|
61
|
+
- `ARCHIVE` → move to `<content-dir>/_archive/` and update cross-references that point at it
|
|
62
62
|
|
|
63
63
|
8. **Run `/intelligence-sync`** once all accepted items are applied.
|
|
64
64
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intelligence-learn-from-repository
|
|
3
|
+
description: "Tailor Intelligence to an initialized repository"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Learn from Repository
|
|
7
|
+
|
|
8
|
+
Use after `intelligence init` creates or converts a project. The CLI owns the
|
|
9
|
+
mechanical setup; this skill adds only repository-specific judgement.
|
|
10
|
+
|
|
11
|
+
## Analyze
|
|
12
|
+
|
|
13
|
+
1. Run `intelligence status --check`. If setup is missing or incomplete, stop
|
|
14
|
+
and ask the user to run `intelligence init`; do not reproduce CLI mechanics.
|
|
15
|
+
2. Read `<manifest>` and resolve `<content-dir>` and the configured source
|
|
16
|
+
directories. Load `<module>/references/conventions.md` and the bundled
|
|
17
|
+
`intelligence-add-rule`, `intelligence-add-skill`, and
|
|
18
|
+
`intelligence-add-agent` skills before proposing authored content.
|
|
19
|
+
3. Inspect repository evidence: its README and contributor instructions,
|
|
20
|
+
language and package manifests, build and test entry points, source layout,
|
|
21
|
+
CI, existing agent instructions, and existing project-owned rules, agents,
|
|
22
|
+
and skills. Treat documentation as a claim and verify important behavior in
|
|
23
|
+
code or executable configuration.
|
|
24
|
+
4. Inventory what initialization already preserved or installed. Do not
|
|
25
|
+
recreate package-owned content, duplicate existing instructions, or convert
|
|
26
|
+
generated target output into source content.
|
|
27
|
+
5. Propose the smallest useful project-owned layer. Prefer updating an existing
|
|
28
|
+
artifact over creating a sibling. Each proposal must state:
|
|
29
|
+
- `CREATE`, `UPDATE`, or `KEEP`;
|
|
30
|
+
- the source path;
|
|
31
|
+
- the repository evidence supporting it;
|
|
32
|
+
- the concise content or responsibility it would add.
|
|
33
|
+
|
|
34
|
+
Analysis is read-only. Present the proposal and request approval per change.
|
|
35
|
+
It is valid to recommend no new artifacts when the repository already explains
|
|
36
|
+
itself well.
|
|
37
|
+
|
|
38
|
+
## Apply after approval
|
|
39
|
+
|
|
40
|
+
6. Apply only accepted proposals. Delegate new artifacts to
|
|
41
|
+
`intelligence-add-rule`, `intelligence-add-skill`, or
|
|
42
|
+
`intelligence-add-agent`; update an existing project-owned artifact directly
|
|
43
|
+
when that is the smaller change. Never edit installed package content or
|
|
44
|
+
generated tool output.
|
|
45
|
+
7. Run `intelligence sync`, then `intelligence status --check`. Completion
|
|
46
|
+
requires `IS_STATUS=ok` and a clean consistency check.
|
|
47
|
+
8. Report what was created, updated, or deliberately left unchanged. Remind the
|
|
48
|
+
user to review and commit generated and source changes according to project
|
|
49
|
+
policy.
|
|
50
|
+
|
|
51
|
+
## Related skill
|
|
52
|
+
|
|
53
|
+
Use `intelligence-learn-from-context` later to preserve a lesson learned during
|
|
54
|
+
a working session. This skill learns the repository's existing structure and
|
|
55
|
+
workflow during onboarding.
|
|
@@ -9,15 +9,15 @@ agent: intelligence-architect
|
|
|
9
9
|
|
|
10
10
|
Read-only audit of the project's rules, agents and skills, ending in a punch-list. This skill owns the **generic** audit — everything true of any repository. A project that adds laws of its own layers a thin project audit on top and invokes this one; it never re-implements these checks.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The name uses "skills" as shorthand for all AI artifacts (rules, agents, and skills).
|
|
13
13
|
|
|
14
14
|
## Scope: what to read, and what to leave alone
|
|
15
15
|
|
|
16
|
-
1. **Resolve the layout — never assume folder names.** `<
|
|
16
|
+
1. **Resolve the layout — never assume folder names.** `<content-dir>/` is the project content directory, `<module>/` the installed sync package, `<manifest>` the root manifest — all localized to this project at sync time. Read authoring conventions from `<module>/references/conventions.md` and the `intelligence-authoring` rule.
|
|
17
17
|
|
|
18
|
-
2. **Enumerate from `<manifest>`, not from a guessed path.** The artifacts are exactly the directories listed under `sources.rules`, `sources.agents` and `sources.skills` — there may be several groups
|
|
18
|
+
2. **Enumerate from `<manifest>`, not from a guessed path.** The artifacts are exactly the directories listed under `sources.rules`, `sources.agents` and `sources.skills` — there may be several groups, they may be nested, and installed packages live under `.intelligence/packages/`. Take the list from the manifest; a literal `intelligence/rules/` is wrong in any project that named things differently.
|
|
19
19
|
|
|
20
|
-
3. **Skip
|
|
20
|
+
3. **Skip installed package sources.** Sources under `<module>/` (`<module>/rules`, `<module>/agents`, `<module>/skills/intelligence-*`) are package-owned and restored by CLI lifecycle operations, so a local "fix" is not durable. Never propose a project-local edit to them. If one is wrong, make an upstream proposal instead.
|
|
21
21
|
|
|
22
22
|
4. **Never read or edit generated output** (`.claude/`, `.cursor/`, `.github/`, `.codex/`, `.agents/`, `.pi/`, `.opencode/`, `AGENTS.md`). Sync owns those entirely; the finding always belongs to the source.
|
|
23
23
|
|
|
@@ -36,9 +36,9 @@ Name reflects the umbrella usage of "skills" for all AI artifacts (rules + agent
|
|
|
36
36
|
| **Machine facts in a rule** | OS, shell, editor or a local absolute path (`R2`) | `MOVE` — these belong in a personal, gitignored `CLAUDE.md`; a rule is committed and read by everyone, including whoever is on another platform |
|
|
37
37
|
| **Literal path or command in a skill** | A path *outside the skill's own folder* baked into a procedure (`R3`) | `PARAMETERIZE` — a skill is *executed*, so a literal path breaks the moment the layout moves; resolve it from a rule or from `<manifest>`. **Exempt:** the skill's own bundle (`references/`, `scripts/`, `assets/` — content is co-located with its skill by default); rules and agents (describing the repository is their job); an example inside an output-format block; the resolution step itself |
|
|
38
38
|
| **Skill with no verification** | Nothing at the end proves the procedure worked (`R4`) | `FLAG` — a procedure that proves nothing is a note, or just the work: give it a verification, or delete it |
|
|
39
|
-
| **Reserved prefix** | A project artifact named `intelligence-*` | `RENAME` — the prefix belongs to the
|
|
39
|
+
| **Reserved prefix** | A project artifact named `intelligence-*` | `RENAME` — the prefix belongs to the sync package and collides in generated output |
|
|
40
40
|
| **Naming** | A skill that is not `<domain>-<verb>-<noun>`, or a domain invented rather than reused | `RENAME` — or introduce the new domain deliberately |
|
|
41
|
-
| **Stale** | No edits in 6+ months and nothing cross-references it | `ARCHIVE` — move to `<
|
|
41
|
+
| **Stale** | No edits in 6+ months and nothing cross-references it | `ARCHIVE` — move to `<content-dir>/_archive/` |
|
|
42
42
|
| **Negative-framed judgement call** | "Never do X" where a positive default fits, outside safety / security / output-format | `REWRITE` — state the default; reserve NEVER for true must-nots |
|
|
43
43
|
| **Unbacked reason** | A rule asserts a *why* — a number, a measurement, a tool's behaviour — that nothing in the repo or in that tool's documentation supports | `FLAG` — an invented reason is worse than none: it sounds like evidence. Surface it with a draft; never rewrite the meaning yourself |
|
|
44
44
|
| **Always-on rule that should be scoped** | A concern that only matters in one area, loaded into every session and inlined into `AGENTS.md` | `SCOPE` — add `paths:`, or justify the cost out loud |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intelligence-sync
|
|
3
|
+
description: "Sync intelligence to enabled adapters"
|
|
4
|
+
agent: intelligence-operator
|
|
5
|
+
context: fork
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Sync intelligence
|
|
9
|
+
|
|
10
|
+
1. Run `intelligence sync` (or `intelligence sync <adapter>` when one adapter
|
|
11
|
+
was requested). For v2, this command first aligns project schema/content
|
|
12
|
+
with the installed CLI and restores a missing package store strictly from
|
|
13
|
+
`intelligence.lock`.
|
|
14
|
+
2. Require final `IS_STATUS=ok`; relay per-adapter counts and any model-drift
|
|
15
|
+
or unsynced-source warnings.
|
|
16
|
+
3. In CI, a required tracked project upgrade is intentionally refused. Report
|
|
17
|
+
the instruction to run `intelligence init --apply` locally, review and
|
|
18
|
+
commit its diff; never bypass the gate. A frozen restore refusal means the
|
|
19
|
+
manifest and lock disagree or a pinned ref moved—report it without
|
|
20
|
+
hand-copying package content.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intelligence-uninstall-adapter
|
|
3
|
+
description: "Disable an adapter and assess its generated output"
|
|
4
|
+
argument-hint: <adapter-name>
|
|
5
|
+
agent: intelligence-operator
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Uninstall an adapter
|
|
9
|
+
|
|
10
|
+
1. Run `intelligence adapter list`, then
|
|
11
|
+
`intelligence adapter disable $ARGUMENTS`. Disabling changes target state
|
|
12
|
+
and deliberately keeps generated output.
|
|
13
|
+
2. If generated files should also be removed, inspect the adapter's cleanup
|
|
14
|
+
block to identify exactly what it owns. Show that list and obtain approval
|
|
15
|
+
before deleting it; never delete a shared output root.
|
|
16
|
+
3. For a project adapter that should be deleted, run
|
|
17
|
+
`intelligence adapter remove $ARGUMENTS` after it is disabled. This prompts
|
|
18
|
+
by default (`--apply` is the explicit non-interactive form) and also keeps
|
|
19
|
+
generated output. Built-in adapter source cannot be removed.
|
|
20
|
+
4. Remove obsolete `.gitignore` entries only when no remaining adapter needs
|
|
21
|
+
them. Sync the remaining enabled adapters when any exist.
|
|
22
|
+
5. Verify with `intelligence adapter list` and `intelligence status --check`:
|
|
23
|
+
the adapter is disabled or removed as requested, retained files are intact,
|
|
24
|
+
and only approved adapter-owned output was deleted.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intelligence-update
|
|
3
|
+
description: "Interpret an update plan and verify breaking post-conditions"
|
|
4
|
+
argument-hint: "[@scope/name]"
|
|
5
|
+
agent: intelligence-operator
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Update intelligence
|
|
9
|
+
|
|
10
|
+
The CLI owns planning and application. This skill interprets the plan, reads
|
|
11
|
+
the changelog across an engine-version gap, obtains approval, and verifies the
|
|
12
|
+
result.
|
|
13
|
+
|
|
14
|
+
## Steps
|
|
15
|
+
|
|
16
|
+
1. Run `intelligence update --preview` (or
|
|
17
|
+
`intelligence update $ARGUMENTS --preview` for one named package). Use its
|
|
18
|
+
CLI, project, and package sections as the complete plan; do not re-resolve
|
|
19
|
+
versions independently.
|
|
20
|
+
|
|
21
|
+
2. If the CLI or project engine version would change, read the authoritative
|
|
22
|
+
`CHANGELOG.md` at `https://github.com/ainova-systems/intelligence` for every
|
|
23
|
+
release in **`current < release <= target`**. If it is unavailable, stop
|
|
24
|
+
before changing versions. Turn every crossed `### Breaking` item into a
|
|
25
|
+
post-condition to verify.
|
|
26
|
+
|
|
27
|
+
3. Show the plan and breaking checklist to the user. The command without a
|
|
28
|
+
mode also shows the plan and prompts; after approval, use `--apply` for an
|
|
29
|
+
unambiguous non-interactive execution.
|
|
30
|
+
|
|
31
|
+
4. If the plan reports a newer global CLI, run exactly the npm command it
|
|
32
|
+
prints after approval, then rerun `intelligence update --preview` with the
|
|
33
|
+
new executable. Apply the resulting plan with `intelligence update --apply`,
|
|
34
|
+
or `intelligence update $ARGUMENTS --apply` when one package was requested.
|
|
35
|
+
|
|
36
|
+
5. An applied update that renders must finish with `IS_STATUS=ok`; preserve and
|
|
37
|
+
stop on any other status. Then run `intelligence status --check`. Do not run
|
|
38
|
+
a duplicate sync after `update --apply`. Verify every crossed breaking
|
|
39
|
+
post-condition directly and report any item that cannot be machine-verified.
|
|
40
|
+
|
|
41
|
+
Report versions before and after, the applied plan, post-condition results,
|
|
42
|
+
and any remaining action. On a refusal, preserve the full error and stop
|
|
43
|
+
instead of invoking hidden lifecycle operations.
|