Hermes Bot Oz commited on
Commit
70d0be3
·
unverified ·
1 Parent(s): 0dcae3c

docs: translate PRD into DOX hierarchy

Browse files

Rewrite root llms.txt from flat PRD format to DOX structure with
Purpose, Ownership, Local Contracts, Work Guidance, Verification, TODO,
and Child DOX Index sections.

Create child DOX files:
- projects/llms.txt — three-app overview
- projects/crittercalm/llms.txt — Backyard AI app
- projects/focusfriend/llms.txt — Focus companion
- projects/tinybard/llms.txt — Text adventure generator
- shared/llms.txt — Inference client + aesthetic tokens

Co-Authored-By: Oz <oz-agent@warp.dev>

llms.txt CHANGED
@@ -1,33 +1,27 @@
1
- # Build Small Hackathon — PRD
2
- # Project Requirements Document
3
 
4
- > Three Gradio apps targeting all tracks + maximum badges + sponsor prizes.
5
- > Hack window: June 5-15, 2026. Deadline: June 15.
6
 
7
- > This file is the master PRD and stays English-only. Per-project UIs and
8
- > READMEs may use additional stylistic content for their own artifacts; this
9
- > doc does not enumerate those choices.
10
 
11
- ---
12
-
13
- ## Overview
14
 
15
  - **Name:** Build Small Hackathon 2026 — Team nbiish
16
  - **Version:** 0.5.0 — Cedar-Copper Edition (HF Inference API)
17
- - **Aesthetic:** Cedar-copper visual language — sky-to-sunrise palette (water-blue → cedar → copper → sun-amber → birch-cream), biophilic motifs, sky-to-water gradient banners. Shared CSS variables live in `shared/cedar_copper_tokens.py`.
18
- - **Purpose:** Win prizes across tracks, badges, and sponsor categories by building delightful, useful AI apps that run locally.
19
- - **UX:** Gradio web apps (gr.Blocks + mount_gradio_app custom frontends), hosted on HF Spaces.
20
 
21
- ---
22
 
23
- ## Rules
24
 
25
- ### Naming & Comments
26
 
27
  - Descriptive project names: CritterCalm, FocusFriend, TinyBard
28
  - Docstrings on all public functions. Comments on non-obvious logic.
29
 
30
- ### Always
31
 
32
  - Models ≤ 32B total params per project
33
  - Gradio app hosted as HF Space
@@ -36,23 +30,21 @@
36
  - Python 3.10+ with pinned requirements
37
  - Cedar-copper aesthetic consistency across all UIs (palette tokens in `shared/cedar_copper_tokens.py`)
38
 
39
- ### Never
40
 
41
  - Cloud API calls in production path
42
  - Hardcoded secrets or API keys
43
  - Models > 32B params
44
  - Default Gradio look without customization attempt
45
 
46
- ### If
47
 
48
- - If custom frontend is feasible → use `mount_gradio_app` for Off-Brand badge
49
- - If model ≤ 4B → tag Tiny Titan eligible
50
- - If using llama.cpp runtime → tag Llama Champion
51
- - If fine-tuning is done → publish model to HF Hub
52
 
53
- ---
54
-
55
- ## Infrastructure
56
 
57
  ### Gradio 6.0 + MCP Server
58
 
@@ -70,11 +62,11 @@
70
  - Spaces managed via: `hf repos create <name> --type space --space-sdk gradio --public`.
71
  - Deploy: `git remote add hf https://huggingface.co/spaces/<user>/<space>` then `git push hf main`.
72
  - HF README metadata: `colorTo` must be one of `[red, yellow, green, blue, indigo, purple, pink, gray]` (no `emerald`/`amber`).
73
- - HF README metadata: `emoji` must match `/\p{Extended_Pictographic}/u` — only the standard emoji block is allowed; decorative Unicode glyphs (solar/astrological/typographic symbols) fail validation. Use a real emoji.
74
 
75
  ### Inference Architecture (v0.5+)
76
 
