embeddings-cli 0.6.0__tar.gz → 0.7.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.
Files changed (84) hide show
  1. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/CHANGELOG.md +20 -0
  2. embeddings_cli-0.7.0/CLAUDE.md +270 -0
  3. embeddings_cli-0.7.0/PKG-INFO +170 -0
  4. embeddings_cli-0.7.0/README.md +153 -0
  5. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/__init__.py +5 -2
  6. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_commands/cli.py +3 -3
  7. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_commands/doctor.py +2 -2
  8. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_commands/explain.py +2 -2
  9. embeddings_cli-0.7.0/embeddings/cli/_commands/learn.py +124 -0
  10. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_commands/overview.py +18 -4
  11. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_commands/whoami.py +1 -1
  12. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/explain/__init__.py +1 -1
  13. embeddings_cli-0.7.0/embeddings/explain/catalog.py +155 -0
  14. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/pyproject.toml +1 -1
  15. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/tests/test_cli.py +28 -2
  16. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/tests/test_cli_introspection.py +1 -1
  17. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/uv.lock +1 -1
  18. embeddings_cli-0.6.0/CLAUDE.md +0 -28
  19. embeddings_cli-0.6.0/PKG-INFO +0 -76
  20. embeddings_cli-0.6.0/README.md +0 -59
  21. embeddings_cli-0.6.0/embeddings/cli/_commands/learn.py +0 -88
  22. embeddings_cli-0.6.0/embeddings/explain/catalog.py +0 -130
  23. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/agent-config/SKILL.md +0 -0
  24. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/agent-config/data/backend-fingerprints.yaml +0 -0
  25. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/agent-config/scripts/show.sh +0 -0
  26. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/ask-colleague/SKILL.md +0 -0
  27. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/ask-colleague/prompts/explore.md +0 -0
  28. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/ask-colleague/prompts/review.md +0 -0
  29. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/ask-colleague/prompts/write.md +0 -0
  30. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/ask-colleague/scripts/ask-colleague.sh +0 -0
  31. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/assign-to-workforce/SKILL.md +0 -0
  32. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/assign-to-workforce/scripts/assign-to-workforce.sh +0 -0
  33. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/challenge/SKILL.md +0 -0
  34. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/cicd/SKILL.md +0 -0
  35. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/cicd/scripts/_resolve-nick.sh +0 -0
  36. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/cicd/scripts/portability-lint.sh +0 -0
  37. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/cicd/scripts/pr-reply.sh +0 -0
  38. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/cicd/scripts/pr-status.sh +0 -0
  39. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/cicd/scripts/workflow.sh +0 -0
  40. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/communicate/SKILL.md +0 -0
  41. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/communicate/scripts/fetch-issues.sh +0 -0
  42. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/communicate/scripts/mesh-message.sh +0 -0
  43. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/communicate/scripts/post-comment.sh +0 -0
  44. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/communicate/scripts/post-issue.sh +0 -0
  45. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/communicate/scripts/templates/skill-new-brief.md +0 -0
  46. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/communicate/scripts/templates/skill-update-brief.md +0 -0
  47. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/deviate/SKILL.md +0 -0
  48. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/doc-test-alignment/SKILL.md +0 -0
  49. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/doc-test-alignment/scripts/check.sh +0 -0
  50. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/pypi-maintainer/SKILL.md +0 -0
  51. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/pypi-maintainer/scripts/switch-source.sh +0 -0
  52. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/recall/SKILL.md +0 -0
  53. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/recall/scripts/recall.sh +0 -0
  54. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/remember/SKILL.md +0 -0
  55. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/remember/scripts/remember.sh +0 -0
  56. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/run-tests/SKILL.md +0 -0
  57. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/run-tests/scripts/test.sh +0 -0
  58. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/scope/SKILL.md +0 -0
  59. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/sonarclaude/SKILL.md +0 -0
  60. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/sonarclaude/scripts/sonar.sh +0 -0
  61. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/spec-to-plan/SKILL.md +0 -0
  62. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/spec-to-plan/scripts/spec-to-plan.sh +0 -0
  63. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/summarize-delivery/SKILL.md +0 -0
  64. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/think/SKILL.md +0 -0
  65. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/think/scripts/think.sh +0 -0
  66. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/version-bump/SKILL.md +0 -0
  67. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills/version-bump/scripts/bump.py +0 -0
  68. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.claude/skills.local.yaml.example +0 -0
  69. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.flake8 +0 -0
  70. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.github/workflows/publish.yml +0 -0
  71. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.github/workflows/tests.yml +0 -0
  72. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.gitignore +0 -0
  73. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/.markdownlint-cli2.yaml +0 -0
  74. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/AGENTS.colleague.md +0 -0
  75. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/LICENSE +0 -0
  76. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/culture.yaml +0 -0
  77. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/docs/skill-sources.md +0 -0
  78. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/__init__.py +0 -0
  79. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/__main__.py +0 -0
  80. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_commands/__init__.py +0 -0
  81. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_errors.py +0 -0
  82. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/embeddings/cli/_output.py +0 -0
  83. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/sonar-project.properties +0 -0
  84. {embeddings_cli-0.6.0 → embeddings_cli-0.7.0}/tests/__init__.py +0 -0
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
5
5
  Format follows [Keep a Changelog](https://keepachangelog.com/). This project
6
6
  adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.7.0] - 2026-07-20
