Harness strategy

From Intense-Visions/harness-engineering · View interactive version

Harness strategy is an AI agent skill from the GitHub repository Intense-Visions/harness-engineering. > Repo-root strategic anchor. **Phase 2 of the strategic-anchor spec ships the skill**: a first-run interview that writes a valid `STRATEGY.md`, plus an update flow that re-interviews one section at a

How to use this skill

Skill file

Harness Strategy

Repo-root strategic anchor. Phase 2 of the strategic-anchor spec ships the skill: a first-run interview that writes a valid STRATEGY.md, plus an update flow that re-interviews one section at a time with pushback against fluff, goals-as-strategy, and feature-lists-as-strategy. Downstream wiring (init, brainstorming, roadmap-pilot, ideate, knowledge graph) ships in spec Phases 3-7.

When to Use

Process

Iron Law

The skill never writes STRATEGY.md without explicit user confirmation of the assembled doc, and never silently accepts an answer that fails a pushback rule on the FIRST round. The 2-round cap is the _capitulation_ point, not the _bypass_ point — round 1 must always fire when a rule matches.


Phase 0: ROUTE BY FILE STATE

  1. Locate STRATEGY.md at repo root. Use path.join(process.cwd(), 'STRATEGY.md').
  2. Call validate_strategy({ path: process.cwd() }) via the harness MCP server. It returns { present, valid, error? }. The MCP server already has @harness-engineering/core loaded, so the project does not need it installed.

The skill MUST NOT auto-overwrite a present-but-invalid STRATEGY.md — that's the user's prior work, even if broken. The three-path offer is the contract.


Phase 1: FIRST-RUN INTERVIEW

Read references/interview.md for the three pushback rules and the 2-round cap. Both are mandatory.

Calibrate the user before section 1. Point them to references/writing-inputs.md — worked examples of high-quality strategy inputs across four quadrants (full vs minimal × greenfield vs brownfield). Offer it up front (one line, e.g. _"Want to see what a good answer looks like first? references/writing-inputs.md has full and minimal worked examples for both new and existing projects."_) and again whenever a pushback rule fires and the user seems unsure what a concrete answer looks like. It lowers the entry cost of clearing the pushback bar; it does not replace the bar.

Walk sections in template order — never out of order, because each section informs the next:

  1. Target problem. Open with: _"In 2-4 sentences: what is specifically broken in the world that this product addresses? Not the goal — the diagnosis."_ Capture. Apply Fluff detection and Goal-as-strategy rules.
  2. Our approach. Open with: _"What is your distinctive bet on how to solve the target problem? The choice you're making about HOW, not WHAT you're building."_ Apply all three rules (Fluff, Goal-as-strategy, Feature-list-as-strategy) — this is where feature-list answers live.
  3. Who it's for. Open with: _"Specific persona — who is the person, what context are they in, what alternatives are they currently using? 'Developers' is not a specific persona."_ Apply Fluff detection.
  4. Key metrics. Open with: _"What 1-5 metrics, measured where, would tell you the bet is paying off? Each metric is a bullet line: - <name>: <how measured, where it lives>."_ Apply Fluff detection per bullet.
  5. Tracks. Open with: _"What 1-5 tracks of work are you currently investing in to advance the bet? Each track is a bullet line: - <track name>: <one-sentence current investment>."_ Apply Feature-list-as-strategy per bullet (a "track" should be an investment direction, not a feature name).
  6. Optional sections. Ask once whether to add Milestones, Not working on, and/or Marketing. If yes, walk each with the same rules. If no, skip — they remain absent (the schema allows omission).
  7. Assemble. Show the full proposed doc. Ask explicitly: _"Write this to STRATEGY.md?"_ Wait for yes/no.
  8. Write. Call write_strategy({ path: process.cwd(), doc }) via the harness MCP server. The doc argument is the assembled StrategyDoc shape: { frontmatter: { name, last_updated, version }, sections: [{ name, body }, ...] }. Set last_updated to today's ISO date; version to 1 for first run. The MCP tool validates against StrategyDocSchema and refuses to touch disk on schema failure. Passing the doc as a JSON parameter (not through a shell) means user-supplied prose never crosses the shell tokenizer — no quoting, backtick, or $VAR hazard. Fallback for environments without the MCP server: shell out to node -e "import('@harness-engineering/core').then(m => m.writeStrategyDoc(JSON.parse(require('fs').readFileSync(0, 'utf-8')), { cwd: process.cwd() }))" with the doc piped on stdin — but only when @harness-engineering/core is resolvable from the project's node_modules.
  1. Validate. Run harness validate to confirm the file passes StrategyDocSchema. On failure, surface the error and stop (do not retry).

