Add tgc agent entrypoint with command registry and next-actions triage#10
Add tgc agent entrypoint with command registry and next-actions triage#10speech115 wants to merge 3 commits into
Conversation
… source evidence Pre-existing Codex WIP on this branch, committed as found (tests green): doctor profiles (core vs maintenance), telegram-mirror-fast status/read/search, source evidence/routing refinements, telecrawl gap policy updates, and the matching docs/tests.
- command_registry.py: single source of truth for all bin/ commands
(purpose, level, safety, example); unit-tested against bin/ and AGENTS.md
- tgc next: doctor findings mapped to prioritized executable drill-down
commands, repair-plan step appended on blocking findings
- tgc commands: human table / --json registry dump
- AGENTS.md compressed to intent->command table; deep prose moved to
docs/agents/{doctor-triage,mcp-surface,telemetry,doc-sync}.md
- release-gate (run) vs release-gates (audit) naming documented
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
mirror_fast.py imports yaml; CI installs only pytest, so test collection failed with ModuleNotFoundError on ubuntu runners. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6aa829818f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| from pathlib import Path | ||
| from typing import Any | ||
|
|
||
| import yaml |
There was a problem hiding this comment.
Declare PyYAML or avoid importing it
In a fresh install of this control-plane package, telegram-mirror-fast now fails at import time with ModuleNotFoundError: No module named 'yaml' because control-plane/pyproject.toml does not declare any runtime dependencies. This blocks the new wrapper and also prevents the test module from being collected unless PyYAML happens to be installed globally; either add the dependency to the package metadata or parse the simple channel config without an undeclared library.
Useful? React with 👍 / 👎.
| if start and end and start > end: | ||
| raise ValueError("--date-from must be before or equal to --date-to") | ||
|
|
||
| messages: deque[dict[str, Any]] = deque(maxlen=max(limit, 0) or None) |
There was a problem hiding this comment.
Apply read limits after sorting all matches
When read matches more than one configured target, this deque applies --limit while iterating config/file order and only sorts afterward, so older rows from a later-matched export can evict newer rows from an earlier export before the date ordering is computed. Since _matches is substring-based and the response reports matched_targets, broad queries can silently omit the most relevant messages; collect matching rows first, sort by date/id, then slice to the requested limit.
Useful? React with 👍 / 👎.
What
Agent-ergonomics upgrade for the control plane: one entrypoint instead of doc archaeology across 28 wrappers.
tgc next --json— runs the core doctor and returns prioritized actions with exact drill-down commands; blocking findings come first and automatically append the dry-runtelegram-repair-planstep.tgc commands --json— machine-readable registry of every public command (purpose, level: daily/live/mirror/drilldown/maintenance/release, safety class, example).command_registry.py— single source of truth; unit tests fail closed when abin/wrapper and the registry drift apart, or when AGENTS.md stops documenting a daily/live command.docs/agents/{doctor-triage,mcp-surface,telemetry,doc-sync}.md.telegram-release-gate(runs gates) vstelegram-release-gates(audits config) naming documented.Also lands the pending control-plane work from the local branch: doctor core/maintenance profiles,
telegram-mirror-faststatus/read/search, and source-evidence routing refinements.Verification
python -m pytest -q -m 'not integration': 131 passed.telegram-release-gate: exit 0.test_control_plane.pyfailures as cleanmainunder the same local simulation — no new failures introduced.🤖 Generated with Claude Code