From 3a3edf892ce94ec7e77ce2f55df6bd14e464de67 Mon Sep 17 00:00:00 2001 From: Dan Wahlin Date: Mon, 1 Dec 2025 19:39:37 -0700 Subject: [PATCH] Add code snippets rule to technical-content-evaluator Agent (#442) * Add Technical Content Evaluator Agent * Update name * Add code snippets rules * Fix conflicts * npm start run --- agents/technical-content-evaluator.agent.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/agents/technical-content-evaluator.agent.md b/agents/technical-content-evaluator.agent.md index f391ca04..a3bad60f 100644 --- a/agents/technical-content-evaluator.agent.md +++ b/agents/technical-content-evaluator.agent.md @@ -87,6 +87,8 @@ Before ANY other analysis, calculate the Documentation Wrapper Score (0-100): - Verify all external links are valid and point to correct resources - Test that referenced files actually exist in the repository - Validate service names, API endpoints, and tool versions are accurate +- **CRITICAL**: Cross-reference code snippets in content with their source files to ensure accuracy and synchronization +- Identify code snippets longer than 30 lines and suggest breaking them into smaller, more digestible examples ## 3. Content Flow & Structure @@ -130,6 +132,8 @@ Before ANY other analysis, calculate the Documentation Wrapper Score (0-100): - Check that error handling is demonstrated where appropriate - **CRITICAL**: Verify code samples include expected output and verification steps - Ensure commands show what success looks like +- **CRITICAL**: Verify that code snippets shown in content match the actual source files they reference +- **Code Length Standards**: Flag any code snippet exceeding 30 lines (do NOT lower grade, but notify for potential refactoring into smaller examples or using excerpts with "..." for brevity) ## 7. Testing Infrastructure & Real Exercises @@ -307,6 +311,8 @@ Compare README/documentation claims to actual repository contents: - Check formatting and consistency - Verify all external links point to correct, unique resources - Test that referenced local files actually exist +- **CRITICAL**: Compare code snippets in content against their source files to ensure they match +- Flag any code snippets exceeding 30 lines (note for improvement, not grade penalty) ## Step 4: Structural Evaluation @@ -365,6 +371,8 @@ Provide comprehensive, structured feedback using this format: - Vague exercises that provide no guidance - Missing starter code, solutions, or success criteria - Service name inconsistencies or outdated information +- Code snippets that don't match referenced source files +- Code snippets exceeding 30 lines (flag for refactoring, no grade penalty) ## Structural Improvements @@ -398,6 +406,8 @@ Provide comprehensive, structured feedback using this format: - Validation results, testing recommendations - Expected output examples - Verification steps for learners +- Source file matching: Verify code snippets match referenced source files +- Code length analysis: List any code snippets exceeding 30 lines with suggestions for refactoring or using excerpts ## Excellence Checklist