Skip to content

Commit 2f6e3c8

Browse files
committed
Replace shell-based context updates with marker-based upsert
Replace ~3500 lines of bash/PowerShell agent context update scripts with a Python-based approach using <!-- SPECKIT START/END --> markers. IntegrationBase now manages the agent context file directly: - upsert_context_section(): creates or updates the marked section at init/install/switch time with a directive to read the current plan - remove_context_section(): removes the section at uninstall, deleting the file only if it becomes empty - __CONTEXT_FILE__ placeholder in command templates is resolved per integration so the plan command references the correct agent file - context_file is persisted in init-options.json for extension access The plan command template instructs the LLM to update the plan reference between the markers in the agent context file. Removed: - scripts/bash/update-agent-context.sh (857 lines) - scripts/powershell/update-agent-context.ps1 (515 lines) - 56 integration wrapper scripts (update-context.sh/.ps1) - templates/agent-file-template.md - agent_scripts frontmatter key and {AGENT_SCRIPT} replacement logic - update-context reference from integration.json - tests/test_cursor_frontmatter.py (tested deleted scripts) Added: - upsert/remove context section methods on IntegrationBase - __CONTEXT_FILE__ placeholder support in process_template() - context_file field in init-options.json (init/switch/uninstall) - Per-integration tests: context file correctness, plan reference, init-options persistence (78 new context_file tests) - End-to-end CLI validation across all 28 integrations
1 parent ba9a8b8 commit 2f6e3c8

82 files changed

Lines changed: 555 additions & 3515 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ packages = ["src/specify_cli"]
2828
[tool.hatch.build.targets.wheel.force-include]
2929
# Bundle core assets so `specify init` works without network access (air-gapped / enterprise)
3030
# Page templates (exclude commands/ — bundled separately below to avoid duplication)
31-
"templates/agent-file-template.md" = "specify_cli/core_pack/templates/agent-file-template.md"
3231
"templates/checklist-template.md" = "specify_cli/core_pack/templates/checklist-template.md"
3332
"templates/constitution-template.md" = "specify_cli/core_pack/templates/constitution-template.md"
3433
"templates/plan-template.md" = "specify_cli/core_pack/templates/plan-template.md"

0 commit comments

Comments
 (0)