Skip to content

Instantly share code, notes, and snippets.

@httpsterio
Last active March 14, 2026 11:36
Show Gist options
  • Select an option

  • Save httpsterio/226d1c003d540652bb96b8a694ba3b02 to your computer and use it in GitHub Desktop.

Select an option

Save httpsterio/226d1c003d540652bb96b8a694ba3b02 to your computer and use it in GitHub Desktop.
Gemini workflow

accounting-app

An Electron and Vue/TS based Accounting desktop application.

Recommended IDE Setup

Project Setup

Install

$ npm install

Development

$ npm run dev

Build

# For windows
$ npm run build:win

# For macOS
$ npm run build:mac

# For Linux
$ npm run build:linux

Agentic Development

Full protocol and agent diagrams: docs/gemini/PIPELINE.md

Pipeline

  USER assigns task
       │
       ▼
  ┌──────────┐
  │ ARCHITECT│  reads PLAN.md · writes hand-off to MEMO.md
  └────┬─────┘
       │
       ▼
  ┌──────────┐
  │PROGRAMMER│  reads PLAN.md + MEMO.md · implements
  └────┬─────┘  self-audits REVIEW_CHECKLIST.md · documents in MEMO.md
       │
       ▼
  ┌──────────┐
  │ INSPECTOR│  reads MEMO.md · audits GOLDEN_RULES.md + REVIEW_CHECKLIST.md
  └────┬─────┘
       │
       ├── FAIL ──▶ appends Rectification Report to MEMO.md ──▶ PROGRAMMER fixes ──▶ re-audit
       │
       └── PASS ──▶ ARCHITECT  archives to LEDGER.md · resets MEMO.md · marks step done in PLAN.md

Periodic: Codebase Audit

  USER triggers
       │
       ▼
  ┌──────────┐
  │ ARCHITECT│  reads src/ · checks GOLDEN_RULES.md + structural patterns
  └──────────┘  updates Last Codebase Audit SHA in INDEX.md

On-Demand: Clerk

  USER asks meta question or requests documentation update
       │
       ▼
  ┌──────────┐
  │  CLERK   │  answers · runs clerk.index-update.md protocol on request
  └──────────┘
+---docs/
|   |   PERSONAL_NOTES.md
|   |
|   +---gemini/
|   |   +---architect/
|   |   |       BACKLOG.md
|   |   |       IDENTITY.md
|   |   |       PLAN.md
|   |   |
|   |   +---clerk/
|   |   |       IDEAS.md
|   |   |       IDENTITY.md
|   |   |
|   |   +---inspector/
|   |   |       IDENTITY.md
|   |   |
|   |   +---programmer/
|   |   |       IDENTITY.md
|   |   |
|   |   +---protocols/
|   |   |       architect.codebase-audit.md
|   |   |       architect.roadmap-formalization.md
|   |   |       architect.task-completion.md
|   |   |       clerk.index-update.md
|   |   |       inspector.task-audit.md
|   |   |       programmer.bug-fix.md
|   |   |       programmer.feature-implementation.md
|   |   |
|   |   \---shared/
|   |           BUGS.md
|   |           CONVENTIONS.md
|   |           GOLDEN_RULES.md
|   |           INDEX.md
|   |           LEDGER.md
|   |           MEMO.md
|   |           REVIEW_CHECKLIST.md

Gemini Agent Pipeline

Full reference for all four agents and all protocol step diagrams.


Agents

ARCHITECT

  ┌──────────────────────────────────────────────┐
  │ ARCHITECT                                    │
  │                                              │
  │  Role:    Design, planning, roadmap          │
  │                                              │
  │  Reads:   PLAN.md · BACKLOG.md · MEMO.md     │
  │           GOLDEN_RULES.md                    │
  │  Writes:  PLAN.md · BACKLOG.md · MEMO.md     │
  │           LEDGER.md · INDEX.md (SHA only)    │
  │                                              │
  │  Protocols:                                  │
  │    · roadmap-formalization                   │
  │    · task-completion                         │
  │    · codebase-audit                          │
  └──────────────────────────────────────────────┘

PROGRAMMER

  ┌──────────────────────────────────────────────┐
  │ PROGRAMMER                                   │
  │                                              │
  │  Role:    Implementation, execution          │
  │                                              │
  │  Reads:   PLAN.md · MEMO.md                  │
  │           GOLDEN_RULES.md · CONVENTIONS.md   │
  │           REVIEW_CHECKLIST.md                │
  │  Writes:  src/ (code) · MEMO.md              │
  │                                              │
  │  Protocols:                                  │
  │    · feature-implementation                  │
  │    · bug-fix                                 │
  └──────────────────────────────────────────────┘

