This workspace contains multiple repositories under C:\Projects\github\sitecorepowershell\:
Book/— Sitecore PowerShell Extensions book/documentation (SitecorePowerShell/Book)mcp-server/— MCP server for Sitecore PowerShell (SitecorePowerShell/mcp-server)sitecorepowershell.com/— Project website (SitecorePowerShell/sitecorepowershell.com)Spe/— Sitecore PowerShell Extensions module (SitecorePowerShell/Console)tutorials/— Tutorials (SitecorePowerShell/tutorials)
Execution Rule: Always confirm the active repository/project directory before executing searches or making file changes.
- /work: Trigger this skill for atomic feature development. You must strictly follow the State Machine protocol below.
- Analyze: Parse the request against the current project structure.
- Clarify: Ask 2-3 targeted questions regarding edge cases, dependencies, or user preferences.
- Plan: Present a concise technical plan (Target branch, files to modify, testing strategy).
- Adversarial Review: Challenge the proposed plan. Identify potential security vulnerabilities, race conditions, attack surfaces, or failure modes. Document findings and adjust the plan.
- HALT: STOP token generation. Wait for the user's explicit approval before proceeding to Phase 2.
- Branching:
a. Check for an existing release branch (e.g.,
release/[version]). If none exists, ask the user whether to create one, incrementing the version from the latest git tag. b. Create a feature branch (feature/[issue-or-concept]) from the release branch (ormasterif no release branch is used). - TDD Red Phase: Write the failing test first to capture expected behavior. Execute the test to confirm failure.
- TDD Green Phase: Implement the code iteratively until the test passes.
- Testing & Diagnosis: Run relevant test suites. If a test fails:
- Trivial syntax errors: Fix immediately.
- Complex failures: Output 3 candidate explanations. State the most likely cause, implement the fix, and retest. Move to the next candidate if the failure persists.
- Documentation: Update relevant inline comments and
README.mdfiles. - Commit Rules:
- Squash related commits on the feature branch (especially when multiple issues are addressed in the same branch).
- Do NOT use composite commands (e.g., chaining with
&∨). - Do NOT explicitly
cdbefore git commands; assume you are executing from the repository root. - Commit changes with descriptive messages.
- HALT: STOP token generation. Instruct the user to perform manual testing. Wait for explicit approval before merging.
- Merge: Upon user approval, merge the feature branch into the release branch (or
master) using--no-ffto preserve a merge commit. - Push: Use the AskUserQuestion tool to request permission to push upstream. Never push automatically.
- Logging: Update
.claude_worklog.mdusing the format below.
Update this file upon completing Phase 1, pausing in Phase 2, and completing Phase 3.
Session ID: [Current session ID] Last Action: [Brief description of the last successful command/step] Next Action: [What needs to happen when execution resumes] State:
- Phase 1: Plan Approved
- Phase 2: Branch Created | Failing Test | Implemented | Documented | Manual Testing Approved
- Phase 3: Merged
If the session terminates or resets, your absolute first action MUST be: cat .claude_worklog.md to restore state before taking any other action.