Display comprehensive project progress including BRD status, corpus statistics, research progress, and writing progress with recommendations for next actions
Display comprehensive project status without making any changes. This is a read-only command that queries the database for all project metrics and recommends the next action based on current state.
Provide a clear, actionable overview of the entire book project's status. Show what's complete, what's in progress, what's blocking progress, and what should be done next. This command helps users understand the project state at a glance and guides them toward the next logical step.
None. This command reads all status information from the database and project files.
Display a comprehensive status dashboard with the following sections:
BOOKSTRAP STATUS
================
Project: <book-title-from-BRD>
Database: <status> (SurrealDB <version>)
BRD: <status> (v<version>)
Config: <config-file-path>
Status indicators:
✓ Complete (v2) or ✗ Missing or ⚠ OutdatedRunning (SurrealDB 2.0) or ✗ Not running or ⚠ Connection issuesCORPUS
------
Sources: <N> ingested
- Primary: <N>
- Secondary: <N>
- Web: <N>
Entities: <N> extracted
- Characters: <N>
- Locations: <N>
- Events: <N>
- Concepts: <N>
Query database for source and entity counts:
-- Count sources by type
SELECT count() AS total,
source_type,
reliability
FROM source
GROUP BY source_type, reliability;
-- Count entities by type
SELECT
(SELECT count() FROM character) AS characters,
(SELECT count() FROM location) AS locations,
(SELECT count() FROM event) AS events,
(SELECT count() FROM concept) AS concepts;
RESEARCH
--------
Tasks: <N>/<total> complete
Gaps: <N> open, <N> resolved
Sources needed: <N> high priority
Query for research status:
-- Knowledge gaps status
SELECT
count() AS total,
count(resolved = true) AS resolved,
count(resolved = false) AS open
FROM knowledge_gap;
-- High priority gaps
SELECT count()
FROM knowledge_gap
WHERE resolved = false
AND priority = 'high';
WRITING
-------
Tasks: <N>/<total> complete
Chapters: <N>/<total> drafted
- Complete: <N>
- In progress: <N>
- Not started: <N>
Word count: <N> / <target> target (<N>%)
Query for writing status:
-- Chapter status
SELECT
count() AS total,
count(status = 'complete') AS complete,
count(status = 'draft') AS in_progress,
count(status = 'planned') AS not_started
FROM chapter;
-- Total word count
SELECT sum(word_count) AS total_words
FROM chapter
WHERE status IN ['draft', 'complete'];
-- Target word count from BRD
SELECT target_word_count FROM brd ORDER BY version DESC LIMIT 1;
NEXT ACTION
-----------
Recommended: /bookstrap-<command> (<reason>)
Recommendation logic based on current state:
| Condition | Recommendation |
|---|---|
| No BRD exists | /bookstrap-init (Create Book Requirements Document) |
| BRD exists, no sources | /bookstrap-ingest (Load initial research corpus) |
| Sources exist, no research tasks | /bookstrap-plan-research (Identify knowledge gaps) |
| Unresolved gaps exist | /bookstrap-research (<N> gaps blocking writing) |
| Gaps resolved, no writing tasks | /bookstrap-plan-write (Generate writing tasks from corpus) |
| Writing tasks exist, gaps block them | /bookstrap-research (<N> gaps blocking <N> tasks) |
| Writing tasks ready | /bookstrap-write (<N> tasks ready to write) |
| Writing complete, not edited | /bookstrap-edit (Run consistency and voice checks) |
| All complete | All tasks complete! Run /bookstrap-query or /bookstrap-edit for refinements |
# Verify SurrealDB is running
curl -s http://localhost:2665/health || echo "Database not running"
# If running, get version
surreal version 2>/dev/null || echo "Unknown"
# Check if BRD.md exists
if [ -f "BRD.md" ]; then
# Get version from BRD if tracked in database
# Otherwise mark as "✓ Complete"
else
echo "✗ Missing"
fi
Execute SurrealDB queries to gather:
surreal sql --conn http://localhost:2665 \
--user root --pass root \
--ns bookstrap --db <database-name> \
--query "<query-from-above>"
Execute queries for:
Execute queries for:
Use the decision logic above to determine the next command to run based on:
Present all information in the formatted output shown above.
If user requests detailed stats with /bookstrap-status --verbose:
DETAILED STATISTICS
===================
CORPUS BREAKDOWN
----------------
Total storage: <MB> in database
Average chunk size: <N> tokens
Average entities per source: <N>
Embedding coverage: <N>% of content
RESEARCH DETAILS
----------------
Average sources per gap: <N>
Source reliability distribution:
- High: <N> (<N>%)
- Medium: <N> (<N>%)
- Low: <N> (<N>%)
Top unresolved gaps:
1. <gap-question> (blocks <N> tasks)
2. <gap-question> (blocks <N> tasks)
3. <gap-question> (blocks <N> tasks)
WRITING DETAILS
---------------
Average section length: <N> words
Citations per section: <N> average
Longest chapter: <chapter-title> (<N> words)
Shortest chapter: <chapter-title> (<N> words)
Blocked tasks:
- Task: <task-subject> (blocked by: <gap-question>)
- Task: <task-subject> (blocked by: <dependency-task>)
TIMELINE
--------
Project started: <date>
Days elapsed: <N>
Last activity: <date> (<command>)
Estimated completion: <date> (based on current pace)
| Error | Display |
|---|---|
| Database not running | Database: ✗ Not running (run: docker-compose up -d) |
| Database connection error | Database: ⚠ Connection issues (check config) |
| BRD missing | BRD: ✗ Missing (run: /bookstrap-init) |
| Query timeout | ⚠ Database query timeout, showing partial results |
| Empty database | Show zeros for all stats, recommend /bookstrap-ingest |
Read database connection settings from bookstrap.config.json:
{
"surrealdb": {
"host": "localhost",
"port": 2665,
"namespace": "bookstrap",
"database": "my_book",
"username": "root",
"password_env": "SURREAL_PASSWORD"
}
}
BOOKSTRAP STATUS
================
Project: The Silent Cipher (Historical Thriller)
Database: Running (SurrealDB 2.0)
BRD: ✓ Complete (v2)
Config: ./bookstrap.config.json
CORPUS
------
Sources: 47 ingested
- Primary: 12
- Secondary: 28
- Web: 7
Entities: 156 extracted
- Characters: 23
- Locations: 45
- Events: 88
- Concepts: 38
RESEARCH
--------
Tasks: 3/15 complete
Gaps: 12 open, 8 resolved
Sources needed: 5 high priority
WRITING
-------
Tasks: 7/32 complete
Chapters: 2/10 drafted
- Complete: 1
- In progress: 1
- Not started: 8
Word count: 12,450 / 80,000 target (16%)
NEXT ACTION
-----------
Recommended: /bookstrap-research (12 gaps blocking writing)
None. This command can be run at any time to check project status. It gracefully handles missing components and reports their status.
/bookstrap-init - Create BRD (if missing)/bookstrap-ingest - Load initial corpus (if needed)/bookstrap-plan-research - Generate research tasks/bookstrap-research - Execute research to fill gaps/bookstrap-plan-write - Generate writing tasks/bookstrap-write - Execute writing tasks/bookstrap-edit - Run editing passes/bookstrap-query - Query database for specific information-- Get latest BRD version
SELECT content, version, created_at
FROM brd
ORDER BY version DESC
LIMIT 1;
-- Get all corpus statistics in one query
SELECT
(SELECT count() FROM source) AS total_sources,
(SELECT count() FROM source WHERE source_type = 'primary') AS primary_sources,
(SELECT count() FROM source WHERE source_type = 'secondary') AS secondary_sources,
(SELECT count() FROM source WHERE source_type = 'web') AS web_sources,
(SELECT count() FROM character) AS characters,
(SELECT count() FROM location) AS locations,
(SELECT count() FROM event) AS events,
(SELECT count() FROM concept) AS concepts,
(SELECT count() FROM knowledge_gap WHERE resolved = false) AS open_gaps,
(SELECT count() FROM knowledge_gap WHERE resolved = true) AS resolved_gaps,
(SELECT count() FROM chapter) AS total_chapters,
(SELECT count() FROM chapter WHERE status = 'complete') AS complete_chapters,
(SELECT count() FROM chapter WHERE status = 'draft') AS draft_chapters,
(SELECT sum(word_count) FROM chapter WHERE status IN ['draft', 'complete']) AS total_words;
-- Find what's blocking progress
SELECT
question,
context,
created_at,
(SELECT count() FROM task WHERE blocked_by CONTAINS $parent.id) AS blocking_task_count
FROM knowledge_gap
WHERE resolved = false
ORDER BY blocking_task_count DESC
LIMIT 10;
This command:
For large projects:
Status can be refreshed by simply re-running /bookstrap-status. The command always shows current state from the database.
Database: ✗ Not running
Start database:
docker-compose up -d
OR
./scripts/start-surreal.sh
CORPUS
------
Sources: 0 ingested
Entities: 0 extracted
NEXT ACTION
-----------
Recommended: /bookstrap-ingest (Load initial research corpus)
If recommendation doesn't match your intent:
Track velocity and estimate completion:
-- Calculate average tasks per day
SELECT
count() AS total_tasks,
count(status = 'completed') AS completed_tasks,
time::diff(min(created_at), max(updated_at)) AS time_elapsed
FROM task;
Use this to estimate remaining time based on historical completion rate.
For future enhancement, export data for visualization:
/bookstrap-status --export json > status.json
/bookstrap-status --export csv > status.csv
For long-running sessions, watch status updates:
watch -n 60 '/bookstrap-status'
/bookstrap-status
# Output: "Recommended: /bookstrap-init"
/bookstrap-init
/bookstrap-status
# See what's done, what's next
# Run recommended command
/bookstrap-status --verbose
# See what's blocking progress
# Identify gaps or dependencies
/bookstrap-status
# Verify all chapters complete
# Check word count against target
# Run final edit pass