pocketsync 0.10.0__tar.gz → 0.10.1__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 (107) hide show
  1. {pocketsync-0.10.0 → pocketsync-0.10.1}/AGENTS.colleague.md +22 -9
  2. {pocketsync-0.10.0 → pocketsync-0.10.1}/AGENTS.override.md +34 -16
  3. {pocketsync-0.10.0 → pocketsync-0.10.1}/CHANGELOG.md +9 -0
  4. pocketsync-0.10.1/CLAUDE.md +236 -0
  5. pocketsync-0.10.1/PKG-INFO +202 -0
  6. pocketsync-0.10.1/QWEN.md +152 -0
  7. pocketsync-0.10.1/README.md +185 -0
  8. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/__init__.py +1 -1
  9. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_commands/learn.py +10 -6
  10. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_commands/overview.py +2 -2
  11. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/explain/catalog.py +8 -6
  12. {pocketsync-0.10.0 → pocketsync-0.10.1}/pyproject.toml +1 -1
  13. {pocketsync-0.10.0 → pocketsync-0.10.1}/uv.lock +33 -33
  14. pocketsync-0.10.0/CLAUDE.md +0 -28
  15. pocketsync-0.10.0/PKG-INFO +0 -157
  16. pocketsync-0.10.0/QWEN.md +0 -129
  17. pocketsync-0.10.0/README.md +0 -140
  18. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/agent-config/SKILL.md +0 -0
  19. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/agent-config/data/backend-fingerprints.yaml +0 -0
  20. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/agent-config/scripts/show.sh +0 -0
  21. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/ask-colleague/SKILL.md +0 -0
  22. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/ask-colleague/prompts/explore.md +0 -0
  23. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/ask-colleague/prompts/review.md +0 -0
  24. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/ask-colleague/prompts/write.md +0 -0
  25. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/ask-colleague/scripts/ask-colleague.sh +0 -0
  26. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/assign-to-workforce/SKILL.md +0 -0
  27. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/assign-to-workforce/scripts/assign-to-workforce.sh +0 -0
  28. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/challenge/SKILL.md +0 -0
  29. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/challenge/scripts/challenge.sh +0 -0
  30. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/cicd/SKILL.md +0 -0
  31. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/cicd/scripts/_resolve-nick.sh +0 -0
  32. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/cicd/scripts/portability-lint.sh +0 -0
  33. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/cicd/scripts/pr-reply.sh +0 -0
  34. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/cicd/scripts/pr-status.sh +0 -0
  35. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/cicd/scripts/workflow.sh +0 -0
  36. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/communicate/SKILL.md +0 -0
  37. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/communicate/scripts/fetch-issues.sh +0 -0
  38. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/communicate/scripts/mesh-message.sh +0 -0
  39. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/communicate/scripts/post-comment.sh +0 -0
  40. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/communicate/scripts/post-issue.sh +0 -0
  41. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/communicate/scripts/templates/skill-new-brief.md +0 -0
  42. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/communicate/scripts/templates/skill-update-brief.md +0 -0
  43. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/deviate/SKILL.md +0 -0
  44. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/deviate/scripts/deviate.sh +0 -0
  45. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/doc-test-alignment/SKILL.md +0 -0
  46. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/doc-test-alignment/scripts/check.sh +0 -0
  47. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/pypi-maintainer/SKILL.md +0 -0
  48. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/pypi-maintainer/scripts/switch-source.sh +0 -0
  49. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/recall/SKILL.md +0 -0
  50. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/recall/scripts/recall.sh +0 -0
  51. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/remember/SKILL.md +0 -0
  52. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/remember/scripts/remember.sh +0 -0
  53. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/run-tests/SKILL.md +0 -0
  54. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/run-tests/scripts/test.sh +0 -0
  55. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/scope/SKILL.md +0 -0
  56. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/scope/scripts/scope.sh +0 -0
  57. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/sonarclaude/SKILL.md +0 -0
  58. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/sonarclaude/scripts/sonar.sh +0 -0
  59. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/spec-to-plan/SKILL.md +0 -0
  60. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/spec-to-plan/scripts/spec-to-plan.sh +0 -0
  61. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/summarize-delivery/SKILL.md +0 -0
  62. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/summarize-delivery/scripts/summarize-delivery.sh +0 -0
  63. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/think/SKILL.md +0 -0
  64. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/think/scripts/think.sh +0 -0
  65. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/validate-delivery/SKILL.md +0 -0
  66. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/validate-delivery/scripts/validate-delivery.sh +0 -0
  67. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/version-bump/SKILL.md +0 -0
  68. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills/version-bump/scripts/bump.py +0 -0
  69. {pocketsync-0.10.0 → pocketsync-0.10.1}/.claude/skills.local.yaml.example +0 -0
  70. {pocketsync-0.10.0 → pocketsync-0.10.1}/.eidetic/memory/default__public.jsonl +0 -0
  71. {pocketsync-0.10.0 → pocketsync-0.10.1}/.flake8 +0 -0
  72. {pocketsync-0.10.0 → pocketsync-0.10.1}/.github/workflows/publish.yml +0 -0
  73. {pocketsync-0.10.0 → pocketsync-0.10.1}/.github/workflows/tests.yml +0 -0
  74. {pocketsync-0.10.0 → pocketsync-0.10.1}/.gitignore +0 -0
  75. {pocketsync-0.10.0 → pocketsync-0.10.1}/.markdownlint-cli2.yaml +0 -0
  76. {pocketsync-0.10.0 → pocketsync-0.10.1}/.pi/SYSTEM.md +0 -0
  77. {pocketsync-0.10.0 → pocketsync-0.10.1}/.qwen/settings.json.example +0 -0
  78. {pocketsync-0.10.0 → pocketsync-0.10.1}/LICENSE +0 -0
  79. {pocketsync-0.10.0 → pocketsync-0.10.1}/culture.yaml +0 -0
  80. {pocketsync-0.10.0 → pocketsync-0.10.1}/docs/automation-contract.md +0 -0
  81. {pocketsync-0.10.0 → pocketsync-0.10.1}/docs/harness-invocations.yaml +0 -0
  82. {pocketsync-0.10.0 → pocketsync-0.10.1}/docs/harness-selection.md +0 -0
  83. {pocketsync-0.10.0 → pocketsync-0.10.1}/docs/harness-verification.md +0 -0
  84. {pocketsync-0.10.0 → pocketsync-0.10.1}/docs/skill-sources.md +0 -0
  85. {pocketsync-0.10.0 → pocketsync-0.10.1}/docs/steward/steward-suggestions.md +0 -0
  86. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/__init__.py +0 -0
  87. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/__main__.py +0 -0
  88. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_commands/__init__.py +0 -0
  89. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_commands/cli.py +0 -0
  90. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_commands/doctor.py +0 -0
  91. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_commands/explain.py +0 -0
  92. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_commands/whoami.py +0 -0
  93. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_errors.py +0 -0
  94. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/cli/_output.py +0 -0
  95. {pocketsync-0.10.0 → pocketsync-0.10.1}/pocketsync/explain/__init__.py +0 -0
  96. {pocketsync-0.10.0 → pocketsync-0.10.1}/scripts/harness-smoke.py +0 -0
  97. {pocketsync-0.10.0 → pocketsync-0.10.1}/scripts/scan-secrets.py +0 -0
  98. {pocketsync-0.10.0 → pocketsync-0.10.1}/sonar-project.properties +0 -0
  99. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/__init__.py +0 -0
  100. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_cli.py +0 -0
  101. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_cli_introspection.py +0 -0
  102. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_doctor_resident_prompt.py +0 -0
  103. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_harness_registries.py +0 -0
  104. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_harness_smoke.py +0 -0
  105. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_pi_settings.py +0 -0
  106. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_qwen_skills_symlink.py +0 -0
  107. {pocketsync-0.10.0 → pocketsync-0.10.1}/tests/test_scan_secrets.py +0 -0