INSPECTOR

  ┌──────────────────────────────────────────────┐
  │ INSPECTOR                                    │
  │                                              │
  │  Role:    Audit, quality gating              │
  │                                              │
  │  Reads:   MEMO.md · PLAN.md                  │
  │           GOLDEN_RULES.md                    │
  │           REVIEW_CHECKLIST.md · src/ files   │
  │  Writes:  MEMO.md (verdict + reports only)   │
  │                                              │
  │  Protocols:                                  │
  │    · task-audit                              │
  └──────────────────────────────────────────────┘

CLERK

  ┌──────────────────────────────────────────────┐
  │ CLERK                                        │
  │                                              │
  │  Role:    Meta-questions, documentation      │
  │                                              │
  │  Reads:   Any doc file as needed             │
  │  Writes:  IDENTITY.md files · INDEX.md       │
  │           GEMINI.md · shared docs            │
  │                                              │
  │  Protocols:                                  │
  │    · index-update                            │
  └──────────────────────────────────────────────┘

Protocols

architect.roadmap-formalization

Promotes an item from BACKLOG.md (or a fresh user description) into a fully specified PLANNED entry in PLAN.md.

  Item from BACKLOG.md or user description
       │
       ▼
  ┌──────────────────────────────┐
  │ 1. MIRROR & INTERPRET        │  confirm source · restate intent · clarify scope
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 2. GOLDEN RULE ANALYSIS      │  identify which rules the task touches
  └───────────────┬──────────────┘  flag implications (transactions · disk ops · IPC)
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 3. SUB-STEP BREAKDOWN        │  decompose into atomic, individually testable steps
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 4. HANDOFF SPECIFICATION     │  target files · constraints · Golden Rule touchpoints
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 5. PROPOSE & WRITE           │  add task to PLAN.md (standalone or under Epic)
  └──────────────────────────────┘  remove item from BACKLOG.md if sourced there

architect.task-completion

Closes a completed task after INSPECTOR PASS. Archives and resets pipeline state.

  INSPECTOR issues PASS
       │
       ▼
  ┌──────────────────────────────┐
  │ 1. MIRROR & INTERPRET        │  confirm which task and step are being closed
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 2. DRIFT CHECK               │  verify implementation matches design intent
  └───────────────┬──────────────┘
                  │
                  ├── DRIFT FOUND ──▶ flag to user before proceeding
                  │
                  └── CLEAR
                           │
                           ▼
                  ┌──────────────────────────────┐
                  │ 3. UPDATE PLAN.md            │  mark step complete
                  └───────────────┬──────────────┘
                                  │
                                  ▼
                  ┌──────────────────────────────┐
                  │ 4. ARCHIVE TO LEDGER.md      │  log completed task permanently
                  └───────────────┬──────────────┘
                                  │
                                  ▼
                  ┌──────────────────────────────┐
                  │ 5. RESET MEMO.md             │  clear with blank template
                  └──────────────────────────────┘  pipeline ready for next task

architect.codebase-audit

Periodic sweep of src/ for Golden Rule violations and structural risks.

  USER triggers audit
       │
       ▼
  ┌──────────────────────────────┐
  │ 1. MIRROR & INTERPRET        │  confirm scope (full or targeted)
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 2. RULE EXPOSURE MAP         │  read GOLDEN_RULES.md · identify most exposed files
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 3. FILE AUDIT                │  detect brittle logic:
  └───────────────┬──────────────┘  unguarded assumptions · non-atomic ops
                  │                 silent wrong results · order-dependent logic
                  ▼
  ┌──────────────────────────────┐
  │ 4. LOG FINDINGS              │  append to BUGS.md
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 5. UPDATE INDEX.md           │  record Last Codebase Audit commit SHA
  └──────────────────────────────┘

programmer.feature-implementation

