# wanshuiyin/hero-anti-overdefense architecture

> Architecture diagram of the GitHub repository wanshuiyin/hero-anti-overdefense, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/wanshuiyin/hero-anti-overdefense
- Repository: https://github.com/wanshuiyin/hero-anti-overdefense

## Overview

HERO is a set of agent-workflow aids: persistent rules to keep work focused, Goal Pulse reminders to maintain momentum on an existing goal, and Session Handoff notes to preserve continuity between sessions. The principal workflow is an agent using the rules while doing work; for long goals, the optional pulse checks goal state and may send a reminder, and a handoff records evidence and a next action for a fresh session. README documentation supports the broader rules, host, and handoff branches; source detail is available only for Goal Pulse.

Main entry points: [`skills/goal-pulse/SKILL.md`](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/SKILL.md) (Pulse Skill), [`skills/goal-pulse/scripts/goal_pulse.py`](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/scripts/goal_pulse.py) (Pulse Commands), [`RULES.md`](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/RULES.md) (HERO Rules), [`skills/session-handoff/SKILL.md`](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/session-handoff/SKILL.md) (Handoff Workflow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_focus["Focus Rules"]
  node_rules["HERO Rules<br/>[RULES.md]"]
  node_hosts["Supported Hosts<br/>[README.md]"]
  node_cases["Behavior Cases<br/>[README.md]"]
end

subgraph group_pulse["Goal Pulse"]
  node_pulse_skill["Pulse Skill<br/>[SKILL.md]"]
  node_pulse_cli["Pulse Commands<br/>[goal_pulse.py]"]
  node_pulse_loop["Reminder Loop<br/>[goal_pulse.py]"]
  node_pulse_state[("Pulse State<br/>[goal_pulse.py]")]
end

subgraph group_handoff["Session Handoff"]
  node_handoff_skill["Handoff Workflow<br/>[SKILL.md]"]
  node_handoff_files["Project Handoff Files<br/>[README.md]"]
end

node_user(("User"))
node_agent(("Coding Agent"))
node_codex["Codex App Server"]

node_user -->|"adds to config"| node_rules
node_rules -->|"guides work"| node_agent
node_hosts -->|"shows placements"| node_rules
node_cases -->|"illustrates behaviors"| node_agent
node_user -->|"installs optionally"| node_pulse_skill
node_pulse_skill -->|"configures timer"| node_pulse_cli
node_pulse_cli -->|"uses JSON-RPC"| node_codex
node_pulse_cli -->|"starts process"| node_pulse_loop
node_pulse_loop -->|"checks and steers"| node_codex
node_pulse_loop -->|"records status"| node_pulse_state
node_pulse_skill -.->|"uses native loop"| node_codex
node_user -->|"starts handoff"| node_handoff_skill
node_handoff_skill -->|"records evidence"| node_handoff_files
node_handoff_files -->|"guides continuation"| node_agent

click node_rules "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/RULES.md"
click node_hosts "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/hosts/README.md"
click node_cases "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/cases/README.md"
click node_pulse_skill "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/SKILL.md"
click node_pulse_cli "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/scripts/goal_pulse.py"
click node_pulse_loop "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/scripts/goal_pulse.py"
click node_pulse_state "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/scripts/goal_pulse.py"
click node_handoff_skill "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/session-handoff/SKILL.md"
click node_handoff_files "https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/session-handoff/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_rules,node_hosts,node_cases,node_user toneBlue
class node_pulse_skill,node_pulse_cli,node_pulse_loop,node_pulse_state toneAmber
class node_handoff_skill,node_handoff_files,node_codex toneMint
class node_agent toneIndigo
```

## Components

### Focus Rules

- [HERO Rules](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/RULES.md): `RULES.md`
- [Supported Hosts](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/hosts/README.md): `hosts/README.md`
- [Behavior Cases](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/cases/README.md): `cases/README.md`

### Goal Pulse

- [Pulse Skill](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/SKILL.md): `skills/goal-pulse/SKILL.md`
- [Pulse Commands](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/scripts/goal_pulse.py): `skills/goal-pulse/scripts/goal_pulse.py`
- [Reminder Loop](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/scripts/goal_pulse.py): `skills/goal-pulse/scripts/goal_pulse.py`
- [Pulse State](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/goal-pulse/scripts/goal_pulse.py): `skills/goal-pulse/scripts/goal_pulse.py`

### Session Handoff

- [Handoff Workflow](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/session-handoff/SKILL.md): `skills/session-handoff/SKILL.md`
- [Project Handoff Files](https://github.com/wanshuiyin/hero-anti-overdefense/blob/main/skills/session-handoff/README.md): `skills/session-handoff/README.md`

### Other components

- **User**
- **Coding Agent**
- **Codex App Server**

## Connections

- User → HERO Rules: adds to config (evidence: `README.md`)
- HERO Rules → Coding Agent: guides work (evidence: `README.md`)
- Supported Hosts → HERO Rules: shows placements (evidence: `README.md`)
- Behavior Cases → Coding Agent: illustrates behaviors (evidence: `README.md`)
- User → Pulse Skill: installs optionally (evidence: `README.md`)
- Pulse Skill → Pulse Commands: configures timer (evidence: `README.md`)
- Pulse Commands → Codex App Server: uses JSON-RPC (evidence: `skills/goal-pulse/scripts/goal_pulse.py`)
- Pulse Commands → Reminder Loop: starts process (evidence: `skills/goal-pulse/scripts/goal_pulse.py`)
- Reminder Loop → Codex App Server: checks and steers (evidence: `skills/goal-pulse/scripts/goal_pulse.py`)
- Reminder Loop → Pulse State: records status (evidence: `skills/goal-pulse/scripts/goal_pulse.py`)
- Pulse Skill → Codex App Server: uses native loop (evidence: `README.md`)
- User → Handoff Workflow: starts handoff (evidence: `README.md`)
- Handoff Workflow → Project Handoff Files: records evidence (evidence: `README.md`)
- Project Handoff Files → Coding Agent: guides continuation (evidence: `README.md`)