@@ -1,9 +1,9 @@
1
1
  # Colleague Resident — `pocketsync`
2
2
 
3
- You are a colleague session working in a clone of this template — reading
3
+ You are a colleague session working in the pocketsync repo — reading
4
4
  this file because colleague's prompt cascade resolves it here, not because
5
5
  `culture.yaml` selected you. That declaration says `backend: claude`, so
6
- `CLAUDE.md` is this template's *mesh resident* prompt; colleague remains fully
6
+ `CLAUDE.md` is this repo's *mesh resident* prompt; colleague remains fully
7
7
  usable interactively over the same clone, and this file is what it loads when
8
8
  you run it. A clone that declares `backend: colleague` promotes this file to
9
9
  its resident prompt as well — the guidance below holds either way.
@@ -31,13 +31,20 @@ update this section so the docs keep matching what's actually on disk.
31
31
 
32
32
  ## What this project is
33
33
 
34
- `pocketsync` is a clonable template for AgentCulture mesh agents —
35
- an agent-first CLI, a mesh identity, the canonical skill kit, and a
36
- buildable/deployable package baseline. `CLAUDE.md` in this repo is written for
37
- a Claude Code session working *on* the repo — it is not your runtime prompt,
38
- but it is the fullest write-up of the repo's conventions if you need more
39
- context than fits here (worktree layout, memory discipline, `ask-colleague`
40
- usage, the full skill kit list).
34
+ `pocketsync` is the **sync bridge for the Pocket AI voice recorder**. It
35
+ pulls recordings, transcripts (STT), summaries and action items out of
36
+ Pocket's cloud into local disk and/or S3. That landing zone (a per-recording
37
+ directory layout plus an append-only `events.jsonl`) is the contract
38
+ [`culture-rules`](https://github.com/agentculture/culture-rules) consumes.
39
+ pocketsync never routes data further.
40
+
41
+ **Status: scaffold only.** The sync engine is *(planned)*; the build brief is
42
+ [issue #1](https://github.com/agentculture/pocketsync/issues/1). `CLAUDE.md`
43
+ is written for a Claude Code session working *on* the repo. It is not your
44
+ runtime prompt, but it is the fullest write-up of the planned architecture,
45
+ the CLI contract and the repo's conventions (worktree layout, memory
46
+ discipline, `ask-colleague` usage). Read it when a task needs more context
47
+ than fits here.
41
48
 
42
49
  ## How you work
43
50
 
@@ -49,3 +56,9 @@ usage, the full skill kit list).
49
56
  (see `docs/skill-sources.md` for the re-sync procedure).
