Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/content/docs/guides/agentic-authoring.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,6 @@ Copy the instructions, paste into your AI chat, then describe your workflow goal

### Dictation

When creating agentic workflows using speech-to-text, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) to correct terminology mismatches and formatting issues. <CopyEntireFileButton filePath="https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md" label="Copy full instructions" />
When creating agentic workflows using speech-to-text, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) to correct terminology mismatches and formatting issues. <CopyEntireFileButton filePath="https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md" label="Copy dictation instructions" />

This prompt corrects terminology (e.g., "ghaw" → "gh-aw", "work flow" → "workflow"), transforms casual speech into imperative task descriptions, removes filler words, and adds implicit context. Load it into your AI assistant before or after dictating.
2 changes: 1 addition & 1 deletion docs/src/content/docs/reference/custom-agent-for-aw.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ Copy the instructions into your AI chat interface, describe your workflow goal,

## Dictating Agentic Workflows

When creating agentic workflows using speech-to-text (dictation), you may encounter terminology mismatches and formatting issues common to voice recognition systems. To help correct these issues, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) or <CopyEntireFileButton filePath="https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md" label="Copy full instructions" />.
When creating agentic workflows using speech-to-text (dictation), you may encounter terminology mismatches and formatting issues common to voice recognition systems. To help correct these issues, use the [dictation instructions prompt](https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md) or <CopyEntireFileButton filePath="https://raw.githubusercontent.com/github/gh-aw/main/skills/dictation/SKILL.md" label="Copy dictation instructions" />.

This prompt corrects terminology (e.g., "ghaw" → "gh-aw"), removes filler words, and transforms dictated sentences into clear, imperative task descriptions. Load it into your AI assistant before or after dictating to improve accuracy.

34 changes: 15 additions & 19 deletions docs/tests/copy-button.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@ test.describe('Copy Entire File Button', () => {
await context.grantPermissions(['clipboard-read', 'clipboard-write']);

// Navigate to the agentic authoring page
await page.goto('/gh-aw/tools/creating-workflows/');

// Debug: print URL and take screenshot
console.log('Current URL:', page.url());
await page.screenshot({ path: 'test-debug-screenshot.png', fullPage: true });
await page.goto('/gh-aw/guides/agentic-authoring/');

// Wait for the page to be fully loaded
await page.waitForLoadState('networkidle');

// Find the "Copy full instructions" button
// Find the "Copy dictation instructions" button
const copyButton = page.locator('.copy-entire-file-btn', {
hasText: 'Copy full instructions',
hasText: 'Copy dictation instructions',
});
Comment on lines +14 to 17
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The locator is filtered by hasText: 'Copy dictation instructions', but the button text changes to Copying…/Copied!/Error after clicking. Because Playwright locators are re-evaluated on each action/assertion, this locator can stop matching the button after the click, making the subsequent expectations flaky or fail. Use a stable selector (e.g., match data-filepath for the dictation SKILL.md) and assert the initial .btn-text separately.

This issue also appears in the following locations of the same file:

  • line 65
  • line 120

See below for a potential fix:

    // Find the dictation instructions copy button using a stable selector
    const copyButton = page.locator(
      '.copy-entire-file-btn[data-filepath*="dictation"][data-filepath$="SKILL.md"]'
    );

    // Ensure the button is visible
    await expect(copyButton).toBeVisible();
    await expect(copyButton.locator('.btn-text')).toHaveText(
      'Copy dictation instructions'
    );

Copilot uses AI. Check for mistakes.

// Ensure the button is visible
Expand All @@ -41,12 +37,12 @@ test.describe('Copy Entire File Button', () => {

// Verify the clipboard contains the dictation instructions
expect(clipboardContent).toContain('# Dictation Instructions');
expect(clipboardContent).toContain('Fix text-to-speech errors');
expect(clipboardContent).toContain('Fix Speech-to-Text Errors');
expect(clipboardContent).toContain('Project Glossary');

// Wait for the button to reset to original text
await expect(copyButton.locator('.btn-text')).toHaveText(
'Copy full instructions',
'Copy dictation instructions',
{ timeout: 3000 }
);
});
Expand All @@ -56,19 +52,19 @@ test.describe('Copy Entire File Button', () => {
await context.grantPermissions(['clipboard-read', 'clipboard-write']);

// Navigate to the agentic authoring page
await page.goto('/gh-aw/tools/creating-workflows/');
await page.goto('/gh-aw/guides/agentic-authoring/');

// Wait for the page to be fully loaded
await page.waitForLoadState('networkidle');

// Intercept the fetch request and make it fail
await page.route('**/*.instructions.md', (route) => {
await page.route('**/SKILL.md', (route) => {
route.abort('failed');
});

// Find the "Copy full instructions" button
// Find the "Copy dictation instructions" button
const copyButton = page.locator('.copy-entire-file-btn', {
hasText: 'Copy full instructions',
hasText: 'Copy dictation instructions',
});

// Ensure the button is visible
Expand Down Expand Up @@ -98,7 +94,7 @@ test.describe('Copy Entire File Button', () => {

// Wait for the button to reset to original text
await expect(copyButton.locator('.btn-text')).toHaveText(
'Copy full instructions',
'Copy dictation instructions',
{ timeout: 4000 }
);
});
Expand All @@ -108,22 +104,22 @@ test.describe('Copy Entire File Button', () => {
await context.grantPermissions(['clipboard-read', 'clipboard-write']);

// Navigate to the agentic authoring page
await page.goto('/gh-aw/tools/creating-workflows/');
await page.goto('/gh-aw/guides/agentic-authoring/');

// Wait for the page to be fully loaded
await page.waitForLoadState('networkidle');

// Intercept the fetch request and return 404
await page.route('**/*.instructions.md', (route) => {
await page.route('**/SKILL.md', (route) => {
route.fulfill({
status: 404,
body: 'Not Found',
});
});

// Find the "Copy full instructions" button
// Find the "Copy dictation instructions" button
const copyButton = page.locator('.copy-entire-file-btn', {
hasText: 'Copy full instructions',
hasText: 'Copy dictation instructions',
});

// Ensure the button is visible
Expand Down Expand Up @@ -152,7 +148,7 @@ test.describe('Copy Entire File Button', () => {

// Wait for the button to reset to original text
await expect(copyButton.locator('.btn-text')).toHaveText(
'Copy full instructions',
'Copy dictation instructions',
{ timeout: 4000 }
);
});
Expand Down
Loading