astern 0.0.2__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.

Potentially problematic release.


This version of astern might be problematic. Click here for more details.

Files changed (38) hide show
  1. astern-0.0.2/.github/workflows/ci.yml +24 -0
  2. astern-0.0.2/.gitignore +132 -0
  3. astern-0.0.2/LICENSE +21 -0
  4. astern-0.0.2/PKG-INFO +122 -0
  5. astern-0.0.2/README.md +92 -0
  6. astern-0.0.2/astern/__init__.py +20 -0
  7. astern-0.0.2/astern/__main__.py +13 -0
  8. astern-0.0.2/astern/data/.gitkeep +0 -0
  9. astern-0.0.2/astern/estimate.py +340 -0
  10. astern-0.0.2/astern/judge.py +291 -0
  11. astern-0.0.2/astern/ledger.py +118 -0
  12. astern-0.0.2/astern/lenses/__init__.py +121 -0
  13. astern-0.0.2/astern/lenses/commands.py +224 -0
  14. astern-0.0.2/astern/lenses/cost.py +45 -0
  15. astern-0.0.2/astern/lenses/friction.py +175 -0
  16. astern-0.0.2/astern/lenses/hygiene.py +68 -0
  17. astern-0.0.2/astern/lenses/stats.py +81 -0
  18. astern-0.0.2/astern/lenses/synopsis.py +245 -0
  19. astern-0.0.2/astern/lenses/timeline.py +62 -0
  20. astern-0.0.2/astern/lenses/tooling.py +60 -0
  21. astern-0.0.2/astern/report.py +403 -0
  22. astern-0.0.2/astern/sources.py +188 -0
  23. astern-0.0.2/astern/store.py +126 -0
  24. astern-0.0.2/astern/tools.py +683 -0
  25. astern-0.0.2/astern/turns.py +385 -0
  26. astern-0.0.2/astern/views.py +269 -0
  27. astern-0.0.2/pyproject.toml +61 -0
  28. astern-0.0.2/tests/conftest.py +53 -0
  29. astern-0.0.2/tests/fixtures.py +343 -0
  30. astern-0.0.2/tests/fixtures_lenses.py +223 -0
  31. astern-0.0.2/tests/test_cli.py +56 -0
  32. astern-0.0.2/tests/test_judge_synopsis.py +283 -0
  33. astern-0.0.2/tests/test_ledger.py +158 -0
  34. astern-0.0.2/tests/test_lenses_h.py +85 -0
  35. astern-0.0.2/tests/test_sources.py +202 -0
  36. astern-0.0.2/tests/test_store.py +121 -0
  37. astern-0.0.2/tests/test_tools.py +282 -0
  38. astern-0.0.2/tests/test_turns.py +278 -0
