# shengjidaguai-china/goutoujunshi architecture

> Architecture diagram of the GitHub repository shengjidaguai-china/goutoujunshi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shengjidaguai-china/goutoujunshi
- Repository: https://github.com/shengjidaguai-china/goutoujunshi

## Overview

Goutoujunshi is an AI relationship-advice Codex Skill. Its documented workflow takes a user’s situation, grounds it in emotional support and evidence boundaries, consults relevant knowledge, evaluates the relationship and risks, then produces an actionable recommendation. Optional branches cover supplied chat material and consent-gated long-term memory. The main workflow and capability links below are documented in the README; unsampled skill and reference contents are represented at their existing paths, not inferred as code-level calls.

Main entry points: [`SKILL.md`](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md) (Skill routing), [`references/practical/ChatLab聊天记录分析适配.md`](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/practical/ChatLab%E8%81%8A%E5%A4%A9%E8%AE%B0%E5%BD%95%E5%88%86%E6%9E%90%E9%80%82%E9%85%8D.md) (Chat analysis), [`references/practical/长期记忆与关系档案.md`](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/practical/%E9%95%BF%E6%9C%9F%E8%AE%B0%E5%BF%86%E4%B8%8E%E5%85%B3%E7%B3%BB%E6%A1%A3%E6%A1%88.md) (Memory rules), [`scripts/memory_store.py`](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/scripts/memory_store.py) (Memory store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Skill workflow"]
  node_skill["Skill routing<br/>[SKILL.md]"]
  node_emotion["Emotional support<br/>[SKILL.md]"]
  node_evidence["Fact analysis<br/>[SKILL.md]"]
  node_judgment["Relationship judgment<br/>[SKILL.md]"]
  node_recommendation["Action and wording<br/>[SKILL.md]"]
end

subgraph group_knowledge["Knowledge and guidance"]
  node_knowledge["Relationship knowledge"]
  node_practical["Practical guides"]
end

subgraph group_tools["Optional tools"]
  node_chat["Chat analysis<br/>[ChatLab聊天记录分析适配.md]"]
  node_memory_guidance["Memory rules<br/>[长期记忆与关系档案.md]"]
  node_memory_store["Memory store<br/>[memory_store.py]"]
  node_memory_db[("Local memory database")]
end

subgraph group_safety["Boundaries and safety"]
  node_ethics["Consent and ethics<br/>[01-证据分级与内容边界.md]"]
  node_crisis["Safety guidance<br/>[17-中国法律安全与危机转介.md]"]
end

node_user(("User"))
node_chatlab["ChatLab"]

node_user -->|"describes situation"| node_skill
node_skill -->|"grounds emotion"| node_emotion
node_skill -->|"separates evidence"| node_evidence
node_skill -->|"loads relevant knowledge"| node_knowledge
node_skill -->|"loads relevant guides"| node_practical
node_skill -->|"evaluates options"| node_judgment
node_skill -->|"forms next steps"| node_recommendation
node_skill -->|"analyzes supplied chat"| node_chat
node_chat -.->|"queries optionally"| node_chatlab
node_skill -->|"consults memory rules"| node_memory_guidance
node_memory_guidance -->|"defines memory use"| node_memory_store
node_memory_store -->|"reads and writes"| node_memory_db
node_skill -->|"respects boundaries"| node_ethics
node_skill -->|"prioritizes safety"| node_crisis

click node_skill "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md"
click node_emotion "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md"
click node_evidence "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md"
click node_judgment "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md"
click node_recommendation "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md"
click node_knowledge "https://github.com/shengjidaguai-china/goutoujunshi/tree/main/references/knowledge"
click node_practical "https://github.com/shengjidaguai-china/goutoujunshi/tree/main/references/practical"
click node_ethics "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/knowledge/01-%E8%AF%81%E6%8D%AE%E5%88%86%E7%BA%A7%E4%B8%8E%E5%86%85%E5%AE%B9%E8%BE%B9%E7%95%8C.md"
click node_crisis "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/knowledge/17-%E4%B8%AD%E5%9B%BD%E6%B3%95%E5%BE%8B%E5%AE%89%E5%85%A8%E4%B8%8E%E5%8D%B1%E6%9C%BA%E8%BD%AC%E4%BB%8B.md"
click node_chat "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/practical/ChatLab%E8%81%8A%E5%A4%A9%E8%AE%B0%E5%BD%95%E5%88%86%E6%9E%90%E9%80%82%E9%85%8D.md"
click node_memory_guidance "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/practical/%E9%95%BF%E6%9C%9F%E8%AE%B0%E5%BF%86%E4%B8%8E%E5%85%B3%E7%B3%BB%E6%A1%A3%E6%A1%88.md"
click node_memory_store "https://github.com/shengjidaguai-china/goutoujunshi/blob/main/scripts/memory_store.py"

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_skill,node_emotion,node_evidence,node_judgment,node_recommendation,node_user toneBlue
class node_knowledge,node_practical toneAmber
class node_chat,node_memory_guidance,node_memory_store,node_memory_db toneMint
class node_ethics,node_crisis toneRose
class node_chatlab toneIndigo
```

## Components

### Skill workflow

- [Skill routing](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md): `SKILL.md`
- [Emotional support](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md): `SKILL.md`
- [Fact analysis](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md): `SKILL.md`
- [Relationship judgment](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md): `SKILL.md`
- [Action and wording](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/SKILL.md): `SKILL.md`

### Knowledge and guidance

- [Relationship knowledge](https://github.com/shengjidaguai-china/goutoujunshi/tree/main/references/knowledge): `references/knowledge`
- [Practical guides](https://github.com/shengjidaguai-china/goutoujunshi/tree/main/references/practical): `references/practical`

### Optional tools

- [Chat analysis](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/practical/ChatLab%E8%81%8A%E5%A4%A9%E8%AE%B0%E5%BD%95%E5%88%86%E6%9E%90%E9%80%82%E9%85%8D.md): `references/practical/ChatLab聊天记录分析适配.md`
- [Memory rules](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/practical/%E9%95%BF%E6%9C%9F%E8%AE%B0%E5%BF%86%E4%B8%8E%E5%85%B3%E7%B3%BB%E6%A1%A3%E6%A1%88.md): `references/practical/长期记忆与关系档案.md`
- [Memory store](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/scripts/memory_store.py): `scripts/memory_store.py`
- **Local memory database**

### Boundaries and safety

- [Consent and ethics](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/knowledge/01-%E8%AF%81%E6%8D%AE%E5%88%86%E7%BA%A7%E4%B8%8E%E5%86%85%E5%AE%B9%E8%BE%B9%E7%95%8C.md): `references/knowledge/01-证据分级与内容边界.md`
- [Safety guidance](https://github.com/shengjidaguai-china/goutoujunshi/blob/main/references/knowledge/17-%E4%B8%AD%E5%9B%BD%E6%B3%95%E5%BE%8B%E5%AE%89%E5%85%A8%E4%B8%8E%E5%8D%B1%E6%9C%BA%E8%BD%AC%E4%BB%8B.md): `references/knowledge/17-中国法律安全与危机转介.md`

### Other components

- **User**
- **ChatLab**

## Connections

- User → Skill routing: describes situation (evidence: `README.md`)
- Skill routing → Emotional support: grounds emotion (evidence: `README.md`)
- Skill routing → Fact analysis: separates evidence (evidence: `README.md`)
- Skill routing → Relationship knowledge: loads relevant knowledge (evidence: `README.md`)
- Skill routing → Practical guides: loads relevant guides (evidence: `README.md`)
- Skill routing → Relationship judgment: evaluates options (evidence: `README.md`)
- Skill routing → Action and wording: forms next steps (evidence: `README.md`)
- Skill routing → Chat analysis: analyzes supplied chat (evidence: `README.md`)
- Chat analysis → ChatLab: queries optionally (evidence: `README.md`)
- Skill routing → Memory rules: consults memory rules (evidence: `README.md`)
- Memory rules → Memory store: defines memory use (evidence: `README.md`)
- Memory store → Local memory database: reads and writes (evidence: `scripts/memory_store.py`)
- Skill routing → Consent and ethics: respects boundaries (evidence: `README.md`)
- Skill routing → Safety guidance: prioritizes safety (evidence: `README.md`)
