ralphflow 0.5.0 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/{chunk-TCCMQDVT.js → chunk-DOC64TD6.js} +32 -2
- package/dist/ralphflow.js +584 -24
- package/dist/{server-DOSLU36L.js → server-EX5MWYW4.js} +210 -10
- package/package.json +6 -2
- package/src/dashboard/ui/app.js +203 -0
- package/src/dashboard/ui/archives.js +167 -0
- package/src/dashboard/ui/index.html +2 -3210
- package/src/dashboard/ui/loop-detail.js +880 -0
- package/src/dashboard/ui/notifications.js +151 -0
- package/src/dashboard/ui/prompt-builder.js +362 -0
- package/src/dashboard/ui/sidebar.js +97 -0
- package/src/dashboard/ui/state.js +54 -0
- package/src/dashboard/ui/styles.css +2140 -0
- package/src/dashboard/ui/templates.js +1858 -0
- package/src/dashboard/ui/utils.js +115 -0
- package/src/templates/code-implementation/loops/00-story-loop/prompt.md +73 -11
- package/src/templates/code-implementation/loops/01-tasks-loop/prompt.md +51 -2
- package/src/templates/code-implementation/loops/02-delivery-loop/prompt.md +48 -4
- package/src/templates/research/loops/00-discovery-loop/prompt.md +58 -5
- package/src/templates/research/loops/01-research-loop/prompt.md +44 -2
- package/src/templates/research/loops/02-story-loop/prompt.md +42 -1
- package/src/templates/research/loops/03-document-loop/prompt.md +42 -1
|
@@ -12,6 +12,24 @@ Read `.ralph-flow/{{APP_NAME}}/03-document-loop/tracker.md` FIRST to determine w
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
+
## Visual Communication Protocol
|
|
16
|
+
|
|
17
|
+
When communicating scope, structure, relationships, or status, render **ASCII diagrams** using Unicode box-drawing characters. These help the user see the full picture at the terminal without scrolling through prose.
|
|
18
|
+
|
|
19
|
+
**Character set:** `┌ ─ ┐ │ └ ┘ ├ ┤ ┬ ┴ ┼ ═ ● ○ ▼ ▶`
|
|
20
|
+
|
|
21
|
+
**Diagram types to use:**
|
|
22
|
+
|
|
23
|
+
- **Scope/Architecture Map** — components and their relationships in a bordered grid
|
|
24
|
+
- **Decomposition Tree** — hierarchical breakdown with `├──` and `└──` branches
|
|
25
|
+
- **Data Flow** — arrows (`──→`) showing how information moves between components
|
|
26
|
+
- **Comparison Table** — bordered table for trade-offs and design options
|
|
27
|
+
- **Status Summary** — bordered box with completion indicators (`✓` done, `◌` pending)
|
|
28
|
+
|
|
29
|
+
**Rules:** Keep diagrams under 20 lines and under 70 characters wide. Populate with real data from current context. Render inside fenced code blocks. Use diagrams to supplement, not replace, prose.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
15
33
|
## STAGE 1: COMPILE
|
|
16
34
|
|
|
17
35
|
1. **Read context:**
|
|
@@ -24,7 +42,8 @@ Read `.ralph-flow/{{APP_NAME}}/03-document-loop/tracker.md` FIRST to determine w
|
|
|
24
42
|
- "What format should the final document be? (markdown/pdf/ppt/html)" with options
|
|
25
43
|
- Also ask: "Any specific structure, branding, or style requirements?"
|
|
26
44
|
|
|
27
|
-
3. **
|
|
45
|
+
3. **Render a Document Blueprint** — output an ASCII diagram showing document sections in reading order with estimated word counts, story-to-section mapping, and appendix structure
|
|
46
|
+
4. **Plan document structure:**
|
|
28
47
|
- Executive summary / abstract
|
|
29
48
|
- Table of contents
|
|
30
49
|
- Arrange stories in logical reading order (not necessarily story-number order)
|
|
@@ -109,6 +128,28 @@ Read `.ralph-flow/{{APP_NAME}}/03-document-loop/tracker.md` FIRST to determine w
|
|
|
109
128
|
|
|
110
129
|
---
|
|
111
130
|
|
|
131
|
+
## Decision Reporting Protocol
|
|
132
|
+
|
|
133
|
+
When you make a substantive decision a human reviewer would want to know about, report it to the dashboard:
|
|
134
|
+
|
|
135
|
+
**When to report:**
|
|
136
|
+
- Document structure decisions (how you organized the overall narrative)
|
|
137
|
+
- Story ordering choices (why stories were arranged in a particular sequence)
|
|
138
|
+
- Format decisions (how you adapted content for the chosen output format)
|
|
139
|
+
- Editorial choices (what to include in the executive summary, what to put in appendices)
|
|
140
|
+
- Audience adaptation decisions (how you adjusted tone or depth)
|
|
141
|
+
|
|
142
|
+
**How to report:**
|
|
143
|
+
```bash
|
|
144
|
+
curl -s --connect-timeout 2 --max-time 5 -X POST "http://127.0.0.1:4242/api/decision?app=$RALPHFLOW_APP&loop=$RALPHFLOW_LOOP" -H 'Content-Type: application/json' -d '{"item":"DOCUMENT","agent":"document-loop","decision":"{one-line summary}","reasoning":"{why this choice}"}'
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Do NOT report** routine operations: reading files, updating tracker. Only report substantive choices that affect the final document.
|
|
148
|
+
|
|
149
|
+
**Best-effort only:** If the dashboard is unreachable (curl fails), continue working normally. Decision reporting must never block or delay your work.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
112
153
|
## Rules
|
|
113
154
|
|
|
114
155
|
- This runs ONCE, on-demand. It is not a recurring loop.
|