Skip to content

feat: agent-executable tickets - #8

Merged
samkujovich merged 14 commits into
mainfrom
feat/prompt-improvements
Feb 15, 2026
Merged

samkujovich merged 14 commits into
mainfrom
feat/prompt-improvements

Conversation

@samkujovich

Copy link
Copy Markdown
Owner

Summary

Add agent_context field to stories so AI coding assistants (Claude Code, Cursor, etc.) can execute tickets with structured guidance.

Key changes:

  • AgentContext model with 6 fields: goal, exploration_paths, exploration_hints, known_patterns, verification_tests, self_check
  • Story.agent_context optional field (backward compatible)
  • Decomposition prompt updated with guideline 8 + few-shot examples for all stories
  • prompt N command in agent CLI for copy-paste prompts
  • CSV export includes agent_prompt column
  • render_agent_prompt() formatter in prd_decomposer.formatters

Test Plan

  • 306 tests passing
  • Lint clean (ruff)
  • All code review feedback addressed

Design for adding agent_context field to stories, enabling AI agents
to execute tickets with structured exploration, pattern guidance,
and self-check verification.
8 tasks with TDD approach:
1. AgentContext model
2. Story model update
3. Decomposition prompt
4. Prompt renderer
5. CLI prompt command
6. CSV export update
7. Integration test
8. README docs
Add AgentContext Pydantic model with fields for AI agent guidance:
- goal (required): The 'why' - what problem this solves
- exploration_paths: Keywords/concepts to search
- exploration_hints: Specific paths to start with
- known_patterns: Libraries/patterns to follow
- verification_tests: Tests that should pass when done
- self_check: Questions to verify before completion

Includes 3 tests and public export from __init__.py.
Add guideline 8 instructing the LLM to generate agent_context for each
story, including goal, exploration_paths, exploration_hints, known_patterns,
verification_tests, and self_check fields. Update the example output and
schema section to demonstrate the agent_context structure.

Bump PROMPT_VERSION to 1.6.0.
Add 'prompt N' command (aliases: copy, show) to display a ready-to-paste
prompt for any story by its 1-based index. This enables users to quickly
extract formatted prompts for use with AI coding agents.

Changes:
- Add prompt/copy/show command parsing to parse_command
- Add current_tickets field and get_story_by_index method to SessionState
- Add prompt command handler using existing render_agent_prompt formatter
- Store tickets in session when decompose_to_tickets results are extracted
Add agent_prompt column to CSV export that renders the story's
agent_context using the render_agent_prompt formatter. This gives
users a ready-to-paste prompt for AI agents directly in the CSV.
- Remove "Agent-Executable Tickets" from Future Iterations (now implemented)
- Update test count from 243 to 305
- Add formatters.py and session_state.py to project structure
- Add Session 10 documenting the agent-executable tickets feature
- Update AI-generated files list with new files
HIGH:
- Move inline import in export.py to module level

MEDIUM:
- Fix line length violations in models.py, agent.py, test files
- Add AgentContext to top-level imports in test_models.py
- Add test for reset() clearing current_tickets

LOW:
- Add agent_context to all example stories in decomposition prompt
  (improves LLM consistency in generating agent_context)
Add TestAgentContextGeneration eval class with 5 tests:
- test_stories_have_agent_context (≥50% coverage)
- test_agent_context_has_goal (meaningful goal text)
- test_agent_context_has_exploration_paths
- test_security_feature_has_self_check_questions
- test_agent_context_verification_tests_present

These evals verify that decompose_to_tickets generates useful
agent_context metadata for AI-assisted implementation.
@samkujovich
samkujovich merged commit 76c2445 into main Feb 15, 2026
3 checks passed
@samkujovich
samkujovich deleted the feat/prompt-improvements branch February 15, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant