codebeacon 0.3.2__tar.gz → 0.4.0__tar.gz
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.
- {codebeacon-0.3.2 → codebeacon-0.4.0}/PKG-INFO +46 -21
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.de.md +25 -17
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.es.md +25 -17
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.fr.md +25 -17
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.ja.md +24 -18
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.ko.md +44 -21
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.md +45 -20
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.pt-BR.md +25 -17
- {codebeacon-0.3.2 → codebeacon-0.4.0}/README.zh-CN.md +22 -18
- codebeacon-0.4.0/codebeacon/__init__.py +1 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/cli.py +81 -6
- codebeacon-0.4.0/codebeacon/semantic_pipeline.py +816 -0
- codebeacon-0.4.0/codebeacon/skill/SKILL.md +312 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/pyproject.toml +1 -1
- {codebeacon-0.3.2 → codebeacon-0.4.0}/skill/install.py +1 -1
- codebeacon-0.4.0/tests/test_semantic.py +191 -0
- codebeacon-0.3.2/codebeacon/__init__.py +0 -1
- codebeacon-0.3.2/codebeacon/semantic_pipeline.py +0 -457
- codebeacon-0.3.2/codebeacon/skill/SKILL.md +0 -129
- codebeacon-0.3.2/skill/SKILL.md +0 -189
- {codebeacon-0.3.2 → codebeacon-0.4.0}/.cursorrules +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/.github/CODEOWNERS +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/.github/dependabot.yml +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/.github/workflows/ci.yml +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/.github/workflows/release.yml +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/.gitignore +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/AGENTS.md +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/CLAUDE.md +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/LICENSE +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/__main__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/cache.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/common/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/common/filters.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/common/safety.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/common/symbols.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/common/types.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/config.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/contextmap/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/contextmap/generator.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/discover/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/discover/detector.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/discover/ignore.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/discover/scanner.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/export/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/export/callflow_html.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/export/hooks.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/export/mcp.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/export/merge.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/export/obsidian.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/export/tree_html.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/base.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/components.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/dependencies.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/entities.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/README.md +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/actix.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/angular.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/aspnet.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/django.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/express.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/fastapi.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/flask.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/gin.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/ktor.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/laravel.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/nestjs.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/rails.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/react.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/spring_boot.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/svelte.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/tauri.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/vapor.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/queries/vue.scm +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/routes.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/semantic.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/extract/services.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/graph/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/graph/analyze.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/graph/build.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/graph/cluster.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/graph/enrich.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/graph/write.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/plugins/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/plugins/githooks.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/plugins/skills.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/wave.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/wiki/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/wiki/generator.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/wiki/index.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon/wiki/templates.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/codebeacon.yaml.example +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/docs/TRANSLATION_STATUS.md +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/public-plan.md +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/__init__.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/conftest.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/actix/main.rs +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/angular/app.component.ts +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/aspnet/UserController.cs +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/django/views.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/express/userRouter.js +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/fastapi/main.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/flask/app.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/gin/main.go +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/ktor/UserRoutes.kt +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/laravel/UserController.php +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/nestjs/user.controller.ts +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/rails/users_controller.rb +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/react/UserPage.tsx +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/spring_boot/UserController.java +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/sveltekit/+page.svelte +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/vapor/routes.swift +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/fixtures/vue/UserList.vue +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_discover.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_entities.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_filters.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_graph.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_plugins.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_resolve.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_routes.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_safety_and_writes.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_services.py +0 -0
- {codebeacon-0.3.2 → codebeacon-0.4.0}/tests/test_wiki.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codebeacon
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
4
4
|
Summary: Source code AST analysis tool for AI context generation — unified multi-framework knowledge graph
|
|
5
5
|
Project-URL: Homepage, https://github.com/codebeacon/codebeacon
|
|
6
6
|
Project-URL: Repository, https://github.com/codebeacon/codebeacon
|
|
@@ -97,6 +97,7 @@ Existing tools solve this partially. Route analyzers map your controllers but mi
|
|
|
97
97
|
- **Zero configuration** — auto-detects frameworks and languages; generates `codebeacon.yaml` for repeat runs
|
|
98
98
|
- **Deep-dive mode** — `--deep-dive` generates per-project `.codebeacon/` + `CLAUDE.md` for every sub-project; running `codebeacon scan . --update` from any sub-project folder automatically syncs all projects in the workspace
|
|
99
99
|
- **Workspace auto-rediscovery** — on every `scan` / `sync`, codebeacon re-scans the workspace and appends any new project folders to `codebeacon.yaml` before extraction, so freshly added sub-projects are never silently skipped; pass `--no-rediscover` to opt out for hand-curated configs
|
|
100
|
+
- **Graphify-style semantic enrichment** — after AST extraction, the skill dispatches one parallel subagent per chunk to emit `{nodes, edges, hyperedges}` with 8 relation types (`calls`/`implements`/`references`/`cites`/`conceptually_related_to`/`shares_data_with`/`semantically_similar_to`/`rationale_for`) and EXTRACTED/INFERRED/AMBIGUOUS confidence; on Claude Code the subagent runs one tier below the host model (Opus→Sonnet, Sonnet→Haiku) so spend stays proportional to corpus size. AST owns code nodes; LLM only contributes `concept`/`document`/`paper` nodes. Existing 0.3.x archives replay through the new schema unchanged.
|
|
100
101
|
|
|
101
102
|
---
|
|
102
103
|
|
|
@@ -185,11 +186,14 @@ project-root/
|
|
|
185
186
|
components/<Name>.md
|
|
186
187
|
obsidian/ ← Obsidian vault (one note per graph node)
|
|
187
188
|
semantic/
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
189
|
+
pending/ ← prepare writes chunk_NNN.jsonl here (≤ --chunk-size tasks each)
|
|
190
|
+
chunk_001.jsonl
|
|
191
|
+
chunk_002.jsonl
|
|
192
|
+
results/ ← agent writes a matching chunk_NNN.jsonl per pending file
|
|
193
|
+
chunk_001.jsonl
|
|
194
|
+
original/ ← apply moves done chunks here (durable archive)
|
|
195
|
+
chunk_001.jsonl
|
|
196
|
+
chunk_002.jsonl ← (older runs accumulate; chunk numbers are monotonic)
|
|
193
197
|
```
|
|
194
198
|
|
|
195
199
|
### Deep Dive Mode
|
|
@@ -259,10 +263,21 @@ This copies `SKILL.md` to `~/.claude/skills/codebeacon/` and registers the `/cod
|
|
|
259
263
|
/codebeacon serve <path> # start MCP server pointing at .codebeacon/
|
|
260
264
|
/codebeacon query <term> # search the graph
|
|
261
265
|
/codebeacon path <src> <tgt> # shortest path
|
|
266
|
+
/codebeacon upgrade # pip upgrade + refresh this skill (then restart Claude Code)
|
|
262
267
|
```
|
|
263
268
|
|
|
264
269
|
By default `scan` and `sync` invocations automatically run the **AI-semantic** pipeline at the end (see the [AI-Semantic Enrichment](#ai-semantic-enrichment-via-the-codebeacon-skill) section). The agent uses whatever model your Claude Code session is currently running on — Opus, Sonnet, Haiku — codebeacon never hardcodes a model and never needs an API key.
|
|
265
270
|
|
|
271
|
+
### Updating to a new version
|
|
272
|
+
|
|
273
|
+
Run **one** command from anywhere:
|
|
274
|
+
|
|
275
|
+
```bash
|
|
276
|
+
codebeacon upgrade
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
This pip-upgrades the package, then re-runs `codebeacon install` so `~/.claude/skills/codebeacon/SKILL.md` is overwritten with the new release's copy. Restart your Claude Code session for the new SKILL.md to load. If codebeacon is installed in editable mode (`pip install -e .`), the pip step is skipped — pass `--force` to upgrade anyway.
|
|
280
|
+
|
|
266
281
|
### MCP Server
|
|
267
282
|
|
|
268
283
|
Run codebeacon as a persistent MCP server so any MCP-compatible client can query your knowledge graph directly.
|
|
@@ -345,14 +360,21 @@ codebeacon sync --config <file> # use a specific config file
|
|
|
345
360
|
codebeacon sync --no-rediscover # don't auto-append newly added projects (hand-curated yaml mode)
|
|
346
361
|
|
|
347
362
|
# AI-semantic enrichment (the agent does the LLM work, codebeacon does the bookkeeping)
|
|
348
|
-
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
349
|
-
# rehydrate
|
|
350
|
-
#
|
|
351
|
-
#
|
|
363
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N] [--chunk-size N]
|
|
364
|
+
# rehydrate archive (.codebeacon/semantic/original/*.jsonl) onto
|
|
365
|
+
# the fresh graph, prune entries pointing at missing nodes,
|
|
366
|
+
# then emit every NEW candidate (god folders + hub files +
|
|
367
|
+
# unresolved targets) into .codebeacon/semantic/pending/
|
|
368
|
+
# chunk_NNN.jsonl (--chunk-size tasks per file, default 10).
|
|
369
|
+
# `--max-tasks` is an optional cap (0 = no cap = emit all).
|
|
370
|
+
# task_id includes a content hash, so a file whose semantic
|
|
371
|
+
# content changes between scans is automatically re-emitted.
|
|
352
372
|
codebeacon semantic-apply [--dir .codebeacon]
|
|
353
|
-
#
|
|
354
|
-
#
|
|
355
|
-
#
|
|
373
|
+
# for each .codebeacon/semantic/results/chunk_NNN.jsonl the
|
|
374
|
+
# agent has written, merge edges (INFERRED references) into
|
|
375
|
+
# beacon.json and MOVE the pending chunk into
|
|
376
|
+
# .codebeacon/semantic/original/chunk_NNN.jsonl (durable
|
|
377
|
+
# archive). Regenerates wiki/obsidian/context map.
|
|
356
378
|
|
|
357
379
|
# Query the knowledge graph
|
|
358
380
|
codebeacon query <term> [--dir .codebeacon] [--limit N] # search nodes by label substring
|
|
@@ -365,6 +387,8 @@ codebeacon merge-driver <base> <cur> <other> # invoked by git after `hook insta
|
|
|
365
387
|
# Integrations
|
|
366
388
|
codebeacon serve [--dir .codebeacon] # start MCP server (stdio)
|
|
367
389
|
codebeacon install # install Claude Code skill
|
|
390
|
+
codebeacon upgrade # pip install --upgrade + refresh ~/.claude/skills/codebeacon/SKILL.md
|
|
391
|
+
# (`--force` to upgrade even when installed in editable mode)
|
|
368
392
|
```
|
|
369
393
|
|
|
370
394
|
---
|
|
@@ -385,22 +409,23 @@ The CLI itself never makes an LLM API call. The AI-semantic layer is intentional
|
|
|
385
409
|
When you invoke `/codebeacon` in Claude Code:
|
|
386
410
|
|
|
387
411
|
1. `scan` / `sync` builds `beacon.json` from the AST (no LLM).
|
|
388
|
-
2. `codebeacon semantic-prepare`
|
|
389
|
-
3. The skill
|
|
390
|
-
4. `codebeacon semantic-apply` merges the results as `INFERRED references` edges into `beacon.json
|
|
391
|
-
5. Next scan: `semantic-prepare`
|
|
412
|
+
2. `codebeacon semantic-prepare` rehydrates the archive at `.codebeacon/semantic/original/*.jsonl` onto the fresh graph, **prunes** archive entries whose source node no longer exists, and writes new task chunks to `.codebeacon/semantic/pending/chunk_NNN.jsonl` (≤ `--chunk-size` tasks per file, default 10). Chunk numbers continue from where the durable archive left off, so they never collide.
|
|
413
|
+
3. The skill iterates the pending chunks **one chunk at a time**. For each `pending/chunk_NNN.jsonl`, the agent (using its current model) reads each task's `excerpt` and writes a matching `semantic/results/chunk_NNN.jsonl`.
|
|
414
|
+
4. `codebeacon semantic-apply` merges the results as `INFERRED references` edges into `beacon.json` and **moves** each finished `pending/chunk_NNN.jsonl` into `semantic/original/chunk_NNN.jsonl` (with the applied edges spliced in for auditability). Result files are deleted; wiki + obsidian + context map regenerated.
|
|
415
|
+
5. Next scan: `semantic-prepare` reads every chunk under `original/`, applies their edges to the freshly built graph (so historical inferences don't disappear), and skips any task whose `task_id` is already on file. `task_id` is `SHA1(file_path | node_id | excerpt_hash[:8])` — a file whose semantic content changes earns a new id and gets re-analysed automatically.
|
|
392
416
|
|
|
393
|
-
This gives you incremental, idempotent enrichment: the agent never re-
|
|
417
|
+
This gives you incremental, idempotent enrichment: the agent never re-analyses the same `(file, content)` twice, accumulated AI signal survives every rescan, and chunked files keep the agent's working set small.
|
|
394
418
|
|
|
395
419
|
### Direct CLI usage
|
|
396
420
|
|
|
397
|
-
If you're not running through the skill (e.g. CI), you can drive the same two commands manually and supply your own `
|
|
421
|
+
If you're not running through the skill (e.g. CI), you can drive the same two commands manually and supply your own `results/chunk_NNN.jsonl` files:
|
|
398
422
|
|
|
399
423
|
```bash
|
|
400
424
|
codebeacon scan .
|
|
401
|
-
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
425
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50 --chunk-size 10
|
|
402
426
|
|
|
403
|
-
#
|
|
427
|
+
# .codebeacon/semantic/pending/chunk_001.jsonl ... now exist.
|
|
428
|
+
# For each pending chunk, write a matching results/chunk_NNN.jsonl. Each line:
|
|
404
429
|
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
405
430
|
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
406
431
|
# ]}
|
|
@@ -56,6 +56,7 @@ Bestehende Tools lösen dieses Problem nur teilweise. Route-Analyzer erfassen Ih
|
|
|
56
56
|
- **Keine Konfiguration notwendig** — erkennt Frameworks und Sprachen automatisch; generiert `codebeacon.yaml` für Folgeläufe
|
|
57
57
|
- **Deep-Dive-Modus** — `--deep-dive` erzeugt für jedes Sub-Projekt eigene `.codebeacon/` + `CLAUDE.md`; ein Update-Aufruf aus **beliebigem** Sub-Projekt-Ordner synchronisiert automatisch alle Projekte im Workspace
|
|
58
58
|
- **Automatische Workspace-Wiedererkennung** — bei jedem `scan`/`sync` scannt codebeacon den Workspace erneut und hängt vor der Extraktion automatisch neue Projekte an die `codebeacon.yaml` an, sodass frisch hinzugefügte Sub-Projekte nicht unbemerkt übersprungen werden; `--no-rediscover` deaktiviert dies für handgepflegte Konfigurationen
|
|
59
|
+
- **Graphify-artige Semantik-Anreicherung** — nach der AST-Extraktion dispatcht der Skill einen parallelen Subagenten pro Chunk, der vollständige Knowledge-Graph-Fragmente `{nodes, edges, hyperedges}` mit 8 Relationstypen (`calls`/`implements`/`references`/`cites`/`conceptually_related_to`/`shares_data_with`/`semantically_similar_to`/`rationale_for`) und Konfidenz EXTRACTED/INFERRED/AMBIGUOUS erzeugt; auf Claude Code läuft der Subagent eine Stufe unter dem Host-Modell (Opus→Sonnet, Sonnet→Haiku), damit die Kosten proportional zur Korpus-Größe bleiben. Code-Knoten gehören dem AST; das LLM darf nur `concept`/`document`/`paper`-Knoten beisteuern. Bestehende 0.3.x-Archive werden unter dem neuen Schema unverändert wiedergegeben
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
|
@@ -378,19 +379,24 @@ codebeacon hook install [path] # Merge-Driver + Post-Commit-Inkrement
|
|
|
378
379
|
codebeacon merge-driver <base> <cur> <other> # von git nach `hook install` aufgerufen; Union-Merge von beacon.json
|
|
379
380
|
|
|
380
381
|
# AI-semantische Anreicherung (LLM macht der Agent, codebeacon nur die Buchführung)
|
|
381
|
-
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
382
|
-
#
|
|
383
|
-
# beacon.json
|
|
384
|
-
#
|
|
382
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N] [--chunk-size N]
|
|
383
|
+
# rehydriert .codebeacon/semantic/original/*.jsonl auf das
|
|
384
|
+
# frische beacon.json + entfernt Einträge mit verschwundenen
|
|
385
|
+
# Knoten, schreibt dann neue Aufgaben nach
|
|
386
|
+
# .codebeacon/semantic/pending/chunk_NNN.jsonl
|
|
387
|
+
# (--chunk-size pro Chunk, Std. 10). task_id enthält einen
|
|
388
|
+
# Content-Hash – geänderte Dateien werden neu emittiert.
|
|
385
389
|
codebeacon semantic-apply [--dir .codebeacon]
|
|
386
|
-
#
|
|
387
|
-
# INFERRED references-Kanten in
|
|
388
|
-
#
|
|
389
|
-
#
|
|
390
|
-
#
|
|
390
|
+
# für jede vom Agent geschriebene .codebeacon/semantic/
|
|
391
|
+
# results/chunk_NNN.jsonl: INFERRED references-Kanten in
|
|
392
|
+
# beacon.json mergen + den Pending-Chunk nach
|
|
393
|
+
# .codebeacon/semantic/original/chunk_NNN.jsonl VERSCHIEBEN
|
|
394
|
+
# (dauerhaftes Archiv). Results löschen, alles regenerieren.
|
|
391
395
|
|
|
392
396
|
codebeacon serve [--dir .codebeacon] # MCP-Server starten (stdio)
|
|
393
397
|
codebeacon install # Claude-Code-Skill installieren
|
|
398
|
+
codebeacon upgrade # pip-Upgrade + ~/.claude/skills/codebeacon/SKILL.md aktualisieren
|
|
399
|
+
# (`--force` falls editable-Installation)
|
|
394
400
|
```
|
|
395
401
|
|
|
396
402
|
---
|
|
@@ -411,22 +417,24 @@ Das CLI selbst **ruft niemals einen LLM-Anbieter auf**. Die AI-semantik-Schicht
|
|
|
411
417
|
Wenn Sie `/codebeacon` in Claude Code aufrufen:
|
|
412
418
|
|
|
413
419
|
1. `scan` / `sync` baut `beacon.json` aus dem AST (kein LLM-Aufruf).
|
|
414
|
-
2. `codebeacon semantic-prepare`
|
|
415
|
-
3. Der Skill
|
|
416
|
-
4. `codebeacon semantic-apply` mergt die Ergebnisse als `INFERRED references`-Kanten in `beacon.json
|
|
417
|
-
5. Beim nächsten Scan: `semantic-prepare`
|
|
420
|
+
2. `codebeacon semantic-prepare` rehydriert das Archiv unter `.codebeacon/semantic/original/*.jsonl` auf den frischen Graphen und **entfernt** Einträge, deren Quellknoten nicht mehr existiert. Anschließend schreibt es neue Aufgaben nach `.codebeacon/semantic/pending/chunk_NNN.jsonl` (≤ `--chunk-size` pro Datei, Std. 10). Chunk-Nummern setzen genau dort an, wo das dauerhafte Archiv aufhört — keine Kollisionen möglich.
|
|
421
|
+
3. Der Skill verarbeitet Pending-Chunks **einzeln**. Für jedes `pending/chunk_NNN.jsonl` liest der Agent (mit dem Modell der laufenden Sitzung) den `excerpt` jeder Aufgabe und schreibt eine gleichnamige `semantic/results/chunk_NNN.jsonl`.
|
|
422
|
+
4. `codebeacon semantic-apply` mergt die Ergebnisse als `INFERRED references`-Kanten in `beacon.json` und **verschiebt** jede abgeschlossene `pending/chunk_NNN.jsonl` nach **`semantic/original/chunk_NNN.jsonl`** (mit den angewandten Kanten zur Nachvollziehbarkeit). Die Result-Dateien werden gelöscht, Wiki + Obsidian + Kontextkarte regeneriert.
|
|
423
|
+
5. Beim nächsten Scan: `semantic-prepare` liest jeden Chunk unter `original/`, wendet seine Kanten auf den frisch gebauten Graphen an (historische Inferenzen bleiben erhalten) und überspringt jede Aufgabe, deren `task_id` bereits archiviert ist. `task_id` = `SHA1(file_path | node_id | excerpt_hash[:8])` — ändert sich der semantische Inhalt einer Datei, bekommt sie eine neue id und wird neu analysiert.
|
|
418
424
|
|
|
419
|
-
|
|
425
|
+
Inkrementelle, idempotente Anreicherung: der Agent analysiert dieselbe (Datei, Inhalt)-Kombination nie zweimal, das angesammelte AI-Signal überlebt jeden Rescan, und die Chunk-Aufteilung hält den Arbeitsumfang des Agenten klein.
|
|
420
426
|
|
|
421
427
|
### Direkte CLI-Nutzung
|
|
422
428
|
|
|
423
|
-
Wenn Sie nicht über den Skill gehen (z. B. CI), können Sie dieselben zwei Befehle manuell ausführen und
|
|
429
|
+
Wenn Sie nicht über den Skill gehen (z. B. CI), können Sie dieselben zwei Befehle manuell ausführen und Ihre eigenen `results/chunk_NNN.jsonl` liefern:
|
|
424
430
|
|
|
425
431
|
```bash
|
|
426
432
|
codebeacon scan .
|
|
427
|
-
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
433
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50 --chunk-size 10
|
|
428
434
|
|
|
429
|
-
#
|
|
435
|
+
# .codebeacon/semantic/pending/chunk_001.jsonl ... existieren jetzt.
|
|
436
|
+
# Schreiben Sie für jeden Pending-Chunk eine gleichnamige results/chunk_NNN.jsonl.
|
|
437
|
+
# Jede Zeile:
|
|
430
438
|
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
431
439
|
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
432
440
|
# ]}
|
|
@@ -56,6 +56,7 @@ Las herramientas existentes resuelven esto de forma parcial. Los analizadores de
|
|
|
56
56
|
- **Cero configuración** — detecta frameworks y lenguajes automáticamente; genera `codebeacon.yaml` para ejecuciones posteriores
|
|
57
57
|
- **Modo Deep Dive** — `--deep-dive` genera `.codebeacon/` + `CLAUDE.md` propios para cada sub-proyecto; ejecutar el comando de actualización desde **cualquier** sub-proyecto sincroniza automáticamente todos los proyectos del workspace
|
|
58
58
|
- **Auto-redescubrimiento del workspace** — en cada `scan`/`sync`, codebeacon re-escanea el workspace y añade automáticamente al `codebeacon.yaml` los nuevos proyectos antes de extraer, de modo que los sub-proyectos recién añadidos nunca se omitan silenciosamente; usa `--no-rediscover` para optar por el modo de configuración curada manualmente
|
|
59
|
+
- **Enriquecimiento semántico estilo Graphify** — tras la extracción AST, el skill despacha un subagente paralelo por chunk para emitir fragmentos completos de grafo `{nodes, edges, hyperedges}` con 8 tipos de relación (`calls`/`implements`/`references`/`cites`/`conceptually_related_to`/`shares_data_with`/`semantically_similar_to`/`rationale_for`) y confianza EXTRACTED/INFERRED/AMBIGUOUS; en Claude Code el subagente se ejecuta un nivel por debajo del modelo host (Opus→Sonnet, Sonnet→Haiku) para mantener el gasto proporcional al tamaño del corpus. El AST posee los nodos de código; el LLM solo puede aportar nodos `concept`/`document`/`paper`. Los archivos 0.3.x existentes se replayean con el nuevo esquema sin cambios
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
|
@@ -376,19 +377,24 @@ codebeacon hook install [path] # instala merge driver + hook post-com
|
|
|
376
377
|
codebeacon merge-driver <base> <cur> <other> # invocado por git tras `hook install`; union-merge de beacon.json
|
|
377
378
|
|
|
378
379
|
# Enriquecimiento AI-semántico (el LLM lo ejecuta el agente, codebeacon lleva la contabilidad)
|
|
379
|
-
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
380
|
-
# rehidrata
|
|
381
|
-
#
|
|
382
|
-
#
|
|
380
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N] [--chunk-size N]
|
|
381
|
+
# rehidrata .codebeacon/semantic/original/*.jsonl sobre el
|
|
382
|
+
# nuevo beacon.json + poda entradas que apuntan a nodos
|
|
383
|
+
# desaparecidos, luego escribe tareas en
|
|
384
|
+
# .codebeacon/semantic/pending/chunk_NNN.jsonl
|
|
385
|
+
# (--chunk-size por chunk, predet. 10). El task_id incluye
|
|
386
|
+
# hash de contenido: si el archivo cambia, se reemite.
|
|
383
387
|
codebeacon semantic-apply [--dir .codebeacon]
|
|
384
|
-
#
|
|
385
|
-
#
|
|
386
|
-
#
|
|
387
|
-
#
|
|
388
|
-
#
|
|
388
|
+
# por cada .codebeacon/semantic/results/chunk_NNN.jsonl que
|
|
389
|
+
# haya escrito el agente, fusiona las aristas INFERRED
|
|
390
|
+
# references en beacon.json y MUEVE el chunk pendiente a
|
|
391
|
+
# .codebeacon/semantic/original/chunk_NNN.jsonl (archivo
|
|
392
|
+
# durable). Borra los resultados y regenera todo.
|
|
389
393
|
|
|
390
394
|
codebeacon serve [--dir .codebeacon] # servidor MCP (stdio)
|
|
391
395
|
codebeacon install # instalar skill de Claude Code
|
|
396
|
+
codebeacon upgrade # pip upgrade + refrescar ~/.claude/skills/codebeacon/SKILL.md
|
|
397
|
+
# (use `--force` si está instalado en modo editable)
|
|
392
398
|
```
|
|
393
399
|
|
|
394
400
|
---
|
|
@@ -409,22 +415,24 @@ El CLI por sí mismo **nunca llama a un LLM**. La capa AI-semántica es propieda
|
|
|
409
415
|
Cuando invocas `/codebeacon` en Claude Code:
|
|
410
416
|
|
|
411
417
|
1. `scan` / `sync` construye `beacon.json` desde el AST (sin LLM).
|
|
412
|
-
2. `codebeacon semantic-prepare`
|
|
413
|
-
3. El skill itera
|
|
414
|
-
4. `codebeacon semantic-apply` mezcla los resultados como aristas `INFERRED references` en `beacon.json
|
|
415
|
-
5. En la
|
|
418
|
+
2. `codebeacon semantic-prepare` rehidrata el archivo en `.codebeacon/semantic/original/*.jsonl` sobre el grafo nuevo y **poda** las entradas que apuntan a nodos ya desaparecidos. Después escribe los nuevos task chunks en `.codebeacon/semantic/pending/chunk_NNN.jsonl` (cada chunk ≤ `--chunk-size`, predet. 10). La numeración de chunks continúa donde dejó el archivo durable, así nunca colisiona.
|
|
419
|
+
3. El skill itera los chunks pendientes **uno por uno**. Para cada `pending/chunk_NNN.jsonl`, el agente (con el modelo de su sesión actual) lee el `excerpt` de cada task y escribe un `semantic/results/chunk_NNN.jsonl` con el mismo nombre.
|
|
420
|
+
4. `codebeacon semantic-apply` mezcla los resultados como aristas `INFERRED references` en `beacon.json` y **mueve** cada `pending/chunk_NNN.jsonl` terminado a **`semantic/original/chunk_NNN.jsonl`** (con las aristas aplicadas para auditoría). Los archivos de resultados se eliminan; wiki + obsidian + mapa de contexto se regeneran.
|
|
421
|
+
5. En la siguiente ejecución: `semantic-prepare` lee cada chunk bajo `original/`, aplica sus aristas al grafo recién construido (las inferencias históricas no se pierden) y omite cualquier task cuyo `task_id` ya esté archivado. `task_id` = `SHA1(file_path | node_id | excerpt_hash[:8])`: si el contenido del archivo cambia, recibe un id nuevo y se reanaliza.
|
|
416
422
|
|
|
417
|
-
|
|
423
|
+
Enriquecimiento incremental e idempotente: el agente nunca reanaliza la misma combinación (archivo, contenido) dos veces, la señal AI acumulada sobrevive a cada re-escaneo y los chunks mantienen pequeño el conjunto de trabajo del agente.
|
|
418
424
|
|
|
419
425
|
### Uso directo del CLI
|
|
420
426
|
|
|
421
|
-
Si no usas el skill (p. ej. en CI), puedes ejecutar las mismas dos órdenes manualmente y
|
|
427
|
+
Si no usas el skill (p. ej. en CI), puedes ejecutar las mismas dos órdenes manualmente y proporcionar tus propios `results/chunk_NNN.jsonl`:
|
|
422
428
|
|
|
423
429
|
```bash
|
|
424
430
|
codebeacon scan .
|
|
425
|
-
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
431
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50 --chunk-size 10
|
|
426
432
|
|
|
427
|
-
#
|
|
433
|
+
# Existen .codebeacon/semantic/pending/chunk_001.jsonl ...
|
|
434
|
+
# Para cada chunk pendiente, escribe un results/chunk_NNN.jsonl con el mismo
|
|
435
|
+
# nombre. Cada línea:
|
|
428
436
|
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
429
437
|
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
430
438
|
# ]}
|
|
@@ -56,6 +56,7 @@ Les outils existants ne résolvent ce problème qu'en partie. Les analyseurs de
|
|
|
56
56
|
- **Zéro configuration** — détecte automatiquement les frameworks et langages ; génère `codebeacon.yaml` pour les exécutions suivantes
|
|
57
57
|
- **Mode Deep Dive** — `--deep-dive` génère un `.codebeacon/` + `CLAUDE.md` propre à chaque sous-projet ; une commande de mise à jour depuis **n'importe quel** sous-projet synchronise automatiquement tous les projets du workspace
|
|
58
58
|
- **Redécouverte automatique du workspace** — à chaque `scan`/`sync`, codebeacon réanalyse le workspace et ajoute automatiquement les nouveaux projets au `codebeacon.yaml` avant l'extraction, de sorte que les sous-projets fraîchement ajoutés ne soient jamais oubliés en silence ; utilisez `--no-rediscover` pour conserver une configuration yaml gérée manuellement
|
|
59
|
+
- **Enrichissement sémantique façon Graphify** — après l'extraction AST, le skill dispatche un sous-agent parallèle par chunk pour émettre des fragments complets de knowledge graph `{nodes, edges, hyperedges}` avec 8 types de relations (`calls`/`implements`/`references`/`cites`/`conceptually_related_to`/`shares_data_with`/`semantically_similar_to`/`rationale_for`) et confiance EXTRACTED/INFERRED/AMBIGUOUS ; sur Claude Code, le sous-agent s'exécute un cran sous le modèle hôte (Opus→Sonnet, Sonnet→Haiku) pour garder le coût proportionnel à la taille du corpus. L'AST possède les nœuds de code ; le LLM ne peut contribuer que des nœuds `concept`/`document`/`paper`. Les archives 0.3.x existantes sont rejouées sous le nouveau schéma sans modification
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
|
@@ -377,19 +378,24 @@ codebeacon hook install [path] # installer merge driver + hook post-c
|
|
|
377
378
|
codebeacon merge-driver <base> <cur> <other> # invoqué par git après `hook install` ; union-merge de beacon.json
|
|
378
379
|
|
|
379
380
|
# Enrichissement AI-sémantique (le LLM est exécuté par l'agent, codebeacon tient la comptabilité)
|
|
380
|
-
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
381
|
-
#
|
|
382
|
-
#
|
|
383
|
-
#
|
|
381
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N] [--chunk-size N]
|
|
382
|
+
# réhydrate .codebeacon/semantic/original/*.jsonl sur le
|
|
383
|
+
# nouveau beacon.json + élague les entrées pointant vers
|
|
384
|
+
# des nœuds disparus, puis écrit les nouvelles tâches
|
|
385
|
+
# dans .codebeacon/semantic/pending/chunk_NNN.jsonl
|
|
386
|
+
# (--chunk-size par chunk, défaut 10). task_id inclut un
|
|
387
|
+
# hash de contenu : un fichier modifié est ré-émis.
|
|
384
388
|
codebeacon semantic-apply [--dir .codebeacon]
|
|
385
|
-
#
|
|
386
|
-
# arêtes INFERRED references
|
|
387
|
-
#
|
|
388
|
-
#
|
|
389
|
-
#
|
|
389
|
+
# pour chaque .codebeacon/semantic/results/chunk_NNN.jsonl
|
|
390
|
+
# écrit par l'agent, fusionne les arêtes INFERRED references
|
|
391
|
+
# dans beacon.json et DÉPLACE le chunk pending vers
|
|
392
|
+
# .codebeacon/semantic/original/chunk_NNN.jsonl (archive
|
|
393
|
+
# durable). Supprime les résultats, régénère tout.
|
|
390
394
|
|
|
391
395
|
codebeacon serve [--dir .codebeacon] # serveur MCP (stdio)
|
|
392
396
|
codebeacon install # installer le skill Claude Code
|
|
397
|
+
codebeacon upgrade # pip upgrade + rafraîchir ~/.claude/skills/codebeacon/SKILL.md
|
|
398
|
+
# (`--force` si installé en mode éditable)
|
|
393
399
|
```
|
|
394
400
|
|
|
395
401
|
---
|
|
@@ -410,22 +416,24 @@ Le CLI lui-même **n'appelle jamais un LLM**. La couche AI-sémantique est inten
|
|
|
410
416
|
Quand vous invoquez `/codebeacon` dans Claude Code :
|
|
411
417
|
|
|
412
418
|
1. `scan` / `sync` construit `beacon.json` à partir de l'AST (aucun appel LLM).
|
|
413
|
-
2. `codebeacon semantic-prepare`
|
|
414
|
-
3. Le skill itère
|
|
415
|
-
4. `codebeacon semantic-apply` fusionne les résultats en arêtes `INFERRED references` dans `beacon.json
|
|
416
|
-
5. Au prochain scan : `semantic-prepare`
|
|
419
|
+
2. `codebeacon semantic-prepare` réhydrate l'archive sous `.codebeacon/semantic/original/*.jsonl` sur le graphe frais et **élague** les entrées dont le nœud source a disparu. Il écrit ensuite les nouvelles tâches dans `.codebeacon/semantic/pending/chunk_NNN.jsonl` (≤ `--chunk-size` par fichier, défaut 10). La numérotation des chunks reprend là où l'archive durable s'est arrêtée — pas de collision possible.
|
|
420
|
+
3. Le skill itère les chunks pending **un par un**. Pour chaque `pending/chunk_NNN.jsonl`, l'agent (avec le modèle de sa session courante) lit l'`excerpt` de chaque tâche et écrit un `semantic/results/chunk_NNN.jsonl` du même nom.
|
|
421
|
+
4. `codebeacon semantic-apply` fusionne les résultats en arêtes `INFERRED references` dans `beacon.json` et **déplace** chaque `pending/chunk_NNN.jsonl` terminé vers **`semantic/original/chunk_NNN.jsonl`** (les arêtes appliquées y sont incluses pour auditabilité). Les fichiers de résultats sont supprimés ; wiki + obsidian + carte de contexte sont régénérés.
|
|
422
|
+
5. Au prochain scan : `semantic-prepare` lit chaque chunk sous `original/`, applique ses arêtes au graphe fraîchement construit (les inférences historiques sont conservées) et saute toute tâche dont le `task_id` est déjà archivé. `task_id` = `SHA1(file_path | node_id | excerpt_hash[:8])` — si le contenu sémantique d'un fichier change, il obtient un nouvel id et est ré-analysé.
|
|
417
423
|
|
|
418
|
-
|
|
424
|
+
Enrichissement incrémental et idempotent : l'agent ne ré-analyse jamais deux fois la même combinaison (fichier, contenu), le signal AI accumulé survit à chaque re-scan et les chunks gardent l'ensemble de travail de l'agent petit.
|
|
419
425
|
|
|
420
426
|
### Utilisation directe du CLI
|
|
421
427
|
|
|
422
|
-
Si vous n'utilisez pas le skill (par ex. en CI), vous pouvez piloter les deux mêmes commandes manuellement et fournir
|
|
428
|
+
Si vous n'utilisez pas le skill (par ex. en CI), vous pouvez piloter les deux mêmes commandes manuellement et fournir vos propres `results/chunk_NNN.jsonl` :
|
|
423
429
|
|
|
424
430
|
```bash
|
|
425
431
|
codebeacon scan .
|
|
426
|
-
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
432
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50 --chunk-size 10
|
|
427
433
|
|
|
428
|
-
#
|
|
434
|
+
# .codebeacon/semantic/pending/chunk_001.jsonl ... existent.
|
|
435
|
+
# Pour chaque chunk pending, écrivez un results/chunk_NNN.jsonl du même nom.
|
|
436
|
+
# Chaque ligne :
|
|
429
437
|
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
430
438
|
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
431
439
|
# ]}
|
|
@@ -56,6 +56,7 @@ AI コーディングセッションを新しく開くたびに、アシスタ
|
|
|
56
56
|
- **ゼロ設定** — フレームワークと言語を自動検出;繰り返し実行のために `codebeacon.yaml` を自動生成
|
|
57
57
|
- **ディープダイブモード** — `--deep-dive` で各サブプロジェクトに専用の `.codebeacon/` + `CLAUDE.md` を生成;**どのサブプロジェクトからでも**更新コマンドを実行するだけでワークスペース全体が自動同期
|
|
58
58
|
- **ワークスペース自動再検出** — `scan`/`sync` 実行のたびにワークスペースを再スキャンし、`codebeacon.yaml` に未登録の新規プロジェクトを自動追加してから抽出を開始するため、新しく追加されたサブプロジェクトが見落とされることがない;yaml を手動で管理している場合は `--no-rediscover` でオプトアウト可能
|
|
59
|
+
- **Graphify 風のセマンティック強化** — AST 抽出後、スキルがチャンクごとに 1 つのサブエージェントを並列でディスパッチし、`{nodes, edges, hyperedges}` のフル知識グラフ断片を抽出。関係 8 種(`calls`/`implements`/`references`/`cites`/`conceptually_related_to`/`shares_data_with`/`semantically_similar_to`/`rationale_for`)+ 信頼度 3 段階(EXTRACTED/INFERRED/AMBIGUOUS)をサポート。Claude Code ではサブエージェントがホストモデルより 1 段階下(Opus→Sonnet、Sonnet→Haiku)に自動ダウングレードされ、コーパスサイズに比例したコストを維持。コードノードは AST が担当し、LLM は `concept`/`document`/`paper` ノードのみ寄与可能。既存の 0.3.x アーカイブは新スキーマで透過的にリプレイされる
|
|
59
60
|
|
|
60
61
|
---
|
|
61
62
|
|
|
@@ -285,21 +286,25 @@ codebeacon hook install [path] # merge driver + post-commit インク
|
|
|
285
286
|
codebeacon merge-driver <base> <cur> <other> # `hook install` 後 git が呼び出す;beacon.json を union マージ
|
|
286
287
|
|
|
287
288
|
# AI-セマンティック補強 (LLM はエージェント、整合性管理は codebeacon)
|
|
288
|
-
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
289
|
-
#
|
|
290
|
-
#
|
|
291
|
-
#
|
|
292
|
-
# に書き出す
|
|
289
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N] [--chunk-size N]
|
|
290
|
+
# .codebeacon/semantic/original/*.jsonl アーカイブを fresh
|
|
291
|
+
# beacon.json に再適用 + 失われたノードを指す stale エントリ
|
|
292
|
+
# を prune し、新規候補のみを .codebeacon/semantic/pending/
|
|
293
|
+
# chunk_NNN.jsonl に書き出す (chunk あたり --chunk-size 件、
|
|
294
|
+
# 既定 10)。task_id にコンテンツハッシュが入っているので、
|
|
295
|
+
# ファイル内容が変わると自動で再発行される。
|
|
293
296
|
codebeacon semantic-apply [--dir .codebeacon]
|
|
294
|
-
# .codebeacon/semantic
|
|
295
|
-
#
|
|
296
|
-
# .
|
|
297
|
-
#
|
|
298
|
-
# wiki/obsidian
|
|
297
|
+
# エージェントが書いた .codebeacon/semantic/results/
|
|
298
|
+
# chunk_NNN.jsonl をそれぞれ INFERRED references エッジ
|
|
299
|
+
# として beacon.json にマージし、pending/chunk_NNN.jsonl
|
|
300
|
+
# を original/chunk_NNN.jsonl に移動 (永続アーカイブ)。
|
|
301
|
+
# results は削除、wiki/obsidian/コンテキストマップを再生成。
|
|
299
302
|
|
|
300
303
|
# インテグレーション
|
|
301
304
|
codebeacon serve [--dir .codebeacon] # MCP サーバー起動 (stdio)
|
|
302
305
|
codebeacon install # Claude Code スキルをインストール
|
|
306
|
+
codebeacon upgrade # pip で更新 + ~/.claude/skills/codebeacon/SKILL.md を再生成
|
|
307
|
+
# (`--force` で editable インストール時も強制実行)
|
|
303
308
|
```
|
|
304
309
|
|
|
305
310
|
---
|
|
@@ -320,22 +325,23 @@ CLI 自体は LLM API 呼び出しを **行いません**。AI-セマンティ
|
|
|
320
325
|
Claude Code で `/codebeacon` を呼び出すと:
|
|
321
326
|
|
|
322
327
|
1. `scan` / `sync` が AST から `beacon.json` を構築(LLM 呼び出しなし)。
|
|
323
|
-
2. `codebeacon semantic-prepare`
|
|
324
|
-
3.
|
|
325
|
-
4. `codebeacon semantic-apply` が結果を `INFERRED references` エッジとして `beacon.json`
|
|
326
|
-
5. 次回スキャン時:`semantic-prepare`
|
|
328
|
+
2. `codebeacon semantic-prepare` が `.codebeacon/semantic/original/*.jsonl` アーカイブを新グラフに再適用し、グラフから消えたノードを指す stale エントリを **prune**。続いて新規 task を `.codebeacon/semantic/pending/chunk_NNN.jsonl` に書き出す(`--chunk-size` 単位、既定 10)。chunk 番号は永続アーカイブの続きから始まるため衝突しません。
|
|
329
|
+
3. スキルは pending chunk を**1 つずつ**処理。各 `pending/chunk_NNN.jsonl` について、エージェント(現在セッションのモデル)が task の `excerpt` を読み、同名の `semantic/results/chunk_NNN.jsonl` を書きます。
|
|
330
|
+
4. `codebeacon semantic-apply` が結果を `INFERRED references` エッジとして `beacon.json` にマージし、完了済み `pending/chunk_NNN.jsonl` を **`semantic/original/chunk_NNN.jsonl`** に**移動**(適用済みエッジを一緒に記録)。results は削除、wiki + obsidian + コンテキストマップを再生成。
|
|
331
|
+
5. 次回スキャン時:`semantic-prepare` が `original/` の全 chunk のエッジを新グラフに再適用(過去の推論を保全)し、既に処理済みの `task_id` はスキップ。`task_id` = `SHA1(file_path | node_id | excerpt_hash[:8])` — ファイルのセマンティック内容が変われば自動的に新しい id になり再解析されます。
|
|
327
332
|
|
|
328
|
-
→
|
|
333
|
+
→ 増分かつ冪等の補強。同じ (ファイル, 内容) を二度分析せず、蓄積された AI シグナルは毎回の再スキャンを生き延び、chunk 分割でエージェントの作業セットも小さく保てます。
|
|
329
334
|
|
|
330
335
|
### 直接 CLI 使用
|
|
331
336
|
|
|
332
|
-
スキルを介さず(例:CI)に同じ 2 コマンドで手動運用し、`
|
|
337
|
+
スキルを介さず(例:CI)に同じ 2 コマンドで手動運用し、`results/chunk_NNN.jsonl` を自分で書くこともできます:
|
|
333
338
|
|
|
334
339
|
```bash
|
|
335
340
|
codebeacon scan .
|
|
336
|
-
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
341
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50 --chunk-size 10
|
|
337
342
|
|
|
338
|
-
#
|
|
343
|
+
# .codebeacon/semantic/pending/chunk_001.jsonl ... が生成される。
|
|
344
|
+
# 各 pending chunk について同名の results/chunk_NNN.jsonl を書く。各行:
|
|
339
345
|
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
340
346
|
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
341
347
|
# ]}
|