agentleFS
clovericcloveric/tarocub/CLAUDE.md

tarocub

CLAUDE.md20 starsChanged 6 months agoMITView on GitHub

Before modifying Telegram flow, Feishu/Lark flow, bus flow, state/config handling, usage/budget/audit logic, or file delivery, read: That file is the source of truth for codebase navigation and test selection. Static Telegram transport rules belong in instance-level ~/.cctb/<instance>/agent.md, not in resumed project AGENTS.md or CLAUDE.md. If those rules change, update docs/telegram-instance-agent.md and sync affected instance agent.md files. This repository is not in maintenance mode. The active objective is: make TaroCub a reliable local control surface for Codex, Claude Code, Kimi Code,…

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. cloveric/cc-telegram-bridge★ 20100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

Show its rules and text

We split this CLAUDE.md into the rules it gives an agent

18 rules. About 0 are common, 12 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before modifying Telegram flow, Feishu/Lark flow, bus flow, state/config handling, usage/budget/audit logic, or file delivery, read:

    line 5
  2. Distinctive:

    Do not treat "feature implemented" as "work complete" unless the current milestone has been verified end-to-end.

    line 20
  3. Very specific:

    When the operator says "commit and release", do not stop at a commit, tag, or GitHub Release.

    line 24
  4. Distinctive:

    Commit the intended changes without unrelated runtime state or secrets.

    line 26
  5. Distinctive:

    Create or update the GitHub Release with accurate notes.

    line 27
  6. Very specific:

    Do not include external package-registry publishing in the release flow.

    line 30
  7. Distinctive:

    When you feel the urge to stop, summarize, or hand back partially-finished work:

    line 34
  8. Very specific:

    Run ./scripts/pre-complete-hook.sh (or .\scripts\pre-complete-hook.ps1 on Windows)

    line 36
  9. Distinctive:

    If it fails, fix the failures

    line 37
  10. Distinctive:

    If it passes but known parity/stability gaps remain, continue with the highest-value next task

    line 38
  11. Distinctive:

    Do not stop just because:

    line 43
  12. Distinctive:

    Before claiming meaningful progress, prefer evidence over assertion:

    line 60
  13. Distinctive:

    When choosing the next task without asking:

    line 68
  14. Very specific:

    Test both the response-text tag path ([send-file:] / [send-image:], all engines) and the Codex telegram-out auto-delivery path.

    line 89
  15. Very specific:

    Never break the deliverTelegramResponse function without re-running its test cases (tests/telegram-response-delivery.test.ts, see commit …

    line 93
  16. Distinctive:

    Before committing or pushing, verify that none of the following appear in code, docs, or examples:

    line 114
  17. Distinctive:

    Run this check before pushing:

    line 123
  18. Distinctive:

    If it matches anything, fix before committing.

    line 131

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

TaroCub Instructions

Read First

Before modifying Telegram flow, Feishu/Lark flow, bus flow, state/config handling, usage/budget/audit logic, or file delivery, read:

  • docs/entrypoint-map.md
  • docs/telegram-instance-agent.md when changing static Telegram transport instructions

That file is the source of truth for codebase navigation and test selection.

Static Telegram transport rules belong in instance-level ~/.cctb/<instance>/agent.md, not in resumed project AGENTS.md or CLAUDE.md. If those rules change, update docs/telegram-instance-agent.md and sync affected instance agent.md files.

Mission

This repository is not in maintenance mode. The active objective is:

make TaroCub a reliable local control surface for Codex, Claude Code, Kimi Code, and Antigravity across Telegram and Feishu/Lark, keeping parity where possible and using each platform's native strengths where it is better

Do not treat "feature implemented" as "work complete" unless the current milestone has been verified end-to-end.

Release Rule

When the operator says "commit and release", do not stop at a commit, tag, or GitHub Release. A complete TaroCub release requires:

  1. Commit the intended changes without unrelated runtime state or secrets.
  2. Create or update the GitHub Release with accurate notes.
  3. Restart and verify the Telegram and Lark fleet.

Do not include external package-registry publishing in the release flow. For Lark fleet restarts, use node dist/src/index.js lark service restart --all; do not hand-roll per-instance restart loops.

Persistence Rule

When you feel the urge to stop, summarize, or hand back partially-finished work:

  1. Run ./scripts/pre-complete-hook.sh (or .\scripts\pre-complete-hook.ps1 on Windows)
  2. If it fails, fix the failures
  3. If it passes but known parity/stability gaps remain, continue with the highest-value next task
  4. Only stop when:
    • the current milestone is actually complete, or
    • you hit a real blocker that cannot be resolved locally

Do not stop just because:

  • tests are passing
  • one bug is fixed
  • one feature was merged
  • a bot replied once

This project should be driven toward:

  • stronger service stability
  • tighter access control
  • better session continuity
  • cleaner operator experience
  • closer cross-channel parity with Telegram and Lark-native UX where Lark is stronger

Verification Standard

Before claiming meaningful progress, prefer evidence over assertion:

  • npm test
  • npm run build
  • focused runtime checks for the area touched

Operator Priorities

When choosing the next task without asking:

  1. Fix correctness or security bugs
  2. Fix duplicate replies, dropped updates, broken service lifecycle, or bad session continuity
  3. Improve operator controls and observability
  4. Improve GitHub presentation and documentation

File Delivery: Engine Differences

The engines surface files differently. The delivery layer (src/telegram/delivery.ts → response-delivery.ts) handles these formats:

EngineFormatExampleNotes
All engines[send-file:/path] / [send-image:/path] tag[send-file:/Users/me/img.png]The only response-text delivery tag. [send-image:] prefers sendPhoto.
All enginesInline text file block```file:report.txt\ncontent\n```Only honored when it is the entire response — a fenced file: block surrounded by other text is treated as an explanatory example, not an attachment.
Codextelegram-out auto-deliveryfiles written under workspace/.telegram-out/<req>/Codex's primary file path: the message-turn loop auto-delivers files the engine produced in the current request output dir.

Codex does NOT use Markdown image/link extraction. That extraction was removed: deliverTelegramResponse leaves Markdown absolute links (![alt](/path), [name](/path)) as ordinary chat text (codified by the "leaves markdown absolute links as ordinary chat text" test in tests/telegram-response-delivery.test.ts). Codex delivers files via telegram-out auto-delivery, generated-image [send-image:] tags, and the cctb send side channel — not Markdown syntax.

When modifying file delivery logic:

  1. Test both the response-text tag path ([send-file:] / [send-image:], all engines) and the Codex telegram-out auto-delivery path.
  2. File path patterns must match both Unix (/Users/...) and Windows (C:\Users\...) absolute paths.
  3. The sendFileOrPhoto helper auto-detects image extensions and uses sendPhoto (Telegram compresses) with a sendDocument fallback.
  4. Multiple images are sent one-by-one (each via sendFileOrPhoto). sendMediaGroup exists on the API but currently has zero call sites — there is no album batching today; do not assume it.
  5. Never break the deliverTelegramResponse function without re-running its test cases (tests/telegram-response-delivery.test.ts, see commit 7dad7a4).

Engine Runtime Differences

CapabilityCodexClaude CodeKimi CodeAntigravity
Runtimepersistent app-server by defaultstreaming CLI workerpersistent ACP workerone-shot print mode
Explicit resume/resume thread <id>local scan and /resume <n>ACP session/list scan and /resume session <id> via real session/loadlog scan or /resume conversation <id>
Goalbridge-native, including status/clearnative goal promptunsupported by ACP 0.31.1; reject explicitlynative goal prompt
Mid-turn steerapp-server turn/steerunsupportedunsupported by ACPunsupported
Compactbridge reset fallbacknative compactreal ACP /compact commandunsupported
Usagestructured token usage when emittedtoken and cost usageno structured per-turn usage in ACP 0.31.1no structured per-turn usage
Instructionstrusted runtime channelappended system promptworkspace .kimi-code/agents/agent.md main-agent override; prompt-scoped block only for external workspace overridesprompt-scoped bridge instructions

Kimi AskUserQuestion currently exposes only ACP-advertised option IDs. Keep it single-choice and do not add a free-text Other path unless the protocol starts providing a structured input field. See docs/kimi-engine-notes.md before changing Kimi behavior.

Security: No Private Data in Commits

Before committing or pushing, verify that none of the following appear in code, docs, or examples:

  • Bot tokens — use placeholder <bot-token-from-BotFather>
  • API keys — ghp_*, sk-ant-*, ANTHROPIC_API_KEY, etc.
  • Pairing codes — real 6-char codes like 38J63T
  • Chat IDs / User IDs — real Telegram numeric IDs
  • File paths containing usernames — use ~/ or %USERPROFILE% instead of /Users/realname/
  • .env files, access.json, session.json — must be in .gitignore

Run this check before pushing:

# NOTE: use /usr/bin/grep explicitly — an interactive shell may alias/shadow `grep`
# (ugrep with --ignore-files silently returned ZERO on a history that really had 7 hits).
# The token pattern must NOT require a literal "bot" prefix: a raw BotFather token
# (<digits>:<35 chars>) is exactly what leaked once and that form never matched.
git diff --cached | /usr/bin/grep -inE 'ghp_[A-Za-z0-9]{20,}|sk-ant-|LTAI[A-Za-z0-9]{10,}|ALIBABA_CLOUD_ACCESS_KEY|TINGWU_APP_KEY=[A-Za-z0-9]|OSSAccessKeyId|[0-9]{8,10}:[A-Za-z0-9_-]{35}|TELEGRAM_BOT_TOKEN=[A-Za-z0-9]'

If it matches anything, fix before committing.

Repo Notes

  • Cross-platform (macOS / Linux / Windows). Primary development target is macOS; Windows support is maintained.
  • One Telegram bot per instance; one Lark app/service surface for the Lark channel
  • One instance per process
  • State lives under ~/.cctb/<instance>/ (POSIX) or %USERPROFILE%\.cctb\<instance>\ (Windows)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.