Foreman
=======

This product includes software derived from mattpocock/skills
(https://github.com/mattpocock/skills), Copyright (c) 2026 Matt Pocock,
licensed under the MIT License.

Upstream source: https://github.com/mattpocock/skills
Forked from commit: 694fa30311e02c2639942308513555e61ee84a6f (cloned 2026-06-12)

The following Foreman skills are derivative works of upstream skills. They have
been renamed into a `foreman-*` namespace and substantially rewritten so that
Foreman's pipeline never resolves to a user-installed upstream copy, and so the
skills operate in a headless, non-interactive orchestration context.

  foreman-grill-docs   <- grill-with-docs (+ to-prd)   [src/foreman/skills/foreman-grill-docs/]
  foreman-to-prd       <- to-prd                        [src/foreman/skills/foreman-to-prd/]
  foreman-to-issues    <- to-issues                     [src/foreman/skills/foreman-to-issues/]
  foreman-tdd          <- tdd                           [src/foreman/skills/foreman-tdd/]

Phase 2 ("Trustworthy Autonomy") adds Foreman-authored, read-only agent files
(no upstream derivation; original works under this repository's MIT License):

  foreman-evaluator    [src/foreman/agents/assets/foreman-evaluator.md]  builder/grader split
  foreman-auditor      [src/foreman/agents/assets/foreman-auditor.md]    impl↔PRD divergence audit
  foreman-retro        [src/foreman/agents/assets/foreman-retro.md]      evals-flywheel patch proposer

WS7 ("Skills-suite expansion") adds four more derivative worker skills and two
read-only gate agents. The worker skills are derived from obra/superpowers
(https://github.com/obra/superpowers), Copyright (c) 2026 obra, MIT License, and
from Anthropic's `web-app-testing` skill; all rewritten headless into the
`foreman-*` namespace with the same modifications summarised below:

  foreman-debug         <- superpowers systematic-debugging         [src/foreman/skills/foreman-debug/]
  foreman-verify        <- superpowers verification-before-completion[src/foreman/skills/foreman-verify/]
  foreman-plan          <- superpowers writing-plans                 [src/foreman/skills/foreman-plan/]
  foreman-web-testing   <- Anthropic web-app-testing (+ tdd e2e)     [src/foreman/skills/foreman-web-testing/]

The two read-only gate agents adapt the structure of obra/superpowers'
code-reviewer prompt (MIT) and the diff-scoped, false-positive-aware approach of
anthropics/claude-code-security-review (Apache-2.0); rewritten as Foreman gate
agents emitting machine-readable verdicts:

  foreman-code-review     [src/foreman/agents/assets/foreman-code-review.md]      diff review → foreman-codereview/v1
  foreman-security-review [src/foreman/agents/assets/foreman-security-review.md]  vuln review → foreman-security/v1

The evidence-gated "done" contract, the read-only evaluator, the commit-on-stop
backstop, and the Default-FAIL results contract are adapted from the primitives in
anthropics/cwc-long-running-agents (Apache-2.0); see DECISIONS.md §P2.5.

A detailed, skill-by-skill description of what changed and why is recorded in
DECISIONS.md, section 8 (Phase 1) and §P2.3 (Phase 2).

Summary of modifications:
  - Removed all live, one-question-at-a-time interactive interviewing; replaced
    with codebase self-answering plus a structured "Open questions for reviewer"
    draft section consumed by Foreman's asynchronous review gate.
  - Removed all GitHub (`gh`) issue-tracker usage and GitHub label/triage
    vocabulary; issues are emitted as local files under .foreman/.
  - Made the TDD skill stack-agnostic (test/lint/typecheck commands injected
    from config.yaml) and added a machine-readable FOREMAN-SUMMARY output block.
  - Repointed all document output paths to the .foreman/features/<slug>/ layout
    while still maintaining the target repo's CONTEXT.md and docs/adr/.

The MIT License text governing both the original and these derivative works is
reproduced in the LICENSE file at the root of this repository.
