一键导入
project-archaeology
Systematically reverse-engineer an existing codebase and produce trustworthy Obsidian vault documentation with evidence-tagged claims
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Systematically reverse-engineer an existing codebase and produce trustworthy Obsidian vault documentation with evidence-tagged claims
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | project-archaeology |
| description | Systematically reverse-engineer an existing codebase and produce trustworthy Obsidian vault documentation with evidence-tagged claims |
| disable-model-invocation | false |
Reverse-engineer a codebase that has never had Obsidian interaction. Produce vault notes that let a future agent work on the project immediately. Runs once per project — must be trustworthy.
Invocation: /project-archaeology [optional/path/to/project]
accelerator_top.sv parameter NUM_PES was set to 8" is useful. Document the HOW — what commands, what inputs, what outputs, what decisions resulted.[verified] — ran it, saw the output[inferred] — read the source, confident but didn't execute[unverified] — mentioned in docs/comments, couldn't confirm[contradicted] — execution produced different results than docs claimCreate at /tmp/archaeology-<project-name>-<timestamp>/.
Setup:
git clone --local <project-path> <scratch-path>cp -r <project-path> <scratch-path>phase1-*.md, phase2-*.md, phase3-*.md)Cleanup:
Goal: Map the project's major themes, identify the ground truth, and understand the high-level flow. NOT to document components — just to know what exists and where to dig.
Steps:
grep -r "project: <name>" ~/obsidian_notes/ --include="*.md" to avoid duplicationOutput: Write scratch/phase1-project-map.md containing:
Everything in Phase 1 is tagged [inferred].
Goal: Trace every causal chain. Understand not just WHAT exists but HOW it was created, WHY it was designed this way, and how it CONNECTS to everything else.
Surface level (BAD): "The accelerator uses 8 PEs and achieves 134x speedup."
Deep level (GOOD): "Timeloop DSE was run with configs in model/analysis/timeloop/ exploring 4/8/16 PEs x 8/16/30KB buffers. The 8-PE config with K=2xC=4 spatial mapping achieved 100% PE utilization for the FC layer (vs 50% with naive K=4), which justified the area cost. This mapping is hardcoded in accelerator_top.sv as NUM_PES=8 and in fc_compute.sv as the K=2, C=4 loop structure. The SRAM bank sizes (8KB + 22KB) were derived from the Timeloop buffer analysis showing 30KB total is sufficient for all activations + weights."
Surface level (BAD): "Golden data is extracted from the TFLite model."
Deep level (GOOD): "The golden data pipeline works as follows: (1) extract_weights_real.py loads the .tflite model, extracts per-layer weights and biases, writes them as .hex files that the bootloader loads via SPI flash. (2) extract_intermediate_tflite.py runs actual inference through the TFLite interpreter, captures the output of each layer, saves as .npy. These become the ground truth for RTL verification. (3) compute_golden_intermediates.py reimplements the same math in pure NumPy as a cross-check — if TFLite and NumPy disagree, something is wrong. (4) gen_conv_test_vectors.py takes the intermediate outputs and packages them into .hex format that the testbenches can load via $readmemh. The naming convention: _golden = TFLite-extracted, _manual = NumPy-reimplemented."
Read scratch/phase1-project-map.md to recover state
For each theme, in order of importance, trace these dimensions:
a. Workflow reconstruction: How do you actually USE this part of the project? What exact commands do you run? What are the inputs? What are the outputs? What tools are required? What environment setup? Document the complete workflow so a future agent can reproduce it.
b. Causal chain tracing: For every significant design parameter, trace it back to its origin. Where did this number come from? What tool output, analysis, or requirement drove this choice? Follow the chain: ground truth requirement → analysis/exploration → decision → implementation → verification.
c. Cross-theme data flow: How does this theme's output become another theme's input? Be specific — not "the model feeds the testbench" but "extract_weights_real.py produces conv_weights.hex which tb_depthwise_conv2d.sv loads via $readmemh at line 47, and the same weights are loaded by bootloader.S into Bank 1 starting at address 0x3000_4000."
d. Design decisions and alternatives: Why this approach and not another? Check git history for deleted alternatives, comments mentioning tradeoffs, TODO/FIXME/HACK markers. If a decision isn't justified anywhere, note it as "decision rationale not found — [unverified]."
e. Non-obvious operational details: Magic constants and where they come from. Implicit ordering dependencies (must run X before Y). Tool version requirements. Environment variables. Things that would silently break if changed.
Write findings to scratch/phase2-<theme-name>.md as EACH theme completes — do not wait until all themes are done. This survives compaction.
After all themes: write scratch/phase2-connections.md — a DENSE cross-theme dependency map. For every connection, explain:
Everything in Phase 2 is tagged [inferred].
Compaction safety: If context compacts mid-phase, read your own scratch files to recover. The phase1 map tells you which themes exist. Check which phase2-<theme>.md files already exist to know where you left off.
Before moving to Phase 3, review your Phase 2 scratch files and ask:
If the answer to any of these is no, go back and dig deeper on those themes.
Goal: Run what can be run. Tag every claim with its evidence level. Verify workflows end-to-end, not just individual commands.
Steps:
scratch/phase1-project-map.md for build targetsscratch/phase2-*.md for claims to verifymake compile — trace the full pipeline:
scratch/phase3-run-<target>.log[inferred]accelerator_top.sv actually use NUM_PES=8?scratch/phase3-verification.md:
[contradicted] findings with what actually happenedSafety: All execution in scratch. Timeout long-running commands (5 minutes default). Document failures — they're valuable.
EDA tool note: For hardware projects requiring EDA tools (VCS, Vivado, Cadence), check if the environment supports them. If source.me.first or similar setup scripts exist, source them before running. If EDA tools aren't available, tag those claims as [unverified — requires EDA tools] rather than failing.
Goal: Synthesize scratch files into vault-compliant Obsidian notes that are DENSELY INTERCONNECTED and capture deep operational knowledge.
Steps:
projects/<project-name>/ subfolder in vaultdate, tags, type: concept, status: active, project: <name>[verified], [inferred], [unverified]agent/session-log.md with archaeology summaryBefore finalizing, verify each note against these criteria:
If a note fails any of these, revise it before writing to the vault.
Notes must NOT contain:
Use before shipping high-stakes output (pre-tapeout RTL, verification infra, production scripts) that needs independent adversarial review. Requires reviewer backends configured in santa-method.json — if none are configured, do not use.
Use before shipping high-stakes output (pre-tapeout RTL, verification infra, production scripts) that needs independent adversarial review. Requires reviewer backends configured in santa-method.json — if none are configured, do not use.
Use this skill when in plan mode. It ensures all assumptions are resolved through an interview process.
Use when context is getting heavy, at natural breakpoints between subtasks, or when the user asks to checkpoint — writes the agent's full working context to a recoverable file before compaction
Audit the Obsidian vault for organizational health — broken links, naming violations, misplaced notes, sync status, stale content, and connection quality
Use when taking notes, recalling context, building connections, or treating the Obsidian vault as Claude's persistent memory across sessions