agentleFS
orbyn-devorbyn-dev/orbyn-fullstack-skills/skills/rea-analysis-optimization/SKILL.md

rea-analysis-optimization

Skill4 starsChanged 10 days agoMITView on GitHub

Optimize a measured REA analysis bottleneck while preserving evidence and resource ownership; scoped to REA.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this to reduce REA analysis cost, not ordinary application performance or test-suite speed.

    line 8
  2. Distinctive:

    Read the consuming checkout's instructions and current implementation.

    line 10
  3. Distinctive:

    If source, artifacts or runtime are unavailable offline, produce a bounded measurement plan and mark measurements unrun.

    line 31
  4. Distinctive:

    Prefer eliminating repeated interpretation or scanning at its owner.

    line 50
  5. Very specific:

    Avoid a new cache/index without a demonstrated cost.

    line 53
  6. Distinctive:

    Use the shared evidence and recovery method when retaining partial observations or unresolved resources.

    line 63
  7. Distinctive:

    When authorized, compare equivalent completed tasks on the baseline and candidate.

    line 68

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Optimize a completed REA investigation

Use this to reduce REA analysis cost, not ordinary application performance or test-suite speed. Route suite costs to REA CI audit. Read the consuming checkout's instructions and current implementation; use how to trace unfamiliar source.

Measure only when the change targets performance or a regression is suspected. Routine cleanup needs correctness checks, not this workflow or synthetic benchmarks.

This local procedure needs no upstream webpage. It does not authorize target execution, tests or edits outside the task.

Define the task and oracle

State the analyst question and the facts needed to finish it. Pin source revision, artifact digest, provider/tool versions, architecture/options, detail and allowed workload. When measurement is authorized, include a representative large input and a small/empty case. Preserve an unchanged baseline in an isolated checkout.

Choose a correctness oracle independent of the proposed optimization: known fixture facts, independently mapped bytes or a verified producer interpretation. Two adapters sharing the same decoder do not count as independent. Preserve same-address alternatives, unresolved relationships, coverage and evidence IDs.

If source, artifacts or runtime are unavailable offline, produce a bounded measurement plan and mark measurements unrun; do not invent before/after numbers.

To compare with the local-tool path, answer the same artifact question at comparable coverage. Count tool startup, source selection, evidence retention and recovery; one raw command against a complete engine workflow is not a comparison. Treat a small upstream benchmark on another engine/model/version as a hypothesis for this task, not this installation's result.

Find the owning cost

Trace the public CLI/MCP path through admission, producer work, decoding, lookup, projection, serialization, retention and cleanup. Measure phases relevant to the completed task, including extra discovery/query calls. Check CPU and peak memory too: a smaller reply can leave both unchanged. Fix incorrect or missing facts before comparing performance across different coverage.

Change the owner

  • Prefer eliminating repeated interpretation or scanning at its owner.
  • Push selection to the earliest capable boundary and reuse validated immutable facts when appropriate.
  • Avoid a new cache/index without a demonstrated cost. For reuse, define key, owner, invalidation, retained size and lifetime. Include result-affecting bytes, engine/schema/options and mapping; revalidate live state before calling it current. Partial, cancelled or transient failures need their own retry policy.
  • Preserve independent caller cancellation and one shared producer's ownership. A cancelled waiter must not corrupt peers.
  • Bound process-family memory and retained state, not just the parent's heap. Keep capacity charged until work and cleanup settle. Report a guard-stopped investigation as incomplete.

Use the shared evidence and recovery method when retaining partial observations or unresolved resources.

Compare and stop

When authorized, compare equivalent completed tasks on the baseline and candidate. Separate fresh sessions, warm caches and OS cache conditions. Record total and phase time, CPU, peak process-family memory with accounting method, coverage, resource stops and cleanup. Retain failed attempts and inspect the payload's exit status, not only the profiler's. Count discovery, arguments, responses, retries and continuations in any token claim; label estimates separately from observed model usage.

Return the bottleneck, owning change or justified no-change decision, correctness oracle, measured scope, before/after evidence and limits. Stop when the demonstrated cost is resolved or further benefit is speculative. See the worked example and shared source record.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.