77
- - **All LLM inference** is now via the **Hugging Face Inference API** (serverless). No more local GGUF, no `llama-cpp-python` compile step.
78
  - Shared module: `shared/inference_client.py` provides `cooldown_status()`, `cooldown_active()`, `generate()`, and `chat_messages()`.
79
  - Default model: `Qwen/Qwen2.5-1.5B-Instruct` (free tier, fast, well-suited to chat). Override via `INFERENCE_MODEL`.
80
  - Per-project model override: `TINYBARD_MODEL`, `FOCUSFRIEND_MODEL`, `CRITTERCALM_MODEL`.
@@ -95,48 +87,28 @@
95
 
96
  ### Local Servers (optional)
97
 
98
- Local servers were used during v0.4 development for visual inspection. v0.5+ prefers iterating on the live HF Spaces (which use your HF/Modal compute credits). Local servers can still be run for dev:
99
-
100
- | Project | URL | Stack | HF Space |
101
- |---|---|---|---|
102
- | TinyBard | http://localhost:7861/ | FastAPI + Gradio Blocks | nbiish/tinybard |
103
- | FocusFriend | http://localhost:7862/ | Gradio 6.0 | nbiish/focusfriend |
104
- | CritterCalm | http://localhost:7863/ | Gradio 6.0 | nbiish/crittercalm |
105
-
106
- ---
107
-
108
- ## Projects
109
-
110
- ### 1. CritterCalm (Backyard AI)
111
 
112
- - **Status:** Code complete. Deployed. HF Inference API + cooldowns wired for script generation. OmniVoice voice cloning still requires local install.
113
- - **Stack:** OmniVoice (0.6B, local optional) + Kokoro TTS (82M, local optional) + Qwen2.5-7B (default) via HF Inference API
114
- - **Badges:** Off the Grid, Well-Tuned (TBD), Field Notes, Off-Brand
115
- - **GitHub:** github.com/nbiish/crittercalm
116
- - **HF Space:** huggingface.co/spaces/nbiish/crittercalm
117
- - **Standalone repo:** /Volumes/1tb-sandisk/code-external/crittercalm-repo
118
 
119
- ### 2. FocusFriend (Thousand Token Wood)
120
-
121
- - **Status:** Code complete. Deployed. HF Inference API + cooldowns wired. Gradio 6 Chatbot dict-format fixed.
122
- - **Stack:** Qwen2.5-7B (default) via HF Inference API
123
- - **Badges:** Off-Brand (sun-amber custom theme), Field Notes, Cooldowns badge
124
- - **GitHub:** github.com/nbiish/focusfriend
125
- - **HF Space:** huggingface.co/spaces/nbiish/focusfriend
126
- - **Standalone repo:** /Volumes/1tb-sandisk/code-external/focusfriend-repo
127
-
128
- ### 3. TinyBard (Thousand Token Wood + Tiny Titan + Llama Champion)
129
 
130
- - **Status:** Code complete. Deployed. HF Inference API + cooldowns wired. Local test verified (procedural fallback + cooldown UI).
131
- - **Concept:** ≤4B LLM generates 5-min interactive text adventures in a CRT terminal aesthetic.
132
- - **Stack:** Qwen2.5-1.5B (default) via HF Inference API + procedural fallback engine
133
 
134
- ---
 
 
 
135
 
136
  ## TODO
137
 
138
- > Keep tasks atomic and testable.
139
-
140
  ### In Progress
141
 
142
  - [ ] Test CritterCalm voice cloning pipeline end-to-end
@@ -156,36 +128,20 @@ Local servers were used during v0.4 development for visual inspection. v0.5+ pre
156
  - [x] Monorepo structure with projects/ directory + shared/ aesthetic module
157
  - [x] INTELLIGENCE.md — full hackathon landscape analysis
158
  - [x] SUBMISSION_DRAFTS.md — social posts + Field Notes drafts
