# How to Use Field-Journal Precedent Files for Authorization in reverse-skill

> Learn to use field-journal precedent files for authorization in reverse-skill. Follow the guide to establish authorization and load task-specific precedents for secure operations.

- Repository: [ZhaoXu/reverse-skill](https://github.com/zhaoxuya520/reverse-skill)
- Tags: how-to-guide
- Published: 2026-08-13

---

**Read [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) first to establish authorization, then load the task-specific precedent ([`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)) before executing any operation.**

The **field-journal** directory in [zhaoxuya520/reverse-skill](https://github.com/zhaoxuya520/reverse-skill) stores **precedent markdown files** that form the backbone of the repository's strict authorization workflow. These files ensure every reverse-engineering or penetration-testing action is pre-approved, auditable, and legally compliant before execution begins.

## The Three Core Precedent Files

The authorization system relies on three specialized files, each serving a distinct purpose in the safety pipeline:

| File | Purpose | When to Read |
|------|---------|--------------|
| [`field-journal/precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/field-journal/precedent-auth.md) | **Authorization pre-declaration** — confirms explicit permission for the operation | **First**, before any safety review or execution |
| [`field-journal/precedent-reverse.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/field-journal/precedent-reverse.md) | Records **authorized reverse-engineering activities** (binary analysis, firmware unpacking) | After [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) for reverse-engineering tasks |
| [`field-journal/precedent-pentest.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/field-journal/precedent-pentest.md) | Records **authorized penetration-testing or bug-bounty activities** | After [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) for pentest/CTF tasks |

Each file contains **templates and historical examples** that prove the operation has been performed before and is therefore permissible under the repository's compliance framework.

## How the Authorization Flow Works

The precedent system enforces a four-stage safety gate that every skill must traverse:

### 1. Safety Gate: Load [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md)

The **global rules** in [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) (line 16) and [`RULES_zh.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES_zh.md) (line 16) mandate reading [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) before any other action. If this file is missing or its authorization section is not satisfied, the system **aborts with a safety warning**.

### 2. Task-Specific Precedent Selection

The **routing matrix** in [`skills/routing_zh.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing_zh.md) (lines 121-122) directs the system to load either [`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) depending on the skill category. This creates a strict chain: `precedent-auth.md → precedent-reverse.md` or [`precedent-pentest.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-pentest.md).

### 3. Automatic Hook via NOW Directive

Every **SKILL** file embeds a `NOW` directive that the runtime interpreter parses. For example, [`skills/windows-ad/SKILL.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/windows-ad/SKILL.md) (line 10) contains:

```markdown
1. NOW: 读取 ../field-journal/precedent-pentest.md

```

This ensures the precedent is **automatically injected** into the execution context before any actionable command runs.

### 4. Evidence and Reporting

After task completion, skills write **desensitized entries** back to the field-journal per [`field-journal/anonymization.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/field-journal/anonymization.md) and update [`_index.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_index.md) for future reuse. The **ops documentation** in [`skills/ops/skill-supply-chain.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/skill-supply-chain.md) (line 71) ties these precedents to the contractual scope defined in [`scope-contract.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope-contract.md).

## Implementation Examples

### Loading the Authorization Precedent in a Skill

The standard **SKILL.md** pattern requires sequential precedent loading:

```markdown

# SKILL.md (example snippet)

1. NOW: 读取 `../field-journal/precedent-auth.md`   <!-- Must be first -->
2. NOW: 读取 `../field-journal/precedent-pentest.md`  <!-- After auth for pentest -->

```

The AI interpreter reads both files, validates the auth block, and only then proceeds with pentest steps. Reversing this order triggers a safety violation.

### Adding a New Journal Entry After a Test

Following a successful operation, the skill runner executes this PowerShell workflow from [`CONTRIBUTE-BACK.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/CONTRIBUTE-BACK.md):

```powershell

# PowerShell snippet used by the skill runner

$journalPath = "skills/field-journal/$(Get-Date -Format yyyy-MM-dd)_my‑pentest‑case.md"
$template    = Get-Content "skills/field-journal/_template.md"
$entry       = $template -replace "{{TITLE}}","My Pentest Case"
$entry       = $entry -replace "{{DESCRIPTION}}","Brief description of the exploit..."
Set-Content -Path $journalPath -Value $entry
git add $journalPath skills/field-journal/_index.md
git commit -m "[field-journal] 2024-05-01 pentest – My Pentest Case"

```

This preserves the operation's **audit trail** while maintaining compliance with the contribution workflow.

### Verifying Precedent Chain Integrity

The test suite uses this validation pattern from `skills/scripts/verify-routing-coherence.ps1`:

```powershell

# sanity-check script fragment

Assert-Fields (Join-Path $skillsRoot 'field-journal/_template.md') @('Scope','Evidence','Finding')

```

This ensures [`field-journal/_template.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/field-journal/_template.md) contains the required sections (`Scope`, `Evidence`, `Finding`) before any skill is considered valid for deployment.

## Key Files and Their Roles

| File | Role |
|------|------|
| [`skills/field-journal/precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/precedent-auth.md) | Central authorization declaration — **must be read first** |
| [`skills/field-journal/precedent-reverse.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/precedent-reverse.md) | Template and examples for **authorized reverse-engineering** actions |
| [`skills/field-journal/precedent-pentest.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/precedent-pentest.md) | Template and examples for **authorized pentesting/CTF** actions |
| [`skills/field-journal/_template.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/_template.md) | Base skeleton for new field-journal entries |
| [`skills/field-journal/CONTRIBUTE-BACK.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/field-journal/CONTRIBUTE-BACK.md) | Guide for adding compliant journal entries |
| [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) / [`RULES_zh.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES_zh.md) | Enforces [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) as mandatory first step |
| [`skills/routing_zh.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/routing_zh.md) | Documents the precedence chain in the routing matrix |
| [`skills/ops/skill-supply-chain.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/skill-supply-chain.md) | Connects precedents to contractual scope |

## Why Field-Journal Precedents Matter

- **Compliance**: Every operation is backed by an explicit, auditable authorization record stored in version control
- **Reusability**: Precedent files act as **knowledge-base templates** — new cases copy the structure, replace placeholders (`{target_ip}`, `{payload}`), and inherit the same compliance status
- **Safety Automation**: The `NOW` hook is a built-in safeguard; the AI **refuses execution** of any step lacking a matching precedent file, preventing accidental illegal actions

## Summary

- **Always read [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) first** — this is enforced by [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) and forms the mandatory safety gate
- **Select the task-specific precedent** ([`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)) based on whether you're performing reverse-engineering or penetration testing
- **Use `NOW` directives** in SKILL files to automatically load precedents before execution
- **Write back desensitized entries** after completion to maintain the audit trail per [`CONTRIBUTE-BACK.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/CONTRIBUTE-BACK.md)
- **Validate against [`_template.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_template.md)** to ensure all required sections (`Scope`, `Evidence`, `Finding`) are present

## Frequently Asked Questions

### What happens if I skip [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) and go straight to [`precedent-pentest.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-pentest.md)?

The system **aborts with a safety warning**. According to [`RULES.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/RULES.md) line 16, the authorization pre-declaration is mandatory before any safety review or execution step. The `NOW` parser enforces this order, and the routing matrix explicitly chains `precedent-auth.md → precedent-pentest.md`.

### Can I create custom precedent files for specialized engagements?

Yes, but they must follow the structure in [`_template.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/_template.md) and include the three required sections: `Scope`, `Evidence`, and `Finding`. The validation script `verify-routing-coherence.ps1` checks for these fields. New precedents should be committed via the workflow in [`CONTRIBUTE-BACK.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/CONTRIBUTE-BACK.md) with proper git messages.

### How do field-journal precedents connect to legal contracts?

[`skills/ops/skill-supply-chain.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/skills/ops/skill-supply-chain.md) line 71 explicitly ties the precedent system to [`scope-contract.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/scope-contract.md). The authorization declared in [`precedent-auth.md`](https://github.com/zhaoxuya520/reverse-skill/blob/main/precedent-auth.md) must align with the contractual scope — this dual-layer verification ensures both technical and legal compliance before any operation proceeds.