# How Field-Journal Stores and Retrieves Previous Task Solutions to Avoid Redundant Work

> Discover how field-journal prevents redundant work by storing past task solutions in Markdown files. Learn how AI agents leverage precedents for efficient reverse-engineering and penetration testing.

- Repository: [ZhaoXu/reverse-skill](https://github.com/zhaoxuya520/reverse-skill)
- Tags: internals
- Published: 2026-08-19

---

**Field-journal eliminates redundant reverse-engineering and penetration-testing work by storing every completed task as a self-describing Markdown file and forcing AI agents to read relevant precedents before acting.**

The `field-journal` system in the `zhaoxuya520/reverse-skill` repository acts as a version-controlled knowledge base that transforms individual task completion into reusable organizational memory. By combining structured storage, mandatory precedent loading, and automation helpers, it ensures that AI-driven skills never solve the same problem twice.

## Storage Layout: How Field-Journal Archives Task Solutions

All journal entries reside under `skills/field-journal/` and follow a strict naming convention: `YYYY-MM-DD_<scenario>.md`. For example, [`2026-08-06_cortex-m-msc-firmware-self-keyed-rotate-xor.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/2026-08-06_cortex-m-msc-firmware-self-keyed-rotate-xor.md) captures a specific firmware reverse-engineering session.

### Core Structure

The directory contains three mandatory components that enforce consistency:

- **[`_template.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_template.md)** — Defines required sections (Scope, Evidence, Finding, etc.) and includes a de-identification checklist that must be completed before committing.
- **[`_index.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_index.md)** — An auto-generated chronological index of all entries, maintained by `skills/scripts/extract-summaries.ps1`.
- **[Precedent Libraries](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/)** — Three high-level knowledge repositories that summarize reusable patterns:

| Precedent File | Purpose |
|----------------|---------|
| [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) | Authorization context (must be read first for any operation) |
| [`precedent-reverse.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-reverse.md) | Reverse-engineering operation patterns |
| [`precedent-pentest.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-pentest.md) | Penetration-testing operation patterns |

These precedent files are ordinary Markdown documents stored alongside dated entries, making them immediately readable without specialized parsing.

## Retrieval Mechanism: How Field-Journal Surfaces Previous Solutions

The system enforces precedent retrieval through two mechanisms: a central rule engine and explicit skill directives.

### RULES.md Hot-Path Enforcement

In [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) (line 36), a critical rule states:

> *"Hesitating about whether an operation is allowed → read [`precedent-reverse.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-reverse.md) or [`precedent-pentest.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-pentest.md)"*

This forces any AI interpreter to load stored experience when uncertainty arises. The rule acts as a guardrail that prevents autonomous action without consulting relevant historical context.

### NOW Directives in Skill Files

Individual skill definitions embed explicit retrieval commands. For example, in [[`skills/radare2/SKILL.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/radare2/SKILL.md)](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/radare2/SKILL.md) line 13:

```markdown

### NOW

读取 `../field-journal/precedent-reverse.md`

```

When executed, the AI interpreter:
1. Parses the directive
2. Opens the referenced file via standard file-read operations
3. Injects the precedent contents into the LLM context window

Because field-journal uses plain Markdown, no external database or query language is required—simple filesystem operations suffice.

### Eliminating Redundant Work

When a new task matches a previously recorded scenario, the AI surfaces the existing journal entry or summarized precedent instead of reconstructing the solution. This design treats each completed task as a training example for future operations.

## Automation Helpers for Field-Journal Maintenance

Three scripts ensure the knowledge base remains current and compliant:

- **`skills/scripts/extract-summaries.ps1`** — Rebuilds [`_index.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_index.md) by scanning all journal entries and prepending new records.
- **`skills/scripts/scan-leaks.ps1`** — Validates that entries respect the de-identification checklist from [`_template.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_template.md) before PR submission.
- **[`CONTRIBUTE-BACK.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/CONTRIBUTE-BACK.md)** — Restricts pull requests to files within `skills/field-journal/`, ensuring the journal remains the sole mutable artifact for experience sharing.

## Practical Examples: Adding and Retrieving Field-Journal Entries

### Creating a New Journal Entry

```bash
#!/usr/bin/env bash

# Create a new entry for a pentest exploit discovered on 2026-08-15

ENTRY="skills/field-journal/2026-08-15_exploit-xor-cipher.md"
cp skills/field-journal/_template.md "$ENTRY"

# Fill in the placeholders manually or with an editor

vim "$ENTRY"

# Update the index and commit

bash skills/scripts/extract-summaries.ps1
git add "$ENTRY" skills/field-journal/_index.md
git commit -m "[field-journal] pentest: XOR cipher exploit"

```

### Retrieving a Precedent Within a Skill

```markdown

### NOW

读取 `../field-journal/precedent-pentest.md`   <!-- pulls prior pentest workflow -->

```

The interpreter loads [`precedent-pentest.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-pentest.md) and presents its documented workflow to the LLM, enabling direct reuse.

### Validating De-identification

```powershell

# Scan the new entry for unreplaced placeholders before commit

$file = "skills/field-journal/2026-08-15_exploit-xor-cipher.md"
.\skills\scripts\scan-leaks.ps1 -Path $file

```

## Summary

- **Storage**: Field-journal stores task solutions as dated Markdown files in `skills/field-journal/` with standardized templates and auto-generated indexes.
- **Retrieval**: [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) mandates precedent loading when AI agents hesitate, while `NOW` directives in skill files trigger explicit reads.
- **Reuse**: Plain Markdown format eliminates parsing complexity—standard file operations enable knowledge injection into LLM contexts.
- **Governance**: PowerShell scripts automate index maintenance and compliance checks, while contribution rules isolate journal changes.

## Frequently Asked Questions

### What makes field-journal different from a conventional wiki?

Field-journal enforces **programmatic retrieval** through [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) and `NOW` directives rather than relying on human browsing. The hot-path rule at line 36 of [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) makes precedent consultation mandatory, not optional, ensuring AI agents cannot bypass historical knowledge. This embedded retrieval mechanism transforms passive documentation into active system memory.

### How does field-journal prevent sensitive data leaks?

The [`_template.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_template.md) file includes a de-identification checklist that must be completed before any commit. The `scan-leaks.ps1` script validates compliance automatically, checking for unreplaced placeholders or residual sensitive content. Only the `skills/field-journal/` directory is mutable in contribution workflows, creating a controlled surface for experience sharing.

### Can field-journal work without AI agents?

Yes—the underlying structure functions as a conventional documentation system. Human practitioners can browse dated entries in [`_index.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_index.md) or consult precedent files directly. However, the retrieval mechanism's full value emerges when paired with an AI interpreter that parses `NOW` directives and [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) constraints.

### Why use Markdown instead of a database?

Markdown's **human readability** and **universal parseability** eliminate dependencies on query languages or specialized drivers. As implemented in `zhaoxuya520/reverse-skill`, a simple file-read suffices to inject precedent knowledge into any LLM context. This design prioritizes transparency and version-control compatibility over structured storage performance.