50
57
  - Every PR bumps the version (`version-bump` skill) — CI's `version-check` job
51
58
  blocks merge otherwise.
59
+ - The repo is public: never commit tokens, recordings, transcripts or
60
+ fixtures made from real recordings. Tests run against a fake Pocket adapter
61
+ and a fake S3, with synthetic fixtures.
62
+ - Keep the CLI contract: `--json` on every verb, results to stdout and errors
63
+ to stderr, `CliError` for failures, and an `explain` catalog entry for each
64
+ new verb. Write verbs are dry-run by default and commit with `--apply`.
@@ -20,14 +20,29 @@ what the repo is and how it is laid out, not who is reading it.
20
20
 
21
21
  ## What this project is
22
22
 
23
- `pocketsync` is a clonable template for AgentCulture mesh agents —
24
- a working, minimal example of the sibling pattern every Culture agent follows:
25
- an agent-first CLI, a mesh identity, the canonical skill kit, and a
26
- buildable/deployable package baseline. It is a sibling to
27
- [`guildmaster`](https://github.com/agentculture/guildmaster) (the skills
28
- supplier), [`steward`](https://github.com/agentculture/steward) (alignment),
29
- and [`teken`](https://github.com/agentculture/teken) (the CLI scaffolder this
30
- package is cited from).
23
+ `pocketsync` is the **sync bridge for the Pocket AI voice recorder**
24
+ (<https://heypocket.com>). It pulls recordings, speech-to-text transcripts,
25
+ summaries and action items out of Pocket's cloud into a store we own: local
26
+ disk and/or S3. [`culture-rules`](https://github.com/agentculture/culture-rules)
27
+ workflows route the data onward from that landing zone, so its layout and the
28
+ append-only `events.jsonl` handoff stream are a public contract (draft schema
29
+ in `README.md`).
30
+
31
+ **Status: scaffold only.** The repo is still the `culture-agent-template`
32
+ scaffold renamed to `pocketsync`. The sync engine, Pocket adapter, sinks and
33
+ events are *(planned)*, and none of that code exists yet. The build brief is
34
+ [issue #1](https://github.com/agentculture/pocketsync/issues/1). Its first
35
+ open question is whether Pocket can be accessed at all: no official API is
36
+ known, and the community approach uses a reverse-engineered API with an
37
+ hourly-expiring Firebase token. If you are asked about Pocket API access,
38
+ report what is verified and what is not.
39
+
40
+ Siblings: [`guildmaster`](https://github.com/agentculture/guildmaster)
41
+ (skills supplier), [`steward`](https://github.com/agentculture/steward)
42
+ (alignment), [`teken`](https://github.com/agentculture/teken) (the CLI
43
+ scaffolder this package is cited from), `culture-rules` (the downstream
44
+ consumer), and [`events-cli`](https://github.com/agentculture/events-cli)
45
+ (the optional MQTT event bus).
31
46
 
32
47
  ## Four harnesses, four files, no shared base
33
48
 
@@ -57,7 +72,7 @@ agents:
57
72
  backend: claude
58
73
  ```
59
74
 
60
- This template's *mesh* resident runs on `backend: claude`, so `CLAUDE.md` is
75
+ This repo's *mesh* resident runs on `backend: claude`, so `CLAUDE.md` is
61
76
  the live resident prompt. A Pi session working in a clone of this repo is a
62
77
  **local tool session**, not the mesh resident — it reads this file and
63
78
  `.pi/SYSTEM.md` regardless of what `culture.yaml` declares, and running `pi`
@@ -65,18 +80,19 @@ here neither requires nor changes that declaration.
65
80
 
66
81
  (A clone that wants `associate` as its *mesh* resident declares
67
82
  `backend: colleague` with `model: associate` — see `docs/skill-sources.md`.
68
- That is a per-clone choice; this template does not ship it.)
83
+ That is a per-clone choice; this repo does not ship it.)
69
84
 
70
85
  ## Layout (what you can read/find/summarize here)
71
86
 
72
87
  ```text
73
- pocketsync/ agent-first CLI (cited from teken's python-cli reference)
88
+ pocketsync/ agent-first CLI (cited from teken's python-cli reference)
74
89
  cli/ parser, error/output contract, _commands/ (verbs)
75
90
  explain/ markdown catalog for `explain`
76
91
  tests/ pytest smoke + introspection tests
92
+ scripts/ scan-secrets.py, harness-smoke.py (CI gates)
77
93
  .claude/skills/ vendored guildmaster skill kit (cite-don't-import)
78
- docs/skill-sources.md skill provenance ledger
79
- culture.yaml mesh identity (suffix + backend)
94
+ docs/ skill provenance, harness selection/automation contract
95
+ culture.yaml mesh identity (suffix + backend) + gate commands
80
96
  .github/workflows/ tests + deploy (PyPI Trusted Publishing)
81
97
  ```
82
98
 
@@ -85,9 +101,11 @@ culture.yaml mesh identity (suffix + backend)
85
101
  - The vendored skills under `.claude/skills/` are cited **verbatim** from
86
102
  guildmaster — never propose editing their scripts; the fix belongs upstream
87
103
  (`docs/skill-sources.md` has the re-sync procedure).
88
- - The package/CLI name (`pocketsync` / `pocketsync`)
89
- is hard-coded in roughly a hundred places; a rename is a `git grep` sweep,
90
- not a hand edit (see `CLAUDE.md`'s "Cloning this template" section).
104
+ - The repo is public. Never quote, copy or summarize real Pocket
105
+ credentials, recordings or transcripts into anything that could be
106
+ committed; test fixtures are synthetic by rule.
107
+ - Write verbs (planned) are dry-run by default and commit only with
108
+ `--apply`, so a dry-run is the safe way to answer "what would sync do?".
91
109
  - Every PR bumps the version (`version-bump` skill); CI's `version-check` job
92
110
  blocks merge otherwise.
93
111
  - This file describes the repo **as it exists on disk today**. If you are
@@ -5,6 +5,15 @@ 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.10.1] - 2026-10-14
9
+
10
+ ### Changed
11
+
12
+ - `CLAUDE.md` re-initialized from the seed into a full runtime prompt for the Pocket sync agent: the domain and lane, the issue #1 build brief and its verify-the-API-first premise, the planned adapter/sink/events architecture (marked planned), the CLI contract, the CI gates, and the repo conventions.
13
+ - `README.md` now describes pocketsync rather than the template: the lane and non-goals, the planned CLI verbs, and a draft landing-zone layout and `events.jsonl` handoff contract for culture-rules, plus a credentials and privacy section.
14
+ - `QWEN.md`, `AGENTS.override.md` and `AGENTS.colleague.md` updated to the same project description and status.
15
+ - `learn`, `explain`, `overview` and `--help` now describe the Pocket sync purpose instead of the template; `overview` names `CLAUDE.md` (not `AGENTS.colleague.md`) as the identity prompt.
16
+
8
17
  ## [0.10.0] - 2026-10-06
9
18
 
10
19
  ### Added
@@ -0,0 +1,236 @@
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
+ `pocketsync` is the **sync bridge for the Pocket AI voice recorder**
8
+ (<https://heypocket.com>). Pocket records audio and produces speech-to-text
9
+ transcripts, summaries and action items in **its own cloud**. pocketsync pulls
10
+ that data out into a store we own — **local disk** and/or **S3** (or any
11
+ S3-compatible bucket) — and stops there.
12
+
13
+ That landing zone is the whole lane. Fan-out to Notion, the mesh, email,
14
+ eidetic memory and so on is the job of
15
+ [`culture-rules`](https://github.com/agentculture/culture-rules) workflows,
16
+ which trigger on pocketsync's output. So the output layout and the event
17
+ stream are a **public contract** other code builds against; treat changes to
18
+ them like API changes.
19
+
20
+ Non-goals (from the build brief): no re-running STT (Pocket's transcript is
21
+ the source of truth; at most we store the audio), no routing to downstream
22
+ destinations, no UI.
23
+
24
+ ## Status — scaffold only, build brief is issue #1
25
+
26
+ As of the last update to this file, the repo is still the
27
+ `culture-agent-template` scaffold renamed to `pocketsync`. **No Pocket, sink,
28
+ sync or event code exists yet.** The only verbs on disk are the agent-first
29
+ identity/introspection verbs (`whoami`, `learn`, `explain`, `overview`,
30
+ `doctor`, `cli overview`).
31
+
32
+ [Issue #1](https://github.com/agentculture/pocketsync/issues/1) is the build
33
+ brief and the requirements baseline. Read it before designing anything.
34
+ `gh issue view 1` fails on the deprecated Projects-classic field, so use:
35
+
36
+ ```bash
37
+ gh issue view 1 --repo agentculture/pocketsync --json title,body,comments
38
+ ```
39
+
40
+ **Verify the API premise first.** guildmaster found no official Pocket
41
+ developer API or bulk export. The only known path is a community skill that
42
+ reads `app.heypocket.com` through a **reverse-engineered** API, authenticated
43
+ with a **Firebase ID token** from a logged-in browser session. That token
44
+ expires about every hour. The first deliverable in #1 is a report on:
45
+
46
+ - any official API, webhook, integration (Zapier, Notion, …) or export;
47
+ - whether a Firebase **refresh token** can be persisted so sync runs
48
+ unattended;
49
+ - Terms-of-Service limits on automated access. Flag them; don't ignore them.
50
+
51
+ Prefer an official path, even a narrow one, if one exists.
52
+
53
+ For new feature work the vendored devague chain applies: `/scope` → `/think`
54
+ → `/challenge` (optional) → `/spec-to-plan` → `/assign-to-workforce` (or
55
+ build directly).
56
+
57
+ ## Target architecture (planned — from #1, adjust once reality is verified)
58
+
59
+ None of this exists yet. It's the shape the brief asks for, so new code should
60
+ slot into it rather than invent a parallel one.
61
+
62
+ - **Source adapter: Pocket**, behind an interface. List recordings since a
63
+ cursor. Fetch each recording's transcript (with speakers and timestamps if
64
+ available), summary, action items and metadata, plus the audio behind a
65
+ flag because it's large. The Pocket API is unofficial and *will* break, so
66
+ nothing outside the adapter may depend on its wire format. Tests use a
67
+ **fake Pocket adapter**.
68
+ - **Sink adapters: `local` and `s3`**, behind one interface so more can be
69
+ added. Proposed per-recording layout:
70
+ `<root>/<YYYY>/<MM>/<recording-id>/{meta.json, transcript.json, transcript.md, summary.md, audio.*}`.
71
+ Writes are **atomic, with `meta.json` written last**, so a reader that sees
72
+ `meta.json` never sees a half-written recording. S3 uses the standard AWS
73
+ credential chain (env, profile or role) and no bespoke secret store. Tests
74
+ use a **fake S3** (moto or a stub).
75
+ - **Incremental, idempotent sync.** Persisted cursor/state. A re-run with no
76
+ remote changes is a no-op. Pocket may re-process a transcript or summary, so
77
+ updates are detected by **content hash** and re-synced.
78
+ - **Handoff contract: `events.jsonl`.** An append-only file in the sink root
79
+ with one event per new or updated recording, carrying the recording id, sink
80
+ paths, content hash and `created`/`updated`. A hook or MQTT publish via
81
+ [`events-cli`](https://github.com/agentculture/events-cli) is an optional
82
+ addition. The schema is documented in `README.md` and is what culture-rules
83
+ builds against. #1 also asks for one example culture-rules rule that
84
+ consumes it.
85
+ - **CLI verbs**: `auth` (set up and verify credentials), `list` (remote
86
+ recordings plus sync status), `sync [--to local|s3] [--since …]
87
+ [--with-audio] [--apply]`, `watch` (poll loop or daemon), `status` (cursor,
88
+ last run, errors). **Write verbs are dry-run by default and commit only with
89
+ `--apply`**, and every verb takes `--json`.
90
+
91
+ Runtime dependencies are currently **zero** (`dependencies = []`). A
92
+ third-party client such as `boto3` should go behind an optional extra (for
93
+ example `pocketsync[s3]`) and be imported lazily, so the core and the
94
+ `local` sink stay dependency-free. Test-only libraries such as `moto` go in
95
+ the `dev` dependency group.
96
+
97
+ ## Constraints that bite
98
+
99
+ - **This repo is public.** Never commit tokens, recordings, transcripts, or
100
+ fixtures derived from real recordings. Test fixtures are **synthetic**.
101
+ Credentials live in env vars, the keyring or a git-ignored config.
102
+ - **`scripts/scan-secrets.py` runs in CI** (lint job). It flags token-shaped
103
+ strings and secret-ish `key = value` assignments in any tracked file. It
104
+ also flags **non-localhost URLs under `url`/`host`/`endpoint`/`baseUrl`
105
+ keys in any file that parses as JSON**. A Pocket base URL in Python source
106
+ is fine. The same URL in a committed JSON fixture or config fails CI, so
107
+ synthetic JSON fixtures should use `localhost` or omit URL keys.
108
+ - PyPI/TestPyPI Trusted Publishing for `pocketsync` still has to be
109
+ registered by the operator. Until then the publish jobs in
110
+ `.github/workflows/publish.yml` fail on the PyPI side, which is expected.
111
+
112
+ ## Commands
113
+
114
+ ```bash
115
+ uv sync # install (incl. dev group)
116
+ uv run pytest -n auto # full suite (what culture.yaml's gate runs)
117
+ uv run pytest tests/test_cli.py::test_whoami_json -v # a single test
118
+ uv run pytest -n auto --cov=pocketsync --cov-report=term # with coverage (fail_under = 60)
119
+
120
+ uv run black pocketsync tests && uv run isort pocketsync tests # format (line length 100)
121
+ uv run flake8 pocketsync tests
122
+ uv run bandit -c pyproject.toml -r pocketsync
123
+ markdownlint-cli2 "**/*.md" "#node_modules" "#.local" "#.claude/skills" "#.teken"
124
+ python3 scripts/scan-secrets.py # CI secret/endpoint gate
125
+ uv run teken cli doctor . --strict # agent-first rubric gate (CI)
126
+ uv run python scripts/harness-smoke.py --stage config # four-harness config check (CI)
127
+
128
+ uv run pocketsync --help # the CLI
129
+ ```
130
+
131
+ CI (`.github/workflows/tests.yml`) runs: `test` (pytest with coverage, plus
132
+ the SonarCloud scan when `SONAR_TOKEN` is set), `lint` (all of the lint
133
+ commands above), `harness-smoke`, and on PRs `version-check`.
134
+
135
+ ## How the CLI is built
136
+
137
+ The CLI is cited (cite-don't-import) from teken's `python-cli` reference.
138
+ Read several files together to see the contract:
139
+
140
+ - **Registration.** Each verb or noun is a module in
141
+ `pocketsync/cli/_commands/` exposing `register(sub)`. It is wired in by
142
+ hand in `_build_parser()` in `pocketsync/cli/__init__.py`. Handlers return
143
+ `None`/`int`, or raise `CliError`.
144
+ - **Error contract.** Every failure raises `CliError(code, message,
145
+ remediation)` from `pocketsync/cli/_errors.py`. `_dispatch()` wraps any
146
+ other exception into one, so no traceback ever reaches the user.
147
+ `_CliArgumentParser` routes argparse errors through the same path. It scans
148
+ raw argv for `--json` *before* parsing, so even parse errors render as JSON.
149
+ Exit codes: `0` success, `1` user error, `2` environment error, `3+`
150
+ reserved.
151
+ - **Output contract.** `pocketsync/cli/_output.py`: results go to stdout via
152
+ `emit_result`, and errors and diagnostics go to stderr via `emit_error` /
153
+ `emit_diagnostic`. Never mix them. Text-mode errors print `error:` plus a
154
+ `hint:` line, which the rubric requires.
155
+ - **`explain` catalog.** `pocketsync/explain/catalog.py` maps command-path
156
+ tuples to markdown. Every new verb or noun needs an entry, and
157
+ `tests/test_cli.py` checks that every catalog path resolves. When adding
158
+ verbs, also update `learn.py` (text and JSON command map) and the `_VERBS`
159
+ list in `overview.py`.
160
+ - **Rubric.** `teken cli doctor . --strict` enforces things like `--json` on
161
+ every command, `learn` content, and any noun with action verbs exposing
162
+ `overview` (that's why the `cli` noun exists). Planned nouns must keep it
163
+ green.
164
+ - **Identity.** `whoami`/`doctor` find `culture.yaml` by walking up from
165
+ the module file (not the cwd) and parse it without a YAML dependency. In a
166
+ wheel install there is no `culture.yaml`, so `doctor` reports a single info
167
+ check and exits 0.
168
+
169
+ ## Identity and the four harness prompt files
170
+
171
+ `culture.yaml` declares `suffix: pocketsync`, `backend: claude`, so **this
172
+ file is the mesh resident prompt**. `pocketsync doctor` and `steward doctor`
173
+ check **prompt-file-present** and **backend-consistency** (`claude` ↔
174
+ `CLAUDE.md`).
175
+
176
+ There are four harnesses, each reading exactly one root prompt, with
177
+ deliberately **no shared `AGENTS.md`**. `harness-smoke.py` fails CI if a bare
178
+ `AGENTS.md` appears.
179
+
180
+ | Harness | File(s) |
181
+ |---------|---------|
182
+ | Claude Code | `CLAUDE.md` (this file) |
183
+ | Pi / associate | `AGENTS.override.md` (context) + `.pi/SYSTEM.md` (system prompt) |
184
+ | colleague | `AGENTS.colleague.md` |
185
+ | Qwen Code | `QWEN.md` |
186
+
187
+ When the project's description or state changes, **update all four, not just
188
+ this one**. The other three summarize this file and must not drift. The live
189
+ harness probes in `docs/harness-invocations.yaml` assert on file content:
190
+
191
+ - Claude and Qwen are asked whether their file "describes this project as
192
+ pocketsync";
193
+ - Pi is asked about the lobes-cli `associate` attribution, which must stay in
194
+ `.pi/SYSTEM.md` only.
195
+
196
+ `culture.yaml` selects only the *mesh resident*; all four harnesses stay
197
+ usable interactively (see `docs/harness-selection.md`).
198
+
199
+ The `gate` section of `culture.yaml` (`uv sync`, then `uv run pytest -n
200
+ auto`) is how external tooling sets up and tests this repo. Keep it accurate
201
+ if the setup or test command changes.
202
+
203
+ ## Conventions
204
+
205
+ - **Every PR bumps the version**, even docs, config or CI: use the
206
+ `version-bump` skill, which updates `pyproject.toml` and `CHANGELOG.md`.
207
+ The `version-check` CI job blocks merge otherwise. `__version__` is read
208
+ from package metadata, so `pyproject.toml` is the single source.
209
+ - **PRs go through the `cicd` skill** (`devex pr` plus SonarCloud gating;
210
+ needs `devex` on PATH). Posts are signed `- pocketsync (Claude)`. The
211
+ `cicd`/`communicate` scripts append that automatically from
212
+ `culture.yaml`, so don't sign bodies they post.
213
+ - **Vendored skills are cited verbatim.** Don't reformat or edit anything
214
+ under `.claude/skills/`. Fixes go upstream, then re-sync per
215
+ `docs/skill-sources.md`. `.qwen/skills`, `.pi/skills` and
216
+ `.colleague/skills` are symlinks to `.claude/skills`, and tests enforce
217
+ that.
218
+ - **Reach for `ask-colleague` reflexively.** Run `review` on a non-trivial
219
+ committed diff before opening a PR, and `explore` for a fresh read of an
220
+ unfamiliar area. Both are read-only, in a throwaway worktree. `write
221
+ --apply` / `write --pr` need the user's go-ahead. Treat its output as a
222
+ second opinion to verify, not authority.
223
+ - **Worktrees you create go in `../.worktrees.pocketsync/<name>/`** with a
224
+ work-scoped branch prefix (`sync/sinks`, not `agent/t2`). The vendored
225
+ `assign-to-workforce` skill's example uses `../worktrees/` and
226
+ `agent/<task-id>`; override both. Remove a worktree with `git worktree
227
+ remove`. `ask-colleague`'s own temporary worktrees under `$TMPDIR` are
228
+ exempt, because they clean themselves up.
229
+ - **Memory: `/recall` before, `/remember` after.** The wrappers default to
230
+ scope `pocketsync` with `--visibility public`, which lands records in the
231
+ committed in-repo store `.eidetic/memory/`. Use `--visibility private` for
232
+ anything that must stay in `$HOME`, which includes anything about
233
+ credentials or real recordings. Store decisions and gotchas, not what the
234
+ repo already records.
235
+ - Keep docs grounded in what is on disk. Mark anything not yet built as
236
+ *(planned)*, as this file does.
@@ -0,0 +1,202 @@
1
+ Metadata-Version: 2.5
2
+ Name: pocketsync
3
+ Version: 0.10.1
4
+ Summary: Sync Pocket voice-recorder recordings, transcripts (STT) and summaries from the Pocket cloud to local disk or S3 - a durable landing zone that culture-rules workflows fan out to anywhere.
5
+ Project-URL: Homepage, https://github.com/agentculture/pocketsync
6
+ Project-URL: Issues, https://github.com/agentculture/pocketsync/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
+ # pocketsync
19
+
20
+ Sync Pocket voice-recorder recordings, transcripts (STT) and summaries from the
21
+ Pocket cloud to local disk or S3 - a durable landing zone that culture-rules
22
+ workflows fan out to anywhere.
23
+
24
+ ## What it does
25
+
26
+ [Pocket](https://heypocket.com) records audio and produces transcripts,
27
+ summaries and action items in its own cloud. pocketsync copies that data into
28
+ a store you own:
29
+
30
+ - **local disk** (a directory tree), and/or
31
+ - **S3** (or any S3-compatible bucket).
32
+
33
+ That is the whole job. pocketsync does not send the data anywhere else.
34
+ [`culture-rules`](https://github.com/agentculture/culture-rules) workflows
35
+ pick it up from the landing zone and route it onward (Notion, the Culture
36
+ mesh, email, eidetic memory, …). The landing-zone layout and the event stream
37
+ below are the stable contract they build against.
38
+
39
+ Non-goals: re-running speech-to-text (Pocket's transcript is the source of
40
+ truth), routing data downstream, and any UI.
41
+
42
+ ## Status
43
+
44
+ **Early: the sync engine is not built yet.** Today the package is the
45
+ agent-first CLI scaffold (identity and introspection verbs only). The build
46
+ brief is [issue #1](https://github.com/agentculture/pocketsync/issues/1).
47
+
48
+ **Pocket API access is unverified.** No official Pocket developer API or bulk
49
+ export has been found so far. The known community approach uses a
50
+ reverse-engineered `app.heypocket.com` API with a short-lived (about one hour)
51
+ Firebase ID token. Before the sync engine is built, issue #1 calls for a
52
+ report on:
53
+
54
+ - whether an official path exists;
55
+ - whether authentication can persist unattended;
56
+ - what Pocket's Terms of Service say about automated access.
57
+
58
+ ## Planned CLI
59
+
60
+ Write verbs are dry-run by default and commit only with `--apply`. Every verb
61
+ takes `--json`.
62
+
63
+ | Verb | What it will do |
64
+ |------|-----------------|
65
+ | `pocketsync auth` | Set up and verify Pocket credentials. |
66
+ | `pocketsync list` | List remote recordings and their sync status. |
67
+ | `pocketsync sync [--to local\|s3] [--since …] [--with-audio] [--apply]` | Incrementally sync recordings into a sink. |
68
+ | `pocketsync watch` | Poll loop or daemon around `sync`. |
69
+ | `pocketsync status` | Show the cursor, the last run and errors. |
70
+
71
+ Sync is incremental and idempotent. A persisted cursor means a re-run with no
72
+ remote changes does nothing. A content hash detects when Pocket re-processes a
73
+ transcript or summary, and that recording is re-synced.
74
+
75
+ ## Landing-zone contract (draft)
76
+
77
+ > **Draft.** This is the shape proposed in issue #1. It is not implemented
78
+ > yet and may change before the first release that writes data. Once
79
+ > released, changes to it are breaking changes for culture-rules consumers.
80
+
81
+ ### Layout
82
+
83
+ One directory per recording, in the same layout on local disk and on S3:
84
+
85
+ ```text
86
+ <root>/
87
+ events.jsonl # append-only handoff log (below)
88
+ <YYYY>/<MM>/<recording-id>/
89
+ meta.json # manifest — written LAST
90
+ transcript.json # speakers + timestamps where available
91
+ transcript.md
92
+ summary.md
93
+ audio.* # only with --with-audio
94
+ ```
95
+
96
+ Every file is written atomically, and `meta.json` is written last. A consumer
97
+ that sees `meta.json` can rely on the rest of the recording being complete.
98
+
99
+ ### `events.jsonl`
100
+
101
+ One JSON object per line, appended for each recording that is new or has
102
+ changed. Each event carries at least:
103
+
104
+ | Field | Meaning |
105
+ |-------|---------|
106
+ | recording id | Pocket's identifier for the recording. |
107
+ | sink paths | Where the recording's files landed. |
108
+ | content hash | Hash of the synced content; a new hash means an update. |
109
+ | `created` / `updated` | Timestamps for the recording / this sync. |
110
+
111
+ The exact field names will be fixed in this README when the sync engine
112
+ ships. Optionally, the same events may also be published over MQTT via
113
+ [`events-cli`](https://github.com/agentculture/events-cli).
114
+
115
+ ## Credentials and privacy
116
+
117
+ This repository is public. Pocket credentials belong in environment variables,
118
+ the OS keyring, or a git-ignored config file. They are never committed. S3
119
+ access uses the standard AWS credential chain (environment, profile or
120
+ instance role). Tests use a fake Pocket adapter, a fake S3, and synthetic
121
+ fixtures only, never data from real recordings.
122
+
123
+ ## Quickstart (development)
124
+
125
+ ```bash
126
+ uv sync
127
+ uv run pytest -n auto # run the test suite
128
+ uv run pocketsync whoami # identity from culture.yaml
129
+ uv run pocketsync learn # self-teaching prompt (add --json)
130
+ uv run teken cli doctor . --strict # the agent-first rubric gate CI runs
131
+ ```
132
+
133
+ ## CLI available 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
+ Every command supports `--json`. Results go to stdout, errors/diagnostics to
145
+ stderr (never mixed). Exit codes: `0` success, `1` user error, `2` environment
146
+ error, `3+` reserved.
147
+
148
+ ## As a Culture mesh agent
149
+
150
+ pocketsync is also an AgentCulture mesh agent, provisioned from
151
+ `culture-agent-template`:
152
+
153
+ - **A mesh identity**: `culture.yaml` (`suffix: pocketsync`,
154
+ `backend: claude`) and the matching resident prompt, `CLAUDE.md`.
155
+ - **The guildmaster skill kit** under `.claude/skills/`, vendored
156
+ cite-don't-import. See [`docs/skill-sources.md`](docs/skill-sources.md).
157
+ - **CI and deploy**: pytest, lint, a secret scan, the agent-first rubric
158
+ gate, a four-harness smoke check, and PyPI Trusted Publishing.
159
+
160
+ ### Prompt files by harness
161
+
162
+ Four harnesses, four root files, no shared base. Each file is read by exactly
163
+ one harness:
164
+
165
+ | Harness | File(s) |
166
+ |---------|---------|
167
+ | Claude Code | [`CLAUDE.md`](CLAUDE.md) |
168
+ | Pi / associate | [`AGENTS.override.md`](AGENTS.override.md) + [`.pi/SYSTEM.md`](.pi/SYSTEM.md) |
169
+ | colleague | [`AGENTS.colleague.md`](AGENTS.colleague.md) |
170
+ | Qwen Code | [`QWEN.md`](QWEN.md) |
171
+
172
+ `CLAUDE.md` is the fullest write-up of the repo's conventions; read it first.
173
+ There is intentionally **no `AGENTS.md`**, because a shared base would leak
174
+ Claude-specific guidance into the other harnesses.
175
+
176
+ `culture.yaml`'s `backend` selects only the **mesh resident**, the one prompt
177
+ the Culture daemon loads. It does not limit which harness you can run
178
+ interactively in the clone; all four stay live. See
179
+ [`docs/harness-selection.md`](docs/harness-selection.md) and
180
+ [`docs/automation-contract.md`](docs/automation-contract.md).
181
+
182
+ ### The `gate` section
183
+
184
+ `culture.yaml` carries a top-level `gate` section that declares how to set up
185
+ and test this repo, so tooling (for example a PR-fixer that re-runs the checks
186
+ before pushing) needs no per-repo knowledge:
187
+
188
+ ```yaml
189
+ gate:
190
+ setup:
191
+ - [uv, sync]
192
+ test:
193
+ - [uv, run, pytest, -n, auto]
194
+ ```
195
+
196
+ `setup` and `test` are each a list of commands, and each command is an argv
197
+ list (never a shell string), run in order from the repo root. Culture's loader
198
+ ignores unknown top-level keys, so the section is safe alongside `agents`.
199
+
200
+ ## License
201
+
202
+ Apache 2.0 — see [`LICENSE`](LICENSE).