agentleFS
sjain-stanfordsjain-stanford/claude-workspace/skills/rocjitsu-project/SKILL.md

rocjitsu-project

Skill2 starsChanged 22 days agoApache-2.0View on GitHub

Work on, debug, review, or explain ROCm rocjitsu in rocm-systems/emulation/rocjitsu, including GPU simulation, DBT, DBI, KFD interposition, ISA semantics/codegen, plugins, and configuration.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 5 are distinctive, and 6 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.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Only modify a canonical checkout when the user explicitly requests it.

    line 17
  2. Very specific:

    Read CONTRIBUTING.md, docs/style.md, and the nearest applicable docs in the active checkout or task worktree before designing, adding, …

    line 23
  3. Distinctive:

    Read references/technical-map.md when locating a subsystem, tracing cross-layer behavior, or assessing architectural impact.

    line 32
  4. Very specific:

    When work depends on HSA runtime, libhsakmt, topology discovery, queue/event, or KFD-facing behavior, verify the contract against the …

    line 34
  5. Very specific:

    Never edit generated ISA decoders, encoders, execute bodies, legalization tables, or encoding translators directly.

    line 50
  6. Distinctive:

    Treat the daemon RPC transport as a trusted, local, version-matched transport, not a security boundary or network-facing protocol.

    line 59
  7. Very specific:

    Follow the project's error model: Result/FailureOr<T> plus DiagnosticEmitter for expected failures.

    line 63
  8. Very specific:

    Use util/log.h in libraries.

    line 67
  9. Distinctive:

    Start with the smallest focused regression or characterization test that observes the contract at the affected layer.

    line 78
  10. Distinctive:

    Keep simulated workloads deliberately small.

    line 91
  11. Very specific:

    Use the rocjitsu-build-test skill after changes and choose verification in proportion to the affected layer.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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

rocjitsu Project

Resolve the intended repository, development base, PR target, and worktree root from the workspace's LOCAL_CONTEXT.md (if present) before selecting a checkout. Its NPI routing applies to development, qualification, and PRs; do not substitute the public base or the remote's default branch.

For public rocjitsu work, the canonical checkout is projects/rocm-systems, with base develop; implementation work belongs in a branch-backed worktree under projects/worktrees/rocm-systems/<task-slug>/. Internal work follows the local routing and the workspace's projects-emu/ worktree convention. Only modify a canonical checkout when the user explicitly requests it.

Paths below are relative to emulation/rocjitsu/ unless stated otherwise.

Establish context

  1. Read CONTRIBUTING.md, docs/style.md, and the nearest applicable docs in the active checkout or task worktree before designing, adding, changing, or reviewing code. Follow docs/style.md for implementation and assess changed code against it during reviews. These project rules override generic workspace C++ guidance.
  2. Inspect the current branch, diff, and local changes. Preserve unrelated work.
  3. Identify the affected execution strategy: simulation, dynamic binary translation (DBT), or dynamic binary instrumentation (DBI). Do not assume a behavior or test from one path covers another.
  4. Read references/technical-map.md when locating a subsystem, tracing cross-layer behavior, or assessing architectural impact.
  5. When work depends on HSA runtime, libhsakmt, topology discovery, queue/event, or KFD-facing behavior, verify the contract against the checked-out ROCR source at <rocm-systems>/projects/rocr-runtime/. Treat it as source context, not a rocjitsu build dependency or an ordinary edit target.
  6. For debugger integration, GPU breakpoints, stepping, wave/register inspection, or debugger launch/resume issues, consult <workspace>/projects/rocgdb/. See the rocGDB source map for entry points and the debugger worktree convention.

Engineering invariants

  • rocjitsu is a C++20 project inside the ROCm/rocm-systems monorepo. It runs unmodified HIP/ROCR applications by interposing at the KFD/DRM boundary, or rewrites already-compiled AMDGPU code objects through DBT/DBI.
  • Extend lib/util, lib/simdojo, and existing rocjitsu components before adding libraries, dependencies, abstractions, or duplicate helpers.
  • Never edit generated ISA decoders, encoders, execute bodies, legalization tables, or encoding translators directly. Change the amdisa generator, regenerate with scripts/generate-amdisa.sh, and keep generator and generated output in the same change.
  • Preserve ISA identity distinctions. Architecture families, concrete gfx targets, ELF/code-object identities, and configured simulated devices are related but not interchangeable.
  • Translation must fail closed for unsupported or ambiguous instructions. Preserve diagnostics and avoid silently emitting guessed semantics.
  • Treat the daemon RPC transport as a trusted, local, version-matched transport, not a security boundary or network-facing protocol.
  • Simulation hot paths are sensitive to allocations, exceptions, logging, and synchronization. Use project utilities and measure performance changes.
  • Follow the project's error model: Result/FailureOr<T> plus DiagnosticEmitter for expected failures; exceptions only for unrecoverable initialization, configuration, or execution failures. Catch only at a boundary that translates the failure.
  • Use util/log.h in libraries. Trace groups may compile out; use Logger::warn() for always-visible warnings. Respect the documented CLI and ROCR-hook stderr carve-outs.
  • For config changes, update the FlatBuffers schema, parsing/validation, topology construction, representative configs, and tests together.
  • Large public API, subsystem, translation-pair, KFD/RPC, or dependency changes require the design-proposal process in CONTRIBUTING.md; localized fixes and tests do not.

Change strategy

  • Start with the smallest focused regression or characterization test that observes the contract at the affected layer.
  • Mirror source structure under tests/ (dbt/, patch/, analysis/, race-detector/, and so on).
  • For instruction semantics, prefer decode/execute harness tests and exact scalar/SIMD correctness checks. Include edge operands, masks, modifiers, widths, and architecture gates relevant to the encoding.
  • For DBT/DBI, verify both transformed structure and executable behavior when practical. Check branches, relocations, symbols, descriptors, scratch/LDS, register liveness, and unsupported-case diagnostics.
  • For KFD, daemon, queue, or memory changes, test lifecycle, cleanup, error paths, concurrency, and both local and daemon mode when the contract spans them.
  • Keep simulated workloads deliberately small. CPU simulation can be orders of magnitude slower than hardware.
  • Use the rocjitsu-build-test skill after changes and choose verification in proportion to the affected layer.

Primary project references

  • README.md: supported architectures, feature maturity, entry points
  • CONTRIBUTING.md: contribution rules, code placement, style, error handling
  • docs/style.md: required coding style for new and changed code and code reviews
  • docs/architecture.md: layer and component map
  • docs/vm-design.md, docs/simdojo.md: simulation and scheduling
  • docs/dbt-design.md, docs/dbi-design.md: binary transformation
  • docs/codegen.md, docs/isa-target-providers.md: ISA generation/registration
  • docs/configuration.md, docs/plugins.md, docs/rocjitsu-cli.md: user/runtime contracts
  • docs/benchmarking.md: performance and memory measurement protocol

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.