import type { TestSequence } from '../types'; import { standardSetup, handlebarsSetup, defaultPromptMd, basicCSSFile } from './setup-data'; export const testSequences: TestSequence[] = [ { id: 'seq-bash-read', name: 'Bash: Read Operations', category: 'bash', setupFiles: standardSetup, steps: [ { id: 'seq-bash-read-cat', name: 'Read file and extract value', prompt: 'Read index.html and tell me the page title.', assertions: [ { type: 'tool_used', toolName: 'bash', description: 'Used shell tool' }, { type: 'output_matches', pattern: 'Test App', description: 'Output contains page title' }, ], }, { id: 'seq-bash-read-head', name: 'Read partial file with head', prompt: 'Show me only the first 10 lines of index.html using head. What is the charset?', assertions: [ { type: 'tool_args_match', toolName: 'bash', pattern: 'head', description: 'Used head command' }, { type: 'output_matches', pattern: 'UTF-8', description: 'Found charset from first 10 lines' }, ], }, { id: 'seq-bash-read-tree', name: 'List files with tree', prompt: 'List all files in the project using tree, then tell me how many files there are.', assertions: [ { type: 'tool_args_match', toolName: 'bash', pattern: 'tree|ls|find', description: 'Used file listing command' }, { type: 'tool_output_matches', toolName: 'bash', pattern: 'index\\.html|styles\\.css|script\\.js', description: 'Output lists project files' }, ], }, ], }, { id: 'seq-bash-search', name: 'Bash: Search Operations', category: 'bash', setupFiles: standardSetup, steps: [ { id: 'seq-bash-search-grep', name: 'Search with grep', prompt: "Use grep to find all lines in index.html that contain 'class' and show line numbers.", assertions: [ { type: 'tool_args_match', toolName: 'bash', pattern: 'grep|rg', description: 'Used search command' }, { type: 'tool_output_matches', toolName: 'bash', pattern: 'class', description: 'Tool output contains class matches' }, ], }, { id: 'seq-bash-search-rg', name: 'Search across files with rg', prompt: "Search across all files for the word 'function' using rg.", assertions: [ { type: 'tool_args_match', toolName: 'bash', pattern: 'rg.*function', description: 'Used rg to search for function' }, { type: 'tool_output_matches', toolName: 'bash', pattern: 'function', description: 'Tool output contains function matches' }, ], }, { id: 'seq-bash-search-find', name: 'Find files by extension', prompt: 'Find all .css files in the project.', assertions: [ { type: 'tool_args_match', toolName: 'bash', pattern: 'find|ls|rg|grep', description: 'Used file discovery command' }, { type: 'tool_output_matches', toolName: 'bash', pattern: 'styles\\.css', description: 'Tool output contains styles.css' }, ], }, ], }, { id: 'seq-bash-write', name: 'Bash: Write & Text Processing', category: 'bash', setupFiles: standardSetup, steps: [ { id: 'seq-bash-write-mkdir', name: 'Create directories and files', prompt: "Create a directory called 'components' with three empty files: header.html, footer.html, sidebar.html.", assertions: [ { type: 'file_exists', path: '/components/header.html', description: 'header.html created' }, { type: 'file_exists', path: '/components/footer.html', description: 'footer.html created' }, { type: 'file_exists', path: '/components/sidebar.html', description: 'sidebar.html created' }, ], }, { id: 'seq-bash-write-cp-mv', name: 'Copy and rename files', prompt: 'Copy styles.css to styles-backup.css, then rename script.js to app.js.', assertions: [ { type: 'file_exists', path: '/styles-backup.css', description: 'styles-backup.css created' }, { type: 'file_exists', path: '/app.js', description: 'app.js exists (renamed)' }, { type: 'file_not_exists', path: '/script.js', description: 'script.js removed after rename' }, ], }, { id: 'seq-bash-write-echo', name: 'Create file with echo redirect', prompt: "Create a new file /data.json with a JSON object containing name 'Test' and version 1 using echo and redirect.", assertions: [ { type: 'file_exists', path: '/data.json', description: 'data.json created' }, { type: 'valid_json', path: '/data.json', description: 'data.json is valid JSON' }, { type: 'file_matches', path: '/data.json', pattern: '[Tt]est', description: 'Contains "Test" name' }, ], }, { id: 'seq-bash-write-sed', name: 'In-place substitution with sed', prompt: "Use sed to change all occurrences of '#007bff' to '#e74c3c' in styles.css.", assertions: [ { type: 'file_not_contains', path: '/styles.css', value: '#007bff', description: 'Old color removed' }, { type: 'file_contains', path: '/styles.css', value: '#e74c3c', description: 'New color applied' }, ], }, { id: 'seq-bash-write-pipe', name: 'Pipe cat through sed to new file', prompt: "Read index.html with cat, pipe through sed to replace 'Test App' with 'My App', redirect to /output.html.", assertions: [ { type: 'file_exists', path: '/output.html', description: 'output.html created' }, { type: 'file_contains', path: '/output.html', value: 'My App', description: 'Contains replaced text' }, ], }, { id: 'seq-bash-write-chain', name: 'Chained commands with &&', prompt: "Create a 'pages' directory, create about.html and contact.html inside it, list contents — single command with &&.", assertions: [ { type: 'file_exists', path: '/pages/about.html', description: 'about.html created in pages/' }, { type: 'file_exists', path: '/pages/contact.html', description: 'contact.html created in pages/' }, ], }, { id: 'seq-bash-write-pipe-chain', name: 'Multi-stage pipe chain', prompt: "Cat index.html, pipe through grep to find lines with 'nav', pipe through head for first 3 matches.", assertions: [ { type: 'tool_args_match', toolName: 'bash', pattern: '\\|', description: 'Used pipe operator' }, { type: 'tool_output_matches', toolName: 'bash', pattern: 'nav', description: 'Tool output contains nav matches' }, ], }, ], }, { id: 'seq-file-editing', name: 'File Editing: Basics', category: 'file-editing', setupFiles: standardSetup, steps: [ { id: 'seq-edit-update', name: 'Update text in file', prompt: "Change the page title from 'Test App' to 'My Application' in index.html.", assertions: [ { type: 'file_contains', path: '/index.html', value: 'My Application', description: 'New title present' }, { type: 'file_not_contains', path: '/index.html', value: '