Phase 2: UPDATE RUN

  1. Re-read the existing file via read_strategy({ path: process.cwd() }) on the harness MCP server. It returns { present: true, valid: true, doc } with the parsed StrategyDoc shape; the server runs validateStrategy + parseStrategyDoc + asStrategyDoc internally so the project does not need @harness-engineering/core installed.
  2. Summarize current state in 3-5 lines: frontmatter (name, last_updated, version), then the first sentence of each present section. This is the "what's there now" view the user needs to choose what to revisit.
  3. Ask which section to revisit. Present the section names as numbered options. Allow none (exit) or multiple (sequential re-interviews).
  4. Re-interview each selected section with the same pushback rules and 2-round cap from Phase 1. Do not re-ask sections the user did not select.
  5. Bump frontmatter. Set last_updated to today's ISO date. Increment version by 1.
  6. Confirm and write. Show the diff between the parsed doc and the new doc (added/changed sections). Ask explicitly: _"Write the update?"_ Wait for yes/no. Call write_strategy (same pattern as Phase 1.8). The writer preserves the user's H1 line and writes a .bak only if no .bak exists yet (idempotent — the original pre-strategy file is the rollback target).
  7. Validate. Run harness validate.

Phase 3: DOWNSTREAM HANDOFF

After Phase 1 or Phase 2 completes successfully, print this short note (3-5 lines):

STRATEGY.md written. Downstream skills that pick this up as grounding:
  - harness-brainstorming     (Phase 5 of strategic-anchor spec — reads STRATEGY.md in Phase 1 EXPLORE)
  - harness-ideate            (Phase 4 of spec — generates ranked candidates grounded in STRATEGY.md)
  - harness-roadmap-pilot     (Phase 6 of spec — strategy-alignment tiebreaker)
  - BusinessKnowledgeIngestor (Phase 7 of spec — strategy domain → business_fact nodes)
Soft-fail when absent; no downstream skill blocks on STRATEGY.md's presence.

The handoff exists to set the user's expectation about _why_ they just answered those questions. It is short by design — this is not a section to grow.


Question-File Mode (opt-in)

The default is the interactive, section-by-section interview above. Question-file mode is an opt-in variant for async, team-reviewable strategy capture — the skill writes its section prompts to a durable file, the human (or the whole team) fills in answers over time, and the skill reads them back. Enter it only when the human asks (e.g. "do this as a question file"); never automatically. The full convention — file location, the [Answer]: tag, the read-back ritual, and context hygiene — lives in references/question-file-mode.md; this section states only how it maps onto the strategy interview.

  1. WRITE. Assemble the same section prompts Phase 1 would ask (Target problem, Our approach, Who it's for, Key metrics, Tracks, and the optional sections when the human opts in), in template order, into docs/strategy/interviews/strategy-questions.md — a strategy-scoped home (strategy updates the root STRATEGY.md, so there is no per-change slug) (or .harness/sessions/<slug>/interviews/strategy-questions.md when a session slug is known). Each prompt gets an empty [Answer]:. Include a one-line pointer at the top of the file to references/writing-inputs.md so async fillers (who cannot ask a follow-up mid-flow) can self-calibrate against the worked examples. Report the path and stop.
  2. READ-BACK. On the next run, re-read the file from disk and treat each filled [Answer]: as that section's answer. Apply the same three pushback rules (Fluff detection, Goal-as-strategy, Feature-list-as-strategy) and the 2-round cap per section, flagging failures in the file under the question.
  3. CONTRADICTION PASS. Run the cross-answer contradiction pass (see references/interview.md Rule 4 and references/question-file-mode.md) over the filled sections — e.g. a Key metrics bullet the Our approach bet cannot produce, or a Tracks entry that contradicts the stated approach. Surface each contradiction; never auto-resolve.
  4. PROCEED. Unanswered [Answer]: sections are treated as skipped (required sections left blank block the write exactly as an empty interactive answer would). Then continue to the unchanged Phase 1.7 assemble → confirm → write_strategy path. File mode changes only how answers are gathered — the writer, schema validation, and .bak behavior are identical.

Harness Integration

Success Criteria

Rationalizations to Reject

These are common rationalizations that sound reasonable but lead to incorrect results. When you catch yourself thinking any of these, stop and follow the documented process instead.

| Rationalization | Why It Is Wrong |

| -------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

| "'We want to be the market leader in X' is a clear direction — I'll accept it as their approach." | That is a goal/aspiration, not a bet on HOW. The Goal-as-strategy rule must fire: strategy is the distinctive choice about how to win, not the outcome you hope to reach. Push for the diagnosis and the bet. |

| "They listed three features as their approach — that's basically the strategy, I'll record it." | The Feature-list-as-strategy rule must fire. A list of features is not a coherent bet; ask "what's the coherent action these features are instances of?" and capture that instead. |

| "The answer is a little fluffy but they seem confident — I'll accept it without pushing back." | Round 1 pushback MUST always fire when a rule matches (Iron Law). The 2-round cap is the capitulation point, not a bypass — skipping round 1 lets empty-modifier vocabulary into a durable anchor. |

| "The doc assembled cleanly — I'll write STRATEGY.md and show them the result after." | The skill must NEVER write without explicit user confirmation of the assembled/updated doc. Show the full doc (or diff) and wait for an explicit yes before calling write_strategy. |

| "STRATEGY.md is present but invalid — the cleanest fix is to overwrite it with a fresh interview." | Never auto-overwrite a present-but-invalid file; it is the user's prior work even when broken. Offer the three Phase 0 repair paths (fix-now / back-up-and-restart / exit) and let the user choose. |

Examples

Example: greenfield (no STRATEGY.md)

Example: update existing STRATEGY.md (one section)

Example: present-but-invalid STRATEGY.md

Example: pushback gives up after the cap

Gates

Escalation

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.