Implements an assigned task step from PLAN.md.

  USER assigns task step
       │
       ▼
  ┌──────────────────────────────┐
  │ 1. MIRROR & INTERPRET        │  confirm target files and approach from PLAN.md
  └───────────────┬──────────────┘  stop and report if plan conflicts with code
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 2. PRE-FLIGHT                │  read target files in full
  └───────────────┬──────────────┘  verify code matches plan assumptions
                  │
                  ▼
  ┌──────────────────────────────┐
  │ BLAST RADIUS CHECK           │
  └───────────────┬──────────────┘
                  │
                  ├── RED ──▶ Technical Blocker Report ──▶ MEMO.md ──▶ STOP
                  │
                  └── GREEN / YELLOW
                           │
                           ▼
                  ┌──────────────────────────────┐
                  │ 3. IMPLEMENT                 │  GOLDEN_RULES.md + CONVENTIONS.md
                  └───────────────┬──────────────┘
                                  │
                                  ▼
                  ┌──────────────────────────────┐
                  │ 4. SELF-AUDIT                │  REVIEW_CHECKLIST.md · all items pass
                  └───────────────┬──────────────┘
                                  │
                                  ▼
                  ┌──────────────────────────────┐
                  │ 5. LOG & HAND-OFF            │  append to MEMO.md Hand-off Notes
                  └──────────────────────────────┘  files changed · testing steps

programmer.bug-fix

Root-cause investigation and targeted repair for a known or reported bug.

  Bug from BUGS.md or user description
       │
       ▼
  ┌──────────────────────────────┐
  │ 1. MIRROR & INTERPRET        │  restate bug · suspected cause · likely files
  └───────────────┬──────────────┘  ask if unclear before investigating
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 2. ROOT CAUSE INVESTIGATION  │  read codebase · find exact cause
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ BLAST RADIUS CHECK           │
  └───────────────┬──────────────┘
                  │
                  ├── RED ──▶ Technical Blocker Report ──▶ MEMO.md ──▶ STOP
                  │
                  └── GREEN / YELLOW
                           │
                           ▼
                  ┌──────────────────────────────┐
                  │ 3. FIX                       │  targeted repair · no collateral changes
                  └───────────────┬──────────────┘  GOLDEN_RULES.md + CONVENTIONS.md
                                  │
                                  ▼
                  ┌──────────────────────────────┐
                  │ 4. SELF-AUDIT                │  REVIEW_CHECKLIST.md · no new issues
                  └───────────────┬──────────────┘
                                  │
                                  ▼
                  ┌──────────────────────────────┐
                  │ 5. LOG & HAND-OFF            │  append to MEMO.md Hand-off Notes
                  └──────────────────────────────┘  root cause · fix · testing steps
                                                    mark resolved in BUGS.md if applicable

inspector.task-audit

Validates a completed implementation against the plan, Golden Rules, and checklist.

  PROGRAMMER signals completion
       │
       ▼
  ┌──────────────────────────────┐
  │ 1. MIRROR & INTERPRET        │  read MEMO.md + PLAN.md
  └───────────────┬──────────────┘  confirm target files and audit scope
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 2. PLAN FIDELITY             │  compare implementation against PLAN.md steps
  └───────────────┬──────────────┘  all sub-steps satisfied?
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 3. GOLDEN RULES + CHECKLIST  │  zero-tolerance audit
  └───────────────┬──────────────┘  GOLDEN_RULES.md + REVIEW_CHECKLIST.md
                  │                 any violation = automatic FAIL
                  ▼
  ┌──────────────────────────────┐
  │ 4. VERDICT                   │
  └───────────────┬──────────────┘
                  │
                  ├── FAIL ──▶ Rectification Report (file · function · line · rule · reasoning)
                  │                 └──▶ append to MEMO.md ──▶ PROGRAMMER fixes ──▶ re-audit
                  │
                  └── PASS
                           │
                           ▼
                  ┌──────────────────────────────┐
                  │ 5. LOG & HAND-OFF            │  append verdict to MEMO.md Hand-off Notes
                  └──────────────────────────────┘  signal ARCHITECT for task-completion

clerk.index-update

Regenerates the Directory Tree and Quick Links sections of INDEX.md.

  USER requests index update
       │
       ▼
  ┌──────────────────────────────┐
  │ 1. MIRROR & INTERPRET        │  full refresh or targeted update?
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 2. GENERATE TREE             │  eza --tree --git-ignore from project root
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 3. REVIEW QUICK LINKS        │  update changed paths · add new files · remove dead links
  └───────────────┬──────────────┘
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 4. PROPOSE                   │  present full proposed INDEX.md for user review
  └───────────────┬──────────────┘  do NOT write until explicitly approved
                  │
                  ▼
  ┌──────────────────────────────┐
  │ 5. WRITE                     │  Directory Tree + Quick Links only
  └──────────────────────────────┘  Standard Tooling section is never modified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment