Prompt 1 Architecture
# Prompt 1: Architecture/Planning
Design the worker pool and task scheduler for tq — a Go CLI task queue with priorities, dependencies, and concurrent workers.
Show:
1. The key types and interfaces (Store, Scheduler, WorkerPool, Task)
2. How tasks with dependencies are scheduled (DAG resolution)
3. How the worker pool bounds concurrency
4. How graceful shutdown works — what happens to in-progress tasks when the user hits Ctrl-C
5. How a crashed process recovers — what state are tasks in after an unclean shutdown
Produce Go type definitions and interface signatures. Include pseudocode or real code for the shutdown sequence and crash recovery logic.when to use it
Community prompt sourced from the open-source GitHub repo croftspan/gigo (Apache-2.0). A "Prompt 1 Architecture" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
croftspan/gigo · Apache-2.0
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar