code-lens-cli 0.9.2__tar.gz → 0.10.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.
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/cicd/SKILL.md +0 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/cicd/scripts/portability-lint.sh +2 -6
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/code-lookup/SKILL.md +1 -1
- code_lens_cli-0.9.2/.claude/skills/code-lookup/scripts/grep.sh → code_lens_cli-0.10.0/.claude/skills/code-lookup/scripts/classify.sh +1 -1
- code_lens_cli-0.9.2/.claude/skills/code-lookup/scripts/recent.sh → code_lens_cli-0.10.0/.claude/skills/code-lookup/scripts/grep.sh +1 -1
- code_lens_cli-0.9.2/.claude/skills/code-lookup/scripts/classify.sh → code_lens_cli-0.10.0/.claude/skills/code-lookup/scripts/recent.sh +1 -1
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/repo-map/SKILL.md +3 -3
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/repo-map/scripts/connections.sh +1 -1
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/repo-map/scripts/graph.sh +1 -1
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/repo-map/scripts/profile.sh +1 -1
- code_lens_cli-0.10.0/.claude/skills.local.yaml.example +15 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.flake8 +2 -4
- code_lens_cli-0.10.0/.github/workflows/publish.yml +91 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.github/workflows/security-checks.yml +2 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.github/workflows/tests.yml +5 -5
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.gitignore +2 -12
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.markdownlint-cli2.yaml +1 -2
- code_lens_cli-0.10.0/CHANGELOG.md +32 -0
- code_lens_cli-0.10.0/CLAUDE.md +103 -0
- code_lens_cli-0.10.0/PKG-INFO +50 -0
- code_lens_cli-0.10.0/README.md +32 -0
- code_lens_cli-0.10.0/code_lens/__init__.py +20 -0
- code_lens_cli-0.10.0/code_lens/__main__.py +10 -0
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/__init__.py +32 -28
- code_lens_cli-0.10.0/code_lens/cli/_commands/__init__.py +1 -0
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_commands/classify.py +4 -4
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_commands/explain.py +7 -7
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_commands/grep.py +3 -3
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_commands/learn.py +8 -8
- code_lens_cli-0.10.0/code_lens/cli/_commands/profile.py +58 -0
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_commands/recent.py +3 -3
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_commands/whoami.py +7 -7
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_errors.py +7 -7
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/cli/_output.py +4 -4
- code_lens_cli-0.10.0/code_lens/lookup/__init__.py +25 -0
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/lookup/ast_scope.py +1 -1
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/lookup/classify.py +9 -9
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/lookup/grep_context.py +11 -11
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/lookup/recent_outline.py +16 -16
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/lookup/render.py +1 -1
- code_lens_cli-0.10.0/code_lens/repo/__init__.py +8 -0
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/__main__.py +22 -22
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/connections.py +17 -11
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/errors.py +17 -17
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/graph.py +14 -9
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/manifest.py +2 -2
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/profile.py +10 -5
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/render.py +7 -7
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/culture.yaml +1 -1
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/pyproject.toml +9 -15
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/sonar-project.properties +2 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_ast_scope.py +2 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_classify.py +9 -9
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_classify_render.py +4 -4
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_cli_chassis.py +5 -5
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_cli_errors.py +10 -10
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_cli_output.py +8 -8
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_cli_stubs.py +8 -8
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_grep_cmd.py +2 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_grep_context.py +7 -7
- code_lens_cli-0.10.0/tests/test_package.py +35 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_recent_cmd.py +2 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_recent_outline.py +12 -12
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_cli.py +3 -3
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_config.py +2 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_connections.py +5 -5
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_detect.py +2 -2
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_errors.py +6 -6
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_graph.py +5 -5
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_manifest.py +5 -5
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_profile.py +4 -4
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/tests/test_repo_render.py +18 -18
- code_lens_cli-0.10.0/uv.lock +650 -0
- code_lens_cli-0.9.2/.claude/settings.json +0 -26
- code_lens_cli-0.9.2/.claude/skills/eval/SKILL.md +0 -399
- code_lens_cli-0.9.2/.claude/skills.local.yaml.example +0 -19
- code_lens_cli-0.9.2/.github/workflows/publish.yml +0 -129
- code_lens_cli-0.9.2/.pre-commit-config.yaml +0 -37
- code_lens_cli-0.9.2/CHANGELOG.md +0 -273
- code_lens_cli-0.9.2/CLAUDE.md +0 -157
- code_lens_cli-0.9.2/PKG-INFO +0 -71
- code_lens_cli-0.9.2/README.md +0 -53
- code_lens_cli-0.9.2/antoine/__init__.py +0 -35
- code_lens_cli-0.9.2/antoine/__main__.py +0 -8
- code_lens_cli-0.9.2/antoine/cli/_commands/__init__.py +0 -1
- code_lens_cli-0.9.2/antoine/lookup/__init__.py +0 -25
- code_lens_cli-0.9.2/antoine/repo/__init__.py +0 -9
- code_lens_cli-0.9.2/docs/eval-rounds/2026-05-15-round-01.md +0 -101
- code_lens_cli-0.9.2/docs/eval-rounds/2026-05-15-smoke-02-examples.md +0 -385
- code_lens_cli-0.9.2/docs/eval-rounds/2026-05-16-round-02.md +0 -74
- code_lens_cli-0.9.2/docs/skill-sources.md +0 -29
- code_lens_cli-0.9.2/docs/superpowers/plans/2026-05-15-repo-map.md +0 -3148
- code_lens_cli-0.9.2/docs/superpowers/plans/2026-05-15-scripts-eval-harness.md +0 -3019
- code_lens_cli-0.9.2/docs/superpowers/plans/2026-05-16-seer-classify.md +0 -1461
- code_lens_cli-0.9.2/docs/superpowers/specs/2026-05-15-repo-map-design.md +0 -386
- code_lens_cli-0.9.2/docs/superpowers/specs/2026-05-15-scripts-eval-harness-design.md +0 -534
- code_lens_cli-0.9.2/docs/superpowers/specs/2026-05-16-seer-classify-design.md +0 -275
- code_lens_cli-0.9.2/experiments/scripts_eval/README.md +0 -56
- code_lens_cli-0.9.2/experiments/scripts_eval/RUNBOOK.md +0 -188
- code_lens_cli-0.9.2/experiments/scripts_eval/__init__.py +0 -0
- code_lens_cli-0.9.2/experiments/scripts_eval/_io.py +0 -65
- code_lens_cli-0.9.2/experiments/scripts_eval/backfill.py +0 -343
- code_lens_cli-0.9.2/experiments/scripts_eval/corpus.py +0 -132
- code_lens_cli-0.9.2/experiments/scripts_eval/corpus.yaml +0 -304
- code_lens_cli-0.9.2/experiments/scripts_eval/hooks/__init__.py +0 -0
- code_lens_cli-0.9.2/experiments/scripts_eval/hooks/post_tool.py +0 -116
- code_lens_cli-0.9.2/experiments/scripts_eval/hooks/pre_tool.py +0 -73
- code_lens_cli-0.9.2/experiments/scripts_eval/judge.py +0 -650
- code_lens_cli-0.9.2/experiments/scripts_eval/judge_rubric.md +0 -28
- code_lens_cli-0.9.2/experiments/scripts_eval/manifest.py +0 -102
- code_lens_cli-0.9.2/experiments/scripts_eval/report.py +0 -156
- code_lens_cli-0.9.2/experiments/scripts_eval/results/.gitkeep +0 -0
- code_lens_cli-0.9.2/experiments/scripts_eval/summarize.py +0 -360
- code_lens_cli-0.9.2/experiments/scripts_eval/switch-arm.sh +0 -58
- code_lens_cli-0.9.2/experiments/scripts_eval/trial.py +0 -367
- code_lens_cli-0.9.2/experiments/scripts_eval/validate.py +0 -82
- code_lens_cli-0.9.2/tests/__init__.py +0 -0
- code_lens_cli-0.9.2/tests/scripts_eval/__init__.py +0 -0
- code_lens_cli-0.9.2/tests/scripts_eval/fixtures/.gitkeep +0 -0
- code_lens_cli-0.9.2/tests/scripts_eval/fixtures/corpus_minimal.yaml +0 -28
- code_lens_cli-0.9.2/tests/scripts_eval/fixtures/sidechain_min.jsonl +0 -70
- code_lens_cli-0.9.2/tests/scripts_eval/test_backfill.py +0 -290
- code_lens_cli-0.9.2/tests/scripts_eval/test_corpus.py +0 -60
- code_lens_cli-0.9.2/tests/scripts_eval/test_hooks_post_tool.py +0 -104
- code_lens_cli-0.9.2/tests/scripts_eval/test_hooks_pre_tool.py +0 -91
- code_lens_cli-0.9.2/tests/scripts_eval/test_io.py +0 -49
- code_lens_cli-0.9.2/tests/scripts_eval/test_judge.py +0 -643
- code_lens_cli-0.9.2/tests/scripts_eval/test_manifest.py +0 -70
- code_lens_cli-0.9.2/tests/scripts_eval/test_report.py +0 -103
- code_lens_cli-0.9.2/tests/scripts_eval/test_summarize.py +0 -332
- code_lens_cli-0.9.2/tests/scripts_eval/test_trial.py +0 -336
- code_lens_cli-0.9.2/tests/scripts_eval/test_validate.py +0 -106
- code_lens_cli-0.9.2/tests/test_package.py +0 -53
- code_lens_cli-0.9.2/uv.lock +0 -1086
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/cicd/scripts/_resolve-nick.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/cicd/scripts/pr-reply.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/cicd/scripts/pr-status.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/cicd/scripts/workflow.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/communicate/SKILL.md +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/communicate/scripts/fetch-issues.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/communicate/scripts/mesh-message.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/communicate/scripts/post-comment.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/communicate/scripts/post-issue.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/communicate/scripts/templates/skill-update-brief.md +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/run-tests/SKILL.md +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/run-tests/scripts/test.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/sonarclaude/SKILL.md +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/sonarclaude/scripts/sonar.sh +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/version-bump/SKILL.md +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/version-bump/scripts/bump.py +0 -0
- {code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/LICENSE +0 -0
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/config.py +0 -0
- {code_lens_cli-0.9.2/antoine → code_lens_cli-0.10.0/code_lens}/repo/detect.py +0 -0
- {code_lens_cli-0.9.2/experiments → code_lens_cli-0.10.0/tests}/__init__.py +0 -0
|
@@ -9,8 +9,6 @@ description: >
|
|
|
9
9
|
review feedback, polling CI status, or the user says "create PR",
|
|
10
10
|
"review comments", "address feedback", "resolve threads". Renamed
|
|
11
11
|
from `pr-review` in steward 0.7.0; rebased on agex in 0.12.0.
|
|
12
|
-
antoine divergence: `scripts/portability-lint.sh` drops the GNU-only
|
|
13
|
-
`xargs -r` flag for BSD/macOS portability — see `docs/skill-sources.md`.
|
|
14
12
|
---
|
|
15
13
|
|
|
16
14
|
# CI/CD — Steward edition
|
{code_lens_cli-0.9.2 → code_lens_cli-0.10.0}/.claude/skills/cicd/scripts/portability-lint.sh
RENAMED
|
@@ -21,9 +21,7 @@ esac
|
|
|
21
21
|
[ -z "$files" ] && { echo "(no files to check)"; exit 0; }
|
|
22
22
|
|
|
23
23
|
# ----- Check 1: hard-coded /home/<user>/... paths -----
|
|
24
|
-
|
|
25
|
-
# `$files` is already guarded non-empty above, so `-r` is redundant — dropped.
|
|
26
|
-
hits1=$(echo "$files" | xargs grep -nE '/home/[a-z][a-z0-9_-]+/' 2>/dev/null || true)
|
|
24
|
+
hits1=$(echo "$files" | xargs -r grep -nE '/home/[a-z][a-z0-9_-]+/' 2>/dev/null || true)
|
|
27
25
|
|
|
28
26
|
# ----- Check 2: per-user dotfile *config* refs in committed docs/configs -----
|
|
29
27
|
# Carve-outs (allowed, NOT flagged):
|
|
@@ -31,9 +29,7 @@ hits1=$(echo "$files" | xargs grep -nE '/home/[a-z][a-z0-9_-]+/' 2>/dev/null ||
|
|
|
31
29
|
# - ~/.culture/ Culture mesh data this skill is supposed to read
|
|
32
30
|
md_yaml=$(echo "$files" | grep -E '\.(md|ya?ml|toml|json|jsonc)$' || true)
|
|
33
31
|
if [ -n "$md_yaml" ]; then
|
|
34
|
-
|
|
35
|
-
# non-empty by the enclosing `if`, so `-r` is redundant — dropped.
|
|
36
|
-
hits2=$(echo "$md_yaml" | xargs grep -nE '~/\.[A-Za-z]' 2>/dev/null \
|
|
32
|
+
hits2=$(echo "$md_yaml" | xargs -r grep -nE '~/\.[A-Za-z]' 2>/dev/null \
|
|
37
33
|
| grep -vE '~/\.claude/skills/[^[:space:]"]+/scripts/' \
|
|
38
34
|
| grep -vE '~/\.culture/' \
|
|
39
35
|
|| true)
|
|
@@ -96,5 +96,5 @@ One call each, no re-grepping.
|
|
|
96
96
|
|
|
97
97
|
## Engine
|
|
98
98
|
|
|
99
|
-
`
|
|
99
|
+
`code_lens/lookup/` — `python -m code_lens <verb> …`. Each shell wrapper is a
|
|
100
100
|
one-liner; the agent-facing contract is the verb and its flags.
|
|
@@ -86,7 +86,7 @@ Optional `.claude/skills/repo-map/config.json` for per-workspace defaults:
|
|
|
86
86
|
|
|
87
87
|
```json
|
|
88
88
|
{
|
|
89
|
-
"roots": ["/
|
|
89
|
+
"roots": ["$HOME/git"],
|
|
90
90
|
"additional_markers": ["culture.yaml"],
|
|
91
91
|
"skip_dirs": [".git", ".venv", "node_modules", "__pycache__"],
|
|
92
92
|
"default_connections_depth": 1
|
|
@@ -97,8 +97,8 @@ Flags always override config.
|
|
|
97
97
|
|
|
98
98
|
## Engine
|
|
99
99
|
|
|
100
|
-
The actual logic lives in `
|
|
101
|
-
`uv run python -m
|
|
100
|
+
The actual logic lives in `code_lens/repo/` and is invoked via
|
|
101
|
+
`uv run python -m code_lens.repo <verb>`. The shell scripts are one-line wrappers; the
|
|
102
102
|
agent-facing contract is the verbs and their flags, not the wrappers.
|
|
103
103
|
|
|
104
104
|
> **Interpreter note:** the scripts use `uv run --directory <project-root>`
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Per-machine local config for code-lens-cli skills.
|
|
2
|
+
# Copy this file to .claude/skills.local.yaml and edit. The .yaml form is
|
|
3
|
+
# git-ignored; this .yaml.example is the documented schema.
|
|
4
|
+
|
|
5
|
+
# Where the Culture mesh server config lives. Used by `communicate`
|
|
6
|
+
# mesh-message.sh to resolve the local IRC server (host, port, tls).
|
|
7
|
+
culture_server_yaml: ~/.culture/server.yaml
|
|
8
|
+
|
|
9
|
+
# Local checkouts of sibling repos. Used by skills that want to read the
|
|
10
|
+
# state of a peer repo (steward doctor, communicate templates, etc.).
|
|
11
|
+
# Relative paths are resolved from the repo root.
|
|
12
|
+
sibling_projects:
|
|
13
|
+
- ../antoine
|
|
14
|
+
- ../steward
|
|
15
|
+
- ../afi-cli
|
|
@@ -11,9 +11,7 @@ exclude =
|
|
|
11
11
|
.git,
|
|
12
12
|
__pycache__,
|
|
13
13
|
dist,
|
|
14
|
-
build
|
|
14
|
+
build,
|
|
15
15
|
per-file-ignores =
|
|
16
16
|
# Bandit S-rules are noisy in tests (assert, subprocess, etc.) — mute them.
|
|
17
|
-
tests/*:S101,
|
|
18
|
-
# subprocess with constant args in manifest.py — false positives for S603, S607
|
|
19
|
-
experiments/scripts_eval/manifest.py:S404,S603,S607
|
|
17
|
+
tests/*:S101,S404,S603
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "pyproject.toml"
|
|
8
|
+
- "code_lens/**"
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [main]
|
|
11
|
+
paths:
|
|
12
|
+
- "pyproject.toml"
|
|
13
|
+
- "code_lens/**"
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
test:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
permissions:
|
|
19
|
+
contents: read
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
22
|
+
|
|
23
|
+
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
|
|
24
|
+
|
|
25
|
+
- run: uv python install 3.12
|
|
26
|
+
|
|
27
|
+
- run: uv sync
|
|
28
|
+
|
|
29
|
+
- run: uv run pytest -n auto -v
|
|
30
|
+
|
|
31
|
+
test-publish:
|
|
32
|
+
# Skip on fork PRs — no OIDC/environment context is available there.
|
|
33
|
+
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository
|
|
34
|
+
needs: test
|
|
35
|
+
runs-on: ubuntu-latest
|
|
36
|
+
environment: testpypi
|
|
37
|
+
permissions:
|
|
38
|
+
contents: read
|
|
39
|
+
id-token: write
|
|
40
|
+
steps:
|
|
41
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
42
|
+
|
|
43
|
+
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
|
|
44
|
+
|
|
45
|
+
- run: uv python install 3.12
|
|
46
|
+
|
|
47
|
+
- run: uv sync
|
|
48
|
+
|
|
49
|
+
- name: Set dev version
|
|
50
|
+
run: |
|
|
51
|
+
BASE=$(uv run python -c "import tomllib; print(tomllib.load(open('pyproject.toml','rb'))['project']['version'])")
|
|
52
|
+
DEV_VERSION="${BASE}.dev${{ github.run_number }}"
|
|
53
|
+
sed -i "s/^version = .*/version = \"${DEV_VERSION}\"/" pyproject.toml
|
|
54
|
+
echo "DEV_VERSION=${DEV_VERSION}" >> "$GITHUB_ENV"
|
|
55
|
+
echo "Publishing ${DEV_VERSION} to TestPyPI"
|
|
56
|
+
|
|
57
|
+
- name: Build and publish to TestPyPI
|
|
58
|
+
run: |
|
|
59
|
+
set -euo pipefail
|
|
60
|
+
rm -rf dist/
|
|
61
|
+
uv build
|
|
62
|
+
uv publish --publish-url https://test.pypi.org/legacy/ --trusted-publishing always --check-url https://test.pypi.org/simple/
|
|
63
|
+
|
|
64
|
+
- name: Print install command
|
|
65
|
+
if: always()
|
|
66
|
+
run: |
|
|
67
|
+
echo "::notice::Test with: uv tool install --index-url https://test.pypi.org/simple/ --index-strategy unsafe-best-match code-lens-cli==${DEV_VERSION}"
|
|
68
|
+
|
|
69
|
+
publish:
|
|
70
|
+
if: github.event_name == 'push'
|
|
71
|
+
needs: test
|
|
72
|
+
runs-on: ubuntu-latest
|
|
73
|
+
environment: pypi
|
|
74
|
+
permissions:
|
|
75
|
+
contents: read
|
|
76
|
+
id-token: write
|
|
77
|
+
steps:
|
|
78
|
+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
|
|
79
|
+
|
|
80
|
+
- uses: astral-sh/setup-uv@38f3f104447c67c051c4a08e39b64a148898af3a # v4
|
|
81
|
+
|
|
82
|
+
- run: uv python install 3.12
|
|
83
|
+
|
|
84
|
+
- run: uv sync
|
|
85
|
+
|
|
86
|
+
- name: Build and publish to PyPI
|
|
87
|
+
run: |
|
|
88
|
+
set -euo pipefail
|
|
89
|
+
rm -rf dist/
|
|
90
|
+
uv build
|
|
91
|
+
uv publish --trusted-publishing always --check-url https://pypi.org/simple/
|
|
@@ -25,11 +25,11 @@ jobs:
|
|
|
25
25
|
- run: uv sync
|
|
26
26
|
|
|
27
27
|
- name: Run Bandit
|
|
28
|
-
run: uv run bandit -r
|
|
28
|
+
run: uv run bandit -r code_lens/ -f json -o bandit-results.json -c pyproject.toml
|
|
29
29
|
continue-on-error: true
|
|
30
30
|
|
|
31
31
|
- name: Run Pylint
|
|
32
|
-
run: uv run pylint
|
|
32
|
+
run: uv run pylint code_lens/ --output-format=json:pylint-results.json,text
|
|
33
33
|
continue-on-error: true
|
|
34
34
|
|
|
35
35
|
- name: Upload Security Results
|
|
@@ -30,7 +30,7 @@ jobs:
|
|
|
30
30
|
|
|
31
31
|
- run: uv sync
|
|
32
32
|
|
|
33
|
-
- run: uv run pytest -n auto --cov=
|
|
33
|
+
- run: uv run pytest -n auto --cov=code_lens --cov-report=xml:coverage.xml --cov-report=term -v
|
|
34
34
|
|
|
35
35
|
- name: SonarCloud Scan
|
|
36
36
|
if: env.SONAR_TOKEN != ''
|
|
@@ -56,16 +56,16 @@ jobs:
|
|
|
56
56
|
- run: uv sync
|
|
57
57
|
|
|
58
58
|
- name: black --check
|
|
59
|
-
run: uv run black --check
|
|
59
|
+
run: uv run black --check code_lens tests
|
|
60
60
|
|
|
61
61
|
- name: isort --check
|
|
62
|
-
run: uv run isort --check-only
|
|
62
|
+
run: uv run isort --check-only code_lens tests
|
|
63
63
|
|
|
64
64
|
- name: flake8
|
|
65
|
-
run: uv run flake8 --config=.flake8
|
|
65
|
+
run: uv run flake8 --config=.flake8 code_lens/ tests/
|
|
66
66
|
|
|
67
67
|
- name: bandit
|
|
68
|
-
run: uv run bandit -c pyproject.toml -r
|
|
68
|
+
run: uv run bandit -c pyproject.toml -r code_lens
|
|
69
69
|
|
|
70
70
|
- name: markdownlint-cli2
|
|
71
71
|
run: |
|
|
@@ -217,18 +217,8 @@ __marimo__/
|
|
|
217
217
|
# Streamlit
|
|
218
218
|
.streamlit/secrets.toml
|
|
219
219
|
|
|
220
|
-
#
|
|
220
|
+
# Per-machine skills config (the .example is committed; the real .yaml is local-only)
|
|
221
221
|
.claude/skills.local.yaml
|
|
222
222
|
|
|
223
|
-
#
|
|
224
|
-
.claude/settings.local.json
|
|
225
|
-
|
|
226
|
-
# scripts-eval results — runs are local artefacts, not checked in.
|
|
227
|
-
experiments/scripts_eval/results/*
|
|
228
|
-
!experiments/scripts_eval/results/.gitkeep
|
|
229
|
-
|
|
230
|
-
# agex per-machine PR event log
|
|
223
|
+
# agex local pr event log (runtime state, not source)
|
|
231
224
|
.agex/
|
|
232
|
-
|
|
233
|
-
# Claude Code per-machine scheduler lock
|
|
234
|
-
.claude/scheduled_tasks.lock
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# markdownlint-cli2 config for
|
|
1
|
+
# markdownlint-cli2 config for code-lens-cli.
|
|
2
2
|
# markdownlint-cli2 stops walking at the git root, so a global
|
|
3
3
|
# markdownlint config in the user's home directory isn't picked up from
|
|
4
4
|
# inside the repo. Keep this file aligned with the global preset.
|
|
@@ -19,4 +19,3 @@ ignores:
|
|
|
19
19
|
- ".local/**"
|
|
20
20
|
- ".venv/**"
|
|
21
21
|
- ".claude/skills/**"
|
|
22
|
-
- "docs/superpowers/**"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.10.0] - 2026-05-17
|
|
9
|
+
|
|
10
|
+
First release published from `agentculture/code-lens-cli`. Picks up the
|
|
11
|
+
version line above antoine's last dual-publish (`0.9.2`) so PyPI accepts
|
|
12
|
+
this distribution as the new canonical home — antoine's dual-publish to
|
|
13
|
+
`code-lens-cli` was turned off in antoine PR #24.
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- `code_lens.lookup` engine ported from `antoine.lookup`: `classify`, `grep_with_context`, `recent_with_outline`, AST scope resolver.
|
|
18
|
+
- `code_lens.repo` engine ported from `antoine.repo`: `profile_shallow` / `profile_deep`, `connections.walk`, `graph.build_graph`, renderers.
|
|
19
|
+
- `code-lens` CLI with verbs `classify` / `grep` / `recent` / `profile` plus the sibling-pattern stubs `learn` / `explain` / `whoami`.
|
|
20
|
+
- Five vendored AgentCulture baseline skills under `.claude/skills/`: `cicd`, `communicate`, `run-tests`, `sonarclaude`, `version-bump`.
|
|
21
|
+
- Two vendored result-side skills: `code-lookup` (`classify` / `grep` / `recent` wrappers) and `repo-map` (`profile` / `connections` / `graph` wrappers). Both invoke `code_lens` directly.
|
|
22
|
+
- `culture.yaml` with `suffix: code-lens-cli`; `.markdownlint-cli2.yaml`; `.flake8`; `.claude/skills.local.yaml.example`.
|
|
23
|
+
- CI: `tests.yml` (pytest + coverage + SonarCloud + version-check), `publish.yml` (TestPyPI on PR via OIDC, PyPI on main push), `security-checks.yml` (weekly bandit + pylint).
|
|
24
|
+
- `sonar-project.properties` keyed to `agentculture_code-lens-cli`.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- `code_lens.cli._dispatch` wraps unexpected exceptions with `EXIT_INTERNAL` (kind=`bug`, with `reason`) instead of `EXIT_USER_ERROR` — matches the policy in `code_lens/repo/__main__.py` and the contract in `_errors.py` (Qodo PR #4 bug 3).
|
|
29
|
+
- `code_lens.repo.graph._safe_profile` and `code_lens.repo.connections._profile_node` call `profile_shallow(basic=True)` — workspace mapping stays offline by default (Qodo PR #4 bug 4).
|
|
30
|
+
- Tightened `_WORKFLOW_NAME_RE` and the `_summarize_on_block` regexes in `code_lens.repo.profile` to use `[ \t]` / `[^\r\n]` character classes that can't backtrack across newlines (SonarCloud `python:S5852`).
|
|
31
|
+
|
|
32
|
+
[0.10.0]: https://github.com/agentculture/code-lens-cli/releases/tag/v0.10.0
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Current state
|
|
6
|
+
|
|
7
|
+
This repo is **intentionally empty scaffolding** as of 2026-05-17. The PyPI distribution name `code-lens-cli` is already registered (antoine published `0.9.2` to it before the split; antoine's dual-publish has since been turned off — see antoine PR #24). The first release tagged here will be `v0.1.0` and will be ours.
|
|
8
|
+
|
|
9
|
+
Two open issues define everything that needs to happen — read them before doing any work:
|
|
10
|
+
|
|
11
|
+
- **#1 — Onboarding:** AgentCulture sibling pattern + the five baseline skills to vendor + CI shape. Signed by `steward`.
|
|
12
|
+
- **#2 — Handover from antoine:** what code/skills to port from `agentculture/antoine` into this repo and the migration recipe. Signed by `antoine`.
|
|
13
|
+
|
|
14
|
+
`gh issue view 1` and `gh issue view 2` are the source of truth; this file summarizes them but does not replace them.
|
|
15
|
+
|
|
16
|
+
## What this repo is (the split)
|
|
17
|
+
|
|
18
|
+
`code-lens-cli` is the **results-side catalog** of a two-repo system:
|
|
19
|
+
|
|
20
|
+
- `agentculture/antoine` (`kata-cli`) — ships the **tool**: the capture / reduce / assess loop that watches agent tool calls and surfaces N-call patterns worth promoting into shipped skills.
|
|
21
|
+
- `agentculture/code-lens-cli` — ships the **results**: the 1-call replacement verbs that came out of running that loop. First two: `code-lookup` (recent / grep / classify) and `repo-map` (profile / connections / graph).
|
|
22
|
+
|
|
23
|
+
The two distributions compose; most agents will install both.
|
|
24
|
+
|
|
25
|
+
## Planned shape (per issue #2)
|
|
26
|
+
|
|
27
|
+
```text
|
|
28
|
+
code-lens-cli/
|
|
29
|
+
├── pyproject.toml # name = "code-lens-cli", hatchling backend, Python ≥3.12
|
|
30
|
+
├── code_lens/ # Python package (rename of antoine.lookup + antoine.repo)
|
|
31
|
+
│ ├── cli/ # argparse chassis ported from antoine/cli/
|
|
32
|
+
│ ├── lookup/ # ← from antoine/lookup/ (classify / grep / recent)
|
|
33
|
+
│ └── repo/ # ← from antoine/repo/ (profile / connections / graph)
|
|
34
|
+
├── .claude/skills/
|
|
35
|
+
│ ├── code-lookup/ # ← from antoine/.claude/skills/code-lookup/
|
|
36
|
+
│ ├── repo-map/ # ← from antoine/.claude/skills/repo-map/
|
|
37
|
+
│ └── {cicd,communicate,run-tests,sonarclaude,version-bump}/ # vendored from steward
|
|
38
|
+
├── culture.yaml # backend + suffix for the agent on this repo
|
|
39
|
+
├── .claude/skills.local.yaml.example
|
|
40
|
+
├── .markdownlint-cli2.yaml
|
|
41
|
+
├── tests/
|
|
42
|
+
├── CHANGELOG.md
|
|
43
|
+
└── README.md
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Console scripts (suggested): `code-lens` umbrella + `classify` / `grep` / `recent` / `profile` as direct entry points (same 1-call ergonomics antoine has today with `kata recent`).
|
|
47
|
+
|
|
48
|
+
When porting from antoine: copy `antoine/lookup/` → `code_lens/lookup/`, `antoine/repo/` → `code_lens/repo/`, port `antoine/cli/{__init__.py,_errors.py,_output.py}` verbatim renaming `AntoineError` → `CodeLensError`. SKILL.md scripts in the two skills must invoke `code_lens`, not `antoine`.
|
|
49
|
+
|
|
50
|
+
## Sibling pattern (per issue #1)
|
|
51
|
+
|
|
52
|
+
This repo must conform to the AgentCulture sibling contract before it can be called a healthy sibling. The canonical references are working code, not docs:
|
|
53
|
+
|
|
54
|
+
- **Pattern spec:** `agentculture/steward/docs/sibling-pattern.md` (12 required artifacts + invariants enforced by `steward doctor`).
|
|
55
|
+
- **Baseline shape:** `agentculture/steward/docs/perfect-patient.md`.
|
|
56
|
+
- **Working exemplars:** `agentculture/steward` and `agentculture/afi-cli` — when in doubt, copy their shape.
|
|
57
|
+
|
|
58
|
+
**Baseline skills to vendor** (copy `SKILL.md` + full `scripts/` tree from `agentculture/steward/.claude/skills/<name>/` into `.claude/skills/<name>/` — **cite, don't import**; you own the copy):
|
|
59
|
+
|
|
60
|
+
| Skill | Purpose |
|
|
61
|
+
|-------|---------|
|
|
62
|
+
| `cicd` | PR workflow verbs (`open` / `read` / `reply` / `lint` / `delta` / `status` / `await`). Auto-signs replies. |
|
|
63
|
+
| `communicate` | Cross-repo + mesh comms (`post-issue.sh`, `post-comment.sh`, `fetch-issues.sh`, `mesh-message.sh`). Auto-signs via `agtag`. |
|
|
64
|
+
| `run-tests` | pytest + xdist + coverage. Reads coverage source from `pyproject.toml`. |
|
|
65
|
+
| `sonarclaude` | SonarCloud API client. Needs `SONAR_TOKEN` + project keyed `code-lens-cli`. |
|
|
66
|
+
| `version-bump` | Bumps semver in `pyproject.toml` + prepends Keep-a-Changelog entry. **Required on every PR** — CI `version-check` job fails if version matches `main`. |
|
|
67
|
+
|
|
68
|
+
**Vendoring portability rule:** a vendored skill's scripts must not reach into another skill's directory, another repo, or any per-user dotfile under the home directory (the `dotclaude` / `dotconfig` trees outside the vendored-skill carve-outs). Helpers must live inside the same skill's `scripts/`. `steward doctor`'s `portability` + `skills-convention` checks enforce this; treat them as the acceptance test for vendoring.
|
|
69
|
+
|
|
70
|
+
## CI shape
|
|
71
|
+
|
|
72
|
+
Mirror antoine's and steward's `.github/workflows/`:
|
|
73
|
+
|
|
74
|
+
- `tests.yml` — pytest + flake8 + bandit + a `version-check` job that fails the PR if `pyproject.toml` version matches `main`.
|
|
75
|
+
- `publish.yml` — TestPyPI on PR (as `.dev<run_number>`), PyPI on push to `main`, via OIDC Trusted Publishing (no API tokens). Fork PRs skipped.
|
|
76
|
+
- SonarCloud quality gate on PRs; merges gated on `cicd await` (exits non-zero on Sonar ERROR or unresolved threads).
|
|
77
|
+
- `version-bump` runs on every PR.
|
|
78
|
+
|
|
79
|
+
## Conventions (inherited, non-negotiable)
|
|
80
|
+
|
|
81
|
+
- **GitHub post signatures:** all PR descriptions, review replies, and issue comments sign as `- <nick> (Claude)`. `<nick>` resolves from `culture.yaml`'s first agent `suffix`, falling back to repo basename (`code-lens-cli`). The `cicd` and `communicate` skills apply this automatically — **don't hand-author the trailing nick** or you'll get a double signature.
|
|
82
|
+
- **Mesh messages are unsigned** — the IRC nick already identifies the speaker.
|
|
83
|
+
- **`culture.yaml`** at the repo root declares the agent(s); minimum `backend` + `suffix`.
|
|
84
|
+
- **Per-machine config:** committed `.claude/skills.local.yaml.example` documents every key; git-ignored `.claude/skills.local.yaml` holds real values. **No `/home/<user>/...` paths in tracked files.**
|
|
85
|
+
- **`.markdownlint-cli2.yaml` at repo root** — no per-user home config.
|
|
86
|
+
- **Python ≥3.12, hatchling, zero runtime deps where possible.**
|
|
87
|
+
- **Mutation safety:** any write verb defaults to dry-run; `--apply` to commit. Agents call CLIs in loops — safe-by-default is mandatory.
|
|
88
|
+
- **All-backends rule** (if backends grow): a feature added to one of `claude` / `codex` / `copilot` / `acp` must land in all four.
|
|
89
|
+
|
|
90
|
+
## Acceptance — when is this repo a healthy sibling?
|
|
91
|
+
|
|
92
|
+
1. `steward doctor <path-to-this-repo>` reports zero `portability` and `skills-convention` violations.
|
|
93
|
+
2. `bash .claude/skills/cicd/scripts/portability-lint.sh` passes.
|
|
94
|
+
3. Five vendored skill dirs present, each with `SKILL.md` whose frontmatter `name` matches the directory + a sibling `scripts/`.
|
|
95
|
+
4. `culture.yaml` declares at least one agent with `backend` + `suffix`.
|
|
96
|
+
5. CI green: `tests.yml` + `publish.yml` wired for Trusted Publishing.
|
|
97
|
+
6. First PR has a `version-bump` CHANGELOG entry and a green SonarCloud gate.
|
|
98
|
+
7. Per issue #2: `code_lens/{lookup,repo}/` ported, both skills present invoking `code_lens` not `antoine`, console scripts registered, `v0.1.0` tagged on PyPI, follow-up PR opened on `agentculture/antoine` flipping `docs/skill-sources.md` rows to "Re-vendor from `code-lens-cli`".
|
|
99
|
+
|
|
100
|
+
## Where to ask questions
|
|
101
|
+
|
|
102
|
+
- **Tracked / async:** file an issue on `agentculture/steward` citing the part of `sibling-pattern.md` that's unclear. The steward agent replies on the thread.
|
|
103
|
+
- **Ephemeral:** ping a Culture mesh channel via the vendored `communicate/scripts/mesh-message.sh`, once `culture.yaml` is wired up and Culture has registered `code-lens-cli` as a mesh agent.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: code-lens-cli
|
|
3
|
+
Version: 0.10.0
|
|
4
|
+
Summary: code-lens — 1-call inspection verbs (classify / grep / recent / profile) for agent skills.
|
|
5
|
+
Project-URL: Homepage, https://github.com/agentculture/code-lens-cli
|
|
6
|
+
Project-URL: Issues, https://github.com/agentculture/code-lens-cli/issues
|
|
7
|
+
Author: AgentCulture
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Topic :: Software Development
|
|
15
|
+
Requires-Python: >=3.12
|
|
16
|
+
Requires-Dist: pyyaml>=6.0
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
|
|
19
|
+
# code-lens-cli
|
|
20
|
+
|
|
21
|
+
Four 1-call inspection verbs for agent skills: tell me what kind of repo this is, where a symbol lives, what changed recently, and how this repo plugs into its neighbors.
|
|
22
|
+
|
|
23
|
+
`code-lens-cli` is the **results-side catalog** of the [`kata-cli` (antoine)](https://github.com/agentculture/antoine) split: antoine ships the capture/reduce/assess loop that *finds* 1-call wins; this repo ships the 1-call verbs themselves. Most agents will install both.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
uv tool install code-lens-cli
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Verbs
|
|
32
|
+
|
|
33
|
+
| Verb | Question it answers |
|
|
34
|
+
|------|---------------------|
|
|
35
|
+
| `code-lens classify [path]` | What kind of project is this? (cli / library / dockerized / tested / packaged-pypi / …) |
|
|
36
|
+
| `code-lens grep <pattern> [path]` | Where is X used? Each ripgrep match annotated with its enclosing AST scope. |
|
|
37
|
+
| `code-lens recent [path] [-n N]` | What changed lately? Recent commits paired with per-file AST symbol diffs. |
|
|
38
|
+
| `code-lens profile [path]` | Mechanical facts about one repo — pyproject, deps, skills, CHANGELOG, layout. |
|
|
39
|
+
|
|
40
|
+
All verbs accept `--json` for structured output. Plus `python -m code_lens.repo {profile,connections,graph}` for the multi-repo workspace surface.
|
|
41
|
+
|
|
42
|
+
## What this is
|
|
43
|
+
|
|
44
|
+
A greenfield AgentCulture sibling. Two skills under `.claude/skills/` (`code-lookup`, `repo-map`) wrap these verbs as shell-callable kits; five baseline skills (`cicd`, `communicate`, `run-tests`, `sonarclaude`, `version-bump`) are vendored from [`agentculture/steward`](https://github.com/agentculture/steward).
|
|
45
|
+
|
|
46
|
+
The first release was tagged `v0.1.0` here after the antoine → code-lens-cli handover landed (issues #1 + #2).
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
MIT.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# code-lens-cli
|
|
2
|
+
|
|
3
|
+
Four 1-call inspection verbs for agent skills: tell me what kind of repo this is, where a symbol lives, what changed recently, and how this repo plugs into its neighbors.
|
|
4
|
+
|
|
5
|
+
`code-lens-cli` is the **results-side catalog** of the [`kata-cli` (antoine)](https://github.com/agentculture/antoine) split: antoine ships the capture/reduce/assess loop that *finds* 1-call wins; this repo ships the 1-call verbs themselves. Most agents will install both.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv tool install code-lens-cli
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Verbs
|
|
14
|
+
|
|
15
|
+
| Verb | Question it answers |
|
|
16
|
+
|------|---------------------|
|
|
17
|
+
| `code-lens classify [path]` | What kind of project is this? (cli / library / dockerized / tested / packaged-pypi / …) |
|
|
18
|
+
| `code-lens grep <pattern> [path]` | Where is X used? Each ripgrep match annotated with its enclosing AST scope. |
|
|
19
|
+
| `code-lens recent [path] [-n N]` | What changed lately? Recent commits paired with per-file AST symbol diffs. |
|
|
20
|
+
| `code-lens profile [path]` | Mechanical facts about one repo — pyproject, deps, skills, CHANGELOG, layout. |
|
|
21
|
+
|
|
22
|
+
All verbs accept `--json` for structured output. Plus `python -m code_lens.repo {profile,connections,graph}` for the multi-repo workspace surface.
|
|
23
|
+
|
|
24
|
+
## What this is
|
|
25
|
+
|
|
26
|
+
A greenfield AgentCulture sibling. Two skills under `.claude/skills/` (`code-lookup`, `repo-map`) wrap these verbs as shell-callable kits; five baseline skills (`cicd`, `communicate`, `run-tests`, `sonarclaude`, `version-bump`) are vendored from [`agentculture/steward`](https://github.com/agentculture/steward).
|
|
27
|
+
|
|
28
|
+
The first release was tagged `v0.1.0` here after the antoine → code-lens-cli handover landed (issues #1 + #2).
|
|
29
|
+
|
|
30
|
+
## License
|
|
31
|
+
|
|
32
|
+
MIT.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""code-lens — 1-call inspection verbs for agent skills (results-side of the kata loop)."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import PackageNotFoundError
|
|
4
|
+
from importlib.metadata import version as _v
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def _resolve_version() -> str:
|
|
8
|
+
"""Resolve the installed-distribution version of ``code-lens-cli``.
|
|
9
|
+
|
|
10
|
+
Falls back to ``0.0.0+local`` for editable installs without metadata.
|
|
11
|
+
"""
|
|
12
|
+
try:
|
|
13
|
+
return _v("code-lens-cli")
|
|
14
|
+
except PackageNotFoundError:
|
|
15
|
+
return "0.0.0+local" # pragma: no cover — editable install without metadata
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
__version__ = _resolve_version()
|
|
19
|
+
|
|
20
|
+
__all__ = ["__version__"]
|