9
+
10
+ ### Added
11
+
12
+ - **The project domain**, replacing the inherited `culture-agent-template` framing. `README.md` now describes what `embeddings-cli` is for: studying embedding spaces as systems — semantic regions, neighborhoods, directions, gaps, density, and cross-model differences — treating an embedding model as a semantic landscape, and serving as the deterministic tool surface for a Surveyor agent that records an evidence-backed Atlas.
13
+ - **Planned-verb sections** in `learn`, `explain`, `overview`, and `README.md` naming the target survey surface (`survey`, `regions`, `neighbors`, `directions`, `gaps`, `compare`, `map`) under explicit *not yet implemented* headings, so an agent reading the CLI never mistakes a roadmap verb for a callable one.
14
+ - `test_prog_matches_declared_console_script` — reads the console script out of `pyproject.toml` and asserts the parser's `prog` matches, guarding the pairing rather than the literal so a future rename that updates only one side fails loudly.
15
+ - `command` and `planned_commands` keys in the `learn --json` payload.
16
+
17
+ ### Changed
18
+
19
+ - **`prog` is now `embeddings`**, matching the console script declared in `pyproject.toml`. Every usage, help, and error line is now copy-pasteable.
20
+ - **Retargeted the CLI's self-documentation** — `learn`, `explain/catalog.py`, and `overview` described this repo as "a clonable template for AgentCulture mesh agents" and explained how to clone it to mint a new agent. They now describe the embeddings/Surveyor domain.
21
+ - Command invocations throughout docstrings, help strings, the `explain` catalog, and the `doctor` status line now read `embeddings ...`; `embeddings-cli` is reserved for the dist/repo/nick. The `explain` catalog keys both spellings to the root entry.
22
+ - `CLAUDE.md` — replaced the roadmap placeholder with the real domain, recorded the naming convention, and noted the design constraints the survey surface will force (runtime dependencies, rubric shape of `directions discover`, Atlas persistence).
23
+
24
+ ### Fixed
25
+
26
+ - **The CLI documented commands that did not exist.** `pyproject.toml` declares the binary `embeddings`, but `prog` and every help/catalog string said `embeddings-cli` — so `embeddings-cli whoami`, printed in the README quickstart and in the CLI's own `learn`/`explain` output, failed with "No such file or directory". Left over from the scaffold rename.
27
+
8
28
  ## [0.6.0] - 2026-07-18
9
29
 
10
30
  ### Added