159
- - [x] HF CLI installed + skills configured (`hf skills add --global`)
160
- - [x] llama-cpp-python installed (conda-forge v0.3.16) — for reference; v0.5+ uses HF Inference API
161
  - [x] Local verification: all 3 apps run on ports 7861/7862/7863
162
- - [x] TinyBard end-to-end game loop verified (start → choose → next scene)
163
- - [x] FocusFriend chat verified (user message → Pip reply)
164
- - [x] CritterCalm UI navigation verified (all 3 tabs render)
165
- - [x] **v0.5: HF Inference API wired into all 3 apps** (no local GGUF, no build step)
166
- - [x] **v0.5: Cooldown system** in `shared/inference_client.py` to protect HF/Modal credit budget
167
- - [x] **v0.5: TinyBard local test** — procedural fallback works when no HF_TOKEN; cooldown UI shows in footer
168
-
169
- ---
170
-
171
- ## Short-term Goals
172
-
173
- - Iterate on the live HF Spaces (nbiish/tinybard, nbiish/focusfriend, nbiish/crittercalm)
174
- - Set HF_TOKEN + INFERENCE_MODEL Space secrets to enable real LLM-backed adventures
175
- - Record demo videos and post to social media
176
- - Write and publish Field Notes blog posts
177
- - Share agent traces for Sharing is Caring badge
178
- - Polish UIs for demo appeal
179
-
180
- ---
181
-
182
- ## Reference
183
-
184
- - CritterCalm: projects/crittercalm/ + github.com/nbiish/crittercalm
185
- - FocusFriend: projects/focusfriend/ + github.com/nbiish/focusfriend
186
- - TinyBard: projects/tinybard/ + github.com/nbiish/tinybard
187
- - Aesthetic module: shared/cedar_copper_tokens.py
188
- - Inference client: shared/inference_client.py
189
- - ML Intern: github.com/huggingface/ml-intern
190
- - HF Agents CLI: huggingface.co/docs/hub/en/agents-cli
191
- - Gradio MCP: gradio.app/guides/model-context-protocol
 
1
+ # Build Small Hackathon — DOX
 
2
 
3
+ ## Purpose
 
4
 
5
+ Three Gradio apps targeting all tracks + maximum badges + sponsor prizes. Hack window: June 5–15, 2026.
 
 
6
 
7
+ ## Ownership
 
 
8
 
9
  - **Name:** Build Small Hackathon 2026 — Team nbiish
10
  - **Version:** 0.5.0 — Cedar-Copper Edition (HF Inference API)
11
+ - **Operator:** nbiish
12
+
13
+ ## Local Contracts
14
 
15
+ ### Aesthetic
16
 
17
+ Cedar-copper visual language — sky-to-sunrise palette (water-blue → cedar → copper → sun-amber → birch-cream), biophilic motifs, sky-to-water gradient banners. Shared CSS variables live in `shared/cedar_copper_tokens.py`.
18
 
19
+ ### Rules — Naming & Comments
20
 
21
  - Descriptive project names: CritterCalm, FocusFriend, TinyBard
22
  - Docstrings on all public functions. Comments on non-obvious logic.
23
 
24
+ ### Rules — Always
25
 
26
  - Models ≤ 32B total params per project
27
  - Gradio app hosted as HF Space
 
30
  - Python 3.10+ with pinned requirements
31
  - Cedar-copper aesthetic consistency across all UIs (palette tokens in `shared/cedar_copper_tokens.py`)
32
 
33
+ ### Rules — Never
34
 
35
  - Cloud API calls in production path
36
  - Hardcoded secrets or API keys
37
  - Models > 32B params
38
  - Default Gradio look without customization attempt
39
 
40
+ ### Rules — If
41
 
42
+ - Custom frontend feasible → use `mount_gradio_app` for Off-Brand badge
43
+ - Model ≤ 4B → tag Tiny Titan eligible
44
+ - Using llama.cpp runtime → tag Llama Champion
45
+ - Fine-tuning done → publish model to HF Hub
46
 
47
+ ## Work Guidance
 
 
48
 
