Skip to content

Commit a79bc8d

Browse files
Copilotpelikhan
andauthored
Optimize dictation workflow: reduce verbosity by 38% for better AI performance (#2243)
* Initial plan * Optimize dictation workflow: reduce verbosity by 38% Co-authored-by: pelikhan <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: pelikhan <[email protected]>
1 parent 4c9d5b7 commit a79bc8d

File tree

2 files changed

+66
-180
lines changed

2 files changed

+66
-180
lines changed

.github/workflows/dictation-prompt.lock.yml

Lines changed: 33 additions & 90 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/dictation-prompt.md

Lines changed: 33 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -47,105 +47,48 @@ Create a concise dictation instruction file at `.github/instructions/dictation.i
4747

4848
### 1. Scan Documentation for Project-Specific Glossary
4949

50-
Extract a comprehensive glossary of terms specific to this project from documentation files only.
50+
Scan documentation files in `docs/src/content/docs/` to extract approximately 100 project-specific technical terms (95-105 acceptable).
5151

52-
**Analyze these sources:**
52+
**Focus areas:**
53+
- Configuration: safe-outputs, permissions, tools, cache-memory, toolset, frontmatter
54+
- Engines: copilot, claude, codex, custom
55+
- Commands: compile, audit, logs, mcp, recompile
56+
- GitHub concepts: workflow_dispatch, pull_request, issues, discussions
57+
- Repository-specific: agentic workflows, gh-aw, activation, MCP servers
58+
- File formats: markdown, lockfile (.lock.yml), YAML
59+
- Tool types: edit, bash, github, playwright, web-fetch, web-search
60+
- Operations: fmt, lint, test-unit, timeout_minutes, runs-on
5361

54-
```bash
55-
# Scan documentation markdown files for technical terms
56-
find docs/src/content/docs -name "*.md" -type f -exec grep -hoE '\b[a-z][a-z0-9_-]{2,}\b' {} + | sort -u | head -200
57-
58-
# Extract headings from documentation
59-
find docs/src/content/docs -name "*.md" -type f -exec grep -h "^#" {} + | sed 's/^#* //' | head -100
60-
61-
# Check key documentation files
62-
cat docs/src/content/docs/reference/*.md | grep -oE '\b[a-z][a-z0-9_-]{3,}\b' | sort -u | head -150
63-
```
64-
65-
**Extract terms from documentation covering:**
66-
67-
1. **Configuration terms**: safe-outputs, permissions, tools, cache-memory, toolset, frontmatter
68-
2. **Engine types**: copilot, claude, codex, custom
69-
3. **Actions and commands**: compile, audit, logs, mcp, recompile
70-
4. **GitHub concepts**: workflow_dispatch, pull_request, issues, discussions, permissions
71-
5. **Repository-specific**: agentic workflows, gh-aw, activation, MCP servers
72-
6. **File types and formats**: markdown, lockfile (.lock.yml), YAML
73-
7. **Tool types**: edit, bash, github, playwright, web-fetch, web-search
74-
8. **Operations**: fmt, lint, test-unit, timeout_minutes, runs-on
75-
76-
**Goal**: Create a list of approximately 100 terms (95-105 is acceptable) that are most relevant to this project, extracted from documentation only.
77-
78-
**Exclude tooling-specific terms**: Do not include makefile, Astro, or starlight as these are tooling-specific and not user-facing concepts.
62+
**Exclude**: makefile, Astro, starlight (tooling-specific, not user-facing)
7963

8064
### 2. Create the Dictation Instructions File
8165

82-
Create the file `.github/instructions/dictation.instructions.md` with the following structure (NO EXAMPLES, NO PLANNING GUIDELINES):
83-
84-
```markdown
85-
Fix text-to-speech errors in dictated text for creating agentic workflow prompts in the gh-aw repository.
86-
87-
## Project Glossary
88-
89-
[List all 100 terms here, one per line, no descriptions, alphabetically sorted]
90-
91-
## Technical Context
92-
93-
GitHub Agentic Workflows (gh-aw) - a Go-based GitHub CLI extension for writing agentic workflows in natural language using markdown files with YAML frontmatter, which compile to GitHub Actions workflows.
94-
95-
## Fix Speech-to-Text Errors
96-
97-
Replace speech-to-text ambiguities with correct technical terms from the glossary:
98-
99-
- "ghaw" → "gh-aw"
100-
- "work flow" → "workflow"
101-
- "front matter" → "frontmatter"
102-
- "lock file" → "lockfile" or ".lock.yml"
103-
- "co-pilot" → "copilot"
104-
- "safe outputs" → "safe-outputs"
105-
- "cache memory" → "cache-memory"
106-
- "max turns" → "max-turns"
107-
- "issue comment" → "issue_comment"
108-
- "pull request" → "pull_request"
109-
- "workflow dispatch" → "workflow_dispatch"
110-
- "runs on" → "runs-on"
111-
- "timeout minutes" → "timeout_minutes"
112-
```
113-
114-
### 3. Generate the Actual Content
115-
116-
Use your analysis of the documentation to populate the glossary with approximately 100 relevant terms (95-105 is acceptable). Scan documentation files thoroughly to identify the most important and frequently used terms.
117-
118-
### 4. Create Pull Request
66+
Create `.github/instructions/dictation.instructions.md` with:
67+
- Title: Fix text-to-speech errors in dictated text
68+
- Project Glossary: ~100 terms, alphabetically sorted, one per line
69+
- Technical Context: Brief description of gh-aw
70+
- Fix Speech-to-Text Errors: Common misrecognitions → correct terms
11971

120-
After creating the dictation instructions file:
72+
### 3. Create Pull Request
12173

122-
1. Use the safe-outputs create-pull-request to submit your changes
123-
2. Title: "[docs] Update dictation prompt instructions"
124-
3. Include a PR description that explains the changes made
74+
Use the create-pull-request tool to submit your changes with:
75+
- Title: "[docs] Update dictation prompt instructions"
76+
- Description explaining the changes made
12577

126-
## Important Guidelines
78+
## Guidelines
12779

128-
- **Extract from documentation**: Scan only docs/src/content/docs/**/*.md files for terms
129-
- **Ignore tooling-specific terms**: Exclude makefile, Astro, and starlight (tooling-specific, not user-facing)
130-
- **Be Thorough**: Scan all documentation files to extract accurate terms
131-
- **Be Precise**: The glossary should contain approximately 100 terms (95-105 is acceptable)
132-
- **Prioritize Relevance**: Include terms that are actually used frequently in documentation
133-
- **Avoid Duplicates**: Each term should appear only once in the glossary
134-
- **Alphabetize**: Sort the glossary alphabetically for easy reference
135-
- **No Descriptions**: The glossary should be a simple list of terms, no definitions
136-
- **No Examples**: Keep the instructions concise without example transformations
137-
- **No Planning Guidelines**: Focus only on fixing speech-to-text errors, not on restructuring or planning tasks
138-
- **Focus on Specificity**: Prefer project-specific terms over generic software terms
80+
- Scan only `docs/src/content/docs/**/*.md` files
81+
- Extract ~100 terms (95-105 acceptable)
82+
- Exclude tooling-specific terms (makefile, Astro, starlight)
83+
- Prioritize frequently used project-specific terms
84+
- Alphabetize the glossary
85+
- No descriptions in glossary (just term names)
86+
- Focus on fixing speech-to-text errors, not planning or examples
13987

14088
## Success Criteria
14189

142-
Your task is complete when:
143-
1. ✅ The file `.github/instructions/dictation.instructions.md` exists
144-
2. ✅ It contains approximately 100 project-specific terms in the glossary (95-105 is acceptable)
145-
3. ✅ Terms are extracted from documentation files only (docs/src/content/docs/**/*.md)
146-
4. ✅ Tooling-specific terms (makefile, Astro, starlight) are excluded
147-
5. ✅ The instructions focus on fixing speech-to-text errors only
148-
6. ✅ NO planning guidelines are included (sentence structure, tone adjustment, context enhancement)
149-
7. ✅ NO examples are included (keep it short)
150-
8. ✅ File description clearly states focus on fixing text-to-speech errors
151-
9. ✅ A pull request has been created with the updated file
90+
- ✅ File `.github/instructions/dictation.instructions.md` exists
91+
- ✅ Contains ~100 project-specific terms (95-105 acceptable)
92+
- ✅ Terms extracted from documentation only
93+
- ✅ Focuses on fixing speech-to-text errors
94+
- ✅ Pull request created with changes

0 commit comments

Comments
 (0)