Skip to content

Add retrospective orb sizing skill - #40

Merged
maphew merged 4 commits into
mainfrom
feat/orb-sizing-retrospective
Aug 23, 2026
Merged

Add retrospective orb sizing skill#40
maphew merged 4 commits into
mainfrom
feat/orb-sizing-retrospective

Conversation

@maphew

@maphew maphew commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • add an Amp skill for evidence-based retrospective orb sizing
  • analyze exported thread shell results for real resource pressure and GNU time measurements
  • avoid false recommendations when telemetry is absent or transcript text merely discusses OOMs
  • bootstrap fresh-orb Beads state from authoritative refs/dolt/data before JSONL auto-import can occur
  • keep setup idempotent across normal clones and linked Git worktrees

Verification

  • python3 -m unittest discover -s .agents/skills/analyzing-orb-sizing/tests -v
  • python3 -m py_compile .agents/skills/analyzing-orb-sizing/scripts/analyze.py
  • bash -n .agents/setup
  • ran .agents/setup twice successfully after correcting its linked-worktree guard
  • recovered authoritative Dolt state and completed a normal bd dolt push

Amp thread: https://ampcode.com/threads/T-019f8cb6-a6f7-77ab-a6d7-ea71e143dc9d

amp-gpt-5.6-medium on behalf of maphew

Agent-Signature: amp-gpt-5.6-medium on behalf of maphew
Amp-Thread-ID: https://ampcode.com/threads/T-019f8cb6-a6f7-77ab-a6d7-ea71e143dc9d

Co-authored-by: Matt Wilkie <maphew@gmail.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: da28ede66c

ℹ️ 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".

Comment thread .agents/skills/analyzing-orb-sizing/scripts/analyze.py Outdated
Comment thread .agents/skills/analyzing-orb-sizing/scripts/analyze.py
ampagent and others added 2 commits July 23, 2026 02:32
Agent-Signature: amp-gpt-5.6-medium on behalf of maphew
Amp-Thread-ID: https://ampcode.com/threads/T-019f8cb6-a6f7-77ab-a6d7-ea71e143dc9d

Co-authored-by: Matt Wilkie <maphew@gmail.com>
Parse Bash and top-level tool results while retaining legacy export support. Surface manual escalation at the largest orb size and ensure setup validates the bd binary it invokes.

Agent-Signature: codex-gpt-5.6-sol-medium on behalf of maphew
@maphew

maphew commented Aug 23, 2026

Copy link
Copy Markdown
Owner Author

Pushed 91a3d26 addressing the review sweep findings:

  1. The analyzer now accepts Amp's current Bash tool calls (cmd) and top-level tool_result.output / status, including structured text output, while retaining compatibility with legacy shell_command and nested run.result exports.
  2. Hard pressure at a0.large now explicitly says that it is the largest documented size and directs workload investigation or a larger-orb request instead of silently implying that the same size is a fix.
  3. Setup validates the exact $HOME/.local/bin/bd binary it later invokes, so an unrelated pinned bd elsewhere on PATH cannot cause bootstrap to fail.

Regression coverage increased from 8 to 11 analyzer tests. Validation passed: analyzer unit tests, Python compilation, bash -n, git diff --check, cargo fmt --check, clippy with warnings denied, and the full Rust test suite (63 tests).

codex-gpt-5.6-sol-medium on behalf of maphew

Comment thread .agents/skills/analyzing-orb-sizing/scripts/analyze.py
Comment thread .agents/skills/analyzing-orb-sizing/scripts/analyze.py
Comment thread .agents/setup Outdated
@kilo-code-bot

kilo-code-bot Bot commented Aug 23, 2026

Copy link
Copy Markdown

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (3 files)
  • .agents/setup
  • .agents/skills/analyzing-orb-sizing/scripts/analyze.py
  • .agents/skills/analyzing-orb-sizing/tests/test_analyze.py
Previous Review Summary (commit 91a3d26)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 91a3d26)

Status: 3 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 3
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
.agents/skills/analyzing-orb-sizing/scripts/analyze.py 199 cpu_matches[-1] picks next report's CPU value when multiple GNU time reports share one output; use [0]
.agents/skills/analyzing-orb-sizing/scripts/analyze.py 147 Current-schema exit codes collapsed to 0/1/None; direct exit_code == 137 check never fires for current-schema exports
.agents/setup 32 Guard checks main repo's .beads but bootstrap targets $repo_root (worktree); inconsistent for linked worktrees
Files Reviewed (4 files)
  • .agents/setup - 1 issue
  • .agents/skills/analyzing-orb-sizing/SKILL.md - 0 issues
  • .agents/skills/analyzing-orb-sizing/scripts/analyze.py - 2 issues
  • .agents/skills/analyzing-orb-sizing/tests/test_analyze.py - 0 issues

Fix these issues in Kilo Cloud


Reviewed by efficient · Input: 60.2K · Output: 16.3K · Cached: 129.2K

Pair each GNU time RSS sample with its own preceding CPU and elapsed values, and bootstrap Beads at the common repository root used by the linked-worktree guard.

Agent-Signature: codex-gpt-5.6-sol-medium on behalf of maphew
@maphew

maphew commented Aug 23, 2026

Copy link
Copy Markdown
Owner Author

Pushed 61bf5f6 after the current-head Kilo review.

  • Fixed multi-report GNU time parsing so every RSS value is paired only with the CPU and elapsed fields that precede that same report; added a two-report regression test with deliberately different values.
  • Fixed linked-worktree setup so the guard and bd bootstrap both target the common repository root.
  • Investigated the exit-137 warning. Amp's documented current ThreadToolResultBlock schema provides status and output, but no numeric exit code. The analyzer already recognizes OOM, signal 9, and textual exit-137 evidence from failed output. Treating every generic error as resource pressure would create false positives, so no numeric status is invented when the export does not carry one; exact numeric handling remains available for legacy exports that do carry exitCode.

All 12 analyzer tests, Python compilation, shell syntax, and git diff --check pass.

codex-gpt-5.6-sol-medium on behalf of maphew

@maphew
maphew merged commit 70737ef into main Aug 23, 2026
4 checks passed
@maphew
maphew deleted the feat/orb-sizing-retrospective branch August 23, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants