Skip to content

docs: retire docs/superpowers, relocating two pieces of rationale first - #3628

Merged
kojiwakayama merged 2 commits into
mainfrom
chore/retire-superpowers-docs
Aug 12, 2026
Merged

docs: retire docs/superpowers, relocating two pieces of rationale first#3628
kojiwakayama merged 2 commits into
mainfrom
chore/retire-superpowers-docs

Conversation

@kojiwakayama

Copy link
Copy Markdown
Contributor

docs/superpowers/ is gitignored (.gitignore:90). All six files were force-added past it, against a policy set two days earlier. Four are shipped-work recipes or restatements of code that already exists with its own tests; two carried rationale that lived nowhere else. This relocates those two, then deletes all six.

Relocated (verified against the code, not copied)

Provider wait accounting -> docs/architecture/27-agent-message-stream-dataflow.md

Checked against src/agent/streaming/lifecycle/deadlines.ts before writing. The spec's core claims hold: provider-wait clocks pause when a read settles and resume with the stored remaining duration; the absolute attempt limit and external cancellation deliberately do not pause under backpressure, because "the absolute limit bounds total wall-clock ownership of an attempt, not provider availability".

Two refinements the spec text did not carry, now written as the code behaves:

  • resumeProviderWait does refill to a full budget when the deadline kind changes (kind !== activeKind), so entering tool-input-idle starts its own budget rather than inheriting a partly consumed one. The spec's flat "does not grant a new full timeout budget" was incomplete.
  • A settled read wins its tie only if settledAtMs <= deadlineAbsMs. A read that landed after the deadline elapsed does not retroactively win. That guard is what actually makes the ordering deterministic; the spec asserted determinism without it.

deadlines.test.ts names a case for each claim — "pauses provider idle while a frame is held but keeps total attempt time", "resumes the remaining provider-wait budget after consumer backpressure", "discards a cached provider result when the attempt deadline wins".

Context OOM forensics -> a comment beside the proxy lock in scripts/build/compile-binary.ts

The sole record of why a dedicated proxy binary exists: the 887,756,293 -> 951,154,705 byte growth across v0.1.1185/v0.1.1186, commit 339367a adding the Sharp/LightningCSS/PurgeCSS includes, and why V8 old-space tuning does not help (a bare --version OOMs before any traffic, so the cost is the embedded dependency archive, not the JS heap).

Chose the code comment over docs/architecture/: no architecture page covers release artifacts (14-build-pipeline.md is the user-project build), so a new page would have no inbound link and no readership. The comment instead sits exactly where the pressure to "simplify" the proxy profile back onto the workspace lock lands, and the file already documents the declarative-evaluator crash-loop in this same style.

Deleted outright

File Why
plans/2026-07-24-enterprise-stream-lifecycle.md Says Gates 1-4 are complete and its checkboxes "are not live status markers"; defers completion evidence to docs/internal/stream-lifecycle-rollout.md
plans/2026-07-30-project-creation-module.md Execution recipe for cli/shared/project-creation.ts, which exists with its own tests
plans/2026-08-03-proxy-memory-footprint.md Recipe whose Task 1 is "import files from draft PR #3280" — merged as afa6e30, released as v0.1.1191
specs/2026-07-30-project-creation-design.md Interface block is a verbatim copy of cli/shared/project-creation.ts; both rejected alternatives are already in commit cde7dd8's body
specs/2026-07-24-stream-lifecycle-design.md After relocation above
specs/2026-08-03-proxy-memory-footprint-design.md After relocation above

Deliberately untouched

docs/internal/stream-lifecycle-rollout.md stays. VF_STREAM_LIFECYCLE_MODE still defaults to legacy, so the rollout has not cleared its first gate and that file is a live rollback procedure — not a record of finished work. Two of the deleted files discuss the same subject; they are not the same document.

Checks

  • No inbound references to any deleted file (grep across the repo; the only "superpowers" hit is unrelated prose in docs/rfcs/0001-ui-primitive-adapters.md:291).
  • deno fmt --check clean (2.7.7).
  • scripts/build/compile-binary.test.ts 16 passed, tests/unit/build/compile-binary-includes.test.ts 9 steps passed, src/agent/streaming/lifecycle/deadlines.test.ts 4 steps passed.

docs/superpowers/ is gitignored (.gitignore:90). All six files were
force-added past it, against a policy set two days earlier. Four are
shipped-work recipes or restatements of code that already exists with its
own tests; two carried rationale that lived nowhere else. Relocate those
two, then delete all six.

Relocated:

- Provider wait accounting -> docs/architecture/27-agent-message-stream-dataflow.md.
  Verified against src/agent/streaming/lifecycle/deadlines.ts rather than
  copied. Two refinements the spec text did not carry: resumeProviderWait
  refills to a full budget when the deadline *kind* changes, and a settled
  read only wins its tie when settledAtMs <= deadlineAbsMs. The rest holds
  as written, and deadlines.test.ts names a case for each claim.

