CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
19 KiB
19 KiB
Changelog
All notable changes to perfxpert will be documented in this file. The format is based on Keep a Changelog.
[Unreleased]
Added
- Advanced specialist tools — 8 new READ_ONLY MCP tools. The
specialist fences now consume eight additional deterministic
tools surfaced on the MCP wire:
kernel_fusion.find_fusion_candidates(adjacent-short-kernel fusion),gpu_runtime_monitor.parse_amd_smi_json/parse_rocm_smi_json/analyze_thermal(thermal / throttle envelope),unified_memory.analyze_paging(MI300X paging + cross-die),dependency_graph.reconstruct_dag(critical-path + GPU bubbles),pragma.lookup_pragmas/explain_pragma/suggest_pragmas_for_kernel(LLVM loop-hint advanced recommendations, gated behind--advanced). - Change-Impact Prediction — 3 new MCP tools.
predict_impact.predict_change_impact,predict_impact.list_supported_changes,predict_impact.explain_prediction. Returns a conservative speedup bracket (hi × 0.85), confidence, rationale, and asource_citationback intoknowledge/proven_optimizations.yaml. Amdahl + tier-2 gates enforced internally. Bumpsschema_versionto0.3.3when any rec fires a prediction. - Live Roofline —
roofline.plot_pointsMCP tool. Emits a per-kernel(ai, achieved_flops_per_s, bottleneck_class, fp_type, confidence)list + arch ridge point; webview renders an inline-SVG log-log plot. Populating the top-levelrooflinekey bumpsschema_versionto0.3.4. - Communication / RCCL analysis —
rccl_analysis.analyze_collectives+interconnect.lookup_peaksMCP tools. Per-collectiveeffective_bw_gbps/efficiency_pct/efficiency_label+ rollupsummary. Validated at the module boundary via theCommunicationBlock+CollectiveEntryPydantic models (perfxpert/agents/schemas.py). Bumpsschema_versionto0.3.2. - ATT Flamegraph (webview-only pure-rendering derivative).
perfxpert/formatters/_att_flamegraph.pyrenders an inline-SVG flamegraph under the Thread Trace.scardwhenthread_trace.has_att_datais true. No new payload key — pure function of the existingthread_trace.kernels+top_stalling_instructionssubfields. - Knowledge YAML conventions.
applies_to_gfxarch gate onmatrix_meter.yaml+attention_patterns.yaml(plus selective entries inproven_optimizations.yaml/compiler_pragmas.yaml);unitsfield on everyexpected_impactentry infusion_patterns.yaml. - Fence template consolidation.
diff_specialist.mdis now the canonical per-agent fence template;root.mdandrecommendation.mdwere re-aligned to that layout. - Agents-as-MCP-tools (8 READ_ONLY agent tools). The MCP server now
exposes every agent in the hierarchy as its own tool:
perfxpert_agent_root,perfxpert_agent_analysis,perfxpert_agent_recommendation,perfxpert_agent_correctness,perfxpert_agent_compute_specialist,perfxpert_agent_memory_specialist,perfxpert_agent_latency_specialist,perfxpert_agent_diff_specialist. Backend TUIs (Claude Code, Gemini CLI, Codex CLI, opencode) read the agent hierarchy as reference inAGENTS.mdand freely pick whichever of the 56 MCP tools matches the user's intent. Current MCP tool inventory: 56 (8 agent-hierarchy + 48 classifier / knowledge / advanced-specialist / trace_diff). Schemas remain frozen perperfxpert/agents/schemas.py. - Public Python API (
perfxpert.api). 1:1 mirror of the 8 agent MCP tools (api.agent_root,api.agent_analysis, etc.) for in-process embedding without standing up an MCP server. Theperfxpert analyzeCLI now callsperfxpert.api.agent_root(...)internally — same function the MCP tool wraps. - Scoped submodule-init fast-install path.
scripts/pip-install-from-git.sh(new wrapper) + the equivalentGIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=submodule.active GIT_CONFIG_VALUE_0=experimental/python/perfxpert/opencode pip install …incantation drops the rocm-systems submodule-init time from ~141 sec (recursive init of ~34 unrelated submodules) down to ~30 ms. Detailed measurements + rationale indocs/guides/getting-started.md§1.2. The plain recursive one-liner still works for users who want it.
Changed
- Codex gate discovery. Codex-rendered gate prompts now allow only
tool_search/tool_search_toolas a discovery-only prelude when the required PerfXpert MCP gate tools are deferred out of the initial tool inventory; shell, SSH, build, edit, and profiling fallbacks remain blocked untilperfxpert_intent_classifyreturns. - Breaking: non-text
perfxpert analyzeformats now write report files by default.--format json,--format markdown, and--format webviewsynthesize a report filename when-o/-dare omitted. Use-o -to preserve stdout for shell pipelines. - Git install hardening. The GitHub wrapper no longer runs
apt/dnf/zypper/sudo unless
PERFXPERT_AUTO_INSTALL_PREREQS=1or--auto-install-prereqsis explicitly supplied. The bundled opencode build no longer bootstraps bun unlessPERFXPERT_AUTO_INSTALL_BUN=1is explicitly supplied. --llmproviders. All five providers —anthropic,openai,ollama,private,opencode— are selectable from the CLI and fromperfxpert.api.agent_root(..., provider=<name>).claude-codestays removed (single-provider wrapper, superseded by theopencode+ backend-adapter stack).- No forced aggregator tool. The backend LLM no longer must
call a single
perfxpert_run_root_analysisafterperfxpert_intent_classify. The "MUST callperfxpert_run_root_analysis" contract is gone; backends choose any of the 56 MCP tools based on intent. The tool-priority gate still requiresperfxpert_intent_classifyas the first call. - FallbackProvider exception taxonomy. Documented the full
typed-error set —
AuthError,RateLimitError,QuotaExceededError,TransientError,FatalError,TimeoutError,ProviderChainExhausted. Only transient + rate-limit cascade; auth / quota / fatal surface immediately because retry is futile. Seedocs/guides/agentic-mode.md§"Fallback chain".
Docs
README.md— MCP count 34→43, 5-provider list restored, pip upgrade hint, fast-install wrapper surfaced.docs/guides/getting-started.md— MCP count refreshed in 3 places, §10 LLM Providers rebuilt for all 5 providers with CLI/API parity, duplicate §3/4/5/6 heading numbering fixed (continued into §7-§14), §1.2 scoped-submodule content retained. Footer marker reintroduced.docs/guides/backends.md— MCP count refreshed, forced-tool-call language removed.docs/guides/agentic-mode.md— typed-error taxonomy table added.docs/integration/README.md— MCP count refreshed, agent-tools line added.docs/integration/mcp-server.md— MCP count refreshed in 5 places, "Snapshot: agent-hierarchy tools" section added,_safetymachinery reference rewritten as "private_-prefixed skip list".docs/architecture.md— providers documented as CLI- AND library-accessible.docs/architecture/README.md—backend-adapter.mdindex row added.docs/architecture/agent-hierarchy.md— agent MCP + API surface cross-reference added; "only reachable via Root" implication removed.- NEW
docs/guides/python-api.md— embedding guide with one example per agent, links back todocs/integration/mcp-server.md.
[0.2.0] — 2026-04-19 (release cut)
This is the first tagged perfxpert release. It consolidates the multi-backend launcher (previously drafted as v0.3.0 below), the Codex backend adapter (drafted as v0.3.1 below), and Phase 8's final cleanup into a single v0.2.0 cut. The v0.3.0 and v0.3.1 headings below are retained as implementation-cycle drafts for audit trail; the canonical user-visible release is this v0.2.0 block.
Changed
- Version bump 0.1.0 → 0.2.0.
pyproject.toml,perfxpert/__init__.py,CMakeLists.txt, theperfxpert doctorbanner fallback, and thedocs/guides/getting-started.mdfooter marker all move together. JSON analysis output keepsschema_version = "0.1.0"by design — that field tracks the on-disk analysis schema, not the module version, and consumers key off it independently. - Claude Code pointer path migrated from
.claude/CLAUDE.mdtoCLAUDE.local.mdat the project root. Claude Code auto-loadsCLAUDE.local.mdat session start, so the perfxpert prompt now reaches the model without requiring a manual/read. User-facing docs (docs/guides/backends.md,docs/integration/mcp-server.md,docs/architecture/backend-adapter.md) are refreshed to match. claude mcp listparser now handles Anthropic Claude CLI's plain-text output format. Recent Claude CLI releases dropped the--jsonflag; the adapter parses the plain-text table form instead. The JSON-specific helpers inperfxpert/cli/_backend/claude.py(_extract_server_names,_extract_tool_names) are removed.
Added
- Codex backend (
perfxpert-code codex). Full Codex CLI adapter landed in PR 2. Trust-gate workflow ([projects."<cwd>"].trust_level = "trusted"in~/.codex/config.toml) with interactive prompt + CI-modePERFXPERT_AUTO_TRUST=1bypass (emits an always-on stderr warning even under--quiet). Gate enforcement is prompt-layer-only because Codex's nativePreToolUsehook intercepts Bash only (not MCP tool calls) as of April 2026 — see the Codex hook-surface decision record.tomlkitis promoted to a required runtime dependency so the comment-preserving TOML fallback path works out of the box without an[extras]install step. Full install / uninstall recipe indocs/guides/backends.md. - Multi-backend
perfxpert-codelauncher —claude,gemini,codex,uninstallsubcommands in one dispatcher. Per-(backend, cwd-hash, file-set-hash)consent;--dry-runand--quietdispatcher flags; MCP warmup + retry with env-configurable timeouts (PERFXPERT_MCP_WARMUP_TIMEOUT_S,PERFXPERT_MCP_RETRY_BUDGET_S,PERFXPERT_SKIP_LIVE_CHECK).
Fixed
- Wordmark. The
perfxpert-codebanner previously rendered mis-shaped glyphs forr,f,p,t— so users saw a string that did not read as "PerfXpert". Patch0051-amd-wordmark-ui.patchis rewritten with correctly-shaped 9-letter block-letter art (44 chars wide) and the bundled opencode binary is rebuilt so the fix reaches pip-install users automatically.
Docs
docs/guides/getting-started.mdfully audited and refreshed for cycle-2/3 stack state (agentic-only, noPERFXPERT_LEGACY, multi-backend launcher recipes, Codex trust-gate section).- Phase-9 docs-audit cleanup:
docs/canonical_facts/+ inventory snapshot artifacts dropped; docs-tooling test suite pared down and relocated underexperimental/python/perfxpert/tests/. - Red-team / ship-readiness gate consolidated into
tests/test_ship_readiness.py(strict mode) — ships-as-tested evidence rather than CI-gate-only.
v0.3.1 — Codex backend
Added
perfxpert-code codexsubcommand — full Codex CLI adapter. Registers perfxpert under[mcp_servers.perfxpert]in<cwd>/.codex/config.tomlfor trusted projects (falling back to~/.codex/config.tomlwhen project scope is unavailable), stages the perfxpert-managed compatibility fileAGENTS.override.md(shadow-copies rootAGENTS.mdwhen present), and handles Codex's[projects."<cwd>"].trust_level = "trusted"requirement (interactive prompt, orPERFXPERT_AUTO_TRUST=1for CI with an always-on stderr warning bypassing--quiet). Gate enforcement is prompt-layer-only because Codex's nativePreToolUsehook intercepts Bash only as of April 2026 (rationale in the local Codex hook-surface decision record).perfxpert-code uninstall codexreverses the install (MCP table + trust entry + stagedAGENTS.override.md), withConfigClobber/skipped_due_to_driftprotection against git-tracked or malformed TOML.
v0.3.0 — multi-backend launcher
Added
perfxpert-code claude|gemini|codex|uninstallsubcommands. Multi-backend launcher.claude/geminiadapters fully ship in PR 1;codexis a stub that prints a deferred notice and exits 42.uninstall <backend>reverses an install.--dry-run,--quietdispatcher flags.--dry-runrunsadapter.plan(), prints the actions, skips every write +spawn().--quietsuppresses the AMD banner + per-step progress log.BackendAdapterProtocol for contributors. Locked day-1 interface underperfxpert/cli/_backend/protocol.pyso fifth-backend work doesn't need Protocol churn. Seedocs/architecture/backend-adapter.md.- Per-backend gate hook with event-based lift. Native
PreToolUsefor Claude Code, nativeBeforeTool/AfterToolhooks for Gemini CLI. Lift fires onceperfxpert_intent_classifyreturns in the current session; non-perfxpert tool calls before that are rejected with a retry-hint message. - MCP warmup + retry (env-configurable).
PERFXPERT_MCP_WARMUP_TIMEOUT_S(default 10s),PERFXPERT_MCP_RETRY_BUDGET_S(default 30s),PERFXPERT_SKIP_LIVE_CHECKto skip post-install verification in CI. - Consent model: per-
(backend, cwd-hash, file-set-hash)tuple. Persisted under~/.perfxpert/consent.json. Re-runs in the same directory are silent; changing the file set re-prompts.PERFXPERT_ASSUME_CONSENT=1bypasses the prompt (required for non-interactive stdin).
Deferred
- Codex adapter. Lands in PR 2 (plan Task 10). The
codexsubcommand is wired as a stub in PR 1 for surface stability.
Decisions
- Claude Code gate hook uses the native
PreToolUsesurface (notpermissions.deny). Doc-fetch evidence + rationale are captured in the local Claude hook-surface decision record.
Docs
docs/guides/getting-started.md§"Choosing a backend" — short-recipe overview.docs/guides/backends.md— dedicated user guide (comparison table, install / uninstall recipes, env-var reference, four troubleshooting scenarios).docs/architecture/backend-adapter.md— contributor-facing Protocol + lifecycle + "how to add a new backend" steps.docs/integration/mcp-server.md— cross-link toguides/backends.mdat the top (manual snippets remain for direct-CLI users).
vNEXT
Removed
- BREAKING: pre-rename API-key env vars from the old project name are
no longer honored. Any environment variable prefixed with the old
project name (including the reference-guide override previously
referenced in migration docs) must be re-exported under the
PERFXPERT_*namespace. The canonical names arePERFXPERT_LLM_ANTHROPIC_KEY,PERFXPERT_LLM_OPENAI_KEY, and the standard vendorANTHROPIC_API_KEY/OPENAI_API_KEYcontinue to be honored. A single pre-rename alias (theROCPD_LLM_*prefix — the rest were removed in Phase 7.1) still works with aDeprecationWarningas a migration ramp. - Legacy
ai_analysismodule (perfxpert/ai_analysis/) fully removed, along with all parity and feature-flag dispatch tests. ThePERFXPERT_LEGACYenvironment variable is now unrecognized — setting it has no effect. docs/deprecation/PERFXPERT_LEGACY.mdsuperseded; migration notes moved todocs/archive/migration-to-agentic.md.
Changed
perfxpert.analyze.execute()unconditionally delegates to the agentic runtime; the_execute_legacyfallback is gone.perfxpert.agents.rootwires the realtasks.*tools (create / next / update / close) instead of no-oplambdastubs.
v0.2.0 draft — 2026-04-18 (agentic-runtime landing, rolled into v0.2.0 above)
Added
- Agentic runtime:
perfxpert/agents/with 7 agent definitions (Root, Analysis, Recommendation, Correctness, 3 specialists) over OpenAI Agents SDK. See design spec for full architecture. perfxpert-code: new interactive TUI. Ships as part of the pip install (bundles opencode per-platform). Replaces the old conversational mode flag onperfxpert analyze.- MCP server:
perfxpert/mcp_server/exposes READ_ONLY tools to external clients (Claude Desktop, Cursor, etc.). - Split fence: per-agent
agents/fence/*.md(≤ 400 lines each; CI-enforced) replaces the monolithicllm-reference-guide.md. - 22 knowledge YAMLs in
perfxpert/knowledge/replace structured data that used to be prose in the fence. - 45 deterministic tools in
perfxpert/tools/— all unit-testable, no LLM calls. - 5 provider adapters in
perfxpert/providers/(Anthropic, OpenAI, Ollama, private, opencode) — pluggable via Agents SDKModelprotocol. - Deterministic 5-gate cascade (
runtime/gate_cascade.py) — anti-Sakana protection via SOL bound + bitwise/numeric correctness + regression gate + test anchors. perfxpert doctornow reports active mode (agentic|legacy).
Changed
PERFXPERT_USE_AGENTSwas removed in Phase 7.1, along with the toggle code it kept alive.- The single-call LLM entrypoint was subsequently removed; use
perfxpert.agents.runtime.build_session()+session.run_root(...). - CI matrix inverted: agentic is the primary test matrix; the pre-v0.2.0 matrix was subsequently removed.
- README, CONTRIBUTING, and the Python API docs rewritten for the new architecture.
Deprecated
PERFXPERT_LEGACYwas introduced as a one-minor-version fallback in v0.2.0 and was then subsequently removed.LLMAnalyzerwas kept as a deprecation stub in v0.2.0 and was removed in Phase 7.1.
Removed
- Pre-agentic interactive workflow module (~4000 LOC: InteractiveSession + WorkflowSession + 7-phase loop) subsequently removed. Replaced by
perfxpert-codewrapping the bundled opencode TUI. (The 7-phase loop here refers to the user-facing workflow phases — profile → analyze → optimize → re-profile — not release phases.) - Pre-agentic LLM conversation module (~600 LOC: streaming + auto-compaction) subsequently removed. Replaced by Agents SDK native sessions.
- Monolithic fence reference guide subsequently removed. Split into per-agent slices + structured knowledge YAMLs under
perfxpert/knowledge/. LLMAnalyzer.analyze_with_llmand the_call_<provider>()private methods were removed in Phase 7.1.tests/test_llm_conversation.py(51 tests of a deleted module) subsequently removed.- Conversational-session CLI flags subsequently removed. Users typing the old flags get a migration hint pointing to
perfxpert-code. load_reference_guideexport from the pre-agentic tree was subsequently removed (previously relocated toperfxpert.providers._reference_guide).
Migration
See docs/archive/migration-to-agentic.md.
Backwards-compatible stubs (v0.2.0 only, all subsequently removed)
LLMAnalyzerstub class — still importable in v0.2.0, removed in Phase 7.1.PERFXPERT_USE_AGENTSenv var — no-op in v0.2.0, removed in Phase 7.1.PERFXPERT_LEGACY— fallback toggle in v0.2.0, subsequently removed. A user-supplied reference-guide override env var (pre-rename name) was also required whilePERFXPERT_LEGACY=1was active; both were removed along with it.
[0.1.x] — 2026-0X-XX and earlier
See git history. v0.1.x ran the pre-agentic path by default. The
experimental opt-in PERFXPERT_USE_AGENTS (available in later v0.1.x releases during the agentic refactor) was removed in Phase 7.1.