@@ -0,0 +1,270 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## What this project is
6
+
7
+ `embeddings-cli` studies **embedding spaces as systems**, not individual
8
+ vectors. A single embedding is hard to interpret — its dimensions rarely map to
9
+ clean human concepts. An embedding space, though, has structure worth measuring:
10
+ semantic regions and clusters, neighborhoods and boundaries, recurring
11
+ directions of meaning, dense/sparse/ambiguous areas, gaps in what the model
12
+ represents, and differences between models, datasets, domains, and versions.
13
+
14
+ The framing: treat an embedding model as a **semantic landscape**. Rather than
15
+ only asking "which documents are closest to this query?", ask "what kind of
16
+ world does this model create?" — what it places together, what it keeps apart,
17
+ which distinctions it preserves, which it collapses, where concepts form
18
+ continuous transitions, and where the representation goes weak or uncertain. The
19
+ goal is explicitly *not* to assign human-readable meaning to each dimension;
20
+ that is unstable and misleading.
21
+
22
+ It also serves as the deterministic tool surface for a **Surveyor agent**, which
23
+ doesn't invent an interpretation from one projection but runs experiments
24
+ against the space — sample concepts, find clusters, propose region names, test
25
+ those names against independent examples, discover candidate directions, measure
26
+ whether they generalize, identify gaps and unstable boundaries, and record the
27
+ evidence behind every conclusion. The output is an **Atlas**: an evidence-backed
28
+ interpretation of the space, not the space itself.
29
+
30
+ ### What exists today
31
+
32
+ **The survey surface is not implemented.** On disk is the agent-first CLI
33
+ skeleton this repo was cloned from (`culture-agent-template`, renamed) — the
34
+ introspection verbs `whoami`, `learn`, `explain`, `overview`, `doctor`,
35
+ `cli overview`, and no third-party runtime dependency. There is no corpus,
36
+ embedding, survey, region, neighborhood, direction, or atlas code.
37
+
38
+ The planned verbs — `survey`, `regions`, `neighbors`, `directions`, `gaps`,
39
+ `compare`, `map` — are named in `README.md`, `learn.py`, `explain/catalog.py`,
40
+ and `overview.py` under explicit *planned / not yet implemented* headings. Keep
41
+ that separation when you touch those files: an agent reading `learn` or
42
+ `overview` must never mistake a roadmap verb for a callable one. Keep new
43
+ sections of this file grounded in checked-in reality and mark anything ahead of
44
+ it `(planned)`.
45
+
46
+ ### Design constraints the domain will force
47
+
48
+ Worth settling deliberately rather than mid-build:
49
+
50
+ - **Runtime dependencies.** Clustering, direction discovery, density/coverage
51
+ measurement, and `map --html` all need numpy at minimum, plus an embedding
52
+ backend. The current "no third-party runtime dependencies" property is
53
+ inherited from being a template and is incompatible with being a measurement
54
+ tool. Nothing in CI enforces it — `teken cli doctor --strict` checks CLI
55
+ shape, not deps — so this is a choice, not a blocker.
56
+ - **Rubric shape of the new verbs.** `directions discover` is a noun with an
57
+ action-verb, so `directions` will also need an `overview` sub-verb to pass the
58
+ rubric (see `cli.py` for the pattern). `survey`, `compare`, and `map` read as
59
+ global verbs. Every new sub-verb needs its own `--json`.
60
+ - **Atlas persistence.** `survey` produces state that `regions` / `gaps` /
61
+ `compare` later read. Nothing today writes to disk, so the storage format and
62
+ its location are entirely open.
63
+
64
+ It is a sibling to [`guildmaster`](https://github.com/agentculture/guildmaster)
65
+ (the **skills supplier**), [`steward`](https://github.com/agentculture/steward)
66
+ (**alignment** — `steward doctor`, the sibling-pattern baseline), and
67
+ [`teken`](https://github.com/agentculture/teken) (the **afi-cli** "Agent First
68
+ Interface" scaffolder this CLI is cited from) within the Organic Development
69
+ framework.
70
+
71
+ ## Naming: the project is `embeddings-cli`, the command is `embeddings`
72
+
73
+ `pyproject.toml` declares one console script — `embeddings = "embeddings.cli:main"`
74
+ — so `embeddings` is what a user types. `embeddings-cli` is the dist name, the
75
+ repo name, and the agent nick in `culture.yaml`; it is *not* a runnable command.
76
+
77
+ The scaffold rename originally left these disagreeing (`prog` and every help
78
+ string said `embeddings-cli`, making the CLI's own documented commands
79
+ uncopyable). That is fixed, and
80
+ `test_prog_matches_declared_console_script` guards the pairing — it reads the
81
+ console script out of `pyproject.toml` and asserts `prog` matches, so a rename
82
+ that updates only one side fails loudly.
83
+
84
+ The convention when writing strings: **invocations** use `embeddings ...`;
85
+ **titles and project references** use `embeddings-cli`. The `explain` catalog
86
+ keys both `("embeddings",)` and `("embeddings-cli",)` to the root entry so
87
+ either spelling resolves.
88
+
89
+ ## The CLI
90
+
91
+ The CLI is cited (cite-don't-import) from teken's `python-cli` reference
92
+ (`teken cli cite`), so the runtime package has **no third-party dependencies**;
93
+ `teken` (a.k.a. `afi-cli`) is a dev dependency only. The agent-first rubric is
94
+ enforced in CI by `teken cli doctor . --strict`.
95
+
96
+ ### Structure and the contract each part holds
97
+
98
+ Everything hangs off three small modules that are marked *stable-contract* — the
99
+ agent-first rubric depends on their exact behavior, so changing them changes the
100
+ CLI's public contract:
101
+
102
+ - **`embeddings/cli/_errors.py`** — `CliError(code, message, remediation)` and
103
+ the exit-code policy in one place: `0` success, `1` user error, `2`
104
+ environment/setup error, `3+` reserved. Every failure inside the CLI raises
105
+ `CliError`; nothing else.
106
+ - **`embeddings/cli/_output.py`** — `emit_result` / `emit_error` /
107
+ `emit_diagnostic`. The invariant agents parse against: **results to stdout,
108
+ errors and diagnostics to stderr, never mixed**, in both text and `--json`
109
+ mode. Text-mode errors render as `error: <msg>` then `hint: <remediation>`;
110
+ the `hint:` prefix is required by the rubric.
111
+ - **`embeddings/cli/__init__.py`** — `main()` → `_build_parser()` →
112
+ `_dispatch()`. `_dispatch` catches `CliError` and wraps *any* other exception
113
+ into one, so no Python traceback ever reaches stderr. Argparse's own errors
114
+ are routed through the same format by `_CliArgumentParser.error()`; because
115
+ parse-time errors happen before `args.json` exists, `main()` pre-scans raw
116
+ argv for `--json` and stashes the answer in the class-level `_json_hint`.
117
+
118
+ ### Adding a verb or noun group
119
+
120
+ Each module under `embeddings/cli/_commands/` exposes a `register(sub)` that
121
+ adds its parser and calls `p.set_defaults(func=...)`. Register it in
122
+ `_build_parser()` (there's a marked spot). Handlers return `None` or an `int`
123
+ exit code and raise `CliError` on failure.
124
+
125
+ Rubric constraints worth knowing before you design a command:
126
+
127
+ - **Every command takes `--json`** — including each sub-verb of a noun group,
128
+ since argparse won't inherit the parent's flag.
129
+ - **Any noun with action-verbs must also expose `overview`.** `cli.py` exists
130
+ only to satisfy this and is the pattern to copy for a new noun group — note
131
+ that it passes `parser_class=type(p)` to `add_subparsers` so nested parse
132
+ errors keep the structured error contract.
133
+ - **Descriptive verbs must not hard-fail on a missing target path.**
134
+ `overview` accepts an optional positional `target` and ignores it, so
135
+ `overview /no/such/path` still exits 0.
136
+ - **`learn` must stay ≥200 chars** and mention purpose, command map, exit codes,
137
+ `--json`, and `explain`.
138
+
139
+ ### `explain`
140
+
141
+ `embeddings/explain/catalog.py` is a dict keyed by command-path tuples
142
+ (`("cli", "overview")`) holding verbatim markdown; `()` and `("embeddings-cli",)`
143
+ both resolve to the root. Entries are meant to be self-contained — an agent
144
+ reading one shouldn't need to chain reads. Add an entry whenever you add a verb.
145
+
146
+ ### Identity resolution
147
+
148
+ `whoami.py` parses `culture.yaml` **without a YAML dependency** (line-wise,
149
+ first agent block only) to keep runtime deps empty, and finds the file by
150
+ walking up from `__file__` — deliberately *not* the caller's CWD, so the
151
+ identity is always this agent's own. A wheel install ships no `culture.yaml`
152
+ alongside the package, so both `whoami` and `doctor` degrade to literal defaults
153
+ rather than failing. `whoami.find_culture_yaml` / `read_agent_fields` are reused
154
+ by `doctor`, and `whoami.report` by `overview` — keep them importable.
155
+
156
+ `doctor` checks the same invariants `steward doctor` verifies —
157
+ **prompt-file-present** and **backend-consistency** (`claude` → `CLAUDE.md`,
158
+ `colleague` → `AGENTS.colleague.md`, `acp` → `AGENTS.md`, `gemini` →
159
+ `GEMINI.md`) — plus a skills-present check, and reports the rubric-shaped
160
+ `{healthy, checks: [{id, passed, severity, message, remediation}]}`.
161
+
162
+ ## Identity
163
+
164
+ Declared in `culture.yaml`:
165
+
166
+ ```yaml
167
+ agents:
168
+ - suffix: embeddings-cli
169
+ backend: colleague
170
+ model: sakamakismile/Qwen3.6-27B-Text-NVFP4-MTP
171
+ ```
172
+
173
+ `backend: colleague` fixes the resident prompt file to **`AGENTS.colleague.md`**
174
+ — this agent is a colleague resident served by a local Qwen model, so the mesh
175
+ runtime reads `AGENTS.colleague.md`, while `CLAUDE.md` (this file) stays the
176
+ Claude Code guidance file. `AGENTS.colleague.md` is still the generic resident
177
+ prompt inherited from the template; retarget it to the Surveyor role when that
178
+ work starts. Changing `backend` here without adding the matching prompt file
179
+ breaks `doctor` and CI.
180
+
181
+ ## Commands
182
+
183
+ ```bash
184
+ uv sync # create .venv and install dev deps
185
+ uv run pytest -n auto # full suite, parallel
186
+ uv run pytest tests/test_cli.py -v # one file
187
+ uv run pytest -k whoami -v # one test by name
188
+ uv run pytest --cov=embeddings --cov-report=term # coverage (fails under 60%)
189
+
190
+ uv run embeddings whoami # NOTE: `embeddings`, not `embeddings-cli`
191
+ uv run embeddings learn --json
192
+ uv run embeddings doctor
193
+
194
+ uv run black embeddings tests # line length 100
195
+ uv run isort embeddings tests # profile=black
196
+ uv run flake8 embeddings tests
197
+ uv run bandit -c pyproject.toml -r embeddings
198
+ markdownlint-cli2 "**/*.md" "#node_modules" "#.local" "#.claude/skills" "#.teken"
199
+ uv run teken cli doctor . --strict # the agent-first rubric gate CI runs
200
+ ```
201
+
202
+ CI (`.github/workflows/tests.yml`) runs tests + SonarCloud, the full lint set
203
+ above, and a `version-check` job. `.github/workflows/publish.yml` publishes to
204
+ PyPI via Trusted Publishing on push to `main`, and does a TestPyPI dry-run on
205
+ PRs; both are path-filtered to `pyproject.toml` and `embeddings/**`. The
206
+ `pypi` / `testpypi` GitHub environments and a PyPI Trusted Publisher must be
207
+ configured before the publish job can succeed.
208
+
209
+ ## Conventions and workflow
210
+
211
+ - **Every PR bumps the version** — even docs/config/CI. Use the `version-bump`
212
+ skill; the `version-check` CI job comments on and blocks the PR otherwise.
213
+ - **PRs** go through the `cicd` skill (`devex pr` + SonarCloud gating). Sign
214
+ online posts as `- embeddings-cli (Claude)` — the `cicd` / `communicate`
215
+ scripts resolve the nick from `culture.yaml` automatically, so don't hand-sign
216
+ in bodies those scripts author.
217
+ - **Reach for `ask-colleague` reflexively.** Treat it as the teammate at the
218
+ next desk, not a last resort — its value is a *second, independent mind* (a
219
+ different backend/model), not a stronger one. Before presenting or opening a
220
+ PR on a non-trivial committed diff, run `review`; for a fresh read of an
221
+ unfamiliar area whose answer is independent of your current context, run
222
+ `explore`. Both are read-only (throwaway worktree, zero side effects), so the
223
+ reflex is always safe. The side-effecting `write --apply` / `write --pr` needs
224
+ the user's go-ahead. Colleague's output is a second opinion to verify and own,
225
+ never authority.
226
+ - **The vendored `.claude/skills/` are cited verbatim** — do not reformat or
227
+ edit their scripts. Re-sync from the upstream tracked in
228
+ `docs/skill-sources.md`, which also records four live local divergences
229
+ (`agex`→`devex`, `ask-colleague` from `colleague`, and four devague-origin
230
+ skills vendored directly rather than via guildmaster).
231
+ - **Tooling prerequisites:** `devex` (>=0.21) and `agtag` (>=0.1) on PATH for
232
+ the `cicd` / `communicate` skills; `colleague` on PATH is *optional* and only
233
+ needed when `ask-colleague` is actually invoked.
234
+ - **Per-machine config:** copy `.claude/skills.local.yaml.example` to
235
+ `skills.local.yaml` (git-ignored) to point skills at your sibling checkouts.
236
+
237
+ ### Memory discipline — recall before, remember after
238
+
239
+ The `recall` / `remember` skills are backed by the `eidetic` store. The vendored
240
+ wrappers here resolve the scope from `culture.yaml`'s `suffix` and default to
241
+ **this agent's personal, private scope** (`--scope embeddings-cli
242
+ --visibility private`), which routes to `$HOME/.eidetic/memory` — outside the
243
+ repo, never committed. Both the `claude` and `colleague` backends resolve the
244
+ same suffix, so they share these records. Pass `--visibility public` to
245
+ contribute to the shared public pool instead (public records inside a git repo
246
+ route to `<repo-root>/.eidetic/memory` and *are* committed, so choose
247
+ deliberately). `/recall` reads both stores and merges.
248
+
249
+ - **`/recall` before you start** a non-trivial task — prior decisions, gotchas,
250
+ "have we done this before?" — so you build on what's known instead of
251
+ re-deriving it.
252
+ - **`/remember` when something worth keeping surfaces** — a non-obvious decision
253
+ and its rationale, a constraint, a fix and *why*, a gotcha that cost time.
254
+ Capture it as it happens, not at the end when it's faded. Don't store what the
255
+ repo already records (code structure, git history, this file, `CHANGELOG.md`);
256
+ store what you'd otherwise have to re-derive.
257
+
258
+ ## Layout
259
+
260
+ ```text
261
+ embeddings/ agent-first CLI (cited from teken's python-cli reference)
262
+ cli/ parser + error/output contract; _commands/ holds the verbs
263
+ explain/ markdown catalog for `explain`, keyed by path tuple
264
+ tests/ pytest smoke (test_cli.py) + introspection (test_cli_introspection.py)
265
+ .claude/skills/ vendored guildmaster skill kit (cite-don't-import, verbatim)
266
+ docs/skill-sources.md skill provenance ledger + re-sync procedure + divergences
267
+ culture.yaml mesh identity (suffix + backend)
268
+ AGENTS.colleague.md resident prompt for the colleague backend
269
+ .github/workflows/ tests + lint + version-check; PyPI Trusted Publishing
270
+ ```
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.4
2
+ Name: embeddings-cli
3
+ Version: 0.7.0
4
+ Summary: Maps the geometry of meaning produced by embedding models — survey a corpus into a semantic landscape, then inspect its regions, neighborhoods, directions, and gaps, and compare models. Backs a Surveyor agent that runs measured experiments against the space and records an evidence-backed Atlas.
5
+ Project-URL: Homepage, https://github.com/agentculture/embeddings-cli
6
+ Project-URL: Issues, https://github.com/agentculture/embeddings-cli/issues
7
+ Author: AgentCulture
8
+ License-Expression: Apache-2.0
9
+ License-File: LICENSE
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: Apache Software License
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Topic :: Software Development
15
+ Requires-Python: >=3.12
16
+ Description-Content-Type: text/markdown
17
+
18
+ # embeddings-cli
19
+
20
+ **embeddings-cli is a tool for studying embedding spaces as systems, not just
21
+ querying individual vectors.**
22
+
23
+ An individual embedding is difficult to interpret. Its dimensions rarely
24
+ correspond to clean human concepts, and inspecting the raw numbers tells us very
25
+ little.
26
+
27
+ But an embedding space contains larger structures that can be studied:
28
+
29
+ - semantic regions and clusters;
30
+ - neighborhoods and boundaries;
31
+ - recurring directions of meaning;
32
+ - dense, sparse, and ambiguous areas;
33
+ - gaps in what the model represents;
34
+ - differences between models, datasets, domains, and versions.
35
+
36
+ `embeddings-cli` treats an embedding model as a **semantic landscape**.
37
+
38
+ Instead of only asking:
39
+
40
+ > Which documents are closest to this query?
41
+
42
+ it asks:
43
+
44
+ > What kind of world does this embedding model create?
45
+
46
+ The CLI can embed a representative corpus, survey the resulting space, identify
47
+ regions and directions, compare different embedding models, and generate an
48
+ interpretable map of the model's semantic coverage.
49
+
50
+ ```bash
51
+ embeddings survey corpus.jsonl
52
+ embeddings regions
53
+ embeddings neighbors "agentic culture"
54
+ embeddings directions discover
55
+ embeddings gaps
56
+ embeddings compare model-a model-b
57
+ embeddings map --html
58
+ ```
59
+
60
+ The goal is not to assign a human-readable meaning to every dimension. That is
61
+ usually unstable and misleading.
62
+
63
+ The goal is to understand the **geometry of meaning produced by the model**:
64
+
65
+ - what it places together;
66
+ - what it keeps apart;
67
+ - which distinctions it preserves;
68
+ - which distinctions it collapses;
69
+ - where concepts form continuous transitions;
70
+ - where the representation becomes weak or uncertain.
71
+
72
+ ## Status
73
+
74
+ The survey surface above is the **target design, not yet implemented**. What
75
+ ships today is the agent-first CLI skeleton this project is built on — identity
76
+ and introspection verbs (`whoami`, `learn`, `explain`, `overview`, `doctor`,
77
+ `cli overview`), each with `--json`. See [CLI](#cli) for what actually runs.
78
+
79
+ ## The Surveyor agent
80
+
81
+ `embeddings-cli` can also serve as the deterministic tool surface for a
82
+ **Surveyor agent**.
83
+
84
+ The Surveyor does not invent an interpretation from a single projection. It
85
+ performs experiments against the space:
86
+
87
+ 1. samples representative concepts;
88
+ 2. searches for natural clusters;
89
+ 3. proposes names for regions;
90
+ 4. tests those names against independent examples;
91
+ 5. discovers candidate semantic directions;
92
+ 6. measures whether those directions generalize;
93
+ 7. identifies gaps, overlaps, and unstable boundaries;
94
+ 8. records the evidence behind every conclusion.
95
+
96
+ The agent may describe a region, but the CLI provides the measurements that make
97
+ the description inspectable and reproducible.
98
+
99
+ ## Outputs
100
+
101
+ A study can produce an **Atlas** containing:
102
+
103
+ - the datasets and models used;
104
+ - representative points and neighborhoods;
105
+ - hierarchical region maps;
106
+ - discovered semantic directions;
107
+ - cluster and boundary evidence;
108
+ - coverage and density measurements;
109
+ - model comparisons;
110
+ - known limitations and uncertain interpretations.
111
+
112
+ The Atlas is not the embedding space itself. It is an evidence-backed
113
+ interpretation of that space.
114
+
115
+ ## Why it matters
116
+
117
+ Embedding models are often treated as interchangeable infrastructure. They are
118
+ selected using retrieval benchmarks and then hidden behind a vector database.
119
+
120
+ But every embedding model defines its own system of similarity and distinction.
121
+
122
+ Two models may disagree about:
123
+
124
+ - whether two concepts are related;
125
+ - which property of a sentence is most important;
126
+ - how domains connect;
127
+ - how multilingual meanings align;
128
+ - whether a semantic change is gradual or abrupt;
129
+ - which concepts are represented precisely and which are compressed together.
130
+
131
+ `embeddings-cli` makes those differences visible.
132
+
133
+ It turns embeddings from an opaque retrieval component into something that can
134
+ be explored, evaluated, compared, and understood.
135
+
136
+ ## Quickstart
137
+
138
+ ```bash
139
+ uv sync
140
+ uv run pytest -n auto # run the test suite
141
+ uv run embeddings whoami # identity from culture.yaml
142
+ uv run embeddings learn # self-teaching prompt (add --json)
143
+ uv run teken cli doctor . --strict # the agent-first rubric gate CI runs
144
+ ```
145
+
146
+ The project is named `embeddings-cli`; the installed command is **`embeddings`**.
147
+
148
+ ## CLI
149
+
150
+ Shipping today:
151
+
152
+ | Verb | What it does |
153
+ |------|--------------|
154
+ | `whoami` | Report this agent's nick, version, backend, and model from `culture.yaml`. |
155
+ | `learn` | Print a structured self-teaching prompt. |
156
+ | `explain <path>` | Markdown docs for any noun/verb path. |
157
+ | `overview` | Read-only descriptive snapshot of the agent. |
158
+ | `doctor` | Check the agent-identity invariants (prompt-file-present, backend-consistency). |
159
+ | `cli overview` | Describe the CLI surface itself. |
160
+
161
+ Planned (the survey surface): `survey`, `regions`, `neighbors`, `directions`,
162
+ `gaps`, `compare`, `map`.
163
+
164
+ Every command supports `--json`. Results go to stdout, errors/diagnostics to
165
+ stderr (never mixed). Exit codes: `0` success, `1` user error, `2` environment
166
+ error, `3+` reserved.
167
+
168
+ ## License
169
+
170
+ Apache 2.0 — see [`LICENSE`](LICENSE).
@@ -0,0 +1,153 @@
1
+ # embeddings-cli
2
+
3
+ **embeddings-cli is a tool for studying embedding spaces as systems, not just
4
+ querying individual vectors.**
5
+
6
+ An individual embedding is difficult to interpret. Its dimensions rarely
7
+ correspond to clean human concepts, and inspecting the raw numbers tells us very
8
+ little.
9
+
10
+ But an embedding space contains larger structures that can be studied:
11
+
12
+ - semantic regions and clusters;
13
+ - neighborhoods and boundaries;
14
+ - recurring directions of meaning;
15
+ - dense, sparse, and ambiguous areas;
16
+ - gaps in what the model represents;
17
+ - differences between models, datasets, domains, and versions.
18
+
19
+ `embeddings-cli` treats an embedding model as a **semantic landscape**.
20
+
21
+ Instead of only asking:
22
+
23
+ > Which documents are closest to this query?
24
+
25
+ it asks:
26
+
27
+ > What kind of world does this embedding model create?
28
+
29
+ The CLI can embed a representative corpus, survey the resulting space, identify
30
+ regions and directions, compare different embedding models, and generate an
31
+ interpretable map of the model's semantic coverage.
32
+
33
+ ```bash
34
+ embeddings survey corpus.jsonl
35
+ embeddings regions
36
+ embeddings neighbors "agentic culture"
37
+ embeddings directions discover
38
+ embeddings gaps
39
+ embeddings compare model-a model-b
40
+ embeddings map --html
41
+ ```
42
+
43
+ The goal is not to assign a human-readable meaning to every dimension. That is
44
+ usually unstable and misleading.
45
+
46
+ The goal is to understand the **geometry of meaning produced by the model**:
47
+
48
+ - what it places together;
49
+ - what it keeps apart;
50
+ - which distinctions it preserves;
51
+ - which distinctions it collapses;
52
+ - where concepts form continuous transitions;
53
+ - where the representation becomes weak or uncertain.
54
+
55
+ ## Status
56
+
57
+ The survey surface above is the **target design, not yet implemented**. What
58
+ ships today is the agent-first CLI skeleton this project is built on — identity
59
+ and introspection verbs (`whoami`, `learn`, `explain`, `overview`, `doctor`,
60
+ `cli overview`), each with `--json`. See [CLI](#cli) for what actually runs.
61
+
62
+ ## The Surveyor agent
63
+
64
+ `embeddings-cli` can also serve as the deterministic tool surface for a
65
+ **Surveyor agent**.
66
+
67
+ The Surveyor does not invent an interpretation from a single projection. It
68
+ performs experiments against the space:
69
+
70
+ 1. samples representative concepts;
71
+ 2. searches for natural clusters;
72
+ 3. proposes names for regions;
73
+ 4. tests those names against independent examples;
74
+ 5. discovers candidate semantic directions;
75
+ 6. measures whether those directions generalize;
76
+ 7. identifies gaps, overlaps, and unstable boundaries;
77
+ 8. records the evidence behind every conclusion.
78
+
79
+ The agent may describe a region, but the CLI provides the measurements that make
80
+ the description inspectable and reproducible.
81
+
82
+ ## Outputs
83
+
84
+ A study can produce an **Atlas** containing:
85
+
86
+ - the datasets and models used;
87
+ - representative points and neighborhoods;
88
+ - hierarchical region maps;
89
+ - discovered semantic directions;
90
+ - cluster and boundary evidence;
91
+ - coverage and density measurements;
92
+ - model comparisons;
93
+ - known limitations and uncertain interpretations.
94
+
95
+ The Atlas is not the embedding space itself. It is an evidence-backed
96
+ interpretation of that space.
97
+
98
+ ## Why it matters
99
+
100
+ Embedding models are often treated as interchangeable infrastructure. They are
101
+ selected using retrieval benchmarks and then hidden behind a vector database.
102
+
103
+ But every embedding model defines its own system of similarity and distinction.
104
+
105
+ Two models may disagree about:
106
+
107
+ - whether two concepts are related;
108
+ - which property of a sentence is most important;
109
+ - how domains connect;
110
+ - how multilingual meanings align;
111
+ - whether a semantic change is gradual or abrupt;
112
+ - which concepts are represented precisely and which are compressed together.
113
+
114
+ `embeddings-cli` makes those differences visible.
115
+
116
+ It turns embeddings from an opaque retrieval component into something that can
117
+ be explored, evaluated, compared, and understood.
118
+
119
+ ## Quickstart
120
+
121
+ ```bash
122
+ uv sync
123
+ uv run pytest -n auto # run the test suite
124
+ uv run embeddings whoami # identity from culture.yaml
125
+ uv run embeddings learn # self-teaching prompt (add --json)
126
+ uv run teken cli doctor . --strict # the agent-first rubric gate CI runs
127
+ ```
128
+
129
+ The project is named `embeddings-cli`; the installed command is **`embeddings`**.
130
+
131
+ ## CLI
132
+
133
+ Shipping today:
134
+
135
+ | Verb | What it does |
136
+ |------|--------------|
137
+ | `whoami` | Report this agent's nick, version, backend, and model from `culture.yaml`. |
138
+ | `learn` | Print a structured self-teaching prompt. |
139
+ | `explain <path>` | Markdown docs for any noun/verb path. |
140
+ | `overview` | Read-only descriptive snapshot of the agent. |
141
+ | `doctor` | Check the agent-identity invariants (prompt-file-present, backend-consistency). |
142
+ | `cli overview` | Describe the CLI surface itself. |
143
+
144
+ Planned (the survey surface): `survey`, `regions`, `neighbors`, `directions`,
145
+ `gaps`, `compare`, `map`.
146
+
147
+ Every command supports `--json`. Results go to stdout, errors/diagnostics to
148
+ stderr (never mixed). Exit codes: `0` success, `1` user error, `2` environment
149
+ error, `3+` reserved.
150
+
151
+ ## License
152
+
153
+ Apache 2.0 — see [`LICENSE`](LICENSE).
@@ -70,8 +70,11 @@ def _build_parser() -> argparse.ArgumentParser:
70
70
  from embeddings.cli._commands import whoami as _whoami_cmd
71
71
 
72
72
  parser = _CliArgumentParser(
73
- prog="embeddings-cli",
74
- description="embeddings-cli — a clonable template for AgentCulture mesh agents.",
73
+ # The project/dist is named `embeddings-cli`; the console script declared
74
+ # in pyproject.toml is `embeddings`. prog must match what a user actually
75
+ # types, so every usage/error line stays copy-pasteable.
76
+ prog="embeddings",
77
+ description="embeddings-cli — study embedding spaces as systems, not individual vectors.",
75
78
  )
76
79
  parser.add_argument(
77
80
  "--version",
@@ -1,4 +1,4 @@
1
- """``embeddings-cli cli`` — noun grouping CLI-surface introspection.
1
+ """``embeddings cli`` — noun grouping CLI-surface introspection.
2
2
 
3
3
  Exists to satisfy the agent-first rubric's ``overview_cli_noun_exists`` check:
4
4
  any noun with action-verbs must also expose ``overview``. There are no
@@ -23,14 +23,14 @@ def cmd_cli_overview(args: argparse.Namespace) -> int:
23
23
 
24
24
 
25
25
  def _no_verb(args: argparse.Namespace) -> int:
26
- # `embeddings-cli cli` with no sub-verb prints the noun's overview.
26
+ # `embeddings cli` with no sub-verb prints the noun's overview.
27
27
  return cmd_cli_overview(args)
28
28
 
29
29
 
30
30
  def register(sub: argparse._SubParsersAction) -> None:
31
31
  p = sub.add_parser(
32
32
  "cli",
33
- help="CLI-surface introspection (see 'embeddings-cli cli overview').",
33
+ help="CLI-surface introspection (see 'embeddings cli overview').",
34
34
  )
35
35
  p.add_argument("--json", action="store_true", help="Emit structured JSON.")
36
36
  p.set_defaults(func=_no_verb, json=False)
@@ -1,4 +1,4 @@
1
- """``embeddings-cli doctor`` — check the agent-identity invariants.
1
+ """``embeddings doctor`` — check the agent-identity invariants.
2
2
 
3
3
  Mirrors the two invariants ``steward doctor`` verifies for a mesh agent:
4
4
 
@@ -105,7 +105,7 @@ def cmd_doctor(args: argparse.Namespace) -> int:
105
105
  emit_result(report, json_mode=True)
106
106
  else:
107
107
  status = "healthy" if report["healthy"] else "unhealthy"
108
- lines = [f"embeddings-cli doctor: {status}", ""]
108
+ lines = [f"embeddings doctor: {status}", ""]
109
109
  for check in report["checks"]:
110
110
  mark = "ok" if check["passed"] else "FAIL"
111
111
  lines.append(f"[{mark}] {check['id']}: {check['message']}")