Skip to content

Comments

feat: add self-disable step to template setup workflow#9

Merged
jpke merged 1 commit intomainfrom
feature/template-self-disable
Jul 4, 2025
Merged

feat: add self-disable step to template setup workflow#9
jpke merged 1 commit intomainfrom
feature/template-self-disable

Conversation

@jpke
Copy link
Owner

@jpke jpke commented Jul 4, 2025

This PR adds a clever self-modifying feature to the template setup workflow that optimizes context window usage.

Problem

The template setup workflow needed to be visible during initialization () so agents could see the detailed instructions, but this caused the detailed instructions to consume context window space even after the one-time setup was complete.

Solution

Added a final step to the template setup workflow that instructs the agent to change to after template initialization is complete.

How it Works

  1. During template initialization: The rule is visible () so agents can see detailed instructions
  2. After template setup is complete: The agent changes the frontmatter to
  3. Future sessions: The detailed template setup instructions don't consume context window space
  4. If needed later: Instructions can still be accessed via the reference in workflow.mdc

Benefits

  • Detailed instructions available during one-time setup
  • Context window space preserved after setup is complete
  • Self-managing rule that optimizes itself automatically
  • No loss of functionality - instructions remain accessible when needed

Changes Made

  • Added "Final Step: Remove from Context Window" section to template_setup.mdc
  • Provides clear instructions for the agent to modify the rule's frontmatter
  • Explains the purpose and benefits of this optimization

This creates an elegant solution for managing context usage while maintaining accessibility to detailed instructions.

- Add final step to change alwaysApply from true to false after template initialization
- Prevents detailed template setup instructions from consuming context window space
- Ensures template setup rules are visible during one-time setup but hidden afterwards
- Maintains accessibility via reference in workflow.mdc if needed later
@jpke jpke merged commit ec4e1ac into main Jul 4, 2025
7 checks passed
@jpke jpke deleted the feature/template-self-disable branch July 4, 2025 22:09
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