Skip to content

[docs]: surface activation-trace utility in add-model skills - #1399

Merged
SolitaryThinker merged 1 commit into
hao-ai-lab:mainfrom
SolitaryThinker:trace_skills_sync
May 26, 2026
Merged

[docs]: surface activation-trace utility in add-model skills#1399
SolitaryThinker merged 1 commit into
hao-ai-lab:mainfrom
SolitaryThinker:trace_skills_sync

Conversation

@SolitaryThinker

Copy link
Copy Markdown
Collaborator

Summary

PR #1304 (commit `a75d19786a`) merged the activation-trace docs and mkdocs nav wiring, exposing `fastvideo/hooks/activation_trace.py` as the canonical layer-by-layer divergence tool. The add-model* skills still describe a DIY `register_forward_hook` workflow that duplicates the new utility.

This PR makes the skills surface and use the new utility.

Files

File Δ What it adds
`.agents/skills/add-model/SKILL.md` +5/-0 Phase 6 routing insert
`.agents/skills/add-model-02-parity/SKILL.md` +6/-0 Parity-red routing insert
`.agents/skills/add-model-03-port-dit/SKILL.md` +6/-2 Replace per-block-hooks recommendation with activation-trace-first path
`.agents/skills/add-model-08-trace/SKILL.md` +108/-117 Replace DIY workflow with activation trace as primary path; DIY survives as "Fallback Instrumentation Hierarchy"
`.agents/skills/add-model-09-pipeline/SKILL.md` +6/-0 Pipeline-stage routing insert

Net: ~126 added / ~119 removed, ~245 touched lines across 5 files. Pure markdown.

Strategic decision

Replaced the DIY workflow in `add-model-08-trace` rather than adding activation-trace as a sibling section. Reason: keeping both inline as peers would preserve drift and teach future-agents to bypass the zero-residue JSONL path. The DIY hooks/patches survive as a "Fallback Instrumentation Hierarchy" subsection for cases where activation-trace cannot observe the needed boundary.

Verification

  • `jj diff --stat`: 5 files, all under `.agents/skills/`.
  • `pre-commit run --files `: passes (markdown-only; codespell + PyMarkdown).
  • No code, tests, or CI behavior change.
  • Activation-trace claims grounded against canonical doc `docs/contributing/activation_trace.md` (PR [docs]: Wire activation trace into mkdocs nav + perf/troubleshooting #1304 HEAD verified by upstream review).

Test plan

  • `jj diff --stat` shows 5 markdown files only
  • `pre-commit run` passes
  • Next /add-model-08-trace invocation exercises the new primary path

PR hao-ai-lab#1304 (commit a75d197) merged the activation-trace docs + nav wiring,
but the add-model* skills still describe a DIY register_forward_hook workflow
that duplicates the new first-class utility at fastvideo/hooks/activation_trace.py.

This PR makes the skills surface and use the new utility:

- add-model (umbrella), add-model-02-parity, add-model-03-port-dit,
  add-model-09-pipeline: small routing inserts pointing future-agents at
  add-model-08-trace + docs/contributing/activation_trace.md when component
  or pipeline parity is numerically red.
- add-model-08-trace: replace DIY forward-hook workflow with activation
  trace as the primary path; demote custom hooks/monkey-patches/source
  edits to a Fallback Instrumentation Hierarchy. Updated frontmatter,
  Trace Compare Contract, Drill-Down Loop, Handoff bullets, and References.

Net: ~126 added / ~119 removed across 5 skill files, ~245 touched lines.
Pure markdown; no production code or tests touched.
@mergify mergify Bot added the type: docs Documentation only label May 26, 2026
@mergify

mergify Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🔴 PR merge requirements

Waiting for

  • #approved-reviews-by>=1
  • check-success=full-suite-passed
This rule is failing.
  • #approved-reviews-by>=1
  • check-success=full-suite-passed
  • check-success=fastcheck-passed
  • check-success~=pre-commit
  • title~=(?i)^\[(feat|feature|bugfix|fix|refactor|perf|ci|doc|docs|misc|chore|kernel|new.?model|skill|skills|infra)\]

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates several agent skill markdown files to prioritize using FastVideo's built-in activation trace utility (fastvideo/hooks/activation_trace.py) for debugging numerical drift before falling back to custom hooks or monkey-patching. The reviewer suggested wrapping PATCH_LINEAR=1 in backticks in add-model-08-trace/SKILL.md for consistency.

- Hypothesis verdict if an A/B toggle was used (e.g. "PATCH_LINEAR=1 closes
the gap, confirming dtype-cast difference in PackedExpertLinear").
- Fallback hook/patch verdict if activation trace could not observe the boundary.
- Hypothesis verdict if an A/B toggle was used, for example `PATCH_LINEAR=1`.

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.

medium

For consistency with other environment variables and code snippets in this document, PATCH_LINEAR=1 should be wrapped in backticks.

@SolitaryThinker
SolitaryThinker merged commit 0ef1357 into hao-ai-lab:main May 26, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: docs Documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant