Instruction file imported from BBoyBen/transcript-to-documentation (
.github/instructions/process.instructions.md). Copyright stays with the author.
Process Instructions - Transcript to Documentation System
📋 Overview
This document describes the overall process for transforming raw transcripts into structured and queryable documentation. It enables any agent involved in the system to understand the complete context and their role in the workflow.
🔄 Overall Workflow
Raw Transcripts → Cleaned Transcripts (+ Visual Annotations) → Documentation → Search/Querying
Phases
| Phase | Input | Agent/Tool | Output | Description |
|---|---|---|---|---|
| 1. Preparation | Raw recordings | Manual | /transcripts/raw/ + /videos/ |
Place raw transcripts and KT videos |
| 2. Cleaning | /transcripts/raw/ + /videos/ |
clean-transcript |
/transcripts/clean/ |
Transform into structured markdown, enrich with visual annotations |
| 3. Validation | /transcripts/clean/ |
Manual | ✓ Approved | Verify quality and completeness |
| 4. Plan Generation | /transcripts/clean/ + config |
doc-planner |
temp/plan.json + temp/plan.md |
Generate the execution plan |
| 5. Docs Creation | temp/plan.json + config |
doc-plan-executor |
OUTPUT_PATH/ |
Execute the plan and generate documentation |
| 6. Querying | OUTPUT_PATH/ |
search-doc |
Answers | Search and respond |
🎯 Phase Details
Phase 1: Preparation (Manual)
Objective: Collect raw transcripts and KT video recordings
Input: Recordings, transcriptions (.transcript files), video files
Actions:
- Place transcript files in
/transcripts/raw/ - Place video recordings in
/videos/using the same folder structure and base name as the transcripts - Organize by domains if necessary
- Format: Plain text or slightly formatted
Output: .transcript files in /transcripts/raw/, video files in /videos/
Example:
transcripts/raw/
├── KT_1.transcript
├── KT_2.transcript
└── KT_3.transcript
videos/
├── KT_1.mp4
├── KT_2.mp4
└── KT_3.mp4
Note: Videos are optional. If a video is absent, the cleaning phase still runs successfully but without visual annotations.
Phase 2: Cleaning (clean-transcript agent)
Objective: Transform raw transcripts into structured markdown with optional visual context
Agent: clean-transcript.agent.md
Input: Raw .transcript files + corresponding video files in /videos/
Agent Actions:
- Read raw file
- Correct transcription errors
- Add missing information
- Structure into markdown sections
- Apply formatting standards
- Visual enrichment (via
video-screenshotskill — requires FFmpeg):- Detect timecodes in the structured content
- Extract a screenshot from the matching video at each timecode
- Describe screen content using vision analysis
- Insert
> **[Visual — HH:MM:SS]** ...callout blocks into the transcript
- Add metadata (Topics, Related, Source)
Output: Structured .md files
Example Transformation:
INPUT (raw):
"knowledge transfer on subject X and Y...
and also process Z"
OUTPUT (clean):
# Knowledge Transfer
## Topics
- Subject X
- Subject Y
- Process Z
## Content
[Structured content...]
Result: .md files organized by domains in /transcripts/clean/
Phase 3: Validation (Manual)
Objective: Ensure cleaned transcripts are correct before planning
Automated Gate: Run validate-transcripts.prompt.md for a structural and metadata check of all files in SOURCE_PATHS. This prompt is read-only and produces a pass/fail report — do not proceed to Phase 4 until all files are ✅ Ready or ⚠️ Needs Revision (minor issues only).
Actions:
- Run
@validate-transcriptson allSOURCE_PATHS - Review the validation report
- Re-run
@clean-transcripton blocked files or fix issues manually - Correct if necessary (re-run clean-transcript if needed)
Acceptance Criteria:
- ✅ Correct and complete content
- ✅ Logical and coherent structure
- ✅
Topics,Source, and optionalRelatedmetadata present - ✅ Valid markdown formatting
- ✅ No raw transcript artifacts (speaker labels, timestamps,
[inaudible]) - ✅ No placeholder text (
TODO,FIXME,[...])
Phase 4: Plan Generation (doc-planner)
Objective: Create a complete execution plan for documentation transformation
Agent: doc-planner.agent.md
Input:
- Source files in
/transcripts/clean/ - Configuration from
prompts.config
Agent Actions:
- Read configuration from
.github/prompts.config - Scan and analyze all source files
- Create the most relevant domain-first documentation structure for the current context
- Create explicit batch grouping (2-4 files per batch) for execution
- Record assumptions, risks, and rationale
- Generate deterministic execution order
Output: Structured plan files:
temp/plan.json(machine-readable, for execution)temp/plan.md(human-readable, for review)
Result: Plan ready for execution by doc-plan-executor
Example plan structure:
temp/plan.json
├── metadata
├── config
├── batches
├── phases
└── execution_order
temp/plan.md
├── Overview
├── Batches (files per batch)
├── Phases (actions + success criteria)
└── Execution Order
Phase 5: Documentation Creation (doc-plan-executor)
Objective: Execute the complete plan to transform all transcripts into documentation
Agent: doc-plan-executor.agent.md
Input:
- Execution plan from
temp/plan.json(generated in Phase 4) temp/plan.md(human-readable reference)- Source files in
/transcripts/clean/ - Configuration from
prompts.config
Agent Actions (sequential execution of all phases):
-
Validate the plan:
- Verify plan exists and is valid
- Reconcile plan with actual repository state
- Stop and request replanning if structural issues are found
-
Phase 0: Initialization:
- Create output folder structure in
OUTPUT_PATH/ - Initialize progress tracking file
- Validate all source files are accessible
- Create output folder structure in
-
Phases 1-N: Batch Processing:
- Read source files for current batch
- Extract key concepts and structure
- Create documentation files with metadata (Topics, Related, Source)
- Optimize for AI search
- Add Mermaid diagrams when they clarify concepts, flows, or relationships
- Mark cross-references with TBD placeholders when needed
- Update progress file
-
Phase N+1: Cross-Reference Resolution:
- Scan all generated files
- Identify all TBD markers
- Replace with actual relative links
- Validate all links work correctly
- Update progress file
-
Phase N+2: Summary Generation:
- Scan all generated documentation
- Create the single documentation entrypoint at
OUTPUT_PATH/ENTRYPOINT - Ensure
ENTRYPOINTcontains navigation + topic index + page index + source mapping - If
CREATE_OVERVIEW_FILESis enabled: ensureOVERVIEW_FILE_NAMEexists for each folder node - Update progress file
-
Phase N+3: Final Validation:
- Verify complete structure
- Validate metadata completeness
- Check all links are valid
- Verify no TBD markers remain
- Generate validation report
- Mark project as COMPLETE
Additional Outputs:
temp/execution-report.md- Detailed execution timelinetemp/validation-report.md- Validation results- Progress tracked in
temp/[progress-file]
Features:
- ✅ Automatically executes all phases without pause
- ✅ Can challenge a weak plan when execution evidence requires it
- ✅ Continuous progress tracking
- ✅ Can resume after interruption
- ✅ Complete error handling
- ✅ No intermediate generated documentation agent required
Output structure example:
# Example when OUTPUT_PATH=/docs and ENTRYPOINT=SUMMARY.md
docs/
├── SUMMARY.md
├── 1_Domain_1/
│ ├── overview.md
│ ├── 01_Topic_A/
│ │ ├── overview.md
│ │ └── 01_Topic_A.md
│ └── 02_Topic_B.md
└── 2_Domain_2/
├── overview.md
└── 01_Topic_C.md
Phase 6: Querying (search-doc agent)
Objective: Enable search and querying of documentation
Agent: search-doc.agent.md (generic)
Input: Documentation in OUTPUT_PATH/
This agent MUST start from the entrypoint defined by .github/prompts.config:
- Read
OUTPUT_PATH/ENTRYPOINT(default:OUTPUT_PATH/SUMMARY.md) - Use it to locate relevant pages deterministically
Usage:
@search-doc "What is [Concept] ?"
@search-doc "How to [Action] ?"
@search-doc "What is the difference between [A] and [B] ?"
Agent Actions:
- Analyze the question
- Read
OUTPUT_PATH/ENTRYPOINTand use it as the search entrypoint - Search in
OUTPUT_PATH/and follow the entrypoint navigation/indexes to locate relevant pages - Extract information with citations
- If docs are insufficient: consult transcripts only as a last resort and only when the transcript sources are explicitly referenced by the docs (never scan all transcripts)
- Generate structured response
Responses:
- ✅ Based ONLY on documentation
- ✅ With exact citations
- ✅ With references to sources
- ✅ Indicating limitations
- ✅ Suggestions for related documents
🔧 Central Configuration
File: .github/prompts.config
This YAML file controls the entire process. Agents and prompts read it to adapt their behavior.
Key Parameters:
PROJECT_NAME: My Project
SOURCE_PATHS:
- /transcripts/clean/1_Domain_1
- /transcripts/clean/2_Domain_2
OUTPUT_PATH: /docs
ENTRYPOINT: SUMMARY.md
CREATE_OVERVIEW_FILES: true
OVERVIEW_FILE_NAME: overview.md
DOMAINS:
- name: Domain 1
path: 1_Domain_1
description: My domain 1
- name: Domain 2
path: 2_Domain_2
description: My domain 2
BATCH_SIZE: 2-4
LANGUAGE: English
Impact:
- Phase 4:
doc-planneruses it to analyze files and create the plan - Phase 5:
doc-plan-executoruses it to execute the plan and generate documentation - Phase 6:
search-docuses it to search inOUTPUT_PATH
📊 Dependencies and Data Flow
prompts.config (source of truth)
↓
├→ Phase 2: clean-transcript transforms raw
├→ Phase 3: validate output
├→ Phase 4: generate execution plan
│ ↓
│ └→ Phase 5: execute plan with documentation executor
│ ↓
│ └→ OUTPUT_PATH/ (final output)
│ ↓
│ └→ Phase 6: search-doc queries this
✅ Completion Checklist
To confirm that each phase is completed:
- Phase 1:
.transcriptfiles in/transcripts/raw/ - Phase 2:
.mdfiles generated in/transcripts/clean/ - Phase 3: Manual validation completed, quality ✓
- Phase 4: Execution plan generated in
temp/plan.json+temp/plan.md - Phase 5: Documentation generated in
OUTPUT_PATH/ - Phase 6: Functional querying via
@search-doc
🔄 Iteration and Improvement
If documentation is not satisfactory
Option 1: Improve cleaned transcripts
- Modify files in
/transcripts/clean/ - Re-run Phase 4 (regenerate plan)
- Re-run Phase 5 (regenerate docs)
Option 2: Modify configuration
- Edit
.github/prompts.config - Re-run Phase 4 (regenerate plan)
- Re-run Phase 5 (regenerate docs)
Option 3: Fix directly
- Edit files in
OUTPUT_PATH/ - Re-run Phase 6 (search-doc will read the modified files)
🎓 Summary for Agents
All agents load their domain-specific knowledge on-demand from .github/skills/. Each skill listed below is loaded at the step indicated — agents must not rely on inline copies of rules that belong to a skill.
For clean-transcript:
- Role: Transform raw → structured
- Input:
/transcripts/raw/ - Output:
/transcripts/clean/ - Phase: 2
- Skills:
doc-metadata-format(Step 3)
For doc-planner:
- Role: Generate execution plan
- Input:
/transcripts/clean/+prompts.config - Output:
temp/plan.json+temp/plan.md - Phase: 4
- Skills:
doc-config-reading(Step 1),doc-output-structure(Step 3)
For doc-plan-executor:
- Role: Generate documentation
- Input:
temp/plan.json+/transcripts/clean/ - Output:
OUTPUT_PATH/ - Phase: 5
- Skills:
doc-config-reading(Step 1),doc-output-structure(Step 2),doc-metadata-format(Step 3),doc-entrypoint-template(Step 5)
For search-doc:
- Role: Query documentation
- Input:
OUTPUT_PATH/andOUTPUT_PATH/ENTRYPOINT - Output: Structured responses
- Phase: 6
- Skills:
doc-entrypoint-template(Step 2)
📝 Conventions
- Raw files:
.transcript(plain text) - Cleaned files:
.md(structured markdown) - Execution prompts:
NN-name.prompt.md(numbered, .prompt.md format) - Final documentation:
.md(markdown with metadata) - Configuration:
prompts.config(YAML) - Skills:
.github/skills/[skill-name]/SKILL.md— loaded on-demand by agents; never auto-injected into context
🚀 Typical Usage Flow
1. Prepare transcripts → /transcripts/raw/
2. Execute @clean-transcript
3. Verify quality
4. Execute @doc-planner
5. Execute @doc-plan-executor
6. Use @search-doc to query
Version: 1.0
Language: English
Audience: Agents and developers
Status: Generic & Reusable