- Added priority markers (e.g., "Priority: X of 12") to existing queued TODOs like audit, changelog, profile, scaffold. - Introduced new detailed TODO markdowns for agent integrations: cnotes, git-chglog, gotools, make, pprof, rg, tea. - Enhances planning for grokkit agent tooling ecosystem.
2.4 KiB
2.4 KiB
grokkit agent cnotes integration
Priority: 6 of 12
Description: Wrappers for your cnotes CLI logging suite. Allows Grok to automatically log coding sessions, notes, progress during agent workflows (e.g., "start work on feature", "log bug found").
Problem It Solves
Developers track time/effort manually. Integrate cnotes (cnadd/cndump/etc.) for AI-assisted logging: timestamps, descriptions, stats—seamless with code edits.
Benefits
- Automated logging: Grok logs at key points (start/edit/commit).
- Queryable: Search/dump stats via AI ("Show time on agent tasks today").
- Safe: Append-only (
cnadd), read-only queries (cnfind/cncount); no deletes. - Terminal-native: Fast C impl, no deps.
- Workflow boost: "Refactor → log changes → stats".
Agent Tool Examples
grokkit agent "Start logging session, fix main.go, log completion"
# Grok: cnadd "start: agent refactor main.go" → edits → cnadd "done: fixed errors"
grokkit agent "Log today's coding stats before planning"
# Grok: cncount → cnfind "today" → "2h on edits, 3 sessions"
High-Level Implementation
- Detect cnotes: Run
cnhelporwhich cnotes. - Tool schemas:
log_note(message: string) → oklist_notes(filter?: string) → stringsession_stats() → string
- Wrappers in
internal/tools/cnotes.go:func LogNote(ctx context.Context, args map[string]any) (string, error) - Agent integration: Auto-log on milestones; user-prompted.
- Safety:
- Only
cnadd/cndump/cnfind/cncount. - Preview log message.
- Config:
[tools.cnotes.enabled].
- Only
- Parsing: Stdout JSON? Or simple text.
Flags / Config
| Key | Description |
|---|---|
tools.cnotes.enabled |
Enable cnotes tools |
--auto-log |
Log start/end automatically |
Implementation Notes
- Commands: cnadd (log), cndump (all), cnfind (search), cncount (stats), cndel (archive—whitelist carefully).
- Extend agent: Tool calls in loop.
- Errors: Custom CnotesError.
- Tests: Mock
exec.Command, table-driven. - Effort: Low (~150 LOC). Simple exec wrappers.
- Prereq: cnotes in PATH (
cnhelpverifies).
ROI
High. Personal logging elevates from code tool to dev productivity hub:
| Stage | Covered |
|---|---|
| Logging | cnotes ← new |
| Code | agent ✓ |
| Repo | tea (sibling) |
Quantifiable: Track hours/features automatically.