49
  ### Gradio 6.0 + MCP Server
50
 
 
62
  - Spaces managed via: `hf repos create <name> --type space --space-sdk gradio --public`.
63
  - Deploy: `git remote add hf https://huggingface.co/spaces/<user>/<space>` then `git push hf main`.
64
  - HF README metadata: `colorTo` must be one of `[red, yellow, green, blue, indigo, purple, pink, gray]` (no `emerald`/`amber`).
65
+ - HF README metadata: `emoji` must match `/\p{Extended_Pictographic}/u` — only the standard emoji block is allowed. Use a real emoji.
66
 
67
  ### Inference Architecture (v0.5+)
68
 
69
+ - **All LLM inference** via the **Hugging Face Inference API** (serverless). No local GGUF, no `llama-cpp-python` compile step.
70
  - Shared module: `shared/inference_client.py` provides `cooldown_status()`, `cooldown_active()`, `generate()`, and `chat_messages()`.
71
  - Default model: `Qwen/Qwen2.5-1.5B-Instruct` (free tier, fast, well-suited to chat). Override via `INFERENCE_MODEL`.
72
  - Per-project model override: `TINYBARD_MODEL`, `FOCUSFRIEND_MODEL`, `CRITTERCALM_MODEL`.
 
87
 
88
  ### Local Servers (optional)
89
 
90
+ - TinyBard: http://localhost:7861/ FastAPI + Gradio Blocks nbiish/tinybard
91
+ - FocusFriend: http://localhost:7862/ — Gradio 6.0 — nbiish/focusfriend
92
+ - CritterCalm: http://localhost:7863/ Gradio 6.0 nbiish/crittercalm
 
 
 
 
 
 
 
 
 
 
93
 
94
+ ### Short-term Goals
 
 
 
 
 
95
 
96
+ - Iterate on the live HF Spaces
97
+ - Set HF_TOKEN + INFERENCE_MODEL Space secrets to enable real LLM-backed adventures
98
+ - Record demo videos and post to social media
99
+ - Write and publish Field Notes blog posts
100
+ - Share agent traces for Sharing is Caring badge
101
+ - Polish UIs for demo appeal
 
 
 
 
102
 
103
+ ## Verification
 
 
104
 
105
+ - All 3 apps deployed to HF Spaces and accessible
106
+ - Cooldown system active in `shared/inference_client.py`
107
+ - Cedar-copper aesthetic consistent across all UIs
108
+ - No hardcoded secrets; no cloud API calls in production path
109
 
110
  ## TODO
111
 
 
 
112
  ### In Progress
113
 
114
  - [ ] Test CritterCalm voice cloning pipeline end-to-end
 
128
  - [x] Monorepo structure with projects/ directory + shared/ aesthetic module
129
  - [x] INTELLIGENCE.md — full hackathon landscape analysis
130
  - [x] SUBMISSION_DRAFTS.md — social posts + Field Notes drafts
131
+ - [x] HF CLI installed + skills configured
132
+ - [x] llama-cpp-python installed — for reference; v0.5+ uses HF Inference API
133
  - [x] Local verification: all 3 apps run on ports 7861/7862/7863