@@ -0,0 +1,24 @@
1
+ # wads CI — calls the reusable workflow hosted in i2mint/wads.
2
+ #
3
+ # All configuration comes from this repo's pyproject.toml [tool.wads.ci.*].
4
+ # To customize the workflow itself (rare), replace this file with the
5
+ # full inline template `wads/data/github_ci_uv.yml` from i2mint/wads.
6
+ #
7
+ # Permissions: the reusable workflow needs `contents: write` (version-bump
8
+ # push-back, gh-pages branch push) and `pages: write` (Pages REST config).
9
+ # Both default to read-only on personal-account callers, so they are granted
10
+ # explicitly here.
11
+ name: Continuous Integration
12
+ on: [push, pull_request]
13
+ jobs:
14
+ ci:
15
+ uses: i2mint/wads/.github/workflows/uv-ci.yml@master
16
+ permissions:
17
+ contents: write
18
+ pages: write
19
+ # Explicit pass-through (not `secrets: inherit`, which does not reliably
20
+ # propagate caller-repo secrets to a reusable workflow owned by a different
21
+ # account). astern reads local files and only ever runs the local `claude` CLI, so
22
+ # PYPI_PASSWORD is the only secret it needs.
23
+ secrets:
24
+ PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
@@ -0,0 +1,132 @@
1
+ docs/_build/
2
+ wads_configs.json
3
+ data/wads_configs.json
4
+ wads/data/wads_configs.json
5
+
6
+ # Byte-compiled / optimized / DLL files
7
+ __pycache__/
8
+ *.py[cod]
9
+ *$py.class
10
+
11
+
12
+ .DS_Store
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ *.egg-info/
31
+ .installed.cfg
32
+ *.egg
33
+ MANIFEST
34
+ _build
35
+
36
+ # PyInstaller
37
+ # Usually these files are written by a python script from a template
38
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+ *.manifest
40
+ *.spec
41
+
42
+ # Installer logs
43
+ pip-log.txt
44
+ pip-delete-this-directory.txt
45
+
46
+ # Unit test / coverage reports
47
+ htmlcov/
48
+ .tox/
49
+ .coverage
50
+ .coverage.*
51
+ .cache
52
+ nosetests.xml
53
+ coverage.xml
54
+ *.cover
55
+ .hypothesis/
56
+ .pytest_cache/
57
+
58
+ # Translations
59
+ *.mo
60
+ *.pot
61
+
62
+ # Django stuff:
63
+ *.log
64
+ local_settings.py
65
+ db.sqlite3
66
+
67
+ # Flask stuff:
68
+ instance/
69
+ .webassets-cache
70
+
71
+ # Scrapy stuff:
72
+ .scrapy
73
+
74
+ # Sphinx documentation
75
+ docs/_build/
76
+
77
+ # PyBuilder
78
+ target/
79
+
80
+ # Jupyter Notebook
81
+ .ipynb_checkpoints
82
+
83
+ # pyenv
84
+ .python-version
85
+
86
+ # celery beat schedule file
87
+ celerybeat-schedule
88
+
89
+ # SageMath parsed files
90
+ *.sage.py
91
+
92
+ # Environments
93
+ .env
94
+ .venv
95
+ env/
96
+ venv/
97
+ ENV/
98
+ env.bak/
99
+ venv.bak/
100
+
101
+ # Spyder project settings
102
+ .spyderproject
103
+ .spyproject
104
+
105
+ # Rope project settings
106
+ .ropeproject
107
+
108
+ # mkdocs documentation
109
+ /site
110
+
111
+ # mypy
112
+ .mypy_cache/
113
+
114
+ # PyCharm
115
+ .idea
116
+
117
+ # Ruff
118
+ .ruff_cache/
119
+
120
+ # VS Code
121
+ .vscode/
122
+
123
+ # Temporary test outputs
124
+ batch_results.json
125
+ *.tmp
126
+ tmp/
127
+ temp/
128
+ # Local session handoffs (not for commit)
129
+ .claude/handoffs/
130
+
131
+ # Session worktrees created by `claude --worktree` (not for commit)
132
+ .claude/worktrees/
astern-0.0.2/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Thor Whalen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
astern-0.0.2/PKG-INFO ADDED
@@ -0,0 +1,122 @@
1
+ Metadata-Version: 2.5
2
+ Name: astern
3
+ Version: 0.0.2
4
+ Summary: Look astern: mine your past Claude Code sessions for recurring problems, friction, rewritten code, and the vocabulary gap between you and your agents
5
+ Project-URL: Homepage, https://github.com/thorwhalen/astern
6
+ Project-URL: Repository, https://github.com/thorwhalen/astern
7
+ Project-URL: Issues, https://github.com/thorwhalen/astern/issues
8
+ Author: Thor Whalen
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: agents,claude-code,mining,retrospective,sessions,transcripts
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Utilities
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: cw<0.2,>=0.1.1
22
+ Requires-Dist: dol>=0.3
23
+ Requires-Dist: openloops>=0.1.9
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=7.0; extra == 'dev'
26
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
27
+ Provides-Extra: similar
28
+ Requires-Dist: ir; extra == 'similar'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # astern
32
+
33
+ `crowsnest` watches the sessions running right now; `astern` looks back at the wake they left — the transcripts Claude Code already keeps under `~/.claude/projects/`. It mines them for what problems recur, where agents get stuck, what one-off code keeps being rewritten, and which words you and your agents don't share, without spending a token twice.
34
+
35
+ ## Start here
36
+
37
+ ```bash
38
+ pip install astern
39
+
40
+ astern sync # read new or changed transcripts, run the free (heuristic) lenses
41
+ astern sessions # what's synced, newest first
42
+ astern show <sid-prefix> # one session: meta, ledger state, last turns, findings
43
+ astern report friction # (in progress) a lens's findings as a markdown report
44
+ astern judge # (in progress) run the LLM-judged lenses over what's synced
45
+ astern estimate # (in progress) token/cost estimate before a judge batch runs
46
+ ```
47
+
48
+ `sync`, `sessions` and `show` are shipped today. `report`, `judge` and `estimate` are being built out by other agents against the same store and ledger; once they land, the one-command loop is `astern sync && astern judge && astern report friction`.
49
+
50
+ ## What it extracts
51
+
52
+ Each **lens** asks one question of a session and returns typed, evidence-backed findings — every finding points back at the turn it came from. Method: **H** = deterministic heuristic, zero tokens; **L** = LLM-judged, spends subscription tokens via the local `claude` CLI; **H→L** = a heuristic shortlist that only the survivors get judged on.
53
+
54
+ | Lens | Question | Method |
55
+ |---|---|---|
56
+ | `stats` | The shape of a session in numbers — the cost model's own features | H |
57
+ | `problems` | What problem was each session solving, and how was it solved? | L |
58
+ | `recurring` | Which problems recur, and would a skill or subagent pay for itself? | H over L |
59
+ | `rewrites` | What one-off code keeps being rewritten? | H→L |
60
+ | `friction` | Where do agents get stuck, and what would remove the obstacle? | H→L |
61
+ | `jargon-in` | Which of my phrasings point to an established term I don't use? | L |
62
+ | `jargon-out` | Which terms do agents use that I don't? | H→L |
63
+ | `corrections` | What did I correct or re-affirm, and which corrections repeat? | H→L |
64
+ | `prompt-quality` | Which prompt shapes lead to clean turns, which to flailing ones? | H→L |
65
+ | `cost` | Where do the tokens and hours go, by project / task / model? | H |
66
+ | `timeline` | What did I work on this week, and what landed? | H→L |
67
+ | `decisions` | Which decisions were made, and why? | L |
68
+ | `claims` | Where did an agent claim "done" and a later turn show otherwise? | H→L |
69
+ | `questions` | What do agents keep asking me, and what did I answer? | H→L |
70
+ | `tooling` | Which skills/subagents/MCP tools are used, unused, or missing? | H |
71
+ | `memory-candidates` | Which restated facts should become memory, and where does memory drift? | H→L |
72
+ | `evals` | Which (prompt, outcome) pairs make a regression test for a skill? | H |
73
+ | `hygiene` | Do agents read before they edit, and does that change over time? | H |
74
+ | `regression` | Did the harness or model change behaviour? | H |
75
+ | `adherence` | Which CLAUDE.md/skill rules are followed, ignored, or fought? | L |
76
+ | `subagents` | Which subagent / `Workflow` spawns paid for themselves? | H |
77
+ | `effect` | Did an adopted rule, skill or function reduce the pattern it targeted? | H |
78
+
79
+ Session handoffs (`Q`) are deliberately not a lens here — that's `openloops`, linked rather than re-derived. The full catalogue, with the signal each lens reads and the sink it feeds, is plan §2 (see "The seams" below).
80
+
81
+ ## Never spending a token twice
82
+
83
+ Every lens run goes through the **ledger**: one entry per session, keyed on the transcript file's fingerprint (size + mtime) and, per lens, its version and the last turn index it has seen. From that, `ledger.plan()` picks one of three actions:
84
+
85
+ - **skip** — this lens version already covered every turn that exists in the transcript.
86
+ - **incremental** — the session grew (it was resumed); only lenses that declare `incremental=True` get handed just the new turns (`from_index` onward) plus their own prior findings, and extend rather than redo.
87
+ - **full** — never analyzed, or analyzed by an older lens version; everything is reprocessed.
88
+
89
+ A heuristic lens (`kind='H'`) costs nothing, so paying for `full` on every source change is fine. The ledger earns its keep on the LLM lenses (`kind='L'`): a resumed session must not pay again for turns it already paid for, and `astern sync` never re-reads a transcript whose size and mtime it already has on file.
90
+
91
+ ## Where things live
92
+
93
+ The store is `dol`-backed JSON files under `~/.local/share/astern/` (`sessions`, `turns`, `findings`, `ledger`, `judgments`) — override with `$ASTERN_DATA_DIR` to keep an experiment out of the real store. The transcripts it reads come from `~/.claude` by default — override with `$ASTERN_HOME` to point at a second account or a synced copy of another machine's home. Both are seams: any `MutableMapping` serves as a store, and `homes()` takes a single dir, an iterable of dirs, or `None`.
94
+
95
+ ## The seams
96
+
97
+ Five things in astern are deliberately swappable, each with a strong out-of-the-box default and a named replacement:
98
+
99
+ | Seam | v1 default | Replacement |
100
+ |---|---|---|
101
+ | `home=` — which `~/.claude`-shaped dirs to read | the one `~/.claude` | a second account, or the server's home over a sync |
102
+ | `store=` — where records and findings live | `dol` JSON files under `~/.local/share/astern/` | any `MutableMapping` — S3, SQLite, a dict for tests |
103
+ | `judge=` — the LLM callable for `L` lenses | the local `claude` CLI, headless, no session persisted | `aix.prompt_func` for API billing; a recorded-replay judge for tests |
104
+ | `similar=` — how findings group across sessions | normalized-string near match | `ir` corpus + embeddings, for real semantic clustering |
105
+ | `turns=` — the transcript-to-turns fetcher | astern's own `openloops`-backed iterator | `priv.claude_transcripts.turn_pair_records` by injection |
106
+
107
+ What's deliberately **not** a seam: the lens registry (a module-level dict), report templates, the finding dict shape, and the `openloops.egress` scrub step on every sink — none of these are meant to vary.
108
+
109
+ ## Not in astern
110
+
111
+ - **Live sessions** — that's `crowsnest`'s axis (*this minute*), not astern's (*the wake*).
112
+ - **Obligation tracking** — what's owed, blocked, or open — that's `openloops`.
113
+ - **Transcript viewers, full-text search, cost dashboards** — `claude-code-log`, `cc-transcript`, `episodic-memory` and `ccusage` already do these well; install them alongside astern rather than rebuilding them here.
114
+ - **Writing into `CLAUDE.md`, skills, or memory.** Every lens emits *candidates* — mined skill/rule/function/memory suggestions — for a human to accept through `skill`, `opsward`, `coact`, or `ge.memory`. Nothing here writes automatically; that's the same "report, never repair" invariant `priv upkeep` carries.
115
+
116
+ ## Development
117
+
118
+ ```bash
119
+ pip install -e ".[dev]"
120
+ pytest -q # the test suite
121
+ pytest --doctest-modules astern # every module's own doctest
122
+ ```
astern-0.0.2/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # astern
2
+
3
+ `crowsnest` watches the sessions running right now; `astern` looks back at the wake they left — the transcripts Claude Code already keeps under `~/.claude/projects/`. It mines them for what problems recur, where agents get stuck, what one-off code keeps being rewritten, and which words you and your agents don't share, without spending a token twice.
4
+
5
+ ## Start here
6
+
7
+ ```bash
8
+ pip install astern
9
+
10
+ astern sync # read new or changed transcripts, run the free (heuristic) lenses
11
+ astern sessions # what's synced, newest first
12
+ astern show <sid-prefix> # one session: meta, ledger state, last turns, findings
13
+ astern report friction # (in progress) a lens's findings as a markdown report
14
+ astern judge # (in progress) run the LLM-judged lenses over what's synced
15
+ astern estimate # (in progress) token/cost estimate before a judge batch runs
16
+ ```
17
+
18
+ `sync`, `sessions` and `show` are shipped today. `report`, `judge` and `estimate` are being built out by other agents against the same store and ledger; once they land, the one-command loop is `astern sync && astern judge && astern report friction`.
19
+
20
+ ## What it extracts
21
+
22
+ Each **lens** asks one question of a session and returns typed, evidence-backed findings — every finding points back at the turn it came from. Method: **H** = deterministic heuristic, zero tokens; **L** = LLM-judged, spends subscription tokens via the local `claude` CLI; **H→L** = a heuristic shortlist that only the survivors get judged on.
23
+
24
+ | Lens | Question | Method |
25
+ |---|---|---|
26
+ | `stats` | The shape of a session in numbers — the cost model's own features | H |
27
+ | `problems` | What problem was each session solving, and how was it solved? | L |
28
+ | `recurring` | Which problems recur, and would a skill or subagent pay for itself? | H over L |
29
+ | `rewrites` | What one-off code keeps being rewritten? | H→L |
30
+ | `friction` | Where do agents get stuck, and what would remove the obstacle? | H→L |
31
+ | `jargon-in` | Which of my phrasings point to an established term I don't use? | L |
32
+ | `jargon-out` | Which terms do agents use that I don't? | H→L |
33
+ | `corrections` | What did I correct or re-affirm, and which corrections repeat? | H→L |
34
+ | `prompt-quality` | Which prompt shapes lead to clean turns, which to flailing ones? | H→L |
35
+ | `cost` | Where do the tokens and hours go, by project / task / model? | H |
36
+ | `timeline` | What did I work on this week, and what landed? | H→L |
37
+ | `decisions` | Which decisions were made, and why? | L |
38
+ | `claims` | Where did an agent claim "done" and a later turn show otherwise? | H→L |
39
+ | `questions` | What do agents keep asking me, and what did I answer? | H→L |
40
+ | `tooling` | Which skills/subagents/MCP tools are used, unused, or missing? | H |
41
+ | `memory-candidates` | Which restated facts should become memory, and where does memory drift? | H→L |
42
+ | `evals` | Which (prompt, outcome) pairs make a regression test for a skill? | H |
43
+ | `hygiene` | Do agents read before they edit, and does that change over time? | H |
44
+ | `regression` | Did the harness or model change behaviour? | H |
45
+ | `adherence` | Which CLAUDE.md/skill rules are followed, ignored, or fought? | L |
46
+ | `subagents` | Which subagent / `Workflow` spawns paid for themselves? | H |
47
+ | `effect` | Did an adopted rule, skill or function reduce the pattern it targeted? | H |
48
+
49
+ Session handoffs (`Q`) are deliberately not a lens here — that's `openloops`, linked rather than re-derived. The full catalogue, with the signal each lens reads and the sink it feeds, is plan §2 (see "The seams" below).
50
+
51
+ ## Never spending a token twice
52
+
53
+ Every lens run goes through the **ledger**: one entry per session, keyed on the transcript file's fingerprint (size + mtime) and, per lens, its version and the last turn index it has seen. From that, `ledger.plan()` picks one of three actions:
54
+
55
+ - **skip** — this lens version already covered every turn that exists in the transcript.
56
+ - **incremental** — the session grew (it was resumed); only lenses that declare `incremental=True` get handed just the new turns (`from_index` onward) plus their own prior findings, and extend rather than redo.
57
+ - **full** — never analyzed, or analyzed by an older lens version; everything is reprocessed.
58
+
59
+ A heuristic lens (`kind='H'`) costs nothing, so paying for `full` on every source change is fine. The ledger earns its keep on the LLM lenses (`kind='L'`): a resumed session must not pay again for turns it already paid for, and `astern sync` never re-reads a transcript whose size and mtime it already has on file.
60
+
61
+ ## Where things live
62
+
63
+ The store is `dol`-backed JSON files under `~/.local/share/astern/` (`sessions`, `turns`, `findings`, `ledger`, `judgments`) — override with `$ASTERN_DATA_DIR` to keep an experiment out of the real store. The transcripts it reads come from `~/.claude` by default — override with `$ASTERN_HOME` to point at a second account or a synced copy of another machine's home. Both are seams: any `MutableMapping` serves as a store, and `homes()` takes a single dir, an iterable of dirs, or `None`.
64
+
65
+ ## The seams
66
+
67
+ Five things in astern are deliberately swappable, each with a strong out-of-the-box default and a named replacement:
68
+
69
+ | Seam | v1 default | Replacement |
70
+ |---|---|---|
71
+ | `home=` — which `~/.claude`-shaped dirs to read | the one `~/.claude` | a second account, or the server's home over a sync |
72
+ | `store=` — where records and findings live | `dol` JSON files under `~/.local/share/astern/` | any `MutableMapping` — S3, SQLite, a dict for tests |
73
+ | `judge=` — the LLM callable for `L` lenses | the local `claude` CLI, headless, no session persisted | `aix.prompt_func` for API billing; a recorded-replay judge for tests |
74
+ | `similar=` — how findings group across sessions | normalized-string near match | `ir` corpus + embeddings, for real semantic clustering |
75
+ | `turns=` — the transcript-to-turns fetcher | astern's own `openloops`-backed iterator | `priv.claude_transcripts.turn_pair_records` by injection |
76
+
77
+ What's deliberately **not** a seam: the lens registry (a module-level dict), report templates, the finding dict shape, and the `openloops.egress` scrub step on every sink — none of these are meant to vary.
78
+
79
+ ## Not in astern
80
+
81
+ - **Live sessions** — that's `crowsnest`'s axis (*this minute*), not astern's (*the wake*).
82
+ - **Obligation tracking** — what's owed, blocked, or open — that's `openloops`.
83
+ - **Transcript viewers, full-text search, cost dashboards** — `claude-code-log`, `cc-transcript`, `episodic-memory` and `ccusage` already do these well; install them alongside astern rather than rebuilding them here.
84
+ - **Writing into `CLAUDE.md`, skills, or memory.** Every lens emits *candidates* — mined skill/rule/function/memory suggestions — for a human to accept through `skill`, `opsward`, `coact`, or `ge.memory`. Nothing here writes automatically; that's the same "report, never repair" invariant `priv upkeep` carries.
85
+
86
+ ## Development
87
+
88
+ ```bash
89
+ pip install -e ".[dev]"
90
+ pytest -q # the test suite
91
+ pytest --doctest-modules astern # every module's own doctest
92
+ ```
@@ -0,0 +1,20 @@
1
+ """astern — look astern: mine your past Claude Code sessions.
2
+
3
+ The crow's nest (``crowsnest``) watches the sessions that are running now; astern
4
+ looks back at the wake they left. It reads the transcripts Claude Code already writes,
5
+ keeps its own store of turns and findings, and answers, without spending tokens twice:
6
+ what problems recur, where agents get stuck, what one-off code keeps being rewritten,
7
+ what words you and your agents do not share.
8
+
9
+ Core contract: :mod:`astern.tools` (plain functions, JSON in, JSON out) over
10
+ :mod:`astern.sources` → :mod:`astern.turns` → :mod:`astern.store` with
11
+ :mod:`astern.ledger` deciding what still needs analyzing, :mod:`astern.lenses`
12
+ answering the questions, and :mod:`astern.judge` the one LLM seam.
13
+ """
14
+
15
+ from astern.judge import Judgment, claude_judge, replay_judge # noqa: F401
16
+ from astern.lenses import LENSES, finding, lens # noqa: F401
17
+ from astern.store import MemoryStore, Store, mk_store # noqa: F401
18
+ from astern.tools import lenses, sessions, show, sync # noqa: F401
19
+
20
+ __version__ = "0.0.1"
@@ -0,0 +1,13 @@
1
+ """``astern`` command line: ``cw`` over the functions :mod:`astern.tools` exposes."""
2
+
3
+ import cw
4
+
5
+ from astern.tools import _dispatch_funcs
6
+
7
+
8
+ def main():
9
+ raise SystemExit(cw.dispatch(_dispatch_funcs))
10
+
11
+
12
+ if __name__ == "__main__":
13
+ main()
File without changes