How the Field-Journal Auto-Evolution Mechanism Works in reverse-skill
The field-journal auto-evolution mechanism is a closed-loop pipeline that enables AI security agents to learn from every successful operation by reading past experiences, executing skills, and writing back anonymized knowledge for future reuse.
The reverse-skill repository implements a self-reinforcing knowledge system where AI-driven penetration tests and reverse-engineering tasks automatically contribute to a growing, sanitized knowledge base—without requiring external databases or manual curation. This article explains exactly how the field-journal auto-evolution mechanism works based on the source code in zhaoxuya520/reverse-skill.
What Is the Field-Journal Auto-Evolution Mechanism?
The field-journal is the cornerstone of reverse-skill's auto-evolution system. It transforms the repository itself into a living knowledge base that improves with every run.
Rather than storing experiences in a separate database, the system uses plain markdown files under skills/field-journal/. This design choice makes the knowledge version-controlled, searchable, and immediately reusable by subsequent AI agents.
The mechanism follows six distinct stages, each enforced through markdown contracts and automated validation scripts.
Stage 1: Pre-Run Loading of Precedent Files
Before any skill execution begins, the AI agent reads a precedent file containing distilled, anonymized outcomes from past operations.
This preload gives the LLM contextual memory of "what we have already solved." According to SKILL.md files throughout the repository (such as [windows-ad/SKILL.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/windows-ad/SKILL.md)), the loading step is explicitly declared:
NOW: 读取 ../field-journal/precedent-pentest.md
Available precedent files include:
precedent-pentest.md— for penetration testing workflowsprecedent-reverse.md— for reverse engineering tasks
These files reside in skills/field-journal/ and serve as the primary read path of the auto-evolution loop.
Stage 2: Execution With Ops Contract Enforcement
During skill execution, several ops contracts enforce that field-journal write-back will occur.
The key contracts include:
- [
skills/ops/evidence-finding-path.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/evidence-finding-path.md) — defines the evidence timeline workflow - [
skills/ops/skill-supply-chain.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/skill-supply-chain.md) — specifies where journal commits fit in the overall pipeline
These contracts function as checklists that the AI must acknowledge, including the mandatory item: "field-journal written (anonymized)".
Stage 3: Post-Run Write-Back via CONTRIBUTE-BACK.md
Upon successful task completion, the AI is prompted to generate a new markdown entry through [skills/field-journal/CONTRIBUTE-BACK.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/CONTRIBUTE-BACK.md).
This file provides a structured checklist that forces the AI to:
- Summarize the technique or vulnerability discovered
- Apply anonymization rules from
field-journal/anonymization.md - Write the entry to
skills/field-journal/with a dated filename
The anonymization rules replace sensitive identifiers with standardized placeholders (IP addresses, hostnames, usernames, etc.) before any commit occurs.
Stage 4: Sanitization Gate With scan-leaks.ps1
Every new entry must pass through a security gate before entering the repository.
The PowerShell script skills/scripts/scan-leaks.ps1 scans all files under skills/field-journal/ for disallowed secret patterns:
# CI gate – run leak scanner (fails if any secret is present)
powershell -File skills/scripts/scan-leaks.ps1 -Path skills/field-journal
If the scanner detects any potential leak, the CI job fails immediately, preventing the commit. This automated validation ensures that sensitive customer data never enters the shared knowledge base.
Stage 5: Index and Template Update
Validated entries are automatically integrated into the searchable index.
The file [skills/field-journal/_index.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/_index.md) serves as an auto-generated directory of all field-journal entries. New files are appended here to maintain discoverability.
Additionally, the common template [_template.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/_template.md) receives updated checklist snippets, ensuring future AI agents inherit the latest operational patterns.
Stage 6: Auto-Evolution Through Reuse
The loop closes when subsequent runs automatically load the freshly recorded experience through the precedent files.
Because all knowledge is stored as plain markdown in version control:
- No external database is required
- Changes are fully auditable via git history
- AI agents instantly benefit from peer operations
The high-level architecture is documented in [skills/ops/IDENTITY.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/IDENTITY.md), which describes how the repository "learns" and improves itself over time.
Complete Auto-Evolution Workflow Example
Here is the full lifecycle demonstrated in PowerShell:
# 1️⃣ Load precedent (expanded from SKILL.md at runtime)
$precedent = Get-Content -Raw "..\field-journal\precedent-pentest.md"
# 2️⃣ Execute core skill workflow
Invoke-Expression $skillScript # e.g., ida-reverse, apk-reverse, etc.
# 3️⃣ Generate and stage new field-journal entry
$newEntry = "skills/field-journal/$(Get-Date -Format 'yyyy-MM-dd')_my-new-experience.md"
git add $newEntry
git add "skills/field-journal/_index.md"
git commit -m "[field-journal] pentest: discovered XYZ technique"
# 4️⃣ Validate through CI security gate
powershell -File skills/scripts/scan-leaks.ps1 -Path skills/field-journal
Key Design Principles of the Field-Journal Mechanism
| Principle | Implementation |
|---|---|
| Anonymization by design | Mandatory placeholder rules in anonymization.md |
| Checklist-driven enforcement | Ops contracts require journal write-back acknowledgment |
| Automated validation | scan-leaks.ps1 blocks commits with potential secrets |
| Zero external dependencies | Plain markdown + git replaces database infrastructure |
| Immediate reusability | Precedent files load automatically on next run |
Summary
The field-journal auto-evolution mechanism in reverse-skill operates as a six-stage closed loop:
- Read past experience from precedent files
- Execute skills with ops contract enforcement
- Write anonymized entries via
CONTRIBUTE-BACK.md - Validate with automated leak scanning
- Index for discoverability in
_index.md - Reuse automatically in future AI agent runs
This architecture enables collaborative AI security operations where every successful penetration test or reverse-engineering task strengthens collective knowledge—without ever exposing sensitive data.
Frequently Asked Questions
What prevents sensitive data from entering the field-journal?
The [anonymization.md](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/anonymization.md) rules mandate placeholder substitution for all identifiers, and scan-leaks.ps1 performs automated pattern matching in CI. If any potential secret is detected, the commit is blocked before reaching the repository.
How do AI agents discover relevant past experiences?
Each skill's SKILL.md explicitly loads a precedent file (e.g., precedent-pentest.md) at startup. These precedent files contain curated, anonymized summaries of previous successful operations, giving the LLM immediate contextual memory without requiring complex retrieval systems.
Can the field-journal mechanism work without human review?
Yes—the pipeline is designed for autonomous operation. The ops contracts enforce write-back obligations, the anonymization rules are machine-applied, and the leak scanner provides automated validation. However, human reviewers can still inspect entries via standard git workflows before merging to protected branches.
What file types does the leak scanner check?
The scan-leaks.ps1 script recursively scans all files under the specified path, with particular focus on markdown entries in skills/field-journal/. It uses pattern matching to detect common secret formats including API keys, passwords, IP addresses, and domain names that may have escaped anonymization.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →