codebeacon 0.3.1__tar.gz → 0.3.3__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.1 → codebeacon-0.3.3}/PKG-INFO +95 -10
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.de.md +68 -6
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.es.md +67 -6
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.fr.md +68 -6
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.ja.md +69 -6
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.ko.md +95 -9
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.md +94 -9
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.pt-BR.md +67 -6
- {codebeacon-0.3.1 → codebeacon-0.3.3}/README.zh-CN.md +68 -6
- codebeacon-0.3.3/codebeacon/__init__.py +1 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/cli.py +124 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/semantic.py +6 -88
- codebeacon-0.3.3/codebeacon/semantic_pipeline.py +457 -0
- codebeacon-0.3.3/codebeacon/skill/SKILL.md +190 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/pyproject.toml +1 -1
- {codebeacon-0.3.1 → codebeacon-0.3.3}/skill/install.py +1 -1
- codebeacon-0.3.1/codebeacon/__init__.py +0 -1
- codebeacon-0.3.1/codebeacon/skill/SKILL.md +0 -129
- codebeacon-0.3.1/skill/SKILL.md +0 -127
- {codebeacon-0.3.1 → codebeacon-0.3.3}/.cursorrules +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/.github/CODEOWNERS +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/.github/dependabot.yml +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/.github/workflows/ci.yml +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/.github/workflows/release.yml +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/.gitignore +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/AGENTS.md +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/CLAUDE.md +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/LICENSE +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/__main__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/cache.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/common/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/common/filters.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/common/safety.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/common/symbols.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/common/types.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/config.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/contextmap/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/contextmap/generator.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/discover/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/discover/detector.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/discover/ignore.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/discover/scanner.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/export/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/export/callflow_html.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/export/hooks.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/export/mcp.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/export/merge.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/export/obsidian.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/export/tree_html.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/base.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/components.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/dependencies.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/entities.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/README.md +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/actix.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/angular.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/aspnet.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/django.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/express.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/fastapi.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/flask.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/gin.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/ktor.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/laravel.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/nestjs.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/rails.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/react.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/spring_boot.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/svelte.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/tauri.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/vapor.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/queries/vue.scm +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/routes.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/extract/services.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/graph/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/graph/analyze.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/graph/build.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/graph/cluster.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/graph/enrich.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/graph/write.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/plugins/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/plugins/githooks.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/plugins/skills.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/wave.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/wiki/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/wiki/generator.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/wiki/index.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon/wiki/templates.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/codebeacon.yaml.example +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/docs/TRANSLATION_STATUS.md +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/public-plan.md +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/__init__.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/conftest.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/actix/main.rs +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/angular/app.component.ts +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/aspnet/UserController.cs +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/django/views.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/express/userRouter.js +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/fastapi/main.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/flask/app.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/gin/main.go +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/ktor/UserRoutes.kt +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/laravel/UserController.php +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/nestjs/user.controller.ts +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/rails/users_controller.rb +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/react/UserPage.tsx +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/spring_boot/UserController.java +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/sveltekit/+page.svelte +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/vapor/routes.swift +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/fixtures/vue/UserList.vue +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_discover.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_entities.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_filters.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_graph.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_plugins.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_resolve.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_routes.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_safety_and_writes.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_services.py +0 -0
- {codebeacon-0.3.1 → codebeacon-0.3.3}/tests/test_wiki.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: codebeacon
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
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
|
|
@@ -184,6 +184,12 @@ project-root/
|
|
|
184
184
|
entities/<Name>.md
|
|
185
185
|
components/<Name>.md
|
|
186
186
|
obsidian/ ← Obsidian vault (one note per graph node)
|
|
187
|
+
semantic/
|
|
188
|
+
original.jsonl ← durable archive of every applied AI-semantic result
|
|
189
|
+
(skipped on rescans, never re-emitted as a task)
|
|
190
|
+
semantic-tasks.jsonl ← pending AI-semantic batch (present only between
|
|
191
|
+
`semantic-prepare` and `semantic-apply`)
|
|
192
|
+
semantic-results.jsonl ← agent-written results (same lifecycle as above)
|
|
187
193
|
```
|
|
188
194
|
|
|
189
195
|
### Deep Dive Mode
|
|
@@ -243,11 +249,31 @@ codebeacon install
|
|
|
243
249
|
This copies `SKILL.md` to `~/.claude/skills/codebeacon/` and registers the `/codebeacon` trigger in `~/.claude/CLAUDE.md`. Restart your Claude Code session, then type `/codebeacon` to scan the current directory.
|
|
244
250
|
|
|
245
251
|
```
|
|
246
|
-
/codebeacon
|
|
247
|
-
/codebeacon /path/to/project
|
|
248
|
-
/codebeacon sync
|
|
252
|
+
/codebeacon # scan current directory + auto AI-semantic
|
|
253
|
+
/codebeacon /path/to/project # scan a specific path + auto AI-semantic
|
|
254
|
+
/codebeacon sync # re-scan from codebeacon.yaml + auto AI-semantic
|
|
255
|
+
/codebeacon <path> --no-semantic # scan only, skip the AI-semantic step
|
|
256
|
+
/codebeacon <path> --wiki-only # regenerate wiki from existing beacon.json
|
|
257
|
+
/codebeacon semantic-prepare # emit a fresh tasks file only
|
|
258
|
+
/codebeacon semantic-apply # merge a results file the agent already wrote
|
|
259
|
+
/codebeacon serve <path> # start MCP server pointing at .codebeacon/
|
|
260
|
+
/codebeacon query <term> # search the graph
|
|
261
|
+
/codebeacon path <src> <tgt> # shortest path
|
|
262
|
+
/codebeacon upgrade # pip upgrade + refresh this skill (then restart Claude Code)
|
|
249
263
|
```
|
|
250
264
|
|
|
265
|
+
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.
|
|
266
|
+
|
|
267
|
+
### Updating to a new version
|
|
268
|
+
|
|
269
|
+
Run **one** command from anywhere:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
codebeacon upgrade
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
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.
|
|
276
|
+
|
|
251
277
|
### MCP Server
|
|
252
278
|
|
|
253
279
|
Run codebeacon as a persistent MCP server so any MCP-compatible client can query your knowledge graph directly.
|
|
@@ -319,7 +345,7 @@ codebeacon scan /workspace # workspace root (multi-project)
|
|
|
319
345
|
codebeacon scan . --update # incremental: mtime/size fast path + content-hash fallback
|
|
320
346
|
codebeacon scan . --wiki-only # skip re-extraction, regenerate wiki/obsidian/context map from existing beacon.json
|
|
321
347
|
codebeacon scan . --obsidian-dir <path> # write Obsidian vault to custom location
|
|
322
|
-
codebeacon scan . --semantic # enable
|
|
348
|
+
codebeacon scan . --semantic # enable structured-comment semantic extraction (Javadoc/JSDoc/docstring refs)
|
|
323
349
|
codebeacon scan . --list-only # detect frameworks only, don't extract
|
|
324
350
|
codebeacon scan /workspace --deep-dive # per-project + combined workspace outputs
|
|
325
351
|
|
|
@@ -329,6 +355,16 @@ codebeacon sync # run from codebeacon.yaml (auto-appen
|
|
|
329
355
|
codebeacon sync --config <file> # use a specific config file
|
|
330
356
|
codebeacon sync --no-rediscover # don't auto-append newly added projects (hand-curated yaml mode)
|
|
331
357
|
|
|
358
|
+
# AI-semantic enrichment (the agent does the LLM work, codebeacon does the bookkeeping)
|
|
359
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
360
|
+
# rehydrate semantic archive onto beacon.json, emit fresh tasks
|
|
361
|
+
# for NEW candidates only (god-node folders + unresolved targets);
|
|
362
|
+
# writes .codebeacon/semantic-tasks.jsonl
|
|
363
|
+
codebeacon semantic-apply [--dir .codebeacon]
|
|
364
|
+
# read .codebeacon/semantic-results.jsonl, merge as INFERRED
|
|
365
|
+
# references edges, append to .codebeacon/semantic/original.jsonl
|
|
366
|
+
# archive, clear pending files, regenerate wiki/obsidian/context map
|
|
367
|
+
|
|
332
368
|
# Query the knowledge graph
|
|
333
369
|
codebeacon query <term> [--dir .codebeacon] [--limit N] # search nodes by label substring
|
|
334
370
|
codebeacon path <source> <target> [--dir .codebeacon] # shortest dependency path
|
|
@@ -340,10 +376,57 @@ codebeacon merge-driver <base> <cur> <other> # invoked by git after `hook insta
|
|
|
340
376
|
# Integrations
|
|
341
377
|
codebeacon serve [--dir .codebeacon] # start MCP server (stdio)
|
|
342
378
|
codebeacon install # install Claude Code skill
|
|
379
|
+
codebeacon upgrade # pip install --upgrade + refresh ~/.claude/skills/codebeacon/SKILL.md
|
|
380
|
+
# (`--force` to upgrade even when installed in editable mode)
|
|
343
381
|
```
|
|
344
382
|
|
|
345
383
|
---
|
|
346
384
|
|
|
385
|
+
## AI-Semantic Enrichment (via the `/codebeacon` skill)
|
|
386
|
+
|
|
387
|
+
Tree-sitter parsing finds what's in the AST. **AI-semantic** finds what's only in the *comments* — the `@see UserService` in a Javadoc, the `:class:`OrderRepository`` in a Python docstring, the contractual references documented next to a route handler. codebeacon ships two layers for this:
|
|
388
|
+
|
|
389
|
+
| Layer | Flag | Cost | What it catches |
|
|
390
|
+
|---|---|---|---|
|
|
391
|
+
| Structured-comment parsing | `--semantic` | free, local, no LLM | Javadoc `@see` / `{@link}`, JSDoc `@see` / `@param` types, Python `:class:` / `:func:` / `See Also` |
|
|
392
|
+
| **AI-semantic** | auto in `/codebeacon` skill | uses the agent's existing model — **no extra API key** | unresolved class/type/service references that regex can't catch (free-form prose, indirect mentions, type-only hints) |
|
|
393
|
+
|
|
394
|
+
The CLI itself never makes an LLM API call. The AI-semantic layer is intentionally **owned by the running agent** inside the `/codebeacon` Claude Code skill — that way the user's model choice (Opus / Sonnet / Haiku / anything) is honored, and codebeacon never needs `ANTHROPIC_API_KEY` or any cloud configuration.
|
|
395
|
+
|
|
396
|
+
### How it runs
|
|
397
|
+
|
|
398
|
+
When you invoke `/codebeacon` in Claude Code:
|
|
399
|
+
|
|
400
|
+
1. `scan` / `sync` builds `beacon.json` from the AST (no LLM).
|
|
401
|
+
2. `codebeacon semantic-prepare` re-applies the prior archive to the fresh graph, then writes `.codebeacon/semantic-tasks.jsonl` containing **only new candidates** — files that score high (unresolved-target edges + god-node folders) and have never been processed before.
|
|
402
|
+
3. The skill loops over the tasks file. For each line, the agent (using its current model) reads the `excerpt` field and returns inferred references inline. Results are written to `.codebeacon/semantic-results.jsonl`.
|
|
403
|
+
4. `codebeacon semantic-apply` merges the results as `INFERRED references` edges into `beacon.json`, **appends them to `.codebeacon/semantic/original.jsonl`** (the durable archive), clears the pending tasks/results files, and regenerates wiki + obsidian + context map.
|
|
404
|
+
5. Next scan: `semantic-prepare` rehydrates the archive onto the freshly built graph (so historical inferences don't disappear) and emits a tasks file with **only newly discovered candidates** since the last archive. Already-processed files are skipped via `task_id` (SHA1 of `file_path|node_id`).
|
|
405
|
+
|
|
406
|
+
This gives you incremental, idempotent enrichment: the agent never re-analyzes the same file twice, and accumulated AI signal survives every rescan.
|
|
407
|
+
|
|
408
|
+
### Direct CLI usage
|
|
409
|
+
|
|
410
|
+
If you're not running through the skill (e.g. CI), you can drive the same two commands manually and supply your own `semantic-results.jsonl`:
|
|
411
|
+
|
|
412
|
+
```bash
|
|
413
|
+
codebeacon scan .
|
|
414
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
415
|
+
|
|
416
|
+
# now write .codebeacon/semantic-results.jsonl yourself; each line is:
|
|
417
|
+
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
418
|
+
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
419
|
+
# ]}
|
|
420
|
+
|
|
421
|
+
codebeacon semantic-apply --dir .codebeacon
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### Opt out
|
|
425
|
+
|
|
426
|
+
Pass `--no-semantic` (or `--wiki-only`, or `--list-only`) when invoking the skill to skip the AI step entirely. The structured-comment layer still runs when you pass `--semantic` to `scan` / `sync`.
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
347
430
|
## Visual Exploration
|
|
348
431
|
|
|
349
432
|
Every scan writes two self-contained HTML files alongside `beacon.json`:
|
|
@@ -425,7 +508,9 @@ wave:
|
|
|
425
508
|
max_parallel: 5 # parallel threads
|
|
426
509
|
|
|
427
510
|
semantic:
|
|
428
|
-
enabled: false # override with --semantic
|
|
511
|
+
enabled: false # structured-comment extraction; override with --semantic.
|
|
512
|
+
# AI-semantic does NOT live here — it is invoked by the
|
|
513
|
+
# /codebeacon skill, see "AI-Semantic Enrichment" above.
|
|
429
514
|
|
|
430
515
|
deep_dive: false # set to true to generate per-project outputs
|
|
431
516
|
```
|
|
@@ -487,13 +572,13 @@ codebeacon is not a replacement for either tool — it's the union of what both
|
|
|
487
572
|
|
|
488
573
|
## Privacy & Security
|
|
489
574
|
|
|
490
|
-
All processing is local. Your source code never leaves your machine.
|
|
575
|
+
All AST processing is local. Your source code never leaves your machine when you run codebeacon directly.
|
|
491
576
|
|
|
492
577
|
- Tree-sitter AST parsing runs entirely in-process
|
|
493
578
|
- No telemetry, no analytics, no network calls during normal operation
|
|
494
|
-
- The
|
|
495
|
-
|
|
496
|
-
|
|
579
|
+
- The CLI **never calls an LLM provider on its own** — codebeacon ships no API client, no key handling, no model name
|
|
580
|
+
- `--semantic` activates **structured-comment parsing only** (Javadoc `@see` / `{@link}`, JSDoc `@see` / `@param` types, Python `:class:` / `:func:` / `See Also`). Fully local.
|
|
581
|
+
- **AI-semantic** (the deeper LLM-driven layer) is invoked by the `/codebeacon` Claude Code skill. The agent reads `semantic-tasks.jsonl`, runs the analysis under whatever model the user already picked, and writes `semantic-results.jsonl`. The Python CLI only prepares the task batch and merges the results — it has no idea which model was used. Pass `--no-semantic` in the skill to skip the LLM step entirely.
|
|
497
582
|
|
|
498
583
|
---
|
|
499
584
|
|
|
@@ -241,7 +241,10 @@ wave:
|
|
|
241
241
|
max_parallel: 5 # parallele Threads
|
|
242
242
|
|
|
243
243
|
semantic:
|
|
244
|
-
enabled: false #
|
|
244
|
+
enabled: false # nur strukturierte Kommentaranalyse;
|
|
245
|
+
# mit --semantic überschreiben. AI-semantik lebt NICHT
|
|
246
|
+
# hier — sie wird vom /codebeacon-Skill
|
|
247
|
+
# (= laufender Agent) ausgelöst.
|
|
245
248
|
|
|
246
249
|
deep_dive: false # auf true setzen für Pro-Projekt-Ausgabe
|
|
247
250
|
```
|
|
@@ -359,7 +362,7 @@ Java, Kotlin, Python, JavaScript, TypeScript, Go, Ruby, PHP, C#, Rust, Swift, HT
|
|
|
359
362
|
codebeacon scan . # aktuelles Verzeichnis
|
|
360
363
|
codebeacon scan . --update # inkrementell: nur geänderte Dateien
|
|
361
364
|
codebeacon scan . --wiki-only # Extraktion überspringen, Wiki/Obsidian/Kontext aus vorhandenem beacon.json regenerieren
|
|
362
|
-
codebeacon scan . --semantic #
|
|
365
|
+
codebeacon scan . --semantic # Extraktion strukturierter Kommentar-Referenzen (Javadoc/JSDoc/docstring)
|
|
363
366
|
codebeacon scan . --list-only # nur Frameworks erkennen
|
|
364
367
|
codebeacon scan /workspace --deep-dive # Pro-Projekt- + kombinierte Workspace-Ausgabe
|
|
365
368
|
|
|
@@ -374,10 +377,69 @@ codebeacon path <Quelle> <Ziel> [--dir .codebeacon] # kürzester Abhän
|
|
|
374
377
|
codebeacon hook install [path] # Merge-Driver + Post-Commit-Inkrement-Rebuild installieren
|
|
375
378
|
codebeacon merge-driver <base> <cur> <other> # von git nach `hook install` aufgerufen; Union-Merge von beacon.json
|
|
376
379
|
|
|
380
|
+
# AI-semantische Anreicherung (LLM macht der Agent, codebeacon nur die Buchführung)
|
|
381
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
382
|
+
# spielt vorhandenes Archiv wieder auf das frische
|
|
383
|
+
# beacon.json an und gibt Aufgaben nur für NEUE
|
|
384
|
+
# Kandidaten aus (god-node-Ordner + unaufgelöste Ziele)
|
|
385
|
+
codebeacon semantic-apply [--dir .codebeacon]
|
|
386
|
+
# mergt .codebeacon/semantic-results.jsonl als
|
|
387
|
+
# INFERRED references-Kanten in beacon.json,
|
|
388
|
+
# hängt an .codebeacon/semantic/original.jsonl an,
|
|
389
|
+
# räumt Pending-Dateien auf und regeneriert
|
|
390
|
+
# wiki/obsidian/Kontextkarte
|
|
391
|
+
|
|
377
392
|
codebeacon serve [--dir .codebeacon] # MCP-Server starten (stdio)
|
|
378
393
|
codebeacon install # Claude-Code-Skill installieren
|
|
394
|
+
codebeacon upgrade # pip-Upgrade + ~/.claude/skills/codebeacon/SKILL.md aktualisieren
|
|
395
|
+
# (`--force` falls editable-Installation)
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
---
|
|
399
|
+
|
|
400
|
+
## AI-semantische Anreicherung (via `/codebeacon`-Skill)
|
|
401
|
+
|
|
402
|
+
Tree-sitter-Parsing findet, was im AST steht. **AI-semantik** findet, was nur in den *Kommentaren* lebt — das `@see UserService` in einer Javadoc, das `:class:`OrderRepository`` in einer Python-Docstring, die vertraglichen Referenzen neben einem Route-Handler. codebeacon liefert dafür zwei Schichten:
|
|
403
|
+
|
|
404
|
+
| Schicht | Flag | Kosten | Was sie erfasst |
|
|
405
|
+
|---|---|---|---|
|
|
406
|
+
| Strukturierte Kommentaranalyse | `--semantic` | kostenlos, lokal, kein LLM | Javadoc `@see` / `{@link}`, JSDoc `@see` / `@param`-Typen, Python `:class:` / `:func:` / `See Also` |
|
|
407
|
+
| **AI-semantik** | automatisch im `/codebeacon`-Skill | nutzt das aktuelle Modell des Agenten — **kein extra API-Schlüssel** | nicht aufgelöste Klassen-/Typ-/Service-Referenzen, die Regex nicht findet (freier Prosa, indirekte Erwähnungen, reine Typ-Hinweise) |
|
|
408
|
+
|
|
409
|
+
Das CLI selbst **ruft niemals einen LLM-Anbieter auf**. Die AI-semantik-Schicht gehört bewusst dem **laufenden Agenten** innerhalb des `/codebeacon` Claude-Code-Skills — so wird die Modellwahl des Nutzers (Opus / Sonnet / Haiku / etc.) respektiert, und codebeacon braucht weder `ANTHROPIC_API_KEY` noch irgendeine Cloud-Konfiguration.
|
|
410
|
+
|
|
411
|
+
### Wie es läuft
|
|
412
|
+
|
|
413
|
+
Wenn Sie `/codebeacon` in Claude Code aufrufen:
|
|
414
|
+
|
|
415
|
+
1. `scan` / `sync` baut `beacon.json` aus dem AST (kein LLM-Aufruf).
|
|
416
|
+
2. `codebeacon semantic-prepare` spielt das frühere Archiv wieder auf den frischen Graphen ein und schreibt dann `.codebeacon/semantic-tasks.jsonl` mit **nur neuen Kandidaten** — hochbewertete Dateien (Kanten zu nicht aufgelösten Zielen + god-node-Ordner), die noch nie verarbeitet wurden.
|
|
417
|
+
3. Der Skill iteriert die Tasks-Datei. Für jede Zeile liest der Agent (mit dem Modell der aktuellen Sitzung) das `excerpt`-Feld und liefert inline gefolgerte References. Ergebnisse werden in `.codebeacon/semantic-results.jsonl` geschrieben.
|
|
418
|
+
4. `codebeacon semantic-apply` mergt die Ergebnisse als `INFERRED references`-Kanten in `beacon.json`, **hängt sie an `.codebeacon/semantic/original.jsonl`** (das dauerhafte Archiv) an, räumt die Pending-Dateien auf und regeneriert Wiki + Obsidian + Kontextkarte.
|
|
419
|
+
5. Beim nächsten Scan: `semantic-prepare` rehydriert das Archiv auf den frisch gebauten Graphen (damit historische Inferenzen nicht durch ein erneutes Scannen verschwinden) und gibt eine Tasks-Datei mit **nur den seit dem letzten Archiv neu entdeckten Kandidaten** aus. Bereits verarbeitete Dateien werden per `task_id` (SHA1 von `file_path|node_id`) übersprungen.
|
|
420
|
+
|
|
421
|
+
Das ergibt inkrementelle, idempotente Anreicherung: der Agent analysiert dieselbe Datei nie zweimal, und das angesammelte AI-Signal überlebt jeden Rescan.
|
|
422
|
+
|
|
423
|
+
### Direkte CLI-Nutzung
|
|
424
|
+
|
|
425
|
+
Wenn Sie nicht über den Skill gehen (z. B. CI), können Sie dieselben zwei Befehle manuell ausführen und Ihr eigenes `semantic-results.jsonl` liefern:
|
|
426
|
+
|
|
427
|
+
```bash
|
|
428
|
+
codebeacon scan .
|
|
429
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
430
|
+
|
|
431
|
+
# jetzt selbst .codebeacon/semantic-results.jsonl schreiben; jede Zeile:
|
|
432
|
+
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
433
|
+
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
434
|
+
# ]}
|
|
435
|
+
|
|
436
|
+
codebeacon semantic-apply --dir .codebeacon
|
|
379
437
|
```
|
|
380
438
|
|
|
439
|
+
### Deaktivieren
|
|
440
|
+
|
|
441
|
+
Übergeben Sie `--no-semantic` (oder `--wiki-only`, oder `--list-only`) beim Aufruf des Skills, um den AI-Schritt komplett zu überspringen. Die strukturierte Kommentaranalyse läuft weiterhin, wenn Sie `--semantic` an `scan` / `sync` übergeben.
|
|
442
|
+
|
|
381
443
|
---
|
|
382
444
|
|
|
383
445
|
## Vergleich
|
|
@@ -408,11 +470,11 @@ codebeacon install # Claude-Code-Skill installieren
|
|
|
408
470
|
|
|
409
471
|
## Datenschutz und Sicherheit
|
|
410
472
|
|
|
411
|
-
|
|
473
|
+
Die gesamte AST-Verarbeitung läuft lokal. Wenn Sie codebeacon direkt aufrufen, verlässt Ihr Quellcode niemals Ihren Rechner. Keine Telemetrie, keine Netzwerkaufrufe im normalen Betrieb.
|
|
412
474
|
|
|
413
|
-
-
|
|
414
|
-
|
|
415
|
-
|
|
475
|
+
- Die CLI selbst **ruft niemals einen LLM-Anbieter auf** — das codebeacon-Paket enthält weder API-Client, noch Schlüsselverwaltung, noch Modellnamen.
|
|
476
|
+
- `--semantic` aktiviert **ausschließlich die strukturierte Kommentaranalyse** (Javadoc `@see` / `{@link}`, JSDoc `@see` / `@param`-Typen, Python `:class:` / `:func:` / `See Also`). Vollständig lokal.
|
|
477
|
+
- **AI-semantik** (die tiefere LLM-Schicht) wird vom `/codebeacon` Claude-Code-Skill ausgelöst. Der Agent liest `semantic-tasks.jsonl`, führt die Analyse mit dem **Modell der laufenden Sitzung** aus und schreibt `semantic-results.jsonl`. Die Python-CLI bereitet nur das Aufgaben-Batch vor und mergt die Ergebnisse — sie weiß nicht einmal, welches Modell verwendet wurde. Übergeben Sie `--no-semantic` an den Skill, um den LLM-Schritt vollständig zu überspringen.
|
|
416
478
|
|
|
417
479
|
---
|
|
418
480
|
|
|
@@ -240,7 +240,9 @@ wave:
|
|
|
240
240
|
max_parallel: 5 # hilos paralelos
|
|
241
241
|
|
|
242
242
|
semantic:
|
|
243
|
-
enabled: false #
|
|
243
|
+
enabled: false # solo extracción de comentarios estructurados;
|
|
244
|
+
# --semantic lo activa. El AI-semántico NO vive aquí:
|
|
245
|
+
# lo dispara el skill /codebeacon (= el agente en ejecución).
|
|
244
246
|
|
|
245
247
|
deep_dive: false # establecer true para salida por proyecto
|
|
246
248
|
```
|
|
@@ -358,7 +360,7 @@ Los parsers de Java, Kotlin, Python, JavaScript, TypeScript, Go, Ruby, PHP, C#,
|
|
|
358
360
|
codebeacon scan . # directorio actual
|
|
359
361
|
codebeacon scan . --update # incremental: solo archivos modificados
|
|
360
362
|
codebeacon scan . --wiki-only # saltar extracción, regenerar wiki/obsidian/contexto desde beacon.json existente
|
|
361
|
-
codebeacon scan . --semantic # extracción
|
|
363
|
+
codebeacon scan . --semantic # extracción de referencias de comentarios estructurados (Javadoc/JSDoc/docstring)
|
|
362
364
|
codebeacon scan . --list-only # solo detectar frameworks
|
|
363
365
|
codebeacon scan /workspace --deep-dive # salida por proyecto + workspace combinado
|
|
364
366
|
|
|
@@ -373,10 +375,69 @@ codebeacon path <origen> <destino> [--dir .codebeacon] # ruta más corta d
|
|
|
373
375
|
codebeacon hook install [path] # instala merge driver + hook post-commit incremental
|
|
374
376
|
codebeacon merge-driver <base> <cur> <other> # invocado por git tras `hook install`; union-merge de beacon.json
|
|
375
377
|
|
|
378
|
+
# 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 el archivo histórico sobre el nuevo beacon.json
|
|
381
|
+
# y emite tareas solo para candidatos NUEVOS
|
|
382
|
+
# (carpetas god-node + objetivos no resueltos)
|
|
383
|
+
codebeacon semantic-apply [--dir .codebeacon]
|
|
384
|
+
# fusiona .codebeacon/semantic-results.jsonl como
|
|
385
|
+
# aristas INFERRED references en beacon.json,
|
|
386
|
+
# añade al archivo .codebeacon/semantic/original.jsonl,
|
|
387
|
+
# limpia los archivos pendientes y regenera
|
|
388
|
+
# wiki/obsidian/mapa de contexto
|
|
389
|
+
|
|
376
390
|
codebeacon serve [--dir .codebeacon] # servidor MCP (stdio)
|
|
377
391
|
codebeacon install # instalar skill de Claude Code
|
|
392
|
+
codebeacon upgrade # pip upgrade + refrescar ~/.claude/skills/codebeacon/SKILL.md
|
|
393
|
+
# (use `--force` si está instalado en modo editable)
|
|
394
|
+
```
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
## Enriquecimiento AI-semántico (mediante el skill `/codebeacon`)
|
|
399
|
+
|
|
400
|
+
El análisis con tree-sitter encuentra lo que está en el AST. **AI-semántico** encuentra lo que vive sólo en los *comentarios* — el `@see UserService` en un Javadoc, el `:class:`OrderRepository`` en una docstring de Python, las referencias contractuales documentadas junto a un handler de ruta. codebeacon ofrece dos capas para esto:
|
|
401
|
+
|
|
402
|
+
| Capa | Flag | Coste | Qué captura |
|
|
403
|
+
|---|---|---|---|
|
|
404
|
+
| Análisis de comentarios estructurados | `--semantic` | gratis, local, sin LLM | Javadoc `@see` / `{@link}`, JSDoc `@see` / tipos de `@param`, Python `:class:` / `:func:` / `See Also` |
|
|
405
|
+
| **AI-semántico** | automático en el skill `/codebeacon` | usa el modelo actual del agente — **sin API key adicional** | referencias de clase/tipo/servicio que el regex no atrapa (texto libre, menciones indirectas, sólo hints de tipo) |
|
|
406
|
+
|
|
407
|
+
El CLI por sí mismo **nunca llama a un LLM**. La capa AI-semántica es propiedad intencional del **agente en ejecución** dentro del skill `/codebeacon` de Claude Code — así se respeta el modelo elegido por el usuario (Opus / Sonnet / Haiku / lo que sea) y codebeacon nunca necesita `ANTHROPIC_API_KEY` ni configuración en la nube.
|
|
408
|
+
|
|
409
|
+
### Cómo funciona
|
|
410
|
+
|
|
411
|
+
Cuando invocas `/codebeacon` en Claude Code:
|
|
412
|
+
|
|
413
|
+
1. `scan` / `sync` construye `beacon.json` desde el AST (sin LLM).
|
|
414
|
+
2. `codebeacon semantic-prepare` reaplica el archivo histórico sobre el grafo nuevo y luego escribe `.codebeacon/semantic-tasks.jsonl` con **sólo los candidatos nuevos** — archivos con puntuación alta (aristas a objetivos no resueltos + carpetas god-node) que nunca se han procesado.
|
|
415
|
+
3. El skill itera sobre el archivo de tareas. Por cada línea, el agente (usando el modelo de su sesión actual) lee el campo `excerpt` y devuelve referencias inferidas en línea. Los resultados se escriben en `.codebeacon/semantic-results.jsonl`.
|
|
416
|
+
4. `codebeacon semantic-apply` mezcla los resultados como aristas `INFERRED references` en `beacon.json`, **los anexa a `.codebeacon/semantic/original.jsonl`** (el archivo durable), limpia los ficheros pendientes y regenera wiki + obsidian + mapa de contexto.
|
|
417
|
+
5. En la próxima ejecución: `semantic-prepare` rehidrata el archivo sobre el grafo recién construido (para que las inferencias históricas no desaparezcan en una nueva exploración) y emite un fichero de tareas con **sólo candidatos nuevos** desde la última actualización del archivo. Los archivos ya procesados se omiten vía `task_id` (SHA1 de `file_path|node_id`).
|
|
418
|
+
|
|
419
|
+
Esto da enriquecimiento incremental e idempotente: el agente nunca reanaliza el mismo archivo dos veces, y la señal AI acumulada sobrevive a cada re-escaneo.
|
|
420
|
+
|
|
421
|
+
### Uso directo del CLI
|
|
422
|
+
|
|
423
|
+
Si no usas el skill (p. ej. en CI), puedes ejecutar las mismas dos órdenes manualmente y suministrar tu propio `semantic-results.jsonl`:
|
|
424
|
+
|
|
425
|
+
```bash
|
|
426
|
+
codebeacon scan .
|
|
427
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
428
|
+
|
|
429
|
+
# ahora escribe tú mismo .codebeacon/semantic-results.jsonl; cada línea:
|
|
430
|
+
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
431
|
+
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
432
|
+
# ]}
|
|
433
|
+
|
|
434
|
+
codebeacon semantic-apply --dir .codebeacon
|
|
378
435
|
```
|
|
379
436
|
|
|
437
|
+
### Desactivar
|
|
438
|
+
|
|
439
|
+
Pasa `--no-semantic` (o `--wiki-only`, o `--list-only`) al invocar el skill para saltarte por completo el paso AI. La capa de comentarios estructurados sigue funcionando cuando pasas `--semantic` a `scan` / `sync`.
|
|
440
|
+
|
|
380
441
|
---
|
|
381
442
|
|
|
382
443
|
## Comparativa
|
|
@@ -407,11 +468,11 @@ codebeacon install # instalar skill de Claude Code
|
|
|
407
468
|
|
|
408
469
|
## Privacidad y seguridad
|
|
409
470
|
|
|
410
|
-
Todo el procesamiento es local.
|
|
471
|
+
Todo el procesamiento AST es local. Al ejecutar codebeacon directamente, su código fuente nunca sale de su máquina. Sin telemetría ni llamadas de red durante el uso normal.
|
|
411
472
|
|
|
412
|
-
-
|
|
413
|
-
|
|
414
|
-
|
|
473
|
+
- El propio CLI **nunca llama a un proveedor LLM** — el paquete codebeacon no incluye cliente API, ni manejo de claves, ni nombre de modelo.
|
|
474
|
+
- `--semantic` activa **solo el análisis de comentarios estructurados** (Javadoc `@see` / `{@link}`, JSDoc `@see` / tipos de `@param`, Python `:class:` / `:func:` / `See Also`). 100 % local.
|
|
475
|
+
- **AI-semántico** (la capa LLM más profunda) lo dispara el skill `/codebeacon` de Claude Code. El agente lee `semantic-tasks.jsonl`, ejecuta el análisis con el **modelo de su sesión actual** y escribe `semantic-results.jsonl`. El CLI Python solo prepara el lote de tareas y fusiona los resultados; ni siquiera sabe qué modelo se utilizó. Pase `--no-semantic` al skill para omitir por completo el paso LLM.
|
|
415
476
|
|
|
416
477
|
---
|
|
417
478
|
|
|
@@ -240,7 +240,10 @@ wave:
|
|
|
240
240
|
max_parallel: 5 # threads parallèles
|
|
241
241
|
|
|
242
242
|
semantic:
|
|
243
|
-
enabled: false #
|
|
243
|
+
enabled: false # uniquement l'extraction de commentaires structurés ;
|
|
244
|
+
# activée par --semantic. L'AI-sémantique N'EST PAS ici :
|
|
245
|
+
# elle est déclenchée par le skill /codebeacon
|
|
246
|
+
# (= l'agent en cours d'exécution).
|
|
244
247
|
|
|
245
248
|
deep_dive: false # mettre à true pour une sortie par projet
|
|
246
249
|
```
|
|
@@ -358,7 +361,7 @@ Les parsers Java, Kotlin, Python, JavaScript, TypeScript, Go, Ruby, PHP, C#, Rus
|
|
|
358
361
|
codebeacon scan . # répertoire courant
|
|
359
362
|
codebeacon scan . --update # incrémental : fichiers modifiés seulement
|
|
360
363
|
codebeacon scan . --wiki-only # ignorer la ré-extraction, régénérer wiki/obsidian/contexte depuis beacon.json existant
|
|
361
|
-
codebeacon scan . --semantic # extraction
|
|
364
|
+
codebeacon scan . --semantic # extraction des références dans commentaires structurés (Javadoc/JSDoc/docstring)
|
|
362
365
|
codebeacon scan . --list-only # détecter les frameworks uniquement
|
|
363
366
|
codebeacon scan /workspace --deep-dive # sortie par projet + workspace combiné
|
|
364
367
|
|
|
@@ -373,10 +376,69 @@ codebeacon path <source> <cible> [--dir .codebeacon] # chemin de dépendan
|
|
|
373
376
|
codebeacon hook install [path] # installer merge driver + hook post-commit incrémental
|
|
374
377
|
codebeacon merge-driver <base> <cur> <other> # invoqué par git après `hook install` ; union-merge de beacon.json
|
|
375
378
|
|
|
379
|
+
# 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
|
+
# réapplique l'archive existante au beacon.json frais
|
|
382
|
+
# puis n'émet de tâches que pour les candidats NEUFS
|
|
383
|
+
# (dossiers god-node + cibles non résolues)
|
|
384
|
+
codebeacon semantic-apply [--dir .codebeacon]
|
|
385
|
+
# fusionne .codebeacon/semantic-results.jsonl comme
|
|
386
|
+
# arêtes INFERRED references dans beacon.json,
|
|
387
|
+
# ajoute à l'archive .codebeacon/semantic/original.jsonl,
|
|
388
|
+
# nettoie les fichiers en attente et régénère
|
|
389
|
+
# wiki/obsidian/carte de contexte
|
|
390
|
+
|
|
376
391
|
codebeacon serve [--dir .codebeacon] # serveur MCP (stdio)
|
|
377
392
|
codebeacon install # installer le skill Claude Code
|
|
393
|
+
codebeacon upgrade # pip upgrade + rafraîchir ~/.claude/skills/codebeacon/SKILL.md
|
|
394
|
+
# (`--force` si installé en mode éditable)
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## Enrichissement AI-sémantique (via le skill `/codebeacon`)
|
|
400
|
+
|
|
401
|
+
L'analyse tree-sitter trouve ce qui est dans l'AST. **AI-sémantique** trouve ce qui ne vit que dans les *commentaires* — le `@see UserService` dans une Javadoc, le `:class:`OrderRepository`` dans une docstring Python, les références contractuelles documentées à côté d'un handler de route. codebeacon propose deux couches pour cela :
|
|
402
|
+
|
|
403
|
+
| Couche | Flag | Coût | Ce qu'elle capture |
|
|
404
|
+
|---|---|---|---|
|
|
405
|
+
| Analyse de commentaires structurés | `--semantic` | gratuit, local, sans LLM | Javadoc `@see` / `{@link}`, JSDoc `@see` / types `@param`, Python `:class:` / `:func:` / `See Also` |
|
|
406
|
+
| **AI-sémantique** | auto dans le skill `/codebeacon` | utilise le modèle courant de l'agent — **aucune clé API supplémentaire** | références de classe/type/service que la regex ne peut pas attraper (prose libre, mentions indirectes, hints de type uniquement) |
|
|
407
|
+
|
|
408
|
+
Le CLI lui-même **n'appelle jamais un LLM**. La couche AI-sémantique est intentionnellement **propriété de l'agent en cours d'exécution** à l'intérieur du skill Claude Code `/codebeacon` — ainsi le modèle choisi par l'utilisateur (Opus / Sonnet / Haiku / autre) est respecté et codebeacon n'a jamais besoin de `ANTHROPIC_API_KEY` ni d'aucune configuration cloud.
|
|
409
|
+
|
|
410
|
+
### Comment ça tourne
|
|
411
|
+
|
|
412
|
+
Quand vous invoquez `/codebeacon` dans Claude Code :
|
|
413
|
+
|
|
414
|
+
1. `scan` / `sync` construit `beacon.json` à partir de l'AST (aucun appel LLM).
|
|
415
|
+
2. `codebeacon semantic-prepare` réapplique l'archive précédente au graphe frais puis écrit `.codebeacon/semantic-tasks.jsonl` contenant **uniquement les nouveaux candidats** — fichiers à score élevé (arêtes vers cibles non résolues + dossiers god-node) qui n'ont jamais été traités.
|
|
416
|
+
3. Le skill itère sur le fichier de tâches. Pour chaque ligne, l'agent (en utilisant le modèle de sa session courante) lit le champ `excerpt` et renvoie inline les références inférées. Les résultats sont écrits dans `.codebeacon/semantic-results.jsonl`.
|
|
417
|
+
4. `codebeacon semantic-apply` fusionne les résultats en arêtes `INFERRED references` dans `beacon.json`, **les ajoute à `.codebeacon/semantic/original.jsonl`** (l'archive durable), nettoie les fichiers en attente et régénère wiki + obsidian + carte de contexte.
|
|
418
|
+
5. Au prochain scan : `semantic-prepare` réhydrate l'archive sur le graphe fraîchement construit (pour que les inférences historiques ne disparaissent pas lors d'un re-scan) et n'émet dans le fichier de tâches que **les candidats nouvellement découverts** depuis la dernière mise à jour de l'archive. Les fichiers déjà traités sont sautés via `task_id` (SHA1 de `file_path|node_id`).
|
|
419
|
+
|
|
420
|
+
Vous obtenez ainsi un enrichissement incrémental et idempotent : l'agent ne réanalyse jamais deux fois le même fichier et le signal AI accumulé survit à chaque re-scan.
|
|
421
|
+
|
|
422
|
+
### Utilisation directe du CLI
|
|
423
|
+
|
|
424
|
+
Si vous n'utilisez pas le skill (par ex. en CI), vous pouvez piloter les deux mêmes commandes manuellement et fournir votre propre `semantic-results.jsonl` :
|
|
425
|
+
|
|
426
|
+
```bash
|
|
427
|
+
codebeacon scan .
|
|
428
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
429
|
+
|
|
430
|
+
# écrivez vous-même .codebeacon/semantic-results.jsonl ; chaque ligne :
|
|
431
|
+
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
432
|
+
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
433
|
+
# ]}
|
|
434
|
+
|
|
435
|
+
codebeacon semantic-apply --dir .codebeacon
|
|
378
436
|
```
|
|
379
437
|
|
|
438
|
+
### Désactivation
|
|
439
|
+
|
|
440
|
+
Passez `--no-semantic` (ou `--wiki-only`, ou `--list-only`) lors de l'invocation du skill pour sauter complètement l'étape AI. La couche de commentaires structurés fonctionne toujours quand vous passez `--semantic` à `scan` / `sync`.
|
|
441
|
+
|
|
380
442
|
---
|
|
381
443
|
|
|
382
444
|
## Comparaison
|
|
@@ -407,11 +469,11 @@ codebeacon install # installer le skill Claude Code
|
|
|
407
469
|
|
|
408
470
|
## Confidentialité et sécurité
|
|
409
471
|
|
|
410
|
-
Tout le traitement est local.
|
|
472
|
+
Tout le traitement AST est local. Lorsque vous lancez codebeacon directement, le code source ne quitte jamais votre machine. Aucune télémétrie ni appel réseau pendant le fonctionnement normal.
|
|
411
473
|
|
|
412
|
-
-
|
|
413
|
-
|
|
414
|
-
|
|
474
|
+
- Le CLI lui-même **n'appelle jamais un fournisseur LLM** — le paquet codebeacon ne contient aucun client API, ni gestion de clé, ni nom de modèle.
|
|
475
|
+
- `--semantic` n'active que **l'analyse des commentaires structurés** (Javadoc `@see` / `{@link}`, JSDoc `@see` / types `@param`, Python `:class:` / `:func:` / `See Also`). 100 % local.
|
|
476
|
+
- **AI-sémantique** (la couche LLM plus profonde) est déclenchée par le skill `/codebeacon` de Claude Code. L'agent lit `semantic-tasks.jsonl`, exécute l'analyse avec **le modèle de sa session courante** et écrit `semantic-results.jsonl`. Le CLI Python prépare uniquement le lot de tâches et fusionne les résultats — il ne sait même pas quel modèle a été utilisé. Passez `--no-semantic` au skill pour ignorer entièrement l'étape LLM.
|
|
415
477
|
|
|
416
478
|
---
|
|
417
479
|
|
|
@@ -266,7 +266,7 @@ codebeacon scan /workspace # ワークスペースルート (マ
|
|
|
266
266
|
codebeacon scan . --update # インクリメンタル:変更ファイルのみ再抽出
|
|
267
267
|
codebeacon scan . --wiki-only # 再抽出をスキップし、既存の beacon.json からウィキ/obsidian/コンテキストマップを再生成
|
|
268
268
|
codebeacon scan . --obsidian-dir <path> # Obsidian Vault をカスタム場所に書き込み
|
|
269
|
-
codebeacon scan . --semantic #
|
|
269
|
+
codebeacon scan . --semantic # 構造化コメント参照(Javadoc/JSDoc/docstring)の抽出を有効化
|
|
270
270
|
codebeacon scan . --list-only # フレームワーク検出のみ、抽出なし
|
|
271
271
|
codebeacon scan /workspace --deep-dive # プロジェクト別 + 統合ワークスペース出力
|
|
272
272
|
|
|
@@ -284,11 +284,71 @@ codebeacon path <source> <target> [--dir .codebeacon] # 最短依存関係
|
|
|
284
284
|
codebeacon hook install [path] # merge driver + post-commit インクリメンタル再ビルドのインストール
|
|
285
285
|
codebeacon merge-driver <base> <cur> <other> # `hook install` 後 git が呼び出す;beacon.json を union マージ
|
|
286
286
|
|
|
287
|
+
# AI-セマンティック補強 (LLM はエージェント、整合性管理は codebeacon)
|
|
288
|
+
codebeacon semantic-prepare [--dir .codebeacon] [--max-tasks N]
|
|
289
|
+
# 過去のアーカイブを fresh beacon.json に再適用後、
|
|
290
|
+
# 未処理の NEW 候補 (god-node フォルダ + unresolved
|
|
291
|
+
# ターゲット) のみを .codebeacon/semantic-tasks.jsonl
|
|
292
|
+
# に書き出す
|
|
293
|
+
codebeacon semantic-apply [--dir .codebeacon]
|
|
294
|
+
# .codebeacon/semantic-results.jsonl を INFERRED
|
|
295
|
+
# references エッジとして beacon.json に統合し、
|
|
296
|
+
# .codebeacon/semantic/original.jsonl アーカイブに
|
|
297
|
+
# 追記、pending ファイルを掃除し、
|
|
298
|
+
# wiki/obsidian/コンテキストマップを再生成
|
|
299
|
+
|
|
287
300
|
# インテグレーション
|
|
288
301
|
codebeacon serve [--dir .codebeacon] # MCP サーバー起動 (stdio)
|
|
289
302
|
codebeacon install # Claude Code スキルをインストール
|
|
303
|
+
codebeacon upgrade # pip で更新 + ~/.claude/skills/codebeacon/SKILL.md を再生成
|
|
304
|
+
# (`--force` で editable インストール時も強制実行)
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## AI-セマンティック補強(`/codebeacon` スキル経由)
|
|
310
|
+
|
|
311
|
+
tree-sitter パースは AST に**ある**ものを見つけます。**AI-セマンティック**は**コメントのみにある**ものを見つけます — Javadoc 中の `@see UserService`、Python docstring 中の `:class:`OrderRepository``、ルートハンドラの横に書かれた契約上の参照など。codebeacon はこのために 2 層を提供します:
|
|
312
|
+
|
|
313
|
+
| レイヤー | フラグ | コスト | 捕捉対象 |
|
|
314
|
+
|---|---|---|---|
|
|
315
|
+
| 構造化コメントパース | `--semantic` | 無料、ローカル、LLM 不要 | Javadoc `@see` / `{@link}`、JSDoc `@see` / `@param` 型、Python `:class:` / `:func:` / `See Also` |
|
|
316
|
+
| **AI-セマンティック** | `/codebeacon` スキルで自動 | エージェントの**現在のモデル**を使用 — **API キー不要** | 正規表現が捕えられないクラス/型/サービス参照(自由文、間接的言及、型ヒントのみ等) |
|
|
317
|
+
|
|
318
|
+
CLI 自体は LLM API 呼び出しを **行いません**。AI-セマンティック層は意図的に `/codebeacon` Claude Code スキル内で**実行中のエージェントが所有**します — そうすることでユーザーが選んだモデル(Opus / Sonnet / Haiku など)がそのまま使われ、codebeacon 自体は `ANTHROPIC_API_KEY` もクラウド設定も必要としません。
|
|
319
|
+
|
|
320
|
+
### 実行フロー
|
|
321
|
+
|
|
322
|
+
Claude Code で `/codebeacon` を呼び出すと:
|
|
323
|
+
|
|
324
|
+
1. `scan` / `sync` が AST から `beacon.json` を構築(LLM 呼び出しなし)。
|
|
325
|
+
2. `codebeacon semantic-prepare` が過去のアーカイブを新しいグラフに再適用後、**新しい候補のみ**を含む `.codebeacon/semantic-tasks.jsonl` を書き出します — スコアが高い(unresolved ターゲットエッジ + god-node フォルダ)かつ一度も処理されたことのないファイル。
|
|
326
|
+
3. スキルが tasks ファイルを順次処理。各行についてエージェント(現在セッションのモデル)が `excerpt` フィールドを読み、推論された references をインラインで返します。結果は `.codebeacon/semantic-results.jsonl` に書き込まれます。
|
|
327
|
+
4. `codebeacon semantic-apply` が結果を `INFERRED references` エッジとして `beacon.json` にマージし、**`.codebeacon/semantic/original.jsonl`**(永続アーカイブ)に追記、pending ファイルを掃除、wiki + obsidian + コンテキストマップを再生成します。
|
|
328
|
+
5. 次回スキャン時:`semantic-prepare` がアーカイブを新グラフに再適用(再スキャンで過去の推論が失われないように)し、最後のアーカイブ以降の**新しく発見された候補のみ**を tasks ファイルに含めます。処理済みファイルは `task_id`(SHA1 of `file_path|node_id`)でスキップ。
|
|
329
|
+
|
|
330
|
+
→ 増分かつ冪等の補強。同じファイルを二度分析せず、蓄積された AI シグナルは毎回の再スキャンを生き延びます。
|
|
331
|
+
|
|
332
|
+
### 直接 CLI 使用
|
|
333
|
+
|
|
334
|
+
スキルを介さず(例:CI)に同じ 2 コマンドで手動運用し、`semantic-results.jsonl` を自分で書くこともできます:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
codebeacon scan .
|
|
338
|
+
codebeacon semantic-prepare --dir .codebeacon --max-tasks 50
|
|
339
|
+
|
|
340
|
+
# 次に .codebeacon/semantic-results.jsonl を自分で書く;各行:
|
|
341
|
+
# {"task_id":"...", "source_node_id":"...", "edges":[
|
|
342
|
+
# {"target_name":"UserService","relation":"references","confidence_score":0.7}
|
|
343
|
+
# ]}
|
|
344
|
+
|
|
345
|
+
codebeacon semantic-apply --dir .codebeacon
|
|
290
346
|
```
|
|
291
347
|
|
|
348
|
+
### オプトアウト
|
|
349
|
+
|
|
350
|
+
スキル呼び出し時に `--no-semantic`(または `--wiki-only`、`--list-only`)を渡せば AI ステップは完全にスキップされます。`--semantic` を `scan` / `sync` に渡すと構造化コメント層は引き続き動作します。
|
|
351
|
+
|
|
292
352
|
---
|
|
293
353
|
|
|
294
354
|
## ビジュアル探索
|
|
@@ -364,7 +424,10 @@ wave:
|
|
|
364
424
|
max_parallel: 5 # 並列スレッド数
|
|
365
425
|
|
|
366
426
|
semantic:
|
|
367
|
-
enabled: false #
|
|
427
|
+
enabled: false # 構造化コメント抽出のみ。--semantic で上書き。
|
|
428
|
+
# AI-セマンティックはこのキーに無い ―
|
|
429
|
+
# /codebeacon スキル (= 実行中のエージェント)
|
|
430
|
+
# が trigger する。
|
|
368
431
|
|
|
369
432
|
deep_dive: false # true にすると各プロジェクト別出力を生成
|
|
370
433
|
```
|
|
@@ -426,13 +489,13 @@ codebeacon は両ツールの代替ではなく統合です — 共有の抽出
|
|
|
426
489
|
|
|
427
490
|
## プライバシーとセキュリティ
|
|
428
491
|
|
|
429
|
-
|
|
492
|
+
AST 処理はすべてローカルで実行されます。codebeacon を直接呼び出す限り、ソースコードはマシンの外に出ません。
|
|
430
493
|
|
|
431
494
|
- tree-sitter AST パースはプロセス内でのみ実行
|
|
432
495
|
- テレメトリ、分析、通常操作中のネットワーク呼び出しなし
|
|
433
|
-
-
|
|
434
|
-
|
|
435
|
-
|
|
496
|
+
- CLI 自体は **LLM プロバイダーを一切呼び出しません** — codebeacon パッケージには API クライアントもキー処理もモデル名もありません
|
|
497
|
+
- `--semantic` は **構造化コメントパースのみ** を有効化します(Javadoc `@see` / `{@link}`、JSDoc `@see` / `@param` 型、Python `:class:` / `:func:` / `See Also`)。完全ローカル。
|
|
498
|
+
- **AI-セマンティック**(LLM ベースの深い推論層)は `/codebeacon` Claude Code スキルが起動します。エージェントが `semantic-tasks.jsonl` を読み、**現在セッションのモデル** で解析を実行して `semantic-results.jsonl` を書き戻します。Python CLI はタスクバッチの準備と結果の統合のみを担当し、どのモデルが使われたかすら知りません。スキル呼び出しに `--no-semantic` を渡せば LLM ステップは完全にスキップされます。
|
|
436
499
|
|
|
437
500
|
---
|
|
438
501
|
|