From f00f724d306dbec2fb1f32f4baf64924f500033f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:45:40 +0000 Subject: [PATCH 1/2] Initial plan From d07456b142515843f94279127e36c0acb4bd82f2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 09:51:46 +0000 Subject: [PATCH 2/2] Fix test infrastructure: portable binary paths, version check, missing SKILL.md Co-authored-by: ProjectAI00 <174952601+ProjectAI00@users.noreply.github.com> --- skills/imi/SKILL.md | 87 ++++++++++++++++++++++++++++++++++++++++++++ tests/eval-loop.sh | 2 +- tests/integration.sh | 4 +- 3 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 skills/imi/SKILL.md diff --git a/skills/imi/SKILL.md b/skills/imi/SKILL.md new file mode 100644 index 0000000..1fe9a95 --- /dev/null +++ b/skills/imi/SKILL.md @@ -0,0 +1,87 @@ +--- +name: imi +description: > + Activate when: the project has a .imi/ directory, or the user asks about + what to build, what's next, tasks, goals, decisions, progress, or where we + left off. Always run `imi context` before responding. Install if missing: bunx imi-agent +license: MIT +metadata: + author: ProjectAI00 + version: "3.0" +compatibility: Requires imi CLI. Install: bunx imi-agent +allowed-tools: Bash(imi:*) +--- + +# IMI — Agent Instruction Manual + +IMI is the PM thinking layer between humans and agents. It keeps human intent, direction, and decisions persistent so every session stays aligned without re-briefing. Goals, tasks, decisions, and direction notes live in `.imi/state.db`. + +**The 3 questions IMI must always answer:** +1. What are we building? +2. How is it going? +3. Are we still aligned with intent? + +**Authority order:** Direction notes + decisions → goals → tasks → execution. If work cannot trace to a direction or decision, flag it before doing anything. + +--- + +## ⛔ HARD STOP — before you do anything + +DO NOT: +- `cat`, `grep`, `ls`, or `sqlite3` any file inside `.imi/` +- Use session memory, built-in todos, or conversation history as project state +- Answer any question about project status without first running `imi context` +- Create a goal or task without filling in `why` and `success_signal` +- Execute work that cannot be traced to a goal in the DB + +--- + +## Every session — no exceptions + +```bash +imi context +``` + +Run this before your first response. Every session. No exceptions. Then ask: does the user's request map to a goal in the DB? If you can't point to one, say so before doing anything. + +--- + +## Mode routing + +Detect which mode applies and load the full instructions: + +| Situation | Mode | Load | +|---|---|---| +| User is checking status, making decisions, thinking out loud | **Ops** | `cat ~/.copilot/skills/imi/ops-mode.md` | +| User wants to plan goals, decompose work, write task specs | **Plan** | `cat ~/.copilot/skills/imi/plan-mode.md` | +| User wants to execute a task, do the work | **Execute** | `cat ~/.copilot/skills/imi/execute-mode.md` | +| Writing `imi complete`, `imi fail`, or memory entries | **Voice** | `cat ~/.copilot/skills/imi/ai-voice.md` | + +Load the relevant mode file before proceeding. It contains the full behavioral contract for that mode. + +--- + +## Quick command reference + +```bash +imi context # start every session here +imi think # is this still the right thing to build? +imi plan # full goal + task list +imi decide "what" "why" # log a firm decision +imi log "note" # log a direction, instinct, or observation +imi goal "" "" "" "" "" +imi task "" --why "<reason>" --acceptance-criteria "<done looks like>" --relevant-files "<files>" +imi complete <task_id> "summary" # mark done — never skip this +imi mlesson "what went wrong" # store a lesson after a corrected mistake +imi check # verification state +``` + +--- + +## If imi is not installed + +```bash +bunx imi-agent +``` + +Then re-run `imi context`. diff --git a/tests/eval-loop.sh b/tests/eval-loop.sh index b2fc234..1d65d03 100755 --- a/tests/eval-loop.sh +++ b/tests/eval-loop.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -u -o pipefail -IMI_BIN="/Users/aimar/Documents/Kitchen/imi/ai-db-imi/target/release/imi" +IMI_BIN="${IMI_BIN:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/target/release/imi}" REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" SESSION_START_SCRIPT="$REPO_ROOT/scripts/session-start.sh" diff --git a/tests/integration.sh b/tests/integration.sh index 74ff09a..80f7811 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -7,7 +7,7 @@ set -euo pipefail # ── Binary location ────────────────────────────────────────── -IMI_BIN="${IMI_BIN:-/Users/aimar/Documents/Kitchen/imi/ai-db-imi/target/release/imi}" +IMI_BIN="${IMI_BIN:-$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)/target/release/imi}" if [[ ! -x "$IMI_BIN" ]]; then echo "ERROR: imi binary not found (or not executable) at: $IMI_BIN" @@ -112,7 +112,7 @@ echo "── 1. Version ────────────────── run --version assert_exit "imi --version exits 0" 0 assert_contains "imi --version output" "imi" -assert_contains "imi --version semver" "0.3.4" +assert_contains "imi --version semver" "0.3.19" # ═════════════════════════════════════════════════════════════ # 2. INIT