From 2ed1ae85a932030c3beb134aaa94e7ca1a34f514 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 16:41:10 +0000 Subject: [PATCH] feat: implement log-summary utility as feature-proposer-agent Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- .scheduler-memory/memory-store.json | 51 +++++++++++ .../session-1771346034/retrieve.json | 18 ++++ .../session-1771346034/retrieve.ok | 1 + .../session-1771346112/store.json | 20 +++++ .scheduler-memory/session-1771346112/store.ok | 1 + features/log-summary.mjs | 85 +++++++++++++++++++ ...02-17T15-00-00Z__feature-proposer-agent.md | 16 ++++ src/context/CONTEXT_2026-02-17T15-00-00Z.md | 30 +++++++ .../DECISIONS_2026-02-17T15-00-00Z.md | 24 ++++++ .../TEST_LOG_2026-02-17T15-00-00Z.md | 25 ++++++ src/todo/TODO_2026-02-17T15-00-00Z.md | 17 ++++ ...-00Z__feature-proposer-agent__completed.md | 25 ++++++ 12 files changed, 313 insertions(+) create mode 100644 .scheduler-memory/session-1771346034/retrieve.json create mode 100644 .scheduler-memory/session-1771346034/retrieve.ok create mode 100644 .scheduler-memory/session-1771346112/store.json create mode 100644 .scheduler-memory/session-1771346112/store.ok create mode 100644 features/log-summary.mjs create mode 100644 memory-updates/2026-02-17T15-00-00Z__feature-proposer-agent.md create mode 100644 src/context/CONTEXT_2026-02-17T15-00-00Z.md create mode 100644 src/decisions/DECISIONS_2026-02-17T15-00-00Z.md create mode 100644 src/test_logs/TEST_LOG_2026-02-17T15-00-00Z.md create mode 100644 src/todo/TODO_2026-02-17T15-00-00Z.md create mode 100644 task-logs/weekly/2026-02-17T15-00-00Z__feature-proposer-agent__completed.md diff --git a/.scheduler-memory/memory-store.json b/.scheduler-memory/memory-store.json index 16b92db..8bc9e45 100644 --- a/.scheduler-memory/memory-store.json +++ b/.scheduler-memory/memory-store.json @@ -297,5 +297,56 @@ "merged_into": null, "pinned": false } + ], + [ + "fd852345-c9c5-4c5c-8076-7e16a7b90016", + { + "schema_version": 1, + "id": "fd852345-c9c5-4c5c-8076-7e16a7b90016", + "agent_id": "feature-proposer-agent", + "session_id": "session-1771346034", + "type": "batch_window", + "content": "Memory retrieval seed for weekly :: Required startup + artifacts + memory + issue capture", + "summary": "Memory retrieval seed for weekly :: Required startup + artifacts + memory + issue capture", + "tags": [ + "scheduler", + "weekly", + "retrieve" + ], + "importance": 0.4, + "embedding_id": null, + "created_at": 1771346034674, + "last_seen": 1771346034684, + "source": "scheduler-retrieve", + "ttl_days": null, + "merged_into": null, + "pinned": false + } + ], + [ + "abe5bddd-5b7a-4e18-aabf-9d517bd59a8e", + { + "schema_version": 1, + "id": "abe5bddd-5b7a-4e18-aabf-9d517bd59a8e", + "agent_id": "feature-proposer-agent", + "session_id": "session-1771346112", + "type": "batch_window", + "content": "# Memory Update - Feature Proposer Agent\n\n**Date**: 2026-02-17T15-00-00Z\n**Agent**: feature-proposer-agent\n\n## Insights\n- The `task-logs` structure is consistent and easy to parse.\n- A simple CLI tool (`features/log-summary.mjs`) was added to visualize this data.\n- This pattern of \"small, standalone utility scripts\" in `features/` is effective for incremental improvement.\n\n## Actions\n- Implemented `features/log-summary.mjs`.\n- Verified with manual execution.\n\n## Recommendations\n- Future agents could enhance this script to filter by status (e.g., show only failed runs).", + "summary": "# Memory Update - Feature Proposer Agent\n\n**Date**: 2026-02-17T15-00-00Z\n**Agent**: feature-proposer-agent\n\n## Insights\n- The `task-logs` structure is consistent and easy to parse.\n- A simple CLI tool (`features/log-summary.mjs`) was added to visualize this data.\n- This pattern …", + "tags": [ + "scheduler", + "weekly", + "store", + "insight" + ], + "importance": 0.8, + "embedding_id": null, + "created_at": 1771346112755, + "last_seen": 1771346112755, + "source": "agent-output", + "ttl_days": null, + "merged_into": null, + "pinned": false + } ] ] \ No newline at end of file diff --git a/.scheduler-memory/session-1771346034/retrieve.json b/.scheduler-memory/session-1771346034/retrieve.json new file mode 100644 index 0000000..3242e31 --- /dev/null +++ b/.scheduler-memory/session-1771346034/retrieve.json @@ -0,0 +1,18 @@ +{ + "cadence": "weekly", + "operation": "retrieve", + "runId": "session-1771346034", + "servicePath": "src/services/memory/index.js#getRelevantMemories", + "inputs": { + "agentId": "feature-proposer-agent", + "promptPath": "src/prompts/weekly/feature-proposer-agent.md", + "promptIntent": "Required startup + artifacts + memory + issue capture", + "query": "scheduler | weekly | agent | feature-proposer-agent | intent | Required startup + artifacts + memory + issue capture", + "events": 1 + }, + "outputs": { + "ingestedCount": 1, + "retrievedCount": 1 + }, + "status": "ok" +} \ No newline at end of file diff --git a/.scheduler-memory/session-1771346034/retrieve.ok b/.scheduler-memory/session-1771346034/retrieve.ok new file mode 100644 index 0000000..84b1719 --- /dev/null +++ b/.scheduler-memory/session-1771346034/retrieve.ok @@ -0,0 +1 @@ +MEMORY_RETRIEVED diff --git a/.scheduler-memory/session-1771346112/store.json b/.scheduler-memory/session-1771346112/store.json new file mode 100644 index 0000000..9f50444 --- /dev/null +++ b/.scheduler-memory/session-1771346112/store.json @@ -0,0 +1,20 @@ +{ + "cadence": "weekly", + "operation": "store", + "runId": "session-1771346112", + "servicePath": "src/services/memory/index.js#ingestEvents", + "inputs": { + "agentId": "feature-proposer-agent", + "promptPath": "src/prompts/weekly/feature-proposer-agent.md", + "promptIntent": "Required startup + artifacts + memory + issue capture", + "events": 1, + "sourceFile": "memory-updates/2026-02-17T15-00-00Z__feature-proposer-agent.md" + }, + "outputs": { + "storedCount": 1, + "summaries": [ + "# Memory Update - Feature Proposer Agent\n\n**Date**: 2026-02-17T15-00-00Z\n**Agent**: feature-proposer-agent\n\n## Insights\n- The `task-logs` structure is consistent and easy to parse.\n- A simple CLI tool (`features/log-summary.mjs`) was added to visualize this data.\n- This pattern …" + ] + }, + "status": "ok" +} \ No newline at end of file diff --git a/.scheduler-memory/session-1771346112/store.ok b/.scheduler-memory/session-1771346112/store.ok new file mode 100644 index 0000000..1e40bb6 --- /dev/null +++ b/.scheduler-memory/session-1771346112/store.ok @@ -0,0 +1 @@ +MEMORY_STORED diff --git a/features/log-summary.mjs b/features/log-summary.mjs new file mode 100644 index 0000000..eca856d --- /dev/null +++ b/features/log-summary.mjs @@ -0,0 +1,85 @@ +#!/usr/bin/env node + +/** + * features/log-summary.mjs + * + * A utility script to parse task-logs and display a summary of recent agent runs. + * + * Usage: + * node features/log-summary.mjs + * node features/log-summary.mjs --cadence daily + * node features/log-summary.mjs --limit 20 + */ + +import fs from 'node:fs'; +import path from 'node:path'; + +const CADENCES = ['daily', 'weekly']; +const LOG_ROOT = 'task-logs'; + +function parseArgs() { + const args = process.argv.slice(2); + const limitIndex = args.indexOf('--limit'); + const limit = limitIndex !== -1 ? parseInt(args[limitIndex + 1], 10) : 10; + + const cadenceIndex = args.indexOf('--cadence'); + const cadence = cadenceIndex !== -1 ? args[cadenceIndex + 1] : null; + + return { limit, cadence }; +} + +function getLogFiles(cadence) { + const dir = path.join(LOG_ROOT, cadence); + if (!fs.existsSync(dir)) return []; + + return fs.readdirSync(dir) + .filter(file => file.endsWith('.md') && !file.startsWith('_')) + .map(file => { + // Format: ____.md + // Example: 2026-02-17T14-29-07Z__dead-code-agent__completed.md + const parts = file.replace('.md', '').split('__'); + if (parts.length < 3) return null; + + return { + timestamp: parts[0], + agent: parts[1], + status: parts[2], + cadence, + file + }; + }) + .filter(Boolean); +} + +function main() { + const { limit, cadence } = parseArgs(); + + let allLogs = []; + + const cadencesToScan = cadence ? [cadence] : CADENCES; + + for (const c of cadencesToScan) { + allLogs = allLogs.concat(getLogFiles(c)); + } + + // Sort by timestamp descending + allLogs.sort((a, b) => b.timestamp.localeCompare(a.timestamp)); + + const displayedLogs = allLogs.slice(0, limit); + + console.log(`\nšŸ” Recent Agent Runs (Limit: ${limit})\n`); + console.log(`| Timestamp | Cadence | Agent | Status |`); + console.log(`|----------------------|---------|--------------------------------|-----------|`); + + for (const log of displayedLogs) { + const ts = log.timestamp.padEnd(20); + const cad = log.cadence.padEnd(7); + const agent = log.agent.padEnd(30); + const status = log.status.padEnd(9); + + console.log(`| ${ts} | ${cad} | ${agent} | ${status} |`); + } + console.log(''); +} + +main(); diff --git a/memory-updates/2026-02-17T15-00-00Z__feature-proposer-agent.md b/memory-updates/2026-02-17T15-00-00Z__feature-proposer-agent.md new file mode 100644 index 0000000..c178b18 --- /dev/null +++ b/memory-updates/2026-02-17T15-00-00Z__feature-proposer-agent.md @@ -0,0 +1,16 @@ +# Memory Update - Feature Proposer Agent + +**Date**: 2026-02-17T15-00-00Z +**Agent**: feature-proposer-agent + +## Insights +- The `task-logs` structure is consistent and easy to parse. +- A simple CLI tool (`features/log-summary.mjs`) was added to visualize this data. +- This pattern of "small, standalone utility scripts" in `features/` is effective for incremental improvement. + +## Actions +- Implemented `features/log-summary.mjs`. +- Verified with manual execution. + +## Recommendations +- Future agents could enhance this script to filter by status (e.g., show only failed runs). diff --git a/src/context/CONTEXT_2026-02-17T15-00-00Z.md b/src/context/CONTEXT_2026-02-17T15-00-00Z.md new file mode 100644 index 0000000..afbe6dd --- /dev/null +++ b/src/context/CONTEXT_2026-02-17T15-00-00Z.md @@ -0,0 +1,30 @@ +# Context - Feature Proposer Agent Run + +**Agent**: feature-proposer-agent +**Cadence**: weekly +**Run-Start**: 2026-02-17T15:00:00Z +**Prompt-Path**: src/prompts/weekly/feature-proposer-agent.md + +## Goal +Implement a new feature to improve developer experience. + +## Scope +Create a new feature in `features/` directory. + +## Constraints +Single file, no new dependencies. + +## Analysis +- The repository has a `task-logs/` directory with daily and weekly logs. +- Checking these logs manually is tedious. +- A simple CLI tool to summarize these logs would be high-value and low-risk. +- Prompt file: `src/prompts/weekly/feature-proposer-agent.md`. + +## Selected Feature +- `features/log-summary.mjs`: A Node.js script to parse and display a summary of recent agent runs. + +## Implementation Details +- Uses `fs` and `path` modules. +- Scans `task-logs/daily` and `task-logs/weekly`. +- Parses filenames `____.md`. +- Outputs a formatted ASCII table. diff --git a/src/decisions/DECISIONS_2026-02-17T15-00-00Z.md b/src/decisions/DECISIONS_2026-02-17T15-00-00Z.md new file mode 100644 index 0000000..0755e30 --- /dev/null +++ b/src/decisions/DECISIONS_2026-02-17T15-00-00Z.md @@ -0,0 +1,24 @@ +# Decisions - Feature Proposer Agent Run + +**Agent**: feature-proposer-agent +**Cadence**: weekly +**Run-Start**: 2026-02-17T15:00:00Z +**Prompt-Path**: src/prompts/weekly/feature-proposer-agent.md + +## Decision: Implement `features/log-summary.mjs` + +### Context +Developers and agents need a quick way to see the recent history of automated tasks without navigating the file system. Prompt: `src/prompts/weekly/feature-proposer-agent.md`. + +### Options Considered +1. **Dashboard Widget**: Requires frontend changes, more complex. +2. **Lock Monitor**: Already covered by `lock:check`. +3. **Log Summary CLI**: Simple, standalone, immediate value. + +### Decision +Chosen Option 3 (Log Summary CLI). + +### Rationale +- Fits the "single file" constraint perfectly. +- No external dependencies required. +- High utility for checking system health at a glance. diff --git a/src/test_logs/TEST_LOG_2026-02-17T15-00-00Z.md b/src/test_logs/TEST_LOG_2026-02-17T15-00-00Z.md new file mode 100644 index 0000000..20106f4 --- /dev/null +++ b/src/test_logs/TEST_LOG_2026-02-17T15-00-00Z.md @@ -0,0 +1,25 @@ +# Test Log - Feature Proposer Agent Run + +**Agent**: feature-proposer-agent +**Cadence**: weekly +**Run-Start**: 2026-02-17T15:00:00Z +**Prompt-Path**: src/prompts/weekly/feature-proposer-agent.md + +## Verification Steps +1. Run `node features/log-summary.mjs`. +2. Check output for correctness. +3. Verify against `src/prompts/weekly/feature-proposer-agent.md`. + +## Execution +- **Command**: `node features/log-summary.mjs` +- **Result**: Pass. The script correctly identifies and lists recent log files. + +## Output +``` +šŸ” Recent Agent Runs (Limit: 10) + +| Timestamp | Cadence | Agent | Status | +|----------------------|---------|--------------------------------|-----------| +| 2026-02-17T14-29-07Z | weekly | dead-code-agent | completed | +... +``` diff --git a/src/todo/TODO_2026-02-17T15-00-00Z.md b/src/todo/TODO_2026-02-17T15-00-00Z.md new file mode 100644 index 0000000..a26e55a --- /dev/null +++ b/src/todo/TODO_2026-02-17T15-00-00Z.md @@ -0,0 +1,17 @@ +# Todo - Feature Proposer Agent Run + +**Agent**: feature-proposer-agent +**Cadence**: weekly +**Run-Start**: 2026-02-17T15:00:00Z +**Prompt-Path**: src/prompts/weekly/feature-proposer-agent.md + +## Completed +- [x] Analyze repository for potential features. +- [x] Select `log-summary.mjs` as the target feature. +- [x] Create `features/` directory. +- [x] Implement `features/log-summary.mjs`. +- [x] Verify the script functionality. +- [x] Follow instructions in `src/prompts/weekly/feature-proposer-agent.md`. + +## Pending +- [ ] Incorporate into main CLI (future work). diff --git a/task-logs/weekly/2026-02-17T15-00-00Z__feature-proposer-agent__completed.md b/task-logs/weekly/2026-02-17T15-00-00Z__feature-proposer-agent__completed.md new file mode 100644 index 0000000..4e6c856 --- /dev/null +++ b/task-logs/weekly/2026-02-17T15-00-00Z__feature-proposer-agent__completed.md @@ -0,0 +1,25 @@ +--- +agent: feature-proposer-agent +cadence: weekly +date: 2026-02-17T15-00-00Z +platform: linux +status: completed +--- + +# Feature Proposer Agent Run - Completed + +**Date**: 2026-02-17T15:00-00Z +**Agent**: feature-proposer-agent +**Platform**: linux +**Status**: completed + +## Summary +The agent successfully analyzed the repository and proposed a new feature: `features/log-summary.mjs`. This script provides a CLI summary of recent agent runs, improving developer visibility into system health. + +## Artifacts +- Feature: `features/log-summary.mjs` +- Context: `src/context/CONTEXT_2026-02-17T15-00-00Z.md` +- Todo: `src/todo/TODO_2026-02-17T15-00-00Z.md` +- Decisions: `src/decisions/DECISIONS_2026-02-17T15-00-00Z.md` +- Test Log: `src/test_logs/TEST_LOG_2026-02-17T15-00-00Z.md` +- Memory: `memory-updates/2026-02-17T15-00-00Z__feature-proposer-agent.md`