Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions agents/specwright-executor.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ You are Specwright's executor agent. Your role is disciplined implementation.

1. Read the task spec, relevant plan sections, and constitution
2. Identify the acceptance criteria for THIS task
3. Read the failing tests provided by the tester agent
4. Understand what each test expects
5. Write the minimum implementation to pass
6. Run tests to confirm they pass (GREEN)
7. Refactor if needed, confirm tests still pass (REFACTOR)
8. Report what was done with file:line references
3. If stub files exist from the tester, read plan.md for correct signatures before replacing stubs with real implementations
4. Read the failing tests provided by the tester agent
5. Understand what each test expects
6. Write the minimum implementation to pass
7. Run tests to confirm they pass (GREEN)
8. Refactor if needed, confirm tests still pass (REFACTOR)
9. Report what was done with file:line references

## Output format

Expand Down
1 change: 1 addition & 0 deletions agents/specwright-tester.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ These are the testing sins you hunt for and eliminate:

## How you write tests

0. If files you need to import don't exist yet, create minimal stubs (empty function bodies, placeholder types) so your tests can import successfully. These stubs are test infrastructure — they ensure tests fail for assertion reasons, not import errors. Keep stubs minimal: just enough for imports.
1. Read the acceptance criteria and spec provided in your prompt
2. Read the project's CONSTITUTION.md for testing standards
3. Read the project's test infrastructure (framework, helpers, fixtures)
Expand Down
6 changes: 6 additions & 0 deletions protocols/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ EOF

The `Co-Authored-By` trailer is always included.

## Commit Recovery (Pre-commit Hook Failures)

If `git commit` exits non-zero AND output contains formatter-like patterns ("reformatted", "fixed", file modification reports), re-stage the modified files and retry once. If the second attempt fails, stop and show the error to the user.

This extends the build skill's `config.commands.format` handling (which runs formatters *before* commit) to cover formatters invoked *by* pre-commit hooks outside Specwright's config.

## PR Creation

Read `config.git.prTool` (default: `gh`).
Expand Down
4 changes: 4 additions & 0 deletions skills/sw-build/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ When delegating, include in the prompt:
- Acquire lock before starting. Release after each task commit.
- Update `tasksCompleted` array after each successful task.

**Context management (MEDIUM freedom):**
- After each task commit, write `.specwright/state/continuation.md`: current unit, task just completed, key files modified, remaining tasks. Overwrites each time.
- After every 3rd completed task, note to the user: "Completed {n}/{total} tasks. If context feels large, consider /clear — I'll recover from workflow.json."

**Task tracking (LOW freedom):**
- At build start, create Claude Code tasks from spec/plan for visual progress tracking (subject = task name, description = acceptance criteria summary, activeForm = present-continuous).
- Write ordering: update workflow.json FIRST (source of truth), then TaskUpdate as best-effort. Task tracking failures never halt the build.
Expand Down
1 change: 1 addition & 0 deletions skills/sw-design/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ When warranted: `decisions.md`, `data-model.md`, `contracts.md`, `testing-strate
- If `.specwright/AUDIT.md` exists and fresh per `protocols/audit.md`, surface relevant findings for the area being designed.
- Scan code, dependencies, APIs, existing patterns. Check `.specwright/patterns.md` and `.specwright/learnings/INDEX.md` if they exist.
- Delegate to `specwright-researcher` and `specwright-architect` as needed.
- When gathering requirements from the user, listen for: hesitation or qualifiers ("maybe", "probably") → capture as uncertainty; repeated module mentions → likely natural boundaries; "core" or "foundation" language → ordering information; multiple alternatives → decision point to surface. Cover natural boundaries, ordering intuition, uncertainty mapping, and existing constraints.
- Produce `context.md` summarizing findings for downstream agents.
- Research is complete when: can describe how the solution integrates with existing code (specific files/modules), can identify the main risk and at least one mitigation, can list what the solution does NOT change (blast radius is bounded), and no major "I'm guessing" gaps remain.

Expand Down