134
+ - [x] TinyBard end-to-end game loop verified
135
+ - [x] FocusFriend chat verified
136
+ - [x] CritterCalm UI navigation verified
137
+ - [x] v0.5: HF Inference API wired into all 3 apps
138
+ - [x] v0.5: Cooldown system in shared/inference_client.py
139
+ - [x] v0.5: TinyBard local test — procedural fallback + cooldown UI
140
+
141
+ ## Child DOX Index
142
+
143
+ - `projects/llms.txt` — Three hackathon Gradio apps (CritterCalm, FocusFriend, TinyBard)
144
+ - `projects/crittercalm/llms.txt` — Backyard AI pet calming app
145
+ - `projects/focusfriend/llms.txt` Focus and mindfulness companion
146
+ - `projects/tinybard/llms.txt` Interactive text adventure generator
147
+ - `shared/llms.txt` Shared inference client and cedar-copper aesthetic tokens
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
projects/crittercalm/llms.txt ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CritterCalm — DOX
2
+
3
+ ## Purpose
4
+
5
+ Backyard AI pet calming app. Generates calming scripts for pets using LLM inference, with optional voice cloning via OmniVoice + Kokoro TTS.
6
+
7
+ ## Ownership
8
+
9
+ - **Status:** Code complete. Deployed. HF Inference API + cooldowns wired. Voice cloning still requires local install.
10
+ - **GitHub:** github.com/nbiish/crittercalm
11
+ - **HF Space:** huggingface.co/spaces/nbiish/crittercalm
12
+ - **Standalone repo:** /Volumes/1tb-sandisk/code-external/crittercalm-repo
13
+
14
+ ## Local Contracts
15
+
16
+ - **Stack:** OmniVoice (0.6B, local optional) + Kokoro TTS (82M, local optional) + Qwen2.5-7B (default) via HF Inference API
17
+ - **Badges:** Off the Grid, Well-Tuned (TBD), Field Notes, Off-Brand
18
+ - Default model: Qwen2.5-7B (override via `CRITTERCALM_MODEL`)
19
+ - Cooldown: 12s (override via `CRITTERCALM_COOLDOWN_SECONDS`)
20
+
21
+ ## Work Guidance
22
+
23
+ - `app.py` — Main Gradio app entry point
24
+ - `content/` — Script generator and templates
25
+ - `voice_cloning/` — OmniVoice cloner
26
+ - `utils/` — Audio utilities
27
+
28
+ ## Verification
29
+
30
+ - UI renders all 3 tabs
31
+ - Script generation works with and without inference
32
+ - Voice cloning pipeline functions when local dependencies available
projects/focusfriend/llms.txt ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # FocusFriend — DOX
2
+
3
+ ## Purpose
4
+
5
+ Focus and mindfulness companion. Four modes: Chat, Focus, Breathe, Meditate. Powered by Qwen2.5-7B via HF Inference API.
6
+
7
+ ## Ownership
8
+
9
+ - **Status:** Code complete. Deployed. HF Inference API + cooldowns wired. Gradio 6 Chatbot dict-format fixed.
10
+ - **GitHub:** github.com/nbiish/focusfriend
11
+ - **HF Space:** huggingface.co/spaces/nbiish/focusfriend
12
+ - **Standalone repo:** /Volumes/1tb-sandisk/code-external/focusfriend-repo
13
+
14
+ ## Local Contracts
15
+
16
+ - **Stack:** Qwen2.5-7B (default) via HF Inference API
17
+ - **Badges:** Off-Brand (sun-amber custom theme), Field Notes, Cooldowns badge
18
+ - Default model: Qwen2.5-7B (override via `FOCUSFRIEND_MODEL`)
19
+ - Cooldown: 10s (override via `FOCUSFRIEND_COOLDOWN_SECONDS`)
20
+
21
+ ## Work Guidance
22
+
23
+ - `app.py` — Main Gradio app entry point
24
+ - `character/` — ASCII art and personality definitions
25
+ - `inference/` — LLM integration layer
26
+ - `modes/` — Chat, Focus, Breathe, Meditate mode implementations
27
+
28
+ ## Verification
29
+
30
+ - All 4 modes render and respond
31
+ - Chat produces Pip replies with correct dict format
32
+ - Cedar-copper theme renders with sun-amber accent
projects/llms.txt ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Projects — DOX
2
+
3
+ ## Purpose
4
+
5
+ Three hackathon Gradio apps, each targeting specific badges and tracks.
6
+
7
+ ## Ownership
8
+
9
+ - Each project owns its own app.py, modules, requirements, and HF Space
10
+ - Shared inference and aesthetic code lives in `shared/`
11
+
12
+ ## Local Contracts
13
+
14
+ - Each project must be deployable as an independent HF Space
15
+ - Apps inherit cedar-copper aesthetic from `shared/cedar_copper_tokens.py`
16
+ - Inference via `shared/inference_client.py` — always-fallback pattern
17
+
18
+ ## Work Guidance
19
+
20
+ - Iterate on live HF Spaces, not localhost
21
+ - Per-project model override env vars: `TINYBARD_MODEL`, `FOCUSFRIEND_MODEL`, `CRITTERCALM_MODEL`
22
+ - Per-project cooldown env vars: `TINYBARD_COOLDOWN_SECONDS`, etc.
23
+
24
+ ## Verification
25
+
26
+ - Each app deploys to its HF Space without errors
27
+ - Cooldown system active per project
28
+ - Cedar-copper aesthetic renders correctly
29
+
30
+ ## Child DOX Index
31
+
32
+ - `crittercalm/llms.txt` — Backyard AI pet calming app
33
+ - `focusfriend/llms.txt` — Focus and mindfulness companion
34
+ - `tinybard/llms.txt` — Interactive text adventure generator
projects/tinybard/llms.txt ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TinyBard — DOX
2
+
3
+ ## Purpose
4
+
5
+ Interactive text adventure generator. ≤4B LLM generates 5-min adventures in a CRT terminal aesthetic. Targets Tiny Titan + Llama Champion badges.
6
+
7
+ ## Ownership
8
+
9
+ - **Status:** Code complete. Deployed. HF Inference API + cooldowns wired. Local test verified.
10
+ - **GitHub:** github.com/nbiish/tinybard
11
+ - **HF Space:** huggingface.co/spaces/nbiish/tinybard
12
+
13
+ ## Local Contracts
14
+
15
+ - **Stack:** Qwen2.5-1.5B (default) via HF Inference API + procedural fallback engine
16
+ - **Badges:** Thousand Token Wood, Tiny Titan, Llama Champion
17
+ - Default model: Qwen2.5-1.5B (override via `TINYBARD_MODEL`)
18
+ - Cooldown: 6s (override via `TINYBARD_COOLDOWN_SECONDS`)
19
+
20
+ ## Work Guidance
21
+
22
+ - `app.py` — Main Gradio app entry point
23
+ - `static/` — Custom CRT terminal HTML/CSS/JS frontend
24
+ - Procedural fallback engine generates adventures when inference unavailable
25
+ - Game loop: start → choose → next scene
26
+
27
+ ## Verification
28
+
29
+ - End-to-end game loop works (start → choose → next scene)
30
+ - Procedural fallback generates content when no HF_TOKEN
31
+ - Cooldown UI shows in footer
32
+ - CRT terminal aesthetic renders correctly
shared/llms.txt ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Shared — DOX
2
+
3
+ ## Purpose
4
+
5
+ Cross-project modules: inference client and cedar-copper aesthetic tokens used by all three apps.
6
+
7
+ ## Ownership
8
+
9
+ - Inference client: `inference_client.py`
10
+ - Aesthetic tokens: `cedar_copper_tokens.py`
11
+
12
+ ## Local Contracts
13
+
14
+ - `inference_client.py` provides `cooldown_status()`, `cooldown_active()`, `generate()`, and `chat_messages()`
15
+ - Default model: `Qwen/Qwen2.5-1.5B-Instruct`. Override via `INFERENCE_MODEL`.
16
+ - All LLM calls have always-fallback to procedural/template output
17
+ - `cedar_copper_tokens.py` exports CSS variables for the sky-to-sunrise palette
18
+
19
+ ## Work Guidance
20
+
21
+ - Changes here affect all three apps — test across CritterCalm, FocusFriend, TinyBard
22
+ - Cooldown defaults: tinybard 6s, focusfriend 10s, crittercalm 12s
23
+ - Override via per-project env vars or global `INFERENCE_COOLDOWN_SECONDS`
24
+
25
+ ## Verification
26
+
27
+ - Inference client loads without errors
28
+ - Cooldown system respects per-project timing
29
+ - Cedar-copper tokens render consistent palette across all apps