ultimate-pi 0.12.0 → 0.13.0

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.
@@ -231,22 +231,32 @@ verify_ctx7() {
231
231
  fi
232
232
  }
233
233
 
234
- verify_ck() {
235
- log "[ck-search]"
236
- npm_global_install "@beaconbay/ck-search" "ck" || { fail "ck-search npm install"; return; }
237
- if ! ck --version &>/dev/null; then
238
- fail "ck --version failed"
234
+ verify_cocoindex() {
235
+ log "[cocoindex-code]"
236
+ local _bootstrap
237
+ _bootstrap="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)/harness-cocoindex-bootstrap.sh"
238
+ if [ ! -f "$_bootstrap" ]; then
239
+ fail "harness-cocoindex-bootstrap.sh missing"
239
240
  return
240
241
  fi
241
- # Fast grep-mode smoke (no embedding model download)
242
- local ck_target="."
243
- [ -d .pi ] && ck_target=".pi"
244
- if ck -l 1 "export" "$ck_target" 2>/dev/null | head -1 | grep -q .; then
245
- pass "ck $(ck --version 2>/dev/null | head -1)"
246
- elif ck --status "$ck_target" 2>/dev/null | head -1 | grep -q .; then
247
- pass "ck $(ck --version 2>/dev/null | head -1) (index status ok)"
242
+ if [ "$FORCE" = true ]; then
243
+ bash "$_bootstrap" --force || { fail "cocoindex bootstrap --force"; return; }
244
+ else
245
+ bash "$_bootstrap" || { fail "cocoindex bootstrap"; return; }
246
+ fi
247
+ if ! command -v ccc &>/dev/null; then
248
+ fail "ccc not on PATH after bootstrap"
249
+ return
250
+ fi
251
+ if ! ccc doctor &>/dev/null; then
252
+ warn "ccc doctor reported issues (daemon/model/SQLite)"
253
+ fi
254
+ if ccc search --limit 3 "export function" 2>/dev/null | head -1 | grep -qE '\.(ts|js|py|md)|\[|score|path'; then
255
+ pass "cocoindex-code (ccc search smoke)"
256
+ elif ccc status 2>/dev/null | head -1 | grep -q .; then
257
+ pass "cocoindex-code (index present; search empty on tiny corpus)"
248
258
  else
249
- warn "ck installed but smoke search empty"
259
+ warn "cocoindex installed but smoke search empty — first [full] install downloads local embedding model"
250
260
  fi
251
261
  }
252
262
 
@@ -335,7 +345,7 @@ log ""
335
345
  verify_scrapling
336
346
  verify_ctx7
337
347
  verify_agent_browser
338
- verify_ck
348
+ verify_cocoindex
339
349
  verify_biome
340
350
  verify_sg
341
351
  verify_gh
@@ -0,0 +1,182 @@
1
+ #!/usr/bin/env bash
2
+ # harness-cocoindex-bootstrap — install CocoIndex Code (ccc), seed settings, build index.
3
+ # Non-interactive (no `ccc init` prompts). Used by harness-cli-verify and /harness-setup.
4
+
5
+ set -euo pipefail
6
+
7
+ FORCE=false
8
+ for arg in "$@"; do
9
+ case "$arg" in
10
+ --force) FORCE=true ;;
11
+ -h | --help)
12
+ echo "Usage: $0 [--force]"
13
+ echo " --force rebuild index even when cocoindex.db exists"
14
+ exit 0
15
+ ;;
16
+ *)
17
+ echo "Unknown argument: $arg" >&2
18
+ exit 2
19
+ ;;
20
+ esac
21
+ done
22
+
23
+ export PATH="${HOME}/.local/bin:${PATH}"
24
+
25
+ log() { printf '%s\n' "$*"; }
26
+ die() { printf 'error: %s\n' "$*" >&2; exit 1; }
27
+
28
+ ROOT="$(pwd)"
29
+
30
+ if ! python3 --version 2>/dev/null | grep -qE 'Python 3\.(1[0-9]|[2-9][0-9])'; then
31
+ die "Python 3.10+ required (got: $(python3 --version 2>/dev/null || echo missing))"
32
+ fi
33
+ log "✓ Python 3.10+"
34
+
35
+ cocoindex_installed() {
36
+ command -v ccc &>/dev/null && return 0
37
+ command -v uv &>/dev/null && uv tool list 2>/dev/null | grep -qE '(^|[[:space:]])cocoindex-code([[:space:]]|$)' && return 0
38
+ return 1
39
+ }
40
+
41
+ install_cocoindex() {
42
+ if command -v uv &>/dev/null; then
43
+ log "Installing cocoindex-code[full] via uv tool..."
44
+ uv tool install 'cocoindex-code[full]'
45
+ elif command -v pipx &>/dev/null; then
46
+ log "Installing cocoindex-code[full] via pipx..."
47
+ pipx install 'cocoindex-code[full]'
48
+ else
49
+ die "Need uv or pipx to install cocoindex-code[full]"
50
+ fi
51
+ export PATH="${HOME}/.local/bin:${PATH}"
52
+ command -v ccc &>/dev/null || die "ccc not on PATH after install"
53
+ }
54
+
55
+ if ! cocoindex_installed; then
56
+ install_cocoindex
57
+ fi
58
+ command -v ccc &>/dev/null || die "ccc CLI not found"
59
+ log "✓ ccc ($(command -v ccc))"
60
+
61
+ CCC_BIN="$(command -v ccc)"
62
+ CCC_PYTHON=""
63
+ if [ -f "$CCC_BIN" ]; then
64
+ CCC_PYTHON="$(sed -n '1s/^#!//p' "$CCC_BIN" | tr -d '\r')"
65
+ fi
66
+ if [ -z "$CCC_PYTHON" ] || [ ! -x "$CCC_PYTHON" ]; then
67
+ CCC_VENV="$(cd "$(dirname "$CCC_BIN")/.." && pwd)"
68
+ CCC_PYTHON="$CCC_VENV/bin/python"
69
+ fi
70
+ if [ ! -x "$CCC_PYTHON" ]; then
71
+ CCC_PYTHON="$(command -v python3)"
72
+ fi
73
+
74
+ # Seed global + project settings and merge harness exclude_patterns (non-interactive).
75
+ "$CCC_PYTHON" - <<'PY'
76
+ from __future__ import annotations
77
+
78
+ import os
79
+ import sys
80
+ from pathlib import Path
81
+
82
+ try:
83
+ import yaml
84
+ except ImportError:
85
+ print("error: PyYAML required for harness cocoindex bootstrap", file=sys.stderr)
86
+ sys.exit(1)
87
+
88
+ ROOT = Path(os.environ.get("HARNESS_COCOINDEX_ROOT", ".")).resolve()
89
+ SETTINGS_DIR = ROOT / ".cocoindex_code"
90
+ PROJECT_SETTINGS = SETTINGS_DIR / "settings.yml"
91
+ USER_DIR = Path.home() / ".cocoindex_code"
92
+ USER_SETTINGS = USER_DIR / "global_settings.yml"
93
+
94
+ HARNESS_EXCLUDES = [
95
+ "graphify-out/**",
96
+ "raw/**",
97
+ ".raw/**",
98
+ ".pi/wiki-search/**",
99
+ "vendor/**",
100
+ "node_modules/**",
101
+ "**/graph.html",
102
+ "**/*.jsonl",
103
+ ".cursor/**",
104
+ ]
105
+
106
+ DEFAULT_GLOBAL = {
107
+ "embedding": {
108
+ "provider": "sentence-transformers",
109
+ "model": "Snowflake/snowflake-arctic-embed-xs",
110
+ }
111
+ }
112
+
113
+
114
+ def load_yaml(path: Path) -> dict:
115
+ if not path.is_file():
116
+ return {}
117
+ data = yaml.safe_load(path.read_text(encoding="utf-8"))
118
+ return data if isinstance(data, dict) else {}
119
+
120
+
121
+ def save_yaml(path: Path, data: dict) -> None:
122
+ path.parent.mkdir(parents=True, exist_ok=True)
123
+ path.write_text(yaml.safe_dump(data, default_flow_style=False), encoding="utf-8")
124
+
125
+
126
+ # Global settings (offline embeddings — no LiteLLM prompt).
127
+ if not USER_SETTINGS.is_file():
128
+ save_yaml(USER_SETTINGS, DEFAULT_GLOBAL)
129
+ print(f"Created {USER_SETTINGS}")
130
+
131
+ # Project settings — minimal file with merged excludes only.
132
+ project = load_yaml(PROJECT_SETTINGS)
133
+ excludes = list(project.get("exclude_patterns") or [])
134
+ seen = set(excludes)
135
+ for pat in HARNESS_EXCLUDES:
136
+ if pat not in seen:
137
+ excludes.append(pat)
138
+ seen.add(pat)
139
+ project["exclude_patterns"] = excludes
140
+ save_yaml(PROJECT_SETTINGS, project)
141
+ print(f"Ensured project settings: {PROJECT_SETTINGS}")
142
+
143
+ # .gitignore entry (mirror ccc init behavior).
144
+ gitignore = ROOT / ".gitignore"
145
+ entry = "/.cocoindex_code/"
146
+ comment = "# CocoIndex Code (ccc)"
147
+ if (ROOT / ".git").is_dir() and gitignore.is_file():
148
+ lines = gitignore.read_text(encoding="utf-8").splitlines()
149
+ if entry not in lines:
150
+ content = gitignore.read_text(encoding="utf-8")
151
+ if content and not content.endswith("\n"):
152
+ content += "\n"
153
+ content += f"{comment}\n{entry}\n"
154
+ gitignore.write_text(content, encoding="utf-8")
155
+ elif (ROOT / ".git").is_dir():
156
+ gitignore.write_text(f"{comment}\n{entry}\n", encoding="utf-8")
157
+ PY
158
+
159
+ NEED_INDEX=true
160
+ if [ "$FORCE" = false ] && [ -f ".cocoindex_code/cocoindex.db" ]; then
161
+ NEED_INDEX=false
162
+ log "✓ Existing cocoindex.db (use --force to rebuild)"
163
+ fi
164
+
165
+ if [ "$NEED_INDEX" = true ] || [ "$FORCE" = true ]; then
166
+ log "Building semantic code index (ccc index)..."
167
+ ccc index
168
+ fi
169
+
170
+ if ccc doctor 2>/dev/null; then
171
+ log "✓ ccc doctor"
172
+ else
173
+ log "! ccc doctor reported issues (see output above)"
174
+ fi
175
+
176
+ if ccc status 2>/dev/null | head -5; then
177
+ log "✓ ccc status"
178
+ else
179
+ log "! ccc status unavailable"
180
+ fi
181
+
182
+ log "CocoIndex output: .cocoindex_code/"
@@ -202,6 +202,16 @@ async function main() {
202
202
  if (!(await fileExists(runCtxLib))) fail("missing lib/harness-run-context.ts");
203
203
  ok("lib/harness-run-context.ts");
204
204
 
205
+ const pkgJson = JSON.parse(
206
+ await readFile(join(ROOT, "package.json"), "utf-8"),
207
+ );
208
+ if (!pkgJson.files?.includes("vendor/pi-subagents")) {
209
+ fail(
210
+ 'package.json "files" must include vendor/pi-subagents (npm publish ships subagents vendor)',
211
+ );
212
+ }
213
+ ok('package.json files includes vendor/pi-subagents');
214
+
205
215
  const subagentsVendor = join(
206
216
  ROOT,
207
217
  "vendor",
@@ -23,7 +23,7 @@ Verifies with `sg --version`.
23
23
  | Task | Tool | Why |
24
24
  |------|------|-----|
25
25
  | Find code by structure/pattern | **ast-grep** (`sg`) | AST-aware — knows what is a function call vs a string |
26
- | Find code by concept/meaning | graphify / ck | Semantic search, knowledge graph |
26
+ | Find code by concept/meaning | graphify / `ccc search` | Architecture (graphify) vs implementation chunks (`ccc`) |
27
27
  | Find exact literal string | `grep` | Only tool for non-code files or exact byte match |
28
28
  | Explore architecture | graphify | Call graph, community detection |
29
29
 
@@ -319,7 +319,7 @@ Need to find code
319
319
  ├─ Structural pattern (function calls, imports, classes)? → sg -p 'pattern'
320
320
  ├─ Rewrite/codemod needed? → sg -p 'old' --rewrite 'new'
321
321
  ├─ Project-wide lint rule? → sg scan (with sgconfig.yml)
322
- ├─ Conceptual/semantic search? → graphify query or ck --hybrid
322
+ ├─ Conceptual/semantic search? → graphify query (architecture) or ccc search (implementation)
323
323
  ├─ Explore architecture? → graphify
324
324
  └─ Exact literal string in non-code? → grep
325
325
  ```
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: ccc
3
+ description: "This skill should be used when code search, file/directory summary lookup, or concept-guide lookup is needed (whether explicitly requested or as part of completing a task), when indexing the codebase after changes, or when the user asks about ccc, cocoindex-code, or the codebase index. Trigger phrases include 'search the codebase', 'find code related to', 'describe this file', 'read the concept guide', 'update the index', 'ccc', 'cocoindex-code'."
4
+ ---
5
+
6
+ # ccc - Semantic Code Search & Indexing
7
+
8
+ `ccc` is the CLI for CocoIndex Code, providing semantic search over the current codebase and index management.
9
+
10
+ ## Ownership
11
+
12
+ The agent owns the `ccc` lifecycle for the current project — initialization, indexing, and searching. Do not ask the user to perform these steps; handle them automatically.
13
+
14
+ - **Initialization**: If `ccc search` or `ccc index` fails with an initialization error (e.g., "Not in an initialized project directory"), run `bash "$UP_PKG/.pi/scripts/harness-cocoindex-bootstrap.sh"` from the project root (or `ccc init` + `ccc index` when not in ultimate-pi harness), then retry the original command.
15
+ - **Index freshness**: Keep the index up to date by running `ccc index` (or `ccc search --refresh`) when the index may be stale — e.g., at the start of a session, or after making significant code changes (new files, refactors, renamed modules). There is no need to re-index between consecutive searches if no code was changed in between.
16
+ - **Installation**: If `ccc` itself is not found (command not found), refer to [management.md](references/management.md) for installation instructions and inform the user.
17
+
18
+ ### ultimate-pi harness
19
+
20
+ - **Parent / main agents:** follow ownership above (`ccc index` when stale after large edits).
21
+ - **`harness/planning/scout-semantic`:** use **`ccc search` only** — the harness runs incremental `ccc index` before subagent spawns. Never run `ccc index`, `ccc init`, or `ccc search --refresh` in scouts.
22
+ - **Lane contract:** graphify = callers/communities/architecture; `ccc` = implementation-by-meaning (chunks). Do not use `ccc` for “who calls X” — use `graphify explain` / `graphify path`.
23
+
24
+ ## Searching the Codebase
25
+
26
+ To perform a semantic search:
27
+
28
+ ```bash
29
+ ccc search <query terms>
30
+ ```
31
+
32
+ The query should describe the concept, functionality, or behavior to find, not exact code syntax. For example:
33
+
34
+ ```bash
35
+ ccc search database connection pooling
36
+ ccc search user authentication flow
37
+ ccc search error handling retry logic
38
+ ```
39
+
40
+ ### Filtering Results
41
+
42
+ - **By language** (`--lang`, repeatable): restrict results to specific languages.
43
+
44
+ ```bash
45
+ ccc search --lang python --lang markdown database schema
46
+ ```
47
+
48
+ - **By path** (`--path`): restrict results to a glob pattern relative to project root. If omitted, defaults to the current working directory (only results under that subdirectory are returned).
49
+
50
+ ```bash
51
+ ccc search --path 'src/api/*' request validation
52
+ ```
53
+
54
+ ### Pagination
55
+
56
+ Results default to the first page. To retrieve additional results:
57
+
58
+ ```bash
59
+ ccc search --offset 5 --limit 5 database schema
60
+ ```
61
+
62
+ If all returned results look relevant, use `--offset` to fetch the next page — there are likely more useful matches beyond the first page.
63
+
64
+ ### Working with Search Results
65
+
66
+ Search results include file paths and line ranges. To explore a result in more detail:
67
+
68
+ - Use the editor's built-in file reading capabilities (e.g., the `Read` tool) to load the matched file and read lines around the returned range for full context.
69
+ - When working in a terminal without a file-reading tool, use `sed -n '<start>,<end>p' <file>` to extract a specific line range.
70
+
71
+ ### Following Hints in Search Output
72
+
73
+ Search results are a mixed ranking of code chunks, per-file/dir summaries, and (when configured) curated concept guides — all scored against the same query. Two kinds of hit come with a follow-up command embedded in the output:
74
+
75
+ - `[summary]` — a file or directory summary. Read with `ccc describe <path>`.
76
+ - `[guide]` — a curated concept guide. Read with `ccc guide <slug>`.
77
+
78
+ When a hit carries one of these tags, follow the hint: the synthesised text is usually a faster read than chasing through individual files. Conversely, do **not** run `ccc describe .` or `ccc guide` proactively as a triage step — let search rank what's relevant and act on what it returns.
79
+
80
+ ## Describing Files and Directories
81
+
82
+ Per-file and per-directory summaries (when configured for the project) condense each file's public API, contracts, and role into a short markdown block. They are typically faster to consult than reading the source.
83
+
84
+ ```bash
85
+ ccc describe src/auth/session.py # one file
86
+ ccc describe src/auth/ # directory: summary + children tree
87
+ ccc describe . # project root overview
88
+ ```
89
+
90
+ Use `describe` when you already know the path you want; let `ccc search` find paths for you when you don't.
91
+
92
+ ## Concept Guides
93
+
94
+ Some projects configure cross-cutting concept guides in `.cocoindex_code/guides.yml` — synthesised markdown documents for architectural topics that span many files (e.g. memoization, plugin-SDK boundary, channel routing). Each guide names canonical files, end-to-end flow, and contracts/invariants.
95
+
96
+ ```bash
97
+ ccc guide # list available guides + descriptions
98
+ ccc guide <slug> # print one guide
99
+ ```
100
+
101
+ Discovery is search-driven: a relevant guide will surface in `ccc search` results tagged `[guide]` with a `ccc guide <slug>` hint. Run `ccc guide` (no args) only when first orienting in an unfamiliar codebase or when the user explicitly asks for the guide list — not as a routine first step.
102
+
103
+ ### Authoring `guides.yml` Interactively
104
+
105
+ When the user wants to add or improve concept guides, collaborate on the slug list rather than dumping a finished YAML. Good guide candidates are **named subsystems the codebase obviously has** — cross-cutting lifecycles, registration/dispatch protocols, end-to-end data paths. Single-file or symbol-specific topics do not warrant a guide; per-file summaries already cover those.
106
+
107
+ Recommended flow:
108
+
109
+ 1. **Survey the codebase.** Use `ccc describe .` and a few likely subdirectory summaries to enumerate the project's subsystems and inter-edge boundaries.
110
+ 2. **Propose candidates.** Suggest 5–10 slugs with one-line descriptions, framed to name the canonical starting file or directory for each topic. Show them to the user as a list.
111
+ 3. **Iterate.** Ask which to keep, drop, rename, or merge. Surface non-obvious dependencies (`deps:`) so a higher-level guide can cite a lower-level one rather than restate it. Cycles are rejected at load time.
112
+ 4. **Write the YAML.** Add the agreed entries to `.cocoindex_code/guides.yml` (creating the file if absent). Confirm `defaults.enabled: true` and that the project's summary feature is enabled — guides require summaries.
113
+ 5. **Generate.** Run `ccc index` to drive the per-guide agent loop and produce `<slug>.md` files under `.cocoindex_code/guides/`. Re-run after editing descriptions to refresh.
114
+
115
+ Schema:
116
+
117
+ ```yaml
118
+ defaults:
119
+ enabled: true # disables all guides when false
120
+ model: openai/gpt-5.4-nano # falls back to summary.model when omitted
121
+ session_budget: 200
122
+ max_logical_depth: 3
123
+ max_turns_per_session: 18
124
+
125
+ guides:
126
+ - slug: memoization # [a-z0-9][a-z0-9-]*
127
+ description: |
128
+ What this guide covers, framed for the reader.
129
+ Name the canonical starting files (e.g. "start with src/cache.py").
130
+ deps: [other-slug] # optional; must not cycle
131
+ max_turns_per_session: 28 # optional per-entry overrides
132
+ ```
133
+
134
+ A multi-line description is fine and often clearer than one terse sentence — the description seeds the guide-generation agent's question, so concrete file/directory anchors pay off.
135
+
136
+ ## Settings
137
+
138
+ To view or edit embedding model configuration, include/exclude patterns, or language overrides, see [settings.md](references/settings.md).
139
+
140
+ ## Management & Troubleshooting
141
+
142
+ For installation, initialization, daemon management, troubleshooting, and cleanup commands, see [management.md](references/management.md).
@@ -0,0 +1,110 @@
1
+ # ccc Management
2
+
3
+ ## Installation
4
+
5
+ Install CocoIndex Code via pipx. Two install styles:
6
+
7
+ ```bash
8
+ pipx install 'cocoindex-code[full]' # batteries included (local embeddings via sentence-transformers)
9
+ pipx install cocoindex-code # slim (LiteLLM-only; requires a cloud embedding provider + API key)
10
+ ```
11
+
12
+ The `[full]` extra pulls in `sentence-transformers` so the first-run default (local embeddings, no API key) works out of the box. The slim install is for environments where you don't want the torch/transformers deps and plan to use a LiteLLM-supported cloud provider instead.
13
+
14
+ To upgrade to the latest version:
15
+
16
+ ```bash
17
+ pipx upgrade cocoindex-code
18
+ ```
19
+
20
+ After installation, the `ccc` command is available globally.
21
+
22
+ ## Project Initialization
23
+
24
+ Run from the root directory of the project to index:
25
+
26
+ ```bash
27
+ ccc init
28
+ ```
29
+
30
+ **First run (global settings don't exist yet)** — `ccc init` prompts interactively for the embedding provider (sentence-transformers / litellm) and model, then runs a one-off test embed via the daemon to confirm the model works. Accept the defaults for the sentence-transformers path, or pick litellm and enter a model identifier.
31
+
32
+ **Subsequent runs** (global settings already exist) — prompts are skipped; only project settings and `.gitignore` are set up.
33
+
34
+ To skip the interactive prompts on the first run (e.g. in a script or container), pass `--litellm-model MODEL`:
35
+
36
+ ```bash
37
+ ccc init --litellm-model openai/text-embedding-3-small
38
+ ```
39
+
40
+ This is also the only way to pick a LiteLLM model when stdin isn't a TTY and you've done a slim install.
41
+
42
+ `ccc init` creates:
43
+ - `~/.cocoindex_code/global_settings.yml` (user-level, embedding config + env vars).
44
+ - `.cocoindex_code/settings.yml` (project-level, include/exclude patterns).
45
+
46
+ If `.git` exists in the directory, `.cocoindex_code/` is automatically added to `.gitignore`.
47
+
48
+ Use `-f` to skip the confirmation prompt if `ccc init` detects a potential parent project root.
49
+
50
+ After initialization, edit the settings files if needed (see [settings.md](settings.md) for format details), then run `ccc index` to build the initial index. If the model test printed `[FAIL]` during `init`, edit `global_settings.yml` (and optionally add API keys under the commented `envs:` block) and verify with `ccc doctor` before indexing.
51
+
52
+ ## Troubleshooting
53
+
54
+ ### Diagnostics
55
+
56
+ Run `ccc doctor` to check system health end-to-end:
57
+
58
+ ```bash
59
+ ccc doctor
60
+ ```
61
+
62
+ This checks global settings, daemon status, embedding model (runs a test embedding), and — if run from within a project — file matching (walks files using the same logic as the indexer) and index status. Results stream incrementally. Always points to `daemon.log` at the end for further investigation.
63
+
64
+ ### Checking Project Status
65
+
66
+ To view the current project's index status:
67
+
68
+ ```bash
69
+ ccc status
70
+ ```
71
+
72
+ This shows whether indexing is ongoing and index statistics.
73
+
74
+ ### Daemon Management
75
+
76
+ The daemon starts automatically on first use. To check its status:
77
+
78
+ ```bash
79
+ ccc daemon status
80
+ ```
81
+
82
+ This shows whether the daemon is running, its version, uptime, and loaded projects.
83
+
84
+ To restart the daemon (useful if it gets into a bad state):
85
+
86
+ ```bash
87
+ ccc daemon restart
88
+ ```
89
+
90
+ To stop the daemon:
91
+
92
+ ```bash
93
+ ccc daemon stop
94
+ ```
95
+
96
+ ## Cleanup
97
+
98
+ To reset a project's index (removes databases, keeps settings):
99
+
100
+ ```bash
101
+ ccc reset
102
+ ```
103
+
104
+ To fully remove all CocoIndex Code data for a project (including settings):
105
+
106
+ ```bash
107
+ ccc reset --all
108
+ ```
109
+
110
+ Both commands prompt for confirmation. Use `-f` to skip.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to this project are documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [v0.13.0] — 2026-05-18
8
+
9
+ ### ✨ Features
10
+
11
+ - **CocoIndex Code:** replace `@beaconbay/ck-search` with offline `ccc` semantic search; `harness-cocoindex-bootstrap.sh`, pre-scout incremental index in `harness-subagents-bridge`, vendored `/skill:ccc`, `cocoindex-search` skill, and `ck-search` deprecation stub.
12
+
13
+ ### 🔧 Chores
14
+
15
+ - Harness excludes for `graphify-out/`, `vendor/`, `raw/`, etc. in `.cocoindex_code/settings.yml`; `.gitignore` tracks `.cocoindex_code/`.
16
+
7
17
  ## [v0.12.0] — 2026-05-18
8
18
 
9
19
  ### ✨ Features
@@ -22,3 +22,10 @@
22
22
  - **License:** MIT ([vendor/pi-subagents/LICENSE](vendor/pi-subagents/LICENSE))
23
23
  - **Pinned revision:** See [vendor/pi-subagents/UPSTREAM_PIN.md](vendor/pi-subagents/UPSTREAM_PIN.md)
24
24
  - ultimate-pi loads it from [`vendor/pi-subagents`](vendor/pi-subagents) via [`.pi/extensions/harness-subagents.ts`](.pi/extensions/harness-subagents.ts) with harness discovery, spawn gates, and subprocess env. Maintainer refresh: `npm run vendor:sync-subagents`.
25
+
26
+ ## CocoIndex Code (CLI + skill)
27
+
28
+ - **Project:** https://github.com/cocoindex-io/cocoindex-code
29
+ - **License:** Apache-2.0
30
+ - **Install:** `uv tool install 'cocoindex-code[full]'` (see `/harness-setup` §2.4)
31
+ - ultimate-pi vendors the upstream agent skill at [`.pi/skills/ccc/`](.pi/skills/ccc/) and bootstraps indexes via [`.pi/scripts/harness-cocoindex-bootstrap.sh`](.pi/scripts/harness-cocoindex-bootstrap.sh). Replaces deprecated `@beaconbay/ck-search`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultimate-pi",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "Ultimate AI coding harness for pi.dev — extensible skills, Obsidian wiki knowledge layer, compressed context, deterministic output",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -67,13 +67,14 @@
67
67
  "README.md",
68
68
  "THIRD_PARTY_NOTICES.md",
69
69
  "vendor/pi-model-router",
70
+ "vendor/pi-subagents",
70
71
  "vendor/pi-vcc"
71
72
  ],
72
73
  "peerDependencies": {
73
74
  "@earendil-works/pi-coding-agent": "*"
74
75
  },
75
76
  "scripts": {
76
- "check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/custom-system-prompt.ts .pi/lib/harness-run-context.ts .pi/lib/harness-ui-state.ts .pi/extensions/harness-run-context.ts .pi/extensions/lib/harness-vcc-settings.ts .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/pi-model-router-harness.ts .pi/extensions/provider-payload-sanitize.ts .pi/extensions/harness-telemetry.ts .pi/extensions/harness-ask-user.ts .pi/extensions/harness-plan-approval.ts .pi/extensions/lib/ask-user/schema.ts .pi/extensions/lib/ask-user/types.ts .pi/extensions/lib/ask-user/validate.ts .pi/extensions/lib/ask-user/dialog.ts .pi/extensions/lib/ask-user/fallback.ts .pi/extensions/lib/ask-user/render.ts .pi/extensions/lib/plan-approval/types.ts .pi/extensions/lib/plan-approval/schema.ts .pi/extensions/lib/plan-approval/validate.ts .pi/extensions/lib/plan-approval/format-plan.ts .pi/extensions/lib/plan-approval/dialog.ts .pi/extensions/lib/plan-approval/fallback.ts .pi/extensions/lib/plan-approval/render.ts .pi/extensions/lib/plan-approval/create-plan.ts .pi/extensions/harness-subagents.ts .pi/extensions/lib/harness-subagents-bridge.ts .pi/extensions/lib/harness-subagent-auth.ts .pi/extensions/lib/harness-subagent-policy.ts .pi/extensions/lib/harness-subagent-precheck.ts .pi/extensions/lib/harness-spawn-budget.ts .pi/extensions/lib/spawn-policy.ts vendor/pi-subagents/src/agents.ts vendor/pi-subagents/src/subagents.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/policy-gate.ts .pi/extensions/budget-guard.ts .pi/extensions/debate-orchestrator.ts .pi/extensions/harness-live-widget.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts .pi/extensions/harness-web-tools.ts .pi/extensions/harness-web-guard.ts .pi/extensions/lib/harness-web/run-cli.ts",
77
+ "check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/custom-system-prompt.ts .pi/lib/harness-run-context.ts .pi/lib/harness-ui-state.ts .pi/extensions/harness-run-context.ts .pi/extensions/lib/harness-vcc-settings.ts .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/pi-model-router-harness.ts .pi/extensions/provider-payload-sanitize.ts .pi/extensions/harness-telemetry.ts .pi/extensions/harness-ask-user.ts .pi/extensions/harness-plan-approval.ts .pi/extensions/lib/ask-user/schema.ts .pi/extensions/lib/ask-user/types.ts .pi/extensions/lib/ask-user/validate.ts .pi/extensions/lib/ask-user/dialog.ts .pi/extensions/lib/ask-user/fallback.ts .pi/extensions/lib/ask-user/render.ts .pi/extensions/lib/plan-approval/types.ts .pi/extensions/lib/plan-approval/schema.ts .pi/extensions/lib/plan-approval/validate.ts .pi/extensions/lib/plan-approval/format-plan.ts .pi/extensions/lib/plan-approval/dialog.ts .pi/extensions/lib/plan-approval/fallback.ts .pi/extensions/lib/plan-approval/render.ts .pi/extensions/lib/plan-approval/create-plan.ts .pi/extensions/harness-subagents.ts .pi/extensions/lib/harness-subagents-bridge.ts .pi/extensions/lib/harness-cocoindex-refresh.ts .pi/extensions/lib/harness-subagent-auth.ts .pi/extensions/lib/harness-subagent-policy.ts .pi/extensions/lib/harness-subagent-precheck.ts .pi/extensions/lib/harness-spawn-budget.ts .pi/extensions/lib/spawn-policy.ts vendor/pi-subagents/src/agents.ts vendor/pi-subagents/src/subagents.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/policy-gate.ts .pi/extensions/budget-guard.ts .pi/extensions/debate-orchestrator.ts .pi/extensions/harness-live-widget.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts .pi/extensions/harness-web-tools.ts .pi/extensions/harness-web-guard.ts .pi/extensions/lib/harness-web/run-cli.ts",
77
78
  "vendor:sync-router": "bash .pi/scripts/vendor-sync-pi-model-router.sh",
78
79
  "vendor:sync-vcc": "bash .pi/scripts/vendor-sync-pi-vcc.sh",
79
80
  "vendor:sync-subagents": "bash .pi/scripts/vendor-sync-pi-subagents.sh",
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 narumiruna
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,11 @@
1
+ # Vendored `@narumitw/pi-subagents`
2
+
3
+ - **Repository:** https://github.com/narumiruna/pi-extensions
4
+ - **Directory:** `extensions/pi-subagents`
5
+ - **Version:** 0.1.26
6
+ - **Commit:** main @ 2026-05-18 (subagents.ts + agents.ts base)
7
+ - **License:** MIT ([LICENSE](LICENSE))
8
+
9
+ ultimate-pi extends upstream with recursive `$UP_PKG/.pi/agents/**` discovery, harness spawn gates, and subprocess env (`UP_PKG`, `PI_HARNESS_SUBPROCESS`).
10
+
11
+ Refresh: `npm run vendor:sync-subagents`