# chiefgyk3d/scrum-around-and-find-out architecture

> Architecture diagram of the GitHub repository chiefgyk3d/scrum-around-and-find-out, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/chiefgyk3d/scrum-around-and-find-out
- Repository: https://github.com/chiefgyk3d/scrum-around-and-find-out

## Overview

SAFO is a maintainer-facing CLI and GitHub Action for managing a GitHub Project as code, enforcing issue-linked work, and advising how to route tasks among AI agents. The main workflow is to validate board configuration, inspect the live project, then audit drift or reconcile and sync cards; status reports the result. Separate capabilities cover agent routing and usage, local hooks, profiles, and guarded Gemini research and paid calls. The graph uses README-documented capabilities and sampled source references; many mode implementations were not excerpted, so their internal call paths are not asserted.

Main entry points: [`src/safo/cli.py`](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/cli.py) (SAFO CLI), [`src/safo/modes/reconcile.py`](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/reconcile.py) (Reconcile), [`src/safo/modes/audit.py`](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/audit.py) (Audit), [`src/safo/modes/sync.py`](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/sync.py) (Sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_board["Board operations"]
  node_board_schema["Board schema<br/>[schema.py]"]
  node_validation["Validate<br/>[validate.py]"]
  node_bootstrap["Bootstrap<br/>[bootstrap.py]"]
  node_audit["Audit<br/>[audit.py]"]
  node_reconcile["Reconcile<br/>[reconcile.py]"]
  node_sync["Sync<br/>[sync.py]"]
  node_status["Status<br/>[status.py]"]
  node_coverage["Tracking checks<br/>[coverage.py]"]
  node_apply["Board apply<br/>[apply.py]"]
end

subgraph group_routing["Agent workflow"]
  node_agents["Agent configuration<br/>[agentsfile.py]"]
  node_routing["Route recommendation<br/>[routing.py]"]
  node_meters["Usage meters"]
  node_usage["Usage report<br/>[usage.py]"]
  node_hooks["Agent hooks<br/>[hooks.py]"]
  node_profiles["Agent profiles<br/>[profile.py]"]
end

subgraph group_gemini["Gemini services"]
  node_free_gemini["Free Gemini<br/>[gemini.py]"]
  node_paid_client["Paid-call client<br/>[client.py]"]
  node_broker_server["Broker service<br/>[server.py]"]
  node_paid_pipeline["Paid-call pipeline<br/>[pipeline.py]"]
  node_paid_ledger[("Call ledger<br/>[ledger.py]")]
end

subgraph group_shared["Shared runtime"]
  node_cli["SAFO CLI<br/>[cli.py]"]
  node_context["Mode context<br/>[context.py]"]
  node_graphql["GitHub GraphQL<br/>[graphql.py]"]
  node_output["Safe output<br/>[output.py]"]
end

node_maintainer(("Maintainer"))
node_github[("GitHub Project")]
node_gemini_vendor{{"Gemini API"}}

node_maintainer -->|"runs commands"| node_cli
node_cli -->|"runs mode"| node_validation
node_cli -->|"runs mode"| node_bootstrap
node_cli -->|"runs mode"| node_audit
node_cli -->|"runs mode"| node_reconcile
node_cli -->|"runs mode"| node_sync
node_cli -->|"runs mode"| node_status
node_validation -->|"validates config"| node_board_schema
node_bootstrap -->|"creates project fields"| node_github
node_audit -->|"inspects project"| node_github
node_audit -->|"checks tracking"| node_coverage
node_reconcile -->|"reads and repairs"| node_github
node_reconcile -->|"finds tracking gaps"| node_coverage
node_reconcile -->|"applies changes"| node_apply
node_sync -->|"uses reconciliation"| node_reconcile
node_sync -->|"applies changes"| node_apply
node_status -->|"reads project"| node_github
node_context -->|"provides client"| node_graphql
node_graphql -->|"sends queries"| node_github
node_maintainer -->|"requests recommendation"| node_routing
node_routing -->|"reads rules"| node_agents
node_routing -->|"uses headroom"| node_meters
node_maintainer -->|"requests report"| node_usage
node_usage -->|"reads usage"| node_meters
node_maintainer -->|"installs hooks"| node_hooks
node_hooks -->|"enforces configuration"| node_agents
node_maintainer -->|"manages profiles"| node_profiles
node_maintainer -->|"requests research"| node_free_gemini
node_free_gemini -->|"calls free tier"| node_gemini_vendor
node_maintainer -->|"requests paid call"| node_paid_client
node_paid_client -->|"requests broker call"| node_broker_server
node_broker_server -->|"dispatches call"| node_paid_pipeline
node_paid_pipeline -->|"records and settles"| node_paid_ledger
node_paid_pipeline -->|"sends request"| node_gemini_vendor
node_context -->|"writes safely"| node_output

click node_cli "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/cli.py"
click node_board_schema "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/schema.py"
click node_context "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/context.py"
click node_graphql "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/graphql.py"
click node_validation "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/validate.py"
click node_bootstrap "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/bootstrap.py"
click node_audit "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/audit.py"
click node_reconcile "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/reconcile.py"
click node_sync "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/sync.py"
click node_status "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/status.py"
click node_coverage "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/coverage.py"
click node_apply "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/apply.py"
click node_agents "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/agentsfile.py"
click node_routing "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/routing.py"
click node_meters "https://github.com/chiefgyk3d/scrum-around-and-find-out/tree/main/src/safo/meters"
click node_usage "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/usage.py"
click node_hooks "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/hooks.py"
click node_profiles "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/profile.py"
click node_free_gemini "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/gemini.py"
click node_paid_client "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/client.py"
click node_broker_server "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/server.py"
click node_paid_pipeline "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/pipeline.py"
click node_paid_ledger "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/ledger.py"
click node_output "https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/output.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_board_schema,node_validation,node_bootstrap,node_audit,node_reconcile,node_sync,node_status,node_coverage,node_apply toneBlue
class node_agents,node_routing,node_meters,node_usage,node_hooks,node_profiles,node_github toneAmber
class node_free_gemini,node_paid_client,node_broker_server,node_paid_pipeline,node_paid_ledger,node_gemini_vendor toneMint
class node_cli,node_context,node_graphql,node_output toneRose
class node_maintainer toneIndigo
```

## Components

### Board operations

- [Board schema](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/schema.py): `src/safo/schema.py`
- [Validate](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/validate.py): `src/safo/modes/validate.py`
- [Bootstrap](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/bootstrap.py): `src/safo/modes/bootstrap.py`
- [Audit](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/audit.py): `src/safo/modes/audit.py`
- [Reconcile](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/reconcile.py): `src/safo/modes/reconcile.py`
- [Sync](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/sync.py): `src/safo/modes/sync.py`
- [Status](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/status.py): `src/safo/modes/status.py`
- [Tracking checks](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/coverage.py): `src/safo/coverage.py`
- [Board apply](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/apply.py): `src/safo/apply.py`

### Agent workflow

- [Agent configuration](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/agentsfile.py): `src/safo/agentsfile.py`
- [Route recommendation](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/routing.py): `src/safo/routing.py`
- [Usage meters](https://github.com/chiefgyk3d/scrum-around-and-find-out/tree/main/src/safo/meters): `src/safo/meters`
- [Usage report](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/modes/usage.py): `src/safo/modes/usage.py`
- [Agent hooks](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/hooks.py): `src/safo/hooks.py`
- [Agent profiles](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/profile.py): `src/safo/profile.py`

### Gemini services

- [Free Gemini](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/gemini.py): `src/safo/gemini.py`
- [Paid-call client](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/client.py): `src/safo/broker/client.py`
- [Broker service](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/server.py): `src/safo/broker/server.py`
- [Paid-call pipeline](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/pipeline.py): `src/safo/broker/pipeline.py`
- [Call ledger](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/broker/ledger.py): `src/safo/broker/ledger.py`

### Shared runtime

- [SAFO CLI](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/cli.py): `src/safo/cli.py`
- [Mode context](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/context.py): `src/safo/context.py`
- [GitHub GraphQL](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/graphql.py): `src/safo/graphql.py`
- [Safe output](https://github.com/chiefgyk3d/scrum-around-and-find-out/blob/main/src/safo/output.py): `src/safo/output.py`

### Other components

- **Maintainer**
- **GitHub Project**
- **Gemini API**

## Connections

- Maintainer → SAFO CLI: runs commands
- SAFO CLI → Validate: runs mode
- SAFO CLI → Bootstrap: runs mode
- SAFO CLI → Audit: runs mode
- SAFO CLI → Reconcile: runs mode
- SAFO CLI → Sync: runs mode
- SAFO CLI → Status: runs mode
- Validate → Board schema: validates config
- Bootstrap → GitHub Project: creates project fields
- Audit → GitHub Project: inspects project
- Audit → Tracking checks: checks tracking (evidence: `src/safo/coverage.py`)
- Reconcile → GitHub Project: reads and repairs (evidence: `src/safo/modes/reconcile.py`)
- Reconcile → Tracking checks: finds tracking gaps (evidence: `src/safo/modes/reconcile.py`)
- Reconcile → Board apply: applies changes (evidence: `src/safo/modes/reconcile.py`)
- Sync → Reconcile: uses reconciliation (evidence: `src/safo/modes/sync.py`)
- Sync → Board apply: applies changes (evidence: `src/safo/modes/sync.py`)
- Status → GitHub Project: reads project
- Mode context → GitHub GraphQL: provides client (evidence: `src/safo/context.py`)
- GitHub GraphQL → GitHub Project: sends queries
- Maintainer → Route recommendation: requests recommendation
- Route recommendation → Agent configuration: reads rules (evidence: `src/safo/routing.py`)
- Route recommendation → Usage meters: uses headroom
- Maintainer → Usage report: requests report
- Usage report → Usage meters: reads usage
- Maintainer → Agent hooks: installs hooks
- Agent hooks → Agent configuration: enforces configuration (evidence: `src/safo/modes/hooks.py`)
- Maintainer → Agent profiles: manages profiles
- Maintainer → Free Gemini: requests research
- Free Gemini → Gemini API: calls free tier
- Maintainer → Paid-call client: requests paid call
- Paid-call client → Broker service: requests broker call (evidence: `src/safo/broker/client.py`)
- Broker service → Paid-call pipeline: dispatches call (evidence: `src/safo/broker/server.py`)
- Paid-call pipeline → Call ledger: records and settles (evidence: `src/safo/broker/pipeline.py`)
- Paid-call pipeline → Gemini API: sends request (evidence: `src/safo/broker/pipeline.py`)
- Mode context → Safe output: writes safely (evidence: `src/safo/context.py`)
