Skip to content

Commit 19d006f

Browse files
committed
docs: overhaul guide and launch Just the Docs site
Rework the guide into a navigable Just the Docs Jekyll site with site config, Bundler dependencies, GitHub Pages deployment, landing pages, and Mermaid support. Refresh chapters, appendices, references, and prompt templates for agentic coding workflows, privacy/security boundaries, reproducible verification, and AI provenance. Add Codex/Copilot project instructions, repo skills, custom subagents, local development setup docs, and ignore generated site artifacts.
1 parent 77a500c commit 19d006f

57 files changed

Lines changed: 2028 additions & 136 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.DS_Store‎

-8 KB
Binary file not shown.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
---
2+
name: deep-research-content-updates
3+
description: Use when researching current or latest tips, tricks, tools, recommendations, product changes, or best practices for GenAI-assisted coding, prompt engineering, documentation, reproducibility, Jekyll/GitHub Pages, or the workflows described in this guide.
4+
---
5+
6+
# Deep Research Content Updates
7+
8+
Use this skill to update the guide from current evidence rather than memory.
9+
10+
## Research Workflow
11+
12+
1. Define the update target:
13+
- chapter, appendix, template, script documentation, or setup page
14+
- exact workflow step affected
15+
- whether the topic is time-sensitive
16+
17+
2. Browse or otherwise verify current facts for:
18+
- OpenAI/Codex behavior and prompt guidance
19+
- GitHub Copilot, GitHub Pages, Actions, Jekyll, Just the Docs, and Mermaid behavior
20+
- reproducible research, data science, R, and documentation practices
21+
- current caveats around LLM-generated code review, testing, security, privacy, and provenance
22+
23+
3. Prefer source tiers in this order:
24+
- official documentation, release notes, standards, package docs, and peer-reviewed or institutional sources
25+
- reputable technical docs and maintained project repositories
26+
- practitioner posts only when corroborated or clearly labeled as opinion
27+
28+
4. Produce a research memo before editing:
29+
- what changed
30+
- why it matters for this textbook
31+
- proposed target files and sections
32+
- source links
33+
- confidence and priority
34+
- claims to avoid because they are weak, vendor-specific, or likely to age quickly
35+
36+
5. Only then propose or make content edits, keeping them narrow and durable.
37+
38+
## Writing Rules
39+
40+
- Avoid "latest tool roundup" churn unless the change affects the guide's workflow advice.
41+
- Prefer durable principles plus short notes on current implementation details.
42+
- Add dates for time-sensitive claims.
43+
- Do not cite unsourced product behavior.
44+
- Keep examples relevant to biostatistics, bioinformatics, data science, or research code.
45+
- If a recommendation could influence spending, compliance, privacy, or research validity, require stronger sourcing.
46+
47+
## Verification
48+
49+
After edits, run:
50+
51+
```bash
52+
bundle exec jekyll build
53+
```
54+
55+
If Conda or Miniforge compiler variables interfere with Ruby gems, use the sanitized environment command documented in `docs/DevelopmentSetup.md`.
56+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
name: just-the-docs-site
3+
description: Use when modifying or troubleshooting this repository's Jekyll/Just the Docs site, including _config.yml, Gemfile, navigation front matter, GitHub Pages workflow, local preview, Mermaid rendering, or build failures.
4+
---
5+
6+
# Just The Docs Site
7+
8+
This repo builds a root-level Just the Docs site. Keep the manuscript in place and avoid reorganizing `chapters/`, `docs/`, `docs/templates/`, or `scripts/`.
9+
10+
## Workflow
11+
12+
1. Inspect `_config.yml`, relevant Markdown front matter, and `.github/workflows/pages.yml` before changing site behavior.
13+
2. Use Bundler-pinned commands:
14+
15+
```bash
16+
bundle install
17+
bundle exec jekyll build
18+
bundle exec jekyll serve --host 127.0.0.1 --port 4000
19+
```
20+
21+
3. If native gem or Jekyll commands fail because Conda/Miniforge compiler variables are active, run with:
22+
23+
```bash
24+
env -u CC -u CXX -u LD -u LDFLAGS -u CPPFLAGS -u CFLAGS PATH=/opt/homebrew/opt/ruby@3.3/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin bundle exec jekyll build
25+
```
26+
27+
4. Verify generated output is not committed: `_site/`, `.jekyll-cache/`, `.bundle/`, and `vendor/bundle/` should remain ignored.
28+
29+
## Front Matter
30+
31+
Rendered pages should generally use:
32+
33+
```yaml
34+
---
35+
layout: default
36+
title: "Page Title"
37+
parent: Parent Page
38+
nav_order: 1
39+
---
40+
```
41+
42+
Use `has_toc: false` on parent landing pages when Just the Docs would duplicate curated child links.
43+
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
---
2+
name: mermaid-workflow-diagrams
3+
description: Use when adding, revising, or reviewing visual explanations in chapters, appendices, landing pages, or script documentation for this Just the Docs site. Includes Mermaid diagram selection guidance and when to choose a non-Mermaid format instead.
4+
---
5+
6+
# Mermaid Workflow Diagrams
7+
8+
Visuals should make the guide easier to understand, not busier. Start by deciding whether a visual is needed at all, then choose the simplest format that explains the relationship clearly.
9+
10+
This site currently pins Mermaid to `9.1.3` in `_config.yml`. Treat diagram types and syntax introduced after that version as "verify first" options. Do not use newer Mermaid features just because they appear in the current Mermaid documentation unless the site Mermaid version is intentionally upgraded and the build/preview is checked.
11+
12+
## Decision Workflow
13+
14+
1. Identify the teaching job of the visual.
15+
- Process: "What happens next?"
16+
- Decision: "Which path should I take?"
17+
- Interaction: "Who talks to whom, and in what order?"
18+
- State: "What modes can this object or workflow be in?"
19+
- Structure: "How are things related?"
20+
- Time: "When do events happen?"
21+
- Evidence/data: "What measured quantity should be compared?"
22+
2. Decide whether Mermaid is the right medium.
23+
3. Choose the diagram type from the repository below.
24+
4. Draft a small version first.
25+
5. Check readability in the Just the Docs content column and on mobile.
26+
6. Add accessibility metadata.
27+
7. Build the site and preview layout-sensitive changes.
28+
29+
## When Not To Use Mermaid
30+
31+
Choose a non-Mermaid format when it is clearer or more reliable:
32+
33+
| Need | Better choice | Why |
34+
| --- | --- | --- |
35+
| Fewer than 4 linear steps | Ordered list | Faster to scan than a diagram. |
36+
| Comparison of options, pros/cons, or rules | Markdown table | Tables support dense text and side-by-side comparison better. |
37+
| Copy/paste instructions or prompts | Fenced code block | Preserves exact Markdown, prompts, and indentation. |
38+
| Detailed quantitative data | R/ggplot, Plotly, CSV-backed table, or static chart image | Mermaid charts are not a statistical graphics system. |
39+
| Screens, UI state, or rendered output | Screenshot or generated image | Shows the real artifact instead of a symbolic approximation. |
40+
| Publication-quality figure with exact layout | SVG, image, or design tool export | Mermaid layout is algorithmic and hard to fine tune. |
41+
| Large architecture with many systems and dependencies | C4/Structurizr, Graphviz/DOT, D2, or a hand-authored architecture diagram | Better control and clearer large-system layout. |
42+
| Conceptual taxonomy with long explanations | Headings, nested list, or table | Text hierarchy is more accessible and easier to maintain. |
43+
| Decorative visual break | No visual | Decoration adds maintenance cost without teaching value. |
44+
45+
## Diagram Repository
46+
47+
Use this table before writing Mermaid. "Good fit" means the diagram type is usually useful for this guide. "Use sparingly" means it can help in narrow cases but is often worse than prose or a table. "Verify first" means confirm support under the pinned Mermaid version or upgrade Mermaid intentionally before using it.
48+
49+
| Diagram type | Syntax start | Fit for this guide | Use when | Avoid when |
50+
| --- | --- | --- | --- | --- |
51+
| Flowchart | `flowchart TB` or `flowchart LR` | Good fit | Workflows, branching decisions, loops, review/refinement cycles, inputs leading to outputs. | The point is an interaction between actors, a data schema, or a time schedule. |
52+
| Sequence diagram | `sequenceDiagram` | Good fit | Prompt/tool/user interactions, request-response flows, review handoffs, API-like exchanges. | There is only one actor or the ordering is not interaction-driven. |
53+
| State diagram | `stateDiagram-v2` | Good fit | Status transitions such as draft -> reviewed -> revised -> accepted, or code/test states. | You are showing tasks rather than states. Use a flowchart instead. |
54+
| Entity relationship diagram | `erDiagram` | Good fit | Data tables, simulated EHR entities, joins, keys, derived datasets. | You need workflow or causal logic. |
55+
| Class diagram | `classDiagram` | Use sparingly | Object models, package/module responsibilities, typed relationships. | The guide is explaining human workflow or data tables. |
56+
| User journey | `journey` | Use sparingly | Researcher experience across planning, coding, review, documentation, and friction points. | The content is not persona-centered. |
57+
| Gantt | `gantt` | Use sparingly | Project schedules, manuscript timelines, release plans. | You only need a checklist or dependency workflow. |
58+
| Pie chart | `pie` | Use sparingly | Simple proportions that sum to a meaningful whole. | Comparing more than 3-5 categories, showing change over time, or presenting precise data. Prefer a table or real chart. |
59+
| Git graph | `gitGraph` | Use sparingly | Branch, commit, PR, review, and release examples. | You are explaining conceptual iteration rather than actual git history. |
60+
| Requirement diagram | `requirementDiagram` | Use sparingly | Trace success criteria to risks, tests, and acceptance checks. | The page is not about requirements or validation. |
61+
| C4 diagram | `C4Context`, `C4Container`, etc. | Verify first | Software architecture context with people, systems, containers, and dependencies. | You need precise, durable architecture docs. Consider Structurizr or C4-PlantUML for larger systems. |
62+
| Mindmap | `mindmap` | Verify first | Brainstorming, topic breakdowns, compact conceptual hierarchy. | The hierarchy is long, text-heavy, or needs stable reading order. |
63+
| Timeline | `timeline` | Verify first | Chronological history, release milestones, or project phases. | You are showing a process that can loop or branch. |
64+
| Quadrant chart | `quadrantChart` | Verify first | Two-axis prioritization such as impact vs effort or risk vs confidence. | Axes are subjective or the categories need explanation. Prefer a table. |
65+
| Sankey | `sankey-beta` | Verify first | Flow quantities between stages, if real quantities exist. | You do not have measured weights. Do not fake quantitative flow. |
66+
| XY chart | `xychart-beta` | Verify first | Simple bar/line examples where exact analytical plotting is not needed. | Research data, statistical graphics, uncertainty, or anything requiring reproducible analysis. Use R. |
67+
| Block diagram | `block-beta` | Verify first | Spatial grouping of components or conceptual blocks. | A flowchart or table can express the relationship. |
68+
| Architecture diagram | `architecture-beta` | Verify first | Lightweight architecture sketches if supported by the active Mermaid version. | Stable architecture documentation. Prefer C4/Structurizr/Graphviz. |
69+
| Kanban | `kanban` | Verify first | Work-in-progress board examples. | The page is about process logic, not current work status. |
70+
| Radar | `radar-beta` | Verify first | Small multi-factor profiles, if the axes are honest and comparable. | Evidence strength or model/tool rankings without rigorous scoring. |
71+
| Treemap | `treemap-beta` | Verify first | Hierarchical quantities. | No real quantities exist or labels are long. |
72+
| Venn | `venn` | Verify first | Small set overlap explanation. | More than 3 sets or non-overlap relationships. |
73+
| Ishikawa | `ishikawa` | Verify first | Root-cause analysis of errors or workflow failures. | The page is not diagnosing causes. |
74+
| Wardley map | `wardley` | Verify first | Strategy mapping with value chain and evolution axis. | Most guide content. It is specialized and may confuse readers. |
75+
| Packet | `packet-beta` | Usually not needed | Network packet structure. | Nearly all content in this repo. |
76+
| Event modeling | `eventModeling` | Usually not needed | Event-sourced systems with commands, events, views, and policies. | General research coding workflows. |
77+
| ZenUML | `zenuml` | Usually not needed | UML-like sequence diagrams if support is confirmed. | Standard `sequenceDiagram` is sufficient. |
78+
| TreeView | `tree` or documented current syntax | Usually not needed | Directory-like trees if support is confirmed. | A fenced text tree or Markdown list is clearer. |
79+
80+
## Mermaid Defaults For This Site
81+
82+
- Prefer `flowchart TB` for long sequences, branching decisions, convergence diagrams, and feedback loops.
83+
- Use `flowchart LR` only for compact pipelines that fit comfortably in the content column, usually 3-5 short nodes.
84+
- Avoid `TD` as a habit. Use `TB` for consistency unless an existing diagram uses `TD` and is already readable.
85+
- Consider `sequenceDiagram` instead of a flowchart when the central question is "who sends what to whom?"
86+
- Consider `stateDiagram-v2` instead of a flowchart when boxes represent statuses rather than tasks.
87+
- Consider `erDiagram` instead of a flowchart when boxes represent data entities or tables.
88+
- For complex flowcharts, use subgraphs only when they reduce cognitive load. If subgraphs make the diagram wider or harder to scan, split the visual or use prose.
89+
- Keep node labels short, concrete, and action-oriented. Move explanation to surrounding prose.
90+
- Prefer 5-9 nodes for most diagrams. Reconsider the format above 12 nodes.
91+
- Use decision diamonds only for real branch points with mutually meaningful paths.
92+
- Do not encode meaning only with color. Labels and structure must carry the meaning.
93+
94+
## Accessibility Rules
95+
96+
Every Mermaid block must include:
97+
98+
```mermaid
99+
flowchart TB
100+
accTitle: Short useful title
101+
accDescr: One sentence describing the diagram's purpose and main structure.
102+
```
103+
104+
Use `accTitle` and `accDescr` for all diagram types. The title should name the visual, and the description should explain what the reader can learn from it. Do not repeat the page title as the only description.
105+
106+
## Visual Style Rules
107+
108+
- Use the repository's global Mermaid theme in `_includes/mermaid_config.js`; avoid one-off styling unless it fixes comprehension.
109+
- Avoid low-contrast custom colors and decorative gradients.
110+
- Do not use icons, emojis, or dense symbol systems inside node labels.
111+
- Keep arrows simple. Too many edge labels usually means the diagram needs to be split.
112+
- Use consistent terminology with the surrounding chapter.
113+
- Avoid long quoted prompt text inside Mermaid. Use a code block for prompts.
114+
115+
## Review Checklist
116+
117+
Before accepting a Mermaid change:
118+
119+
- The visual has a clear teaching job that prose/table/code cannot do better.
120+
- The selected Mermaid type matches the relationship being explained.
121+
- The diagram type is supported by the current site Mermaid version or the version was intentionally upgraded.
122+
- `accTitle` and `accDescr` are present.
123+
- Orientation is readable in the Just the Docs content column.
124+
- Labels fit on mobile and do not duplicate adjacent prose.
125+
- The diagram does not imply quantitative precision unless the data are real.
126+
- The page still builds with Jekyll.
127+
128+
## Validation
129+
130+
Run the site build after changes:
131+
132+
```text
133+
bundle exec jekyll build
134+
```
135+
136+
For layout-sensitive edits, preview locally at:
137+
138+
```text
139+
http://127.0.0.1:4000/practical-genai-coding-guide/
140+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: prompt-template-curation
3+
description: Use when editing prompt templates, project plans, refactoring prompts, red-team prompts, or reusable template pages under docs/templates in this repository.
4+
---
5+
6+
# Prompt Template Curation
7+
8+
Prompt templates in `docs/templates/` must remain easy to copy into an LLM while still rendering cleanly in Just the Docs.
9+
10+
## Rules
11+
12+
- Keep prompt template bodies inside fenced `markdown` code blocks when the page is meant for copy/paste.
13+
- Keep project plan examples rendered normally when they are better read as example documents.
14+
- Use `nav_exclude: true` for raw template files that should not appear as sidebar pages.
15+
- Avoid smart quotes or decorative symbols inside copy/paste prompt bodies unless the source already depends on them.
16+
- Preserve placeholders exactly when they are part of the reusable template.
17+
- Check links from Appendix D and template landing pages after renaming or moving files.
18+
19+
## Validation
20+
21+
Run `bundle exec jekyll build` after template changes and inspect the rendered page if nested code fences were edited.
22+
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
---
2+
name: reference-source-audit
3+
description: Use when validating references, citations, source URLs, link rot, anchor integrity, or whether the current content is supported by the cited reference sources.
4+
---
5+
6+
# Reference Source Audit
7+
8+
Use this skill to check whether the guide's references still exist and whether cited claims align with the cited sources.
9+
10+
## Audit Workflow
11+
12+
1. Inventory references:
13+
14+
```bash
15+
rg -n '<a name="ref[0-9]+"></a>|References\\.md#ref[0-9]+|#ref[0-9]+' chapters docs scripts
16+
```
17+
18+
2. Build three lists:
19+
- reference ids defined in `docs/References.md`
20+
- reference ids cited from content
21+
- URLs attached to each reference
22+
23+
3. Check structural integrity:
24+
- every cited `refN` exists
25+
- every reference anchor is unique
26+
- every reference has a usable title or source name
27+
- every URL is present and reasonably canonical
28+
- duplicate references are intentional or consolidated
29+
30+
4. Check link health:
31+
- URL resolves
32+
- redirects are recorded
33+
- paywalled or unstable pages are flagged
34+
- canonical DOI, PubMed, PMC, arXiv, official docs, or release-note URLs are preferred where available
35+
36+
5. Check claim support:
37+
- read the paragraph or sentence around each citation
38+
- inspect the cited source for direct support
39+
- classify as `supported`, `partially supported`, `unsupported`, `stale/changed`, or `unverifiable`
40+
41+
6. Report before editing:
42+
- file and line
43+
- ref id
44+
- claim summary
45+
- source URL
46+
- link status
47+
- support status
48+
- severity
49+
- recommended action
50+
51+
## Source Quality
52+
53+
- Strong: official docs, standards, release notes, peer-reviewed papers, PubMed/PMC, arXiv/OpenReview, institutional guidance.
54+
- Moderate: maintained technical docs, reputable research-team posts, active GitHub repositories.
55+
- Weak: SEO articles, vendor marketing pages, Medium posts, Reddit, YouTube, and personal blogs unless used as examples or corroborated practitioner perspectives.
56+
57+
For clinical, medical, statistical, privacy, compliance, or research-validity claims, require strong sources.
58+
59+
## Editing Guidance
60+
61+
- Do not replace a source just because it is old if it remains authoritative.
62+
- Prefer updating weak citations to stronger sources over adding more citations.
63+
- Preserve stable reference anchors when possible so existing chapter links do not break.
64+
- If renumbering references is unavoidable, update every inbound citation in the same change.
65+
- Include access or verification dates for time-sensitive source checks.
66+
67+
## Verification
68+
69+
After edits, run:
70+
71+
```bash
72+
bundle exec jekyll build
73+
```
74+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name = "content-reviewer"
2+
description = "Use for independent review of chapter, appendix, README, reference, and template prose changes before finalizing documentation work."
3+
nickname_candidates = ["reviewer", "editor", "content"]
4+
sandbox_mode = "read-only"
5+
6+
developer_instructions = """
7+
You review this repository as a technical editor for a practical textbook on GenAI-assisted coding and research workflows.
8+
9+
Focus on:
10+
- Broken or suspicious relative links.
11+
- Duplicated navigation or table-of-contents content.
12+
- Missing or inconsistent Just the Docs front matter.
13+
- Rendered prompt templates that should instead appear as fenced Markdown code blocks.
14+
- Prose changes that weaken technical accuracy, reproducibility, or human-review emphasis.
15+
- Accidental broad rewrites unrelated to the requested task.
16+
17+
Return concise findings with file paths and line references. Do not rewrite content unless explicitly asked.
18+
"""
19+

0 commit comments

Comments
 (0)