- Context OOM forensics -> a comment beside the proxy lock in
  scripts/build/compile-binary.ts. Chose code over docs/architecture: no
  architecture page covers release artifacts, so a new one would have no
  inbound link, while this comment sits exactly where the pressure to fold
  the proxy profile back onto the workspace lock lands. The file already
  documents the declarative-evaluator crash-loop the same way.

Deleted outright:

- plans/2026-07-24-enterprise-stream-lifecycle.md - says Gates 1-4 are
  complete and that its checkboxes "are not live status markers"; defers
  completion evidence to docs/internal/stream-lifecycle-rollout.md.
- plans/2026-07-30-project-creation-module.md - recipe for
  cli/shared/project-creation.ts, which exists with its own tests.
- plans/2026-08-03-proxy-memory-footprint.md - recipe whose Task 1 is
  "import files from draft PR #3280", merged as afa6e30 in v0.1.1191.
- specs/2026-07-30-project-creation-design.md - interface block is a
  verbatim copy of cli/shared/project-creation.ts; both rejected
  alternatives are in commit cde7dd8's body.
- specs/2026-07-24-stream-lifecycle-design.md and
  specs/2026-08-03-proxy-memory-footprint-design.md - after relocation.

docs/internal/stream-lifecycle-rollout.md is deliberately untouched:
VF_STREAM_LIFECYCLE_MODE still defaults to legacy, so that runbook is a
live rollback procedure, not a record of finished work.

No inbound references to any deleted file exist.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@kojiwakayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 46cbce49-d800-4e99-8b2a-5e73c25a5435

📥 Commits

Reviewing files that changed from the base of the PR and between f35c8e3 and f569924.

📒 Files selected for processing (8)
  • docs/architecture/27-agent-message-stream-dataflow.md
  • docs/superpowers/plans/2026-07-24-enterprise-stream-lifecycle.md
  • docs/superpowers/plans/2026-07-30-project-creation-module.md
  • docs/superpowers/plans/2026-08-03-proxy-memory-footprint.md
  • docs/superpowers/specs/2026-07-24-stream-lifecycle-design.md
  • docs/superpowers/specs/2026-07-30-project-creation-design.md
  • docs/superpowers/specs/2026-08-03-proxy-memory-footprint-design.md
  • scripts/build/compile-binary.ts

Comment @coderabbitai help to get the list of available commands.

@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: 43b37f27ef

ℹ️ 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 docs/architecture/27-agent-message-stream-dataflow.md Outdated
Comment thread docs/architecture/27-agent-message-stream-dataflow.md Outdated
… section

Review follow-up on the provider wait accounting section.

The "Telemetry cannot do this" sentence described the wrong execution path.
When status wins, raceProviderRead only sets statusEmitted; the runner then
calls pauseProviderWait, which clears deadlineAbsMs, and the next
resumeProviderWait both schedules the following status time and re-arms
deadlineAbsMs from the carried-over remainingMs. Saying that status emission
schedules the next status and never touches deadlineAbsMs misleads anyone
debugging backpressure: deadlineAbsMs is recomputed on every resume. The
invariant is about the budget, so state it that way.

Verified against src/agent/streaming/lifecycle/deadlines.ts:139-198 and
src/agent/streaming/lifecycle/runner.ts:165-192.

Also replaced both em dashes this PR introduced with ASCII punctuation.
AGENTS.md bans them, and the two lines added here were the only em dashes
in all 26 files of docs/architecture. Docs only, no behavior change.
@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 12, 2026

@kwakayama kwakayama left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No actionable findings.

  • docs/architecture/27-agent-message-stream-dataflow.md:332 accurately describes the lifecycle behavior implemented in src/agent/streaming/lifecycle/deadlines.ts:139 and runner.ts:163; tie ordering, paused provider budgets, and absolute attempt timeout handling all match code.
  • Existing focused coverage exercises the documented backpressure and cached-read paths: deadlines.test.ts:52, deadlines.test.ts:91, deadlines.test.ts:151, and runner.test.ts:153.
  • scripts/build/compile-binary.ts:108 changes rationale comments only; compile arguments and profile behavior remain unchanged. The proxy build contract remains covered by scripts/build/compile-binary.test.ts:179.
  • The deleted docs/superpowers/ artifacts were ignored by policy (.gitignore:90), had no remaining inbound references, and the active lifecycle rollback runbook remains at docs/internal/stream-lifecycle-rollout.md:1.

Rubric: correctness 40/40, tests 20/20, reliability/security 15/15, maintainability 15/15, scope/docs 10/10.

Review-Gate:
Reviewer: Codex
Reviewed-SHA: f569924
Score: 100/100
Actionable-Findings: 0
Verdict: APPROVE

Merged via the queue into main with commit 4d8114e Aug 12, 2026
33 checks passed
@kojiwakayama
kojiwakayama deleted the chore/retire-superpowers-docs branch August 12, 2026 08:16
@kojiwakayama kojiwakayama mentioned this pull request Aug 12, 2026
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