From 13caa83afba0a531ef6db7218dbf7af36e34b3c1 Mon Sep 17 00:00:00 2001 From: kevlingo Date: Sun, 22 Jun 2025 18:54:30 -0400 Subject: [PATCH] feat(dev-agent): Add configurable date check for environment optimization This commit introduces a configurable date check option to optimize the workflow for different AI environments. New configuration: - checkCurrentDate: false (default) - Skip date retrieval when current date is available in system context - checkCurrentDate: true - Explicitly retrieve current date via tool call Key improvements: - Eliminates redundant date tool calls in environments where current date is injected into system prompt - Maintains backward compatibility with default false setting - Provides flexibility for environments that need explicit date retrieval - Updated dev agent startup to load the new configuration setting This optimization reduces unnecessary tool calls while maintaining the temporal context functionality for environments that require it, improving overall workflow efficiency. --- bmad-core/agents/dev.md | 2 +- bmad-core/core-config.yml | 5 ++++- bmad-core/tasks/implement-story-with-review.md | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bmad-core/agents/dev.md b/bmad-core/agents/dev.md index aba03ab0..a862d6f5 100644 --- a/bmad-core/agents/dev.md +++ b/bmad-core/agents/dev.md @@ -16,7 +16,7 @@ agent: startup: - Announce: Greet the user with your name and role, and inform of the *help command. - - CRITICAL: Load .bmad-core/core-config.yml and read devLoadAlwaysFiles list, devDebugLog values, and complexity thresholds. + - CRITICAL: Load .bmad-core/core-config.yml and read devLoadAlwaysFiles list, devDebugLog values, complexity thresholds, and checkCurrentDate setting. - CRITICAL: Load ONLY files specified in devLoadAlwaysFiles. If any missing, inform user but continue - CRITICAL: Do NOT load any story files during startup unless user requested you do - CRITICAL: Do NOT begin development until told to proceed diff --git a/bmad-core/core-config.yml b/bmad-core/core-config.yml index 4e4b986e..d20af91c 100644 --- a/bmad-core/core-config.yml +++ b/bmad-core/core-config.yml @@ -23,4 +23,7 @@ agentCoreDump: .ai/core-dump{n}.md # Within Review Mode, it will trigger a self-critique loop for any task whose # complexity exceeds agentThresholdTask. agentThresholdStory: 5 -agentThresholdTask: 8 \ No newline at end of file +agentThresholdTask: 8 +# Whether to check current date during temporal context establishment (defaults to false). +# Set to true if current date is not available in system prompt and needs to be retrieved. +checkCurrentDate: false \ No newline at end of file diff --git a/bmad-core/tasks/implement-story-with-review.md b/bmad-core/tasks/implement-story-with-review.md index 2d814465..5e01a9cc 100644 --- a/bmad-core/tasks/implement-story-with-review.md +++ b/bmad-core/tasks/implement-story-with-review.md @@ -11,7 +11,7 @@ To execute a user story with a proactive analysis and review cycle, ensuring ali - First, check if the user has explicitly requested to force Review Mode for this story (e.g., "Implement this story in review mode"). - If so, immediately declare: "**User has forced Review Mode for this story.**" and proceed to step 5, skipping the complexity assessment. Log this in the `Dev Notes`. 2. **Establish Temporal Context**: - - Run `get-Date -Format "yyyy-MM-dd"` and store the current year. Announce the year being used for context-setting (e.g., "Operating with standards context for the year 2024."). + - Check `checkCurrentDate` setting in `core-config.yml`. If `true`, run `get-Date -Format "yyyy-MM-dd"` and store the current year. Announce the year being used for context-setting (e.g., "Operating with standards context for the year 2024."). If `false`, skip this step as current date is assumed to be available in system context. 3. **Internal Codebase Analysis**: - **Action**: Use the built-in IDE semantic search capabilities. - **Query**: Search the entire codebase for implementations, functions, components, or patterns that are semantically related to the user story's title, description, and Acceptance Criteria.