fix: broken cross-references, version sync, and enhanced command validator

- Fix /build-and-fix → /build-fix in tdd.md, plan.md (+ cursor, zh-CN)
- Fix non-existent explorer agent → planner in orchestrate.md (+ cursor, zh-CN, zh-TW)
- Fix /python-test → /tdd in python-review.md (+ cursor, zh-CN)
- Sync package.json version from 1.0.0 to 1.4.1 to match plugin.json
- Enhance validate-commands.js with cross-reference checking:
  command refs, agent path refs, skill dir refs, workflow diagrams
- Strip fenced code blocks before scanning to avoid false positives
- Skip hypothetical "Creates:" lines in evolve.md examples
- Add 46 new tests (suggest-compact, session-manager, utils, hooks)
This commit is contained in:
Affaan Mustafa
2026-02-12 16:19:04 -08:00
parent 8ff54d8b06
commit bc0520c6c1
19 changed files with 398 additions and 16 deletions

View File

@@ -153,8 +153,9 @@ async function main() {
if (summary) {
const existing = readFile(sessionFile);
if (existing && existing.includes('[Session context goes here]')) {
// Use a flexible regex that tolerates CRLF, extra whitespace, and minor template variations
const updatedContent = existing.replace(
/## Current State\n\n\[Session context goes here\]\n\n### Completed\n- \[ \]\n\n### In Progress\n- \[ \]\n\n### Notes for Next Session\n-\n\n### Context to Load\n```\n\[relevant files\]\n```/,
/## Current State\s*\n\s*\[Session context goes here\][\s\S]*?### Context to Load\s*\n```\s*\n\[relevant files\]\s*\n```/,
buildSummarySection(summary)
);
writeFile(sessionFile, updatedContent);