agentleFS
tuana-vntuana-vn/system-reverse-engineer/.github/skills/runtime-flow-analysis/SKILL.md

runtime-flow-analysis

Skill0 starsChanged 2 months agoMITView on GitHub

Trace a runtime operation end-to-end, record candidate claims, verify important behavior, and promote only claims that pass source verification, counterexample search, and scope checks.

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read 00_hypotheses.md and 00_open_questions.md only if relevant.

    line 16
  2. Very specific:

    When multiple endpoints/operations/modes reach shared code, record the exact scope of each branch.

    line 52
  3. Distinctive:

    Do not transfer a condition observed in one entry point to another entry point merely because they share a downstream method.

    line 54
  4. Distinctive:

    Do not infer that the output layer itself must contain the condition.

    line 64
  5. Distinctive:

    Do not write directly to canonical baseline.

    line 70
  6. Distinctive:

    verify runtime wiring when relevant

    line 76
  7. Distinctive:

    search for alternate entry points or earlier conditional retrieval that could contradict the claim

    line 82

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Runtime Flow Analysis — 4.0

Start

Read canonical memory:

  • 00_current_understanding.md
  • 00_evidence_ledger.md
  • 00_master_decision_matrix.md

Read 00_hypotheses.md and 00_open_questions.md only if relevant.

Trace

Generic control-flow target:

Inbound trigger
→ entry handler
→ validation/conversion
→ service/use-case
→ orchestration
→ abstraction
→ selector/factory/provider
→ concrete implementation
→ real boundary
→ result/error mapping

Trace data flow in parallel whenever a value influences an external result:

input / trigger
→ source retrieval
→ source field/data
→ parse/decode
→ transform/normalize
→ mapping/state
→ serialization/output
→ observable result

Control flow and data provenance are separate evidence dimensions. Prove both when needed.

Scope Isolation

When multiple endpoints/operations/modes reach shared code, record the exact scope of each branch.

Do not transfer a condition observed in one entry point to another entry point merely because they share a downstream method.

Field / Data Provenance

For externally meaningful fields/data, record:

SurfaceField/DataTrigger/ConditionRetrievalSourceTransformMapping/StateOutputEvidence

A conditional external result may be implemented by conditional retrieval earlier in the flow. Do not infer that the output layer itself must contain the condition.

Record Candidates First

New non-trivial findings start as CANDIDATE.

Do not write directly to canonical baseline.

For Each Candidate

  1. define exact scope
  2. locate supporting source
  3. verify runtime wiring when relevant
  4. identify concrete implementation
  5. search for counterexamples
  6. inspect alternate branches/configuration where relevant
  7. assign Evidence ID
  8. for output/data claims, prove provenance through to observable result
  9. search for alternate entry points or earlier conditional retrieval that could contradict the claim
  10. decide:
  • PROMOTE
  • KEEP AS HYPOTHESIS
  • REJECT
  • LEAVE UNKNOWN

Runtime Model and Diagram Requirement

For each materially distinct externally significant flow family, update docs/reverse-engineering/models/runtime_flow_catalog.md with:

FlowEntryValidationOrchestrationState/IntegrationResult/Error MappingObservable EffectEvidence

For the primary representative full-system flow, create/update:

docs/reverse-engineering/diagrams/03_primary_runtime_sequence.md

It must contain a Mermaid sequenceDiagram and an Evidence Anchors section. A class list or prose-only flow is insufficient.

Output

Detailed flow: docs/reverse-engineering/flows/<operation>.md

Canonical updates: only PROMOTED VERIFIED facts.

Hypotheses: write non-promoted findings to 00_hypotheses.md.

Completion Gate

A runtime-flow document is incomplete when an applicable item is unresolved without explanation:

[ ] entry-point scope is explicit
[ ] callers and downstream effects are traced far enough to classify exposure
[ ] branch conditions are not generalized beyond proven scope
[ ] externally meaningful field/data provenance is traced when applicable
[ ] observable result/error mapping is proven
[ ] alternate paths/counterexamples were searched
[ ] unresolved links remain hypotheses/unknowns rather than promoted facts
[ ] material flow is represented in the runtime flow catalog
[ ] primary full-system flow has an evidence-linked Mermaid sequence diagram

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.