[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6MZ256P9ZYHZVBV5ZPZ2X0C":3,"skill-same:01M6MZ256P9ZYHZVBV5ZPZ2X0C":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6MZ256P9ZYHZVBV5ZPZ2X0C","goal-condition-synthesis",null,"Synthesize a Claude Code \u002Fgoal condition from AA-MA plan artifacts. Produces a falsifiable condition referencing observable artifacts (provenance.log, tasks.md, git tags, test exit codes) plus a turn cap derived from plan effort. Owns the canonical verdict-token enum, observable-artifact list, hashing contract, and turn-cap formula. Used by \u002Fexecute-aa-ma-full §2.5 and \u002Fverify-plan --iterate.","snewhouse\u002Faa-ma-forge","snewhouse","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6317143?v=4","01M6MYYWF28C4KBQHHWB9SC6TS","Stephen J Newhouse","01M6MYYWJWQMDN2ZPFMJ584SSM",6,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fgoal-condition-synthesis\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"goal condition synthesis","condition","goal","Synthesis","formula","iterate","plan artifacts","codes","tags","contract","synthesize","exit","test","log","hashing","plan","provenance","artifacts","code","tasks","2026-11-10 10:12:30",false,"---\nname: goal-condition-synthesis\ndescription: Synthesize a Claude Code \u002Fgoal condition from AA-MA plan artifacts. Produces a falsifiable condition referencing observable artifacts (provenance.log, tasks.md, git tags, test exit codes) plus a turn cap derived from plan effort. Owns the canonical verdict-token enum, observable-artifact list, hashing contract, and turn-cap formula. Used by \u002Fexecute-aa-ma-full §2.5 and \u002Fverify-plan --iterate.\n---\n\n# Goal-Condition Synthesis Skill\n\nProduce a `\u002Fgoal` completion condition from AA-MA plan artefacts, suitable for\nbinding to a Claude Code session as the cross-turn drive-to-completion\nprimitive (https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fgoal.md).\n\nThis SKILL is the **canonical source** for:\n\n- the observable-artifact list (used by `\u002Fgoal` Haiku evaluator)\n- the verdict-token enum (used in `provenance.log` audit lines)\n- the turn-cap formula (cost ceiling)\n- the condition-hash contract (auditable cross-reference primitive)\n\nOther surfaces (`aa-ma-execution` §IX.5, `aa-ma-team-guide` §2.7,\n`aa-ma-quick-reference`, `execute-aa-ma-full` §2.5, `verify-plan` Step 4.5)\n**link back** to this SKILL rather than restating these values, to prevent\ndrift.\n\n**Reference implementation for maintainer regression net:** the algorithm is\nmirrored as pure Python in `src\u002Faa_ma\u002Fgoal_synthesis.py` (unit-tested in\n`tests\u002Ftest_goal_synthesis.py`). The module exists so the spec stays\nfalsifiable for aa-ma-forge maintainers — **agents executing this skill\nfollow the markdown protocol below; they do not need the Python module\ninstalled in the consuming project** (`scripts\u002Finstall.sh` does not symlink\n`src\u002F` into `~\u002F.claude\u002F`). When the SKILL and the Python disagree, file an\nissue — they are co-canonical.\n\n**Relationship to `Skill(plan-verification)` Angle 4 (falsifiability):**\nplan-verification audits **Acceptance Criteria phrases** in `plan.md` against\nits own banned-phrase list (e.g. `\"handles edge cases gracefully\"`,\n`\"works as expected\"` — see L-059 in `plan-authoring-standards.md`). This\nskill audits **`\u002Fgoal` condition words** against `BANNED_VAGUE_TERMS`\n(`done`, `working`, `correct`, `good`, `ready`). The two lists are\n**complementary, not redundant** — different artefact types, different\nvagueness grammars. Do not merge them; do not delete either. If you need to\nextend one, document why the other does not need the same extension.\n\n## When to Use This Skill\n\nInvoke this skill when:\n\n- `\u002Fexecute-aa-ma-full` reaches §2.5 (Goal Synthesis & Bind) and must construct\n  a goal condition before AFK execution.\n- `\u002Fverify-plan --iterate` needs a condition that bounds the adversarial\n  verification loop.\n- A user explicitly asks \"synthesise a goal for this plan\" against an active\n  AA-MA task.\n\nDo NOT use this skill for:\n\n- Per-step or per-sub-task goals — `\u002Fgoal` is one-per-session. Goals live at\n  the **task** level, not the milestone or step level.\n- Tasks missing any of the 5 standard AA-MA files\n  (`plan.md`, `reference.md`, `context-log.md`, `tasks.md`, `provenance.log`).\n  The synthesiser needs `plan.md` Acceptance Criteria and `tasks.md` milestone\n  count at minimum.\n\n## Why Observable Artefacts Matter\n\nThe Haiku evaluator that `\u002Fgoal` invokes after each turn only sees what is in\nthe conversation transcript. It does **not** run tools. A vague condition like\n\"feature is done\" cannot be evaluated; the model has nothing to check.\n\n### Canonical Observable-Artefact Table\n\nThis is the authoritative list. Other docs reference it; they do not restate it.\n\n| # | Observable | Where it appears in the transcript |\n|---|---|---|\n| 1 | `provenance.log` lines | Bash `cat` output after milestone commits |\n| 2 | `tasks.md` Status fields | Read tool output during finalisation |\n| 3 | Git tag existence | `git tag -l` output |\n| 4 | Test exit codes | `make ci` \u002F `pytest` output |\n| 5 | Commit footers (`[AA-MA Plan]` signature) | `git log` output |\n| 6 | `\u003Ctask>-verification.md` Verdict line | Read tool output after `\u002Fverify-plan` runs |\n\nConditions that reference at least **two** rows from this table can be evaluated\nby Haiku from transcript context alone.\n\n## Synthesis Algorithm\n\n### Inputs\n\n1. `\u003Ctask-dir>` — path to `.claude\u002Fdev\u002Factive\u002F\u003Ctask-name>\u002F`\n2. `\u003Ctask-name>` — the task slug\n3. `\u003Cmode>` — one of `full-execute`, `verify-iterate`\n4. (optional) `\u003Coverride-turn-cap>` — explicit user override; otherwise auto-derived\n\n### Step 1: Read plan and tasks\n\nRead these files:\n\n- `\u003Ctask-dir>\u002F\u003Ctask-name>-plan.md` → extract `Acceptance Criteria` (per\n  milestone or top-level), `Tests`, `Effort`, `Engineering Standards Declaration`.\n- `\u003Ctask-dir>\u002F\u003Ctask-name>-tasks.md` → count milestones with `Status: PENDING`\n  or `Status: ACTIVE`.\n\n### Step 2: Derive turn cap\n\n```\nturn_cap = max(4, ceil(min(pending_milestones * 1.5, 30)))\n```\n\nFloor of 4 prevents single-milestone plans from being capped below the\nfinalisation overhead (milestone commit + `\u002Fverify-plan` + finalize).\nCeiling of 30 is the cost ceiling for AFK runs.\n\nIf user provided `\u003Coverride-turn-cap>`, use that value (still validated as\n≥ 1 and ≤ 30 by `validate_condition`).\n\nReference implementation: `aa_ma.goal_synthesis.turn_cap(pending_milestones: int) -> int`.\n\n### Step 3: Build the condition string\n\nTemplates by mode:\n\n**`full-execute`:**\n\n```\nAll remaining milestones in \u003Ctask>\u002Ftasks.md have Status: COMPLETE;\n\u003Ctask>-provenance.log contains a \"MILESTONE COMPLETE\" line for each;\ngit tag \u003Ctask-name>-complete exists;\n`make ci` (or the project's quality gate equivalent) exits 0;\nor stop after \u003Cturn_cap> turns.\n```\n\n**`verify-iterate`:**\n\n```\n\u003Ctask>-verification.md latest \"## Verdict\" block shows GREEN with\n0 Criticals AND every Critical from the previous Verdict block has a\n\"Resolution:\" line in this block;\nor stop after 3 iterations.\n```\n\nThe iterate cap is fixed at 3 (heuristic: more than 3 verification iterations\non the same plan typically indicates the plan needs a human re-think, not\nanother mechanical pass).\n\n### Step 4: Validate the condition\n\nSelf-check before returning. The Python reference implementation is\n`aa_ma.goal_synthesis.validate_condition(condition: str, turn_cap_value: int)\n-> ValidationResult` where `ValidationResult = ValidationOk | ValidationError`\n(both are frozen dataclasses; `ValidationError.reason` is one of the canonical\ntokens listed under Failure Modes below). Checks:\n\n1. Condition references at least 2 distinct observable artefacts from the\n   canonical table above. Detected via regex against artefact-signature\n   substrings (`provenance.log`, `tasks.md`, `git tag`, `make ci` \u002F\n   `pytest`, `[AA-MA Plan]`, `verification.md`).\n2. `turn_cap` is an integer in `[1, 30]`.\n3. Total condition length is ≤ 4 000 characters (Claude Code `\u002Fgoal` limit).\n4. Condition avoids any case-insensitive whole-word match of vague terms:\n   `done`, `working`, `correct`, `good`, `ready`. The banned-word list is\n   exported as `aa_ma.goal_synthesis.BANNED_VAGUE_TERMS`.\n\nIf any check fails, return `SYNTHESIS_FAILED` with the specific reason. Do\n**not** return a degraded condition.\n\n### Step 5: Compute the condition hash\n\nThe hash is the deterministic audit primitive for cross-referencing a bound\ngoal between `provenance.log`, sibling sessions, and future replay.\n\nReference implementation: `aa_ma.goal_synthesis.condition_hash(condition: str)\n-> str`. Equivalent shell:\n\n```bash\nprintf '%s' \"$CONDITION_LF_NORMALISED\" | sha256sum | cut -c1-12\n```\n\nWhere `$CONDITION_LF_NORMALISED` is the condition with:\n\n- all `\\r\\n` and `\\r` replaced by `\\n`\n- trailing whitespace on each line stripped\n- no trailing newline at end of string\n- UTF-8 encoded\n\nThe first 12 hex characters of the SHA-256 digest are the hash. Two sessions\nbinding the same condition (semantically and byte-for-byte after normalisation)\nproduce the same hash.\n\n### Step 6: Return structured result\n\n```yaml\nstatus: SYNTHESIZED | SYNTHESIS_FAILED\nmode: full-execute | verify-iterate\ncondition: |\n  \u003Cthe full condition string>\nturn_cap: \u003Cint>\ncondition_hash: \u003C12-hex>     # only when status=SYNTHESIZED\nobservable_artifacts: [\u003Clist of artefact identifiers referenced>]\nplan_inputs:\n  acceptance_criteria_count: \u003Cint>\n  milestone_count: \u003Cint>\n  effort_estimate: \u003Cstring from plan.md>\nsynthesis_warnings: [\u003Clist of any non-blocking concerns>]\n```\n\n## Canonical Verdict & Event Vocabulary\n\nThis is the single authoritative enum for `\u002Fgoal`-integration provenance lines.\nAll other docs reference this table; they do not restate it.\n\n| Event token | Where emitted | Allowed value tokens |\n|---|---|---|\n| `GOAL_BOUND` | After `AskUserQuestion → Bind` (full-execute §2.5) | `turn_cap=\u003Cint>` and `condition_hash=\u003C12-hex>` |\n| `GOAL_BIND_DECLINED` | User chose `[Skip \u002Fgoal]` at §2.5 | `user_choice` |\n| `GOAL_SYNTHESIS_SKIPPED` | Synthesis returned `SYNTHESIS_FAILED` | `reason={missing_plan, nothing_to_do, plan_incomplete, condition_too_long, condition_too_vague, turn_cap_out_of_range, observable_artifacts_insufficient}` |\n| `GOAL_FINAL` | At plan completion (full-execute §6) | `verdict={MET, UNMET, TURN_CAP_HIT, CLEARED, NOT_BOUND}`, `turns=\u003Cint>`, `reason='\u003Cshort>'` |\n| `VERIFY_ITERATE` | At iterate-mode termination (verify-plan §4.5) | `verdict={GREEN, YELLOW, RED}`, `iterations=\u003Cint>`, `criticals=\u003Cint>`, `outcome={MET, EXHAUSTED, USER_HALTED}` |\n| `VERIFY_ITERATE_SKIPPED` | `--iterate` requested but `\u002Fgoal` unavailable or synthesis failed | `reason=\u003Ctoken>` |\n\nAudit one-liner (covers every event token above):\n\n```bash\ngrep -E '^\\[.*\\] (GOAL_|VERIFY_ITERATE)' \\\n  .claude\u002Fdev\u002Factive\u002F\u003Ctask>\u002F\u003Ctask>-provenance.log\n```\n\n## Worked Example\n\nInput:\n\n- `task-name`: `add-jwt-auth`\n- `task-dir`: `.claude\u002Fdev\u002Factive\u002Fadd-jwt-auth\u002F`\n- `mode`: `full-execute`\n- `plan.md` has 4 milestones, 11 acceptance criteria total, Effort: \"M (3-5 days)\"\n- `tasks.md` shows 3 milestones PENDING, 1 COMPLETE\n\nOutput:\n\n```yaml\nstatus: SYNTHESIZED\nmode: full-execute\ncondition: |\n  All remaining milestones in add-jwt-auth\u002Ftasks.md have Status: COMPLETE;\n  add-jwt-auth-provenance.log contains a \"MILESTONE COMPLETE\" line for each;\n  git tag add-jwt-auth-complete exists;\n  `make ci` exits 0;\n  or stop after 5 turns.\nturn_cap: 5            # max(4, ceil(min(3 * 1.5, 30))) = max(4, 5) = 5\ncondition_hash: a3f2b1c8d4e7\nobservable_artifacts: [tasks.md Status, provenance.log lines, git tag, test exit code]\nplan_inputs:\n  acceptance_criteria_count: 11\n  milestone_count: 4\n  effort_estimate: \"M (3-5 days)\"\nsynthesis_warnings: []\n```\n\n## Anti-Patterns\n\n| Anti-pattern | Why it fails |\n|---|---|\n| \"Feature is complete\" | Not observable — Haiku has nothing to check |\n| \"All tests pass\" without saying *how the agent surfaces test results* | Haiku doesn't see tool output; the agent must `cat` results into the transcript |\n| Per-milestone goals | `\u002Fgoal` is one-per-session; replacing a goal mid-run loses cross-turn continuity |\n| `turn_cap > 30` | Cost ceiling fails; AFK runs can burn through tokens unnoticed |\n| No turn cap | Same as above — `\u002Fgoal` will keep retrying indefinitely if the condition is unmet |\n| Subjective criteria (`good`, `ready`, `correct`, `working`, `done`) | Haiku cannot evaluate subjective claims |\n\n## Integration Points\n\n- **Called by:** `\u002Fexecute-aa-ma-full` §2.5; `\u002Fverify-plan --iterate`\n- **Uses:** `Read` tool to load plan.md and tasks.md; `aa_ma.goal_synthesis`\n  Python helpers\n- **Does NOT call:** `\u002Fgoal` directly — returns the condition string for the\n  caller to invoke\n- **Related skills:** `aa-ma-execution` (operator reference); `plan-verification`\n  (consumed by the iterate-mode condition)\n\n## Failure Modes\n\n| Reason token | Cause | Resolution |\n|---|---|---|\n| `missing_plan` | `plan.md` missing or empty | Run `\u002Faa-ma-plan` first |\n| `nothing_to_do` | No PENDING milestones | Run `\u002Farchive-aa-ma` |\n| `plan_incomplete` | Acceptance Criteria section absent from plan | Re-run `\u002Faa-ma-plan` or `\u002Fverify-plan` |\n| `condition_too_long` | Condition exceeds 4 000 chars | Narrow scope or trim per-milestone criteria |\n| `condition_too_vague` | Condition matches a banned vague term | Reword to reference observable artefacts |\n| `observable_artifacts_insufficient` | Fewer than 2 artefact references in the condition | Add explicit artefact-targeting clauses |\n| `turn_cap_out_of_range` | User-provided override is \u003C 1 or > 30 | Pick a value in `[1, 30]` |\n\n---\n\n**End of goal-condition-synthesis\u002FSKILL.md**\n","# Goal-Condition Synthesis Skill\n\nProduce a `\u002Fgoal` completion condition from AA-MA plan artefacts, suitable for\nbinding to a Claude Code session as the cross-turn drive-to-completion\nprimitive (https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fgoal.md).\n\nThis SKILL is the **canonical source** for:\n\n- the observable-artifact list (used by `\u002Fgoal` Haiku evaluator)\n- the verdict-token enum (used in `provenance.log` audit lines)\n- the turn-cap formula (cost ceiling)\n- the condition-hash contract (auditable cross-reference primitive)\n\nOther surfaces (`aa-ma-execution` §IX.5, `aa-ma-team-guide` §2.7,\n`aa-ma-quick-reference`, `execute-aa-ma-full` §2.5, `verify-plan` Step 4.5)\n**link back** to this SKILL rather than restating these values, to prevent\ndrift.\n\n**Reference implementation for maintainer regression net:** the algorithm is\nmirrored as pure Python in `src\u002Faa_ma\u002Fgoal_synthesis.py` (unit-tested in\n`tests\u002Ftest_goal_synthesis.py`). The module exists so the spec stays\nfalsifiable for aa-ma-forge maintainers — **agents executing this skill\nfollow the markdown protocol below; they do not need the Python module\ninstalled in the consuming project** (`scripts\u002Finstall.sh` does not symlink\n`src\u002F` into `~\u002F.claude\u002F`). When the SKILL and the Python disagree, file an\nissue — they are co-canonical.\n\n**Relationship to `Skill(plan-verification)` Angle 4 (falsifiability):**\nplan-verification audits **Acceptance Criteria phrases** in `plan.md` against\nits own banned-phrase list (e.g. `\"handles edge cases gracefully\"`,\n`\"works as expected\"` — see L-059 in `plan-authoring-standards.md`). This\nskill audits **`\u002Fgoal` condition words** against `BANNED_VAGUE_TERMS`\n(`done`, `working`, `correct`, `good`, `ready`). The two lists are\n**complementary, not redundant** — different artefact types, different\nvagueness grammars. Do not merge them; do not delete either. If you need to\nextend one, document why the other does not need the same extension.\n\n## When to Use This Skill\n\nInvoke this skill when:\n\n- `\u002Fexecute-aa-ma-full` reaches §2.5 (Goal Synthesis & Bind) and must construct\n  a goal condition before AFK execution.\n- `\u002Fverify-plan --iterate` needs a condition that bounds the adversarial\n  verification loop.\n- A user explicitly asks \"synthesise a goal for this plan\" against an active\n  AA-MA task.\n\nDo NOT use this skill for:\n\n- Per-step or per-sub-task goals — `\u002Fgoal` is one-per-session. Goals live at\n  the **task** level, not the milestone or step level.\n- Tasks missing any of the 5 standard AA-MA files\n  (`plan.md`, `reference.md`, `context-log.md`, `tasks.md`, `provenance.log`).\n  The synthesiser needs `plan.md` Acceptance Criteria and `tasks.md` milestone\n  count at minimum.\n\n## Why Observable Artefacts Matter\n\nThe Haiku evaluator that `\u002Fgoal` invokes after each turn only sees what is in\nthe conversation transcript. It does **not** run tools. A vague condition like\n\"feature is done\" cannot be evaluated; the model has nothing to check.\n\n### Canonical Observable-Artefact Table\n\nThis is the authoritative list. Other docs reference it; they do not restate it.\n\n| # | Observable | Where it appears in the transcript |\n|---|---|---|\n| 1 | `provenance.log` lines | Bash `cat` output after milestone commits |\n| 2 | `tasks.md` Status fields | Read tool output during finalisation |\n| 3 | Git tag existence | `git tag -l` output |\n| 4 | Test exit codes | `make ci` \u002F `pytest` output |\n| 5 | Commit footers (`[AA-MA Plan]` signature) | `git log` output |\n| 6 | `\u003Ctask>-verification.md` Verdict line | Read tool output after `\u002Fverify-plan` runs |\n\nConditions that reference at least **two** rows from this table can be evaluated\nby Haiku from transcript context alone.\n\n## Synthesis Algorithm\n\n### Inputs\n\n1. `\u003Ctask-dir>` — path to `.claude\u002Fdev\u002Factive\u002F\u003Ctask-name>\u002F`\n2. `\u003Ctask-name>` — the task slug\n3. `\u003Cmode>` — one of `full-execute`, `verify-iterate`\n4. (optional) `\u003Coverride-turn-cap>` — explicit user override; otherwise auto-derived\n\n### Step 1: Read plan and tasks\n\nRead these files:\n\n- `\u003Ctask-dir>\u002F\u003Ctask-name>-plan.md` → extract `Acceptance Criteria` (per\n  milestone or top-level), `Tests`, `Effort`, `Engineering Standards Declaration`.\n- `\u003Ctask-dir>\u002F\u003Ctask-name>-tasks.md` → count milestones with `Status: PENDING`\n  or `Status: ACTIVE`.\n\n### Step 2: Derive turn cap\n\n```\nturn_cap = max(4, ceil(min(pending_milestones * 1.5, 30)))\n```\n\nFloor of 4 prevents single-milestone plans from being capped below the\nfinalisation overhead (milestone commit + `\u002Fverify-plan` + finalize).\nCeiling of 30 is the cost ceiling for AFK runs.\n\nIf user provided `\u003Coverride-turn-cap>`, use that value (still validated as\n≥ 1 and ≤ 30 by `validate_condition`).\n\nReference implementation: `aa_ma.goal_synthesis.turn_cap(pending_milestones: int) -> int`.\n\n### Step 3: Build the condition string\n\nTemplates by mode:\n\n**`full-execute`:**\n\n```\nAll remaining milestones in \u003Ctask>\u002Ftasks.md have Status: COMPLETE;\n\u003Ctask>-provenance.log contains a \"MILESTONE COMPLETE\" line for each;\ngit tag \u003Ctask-name>-complete exists;\n`make ci` (or the project's quality gate equivalent) exits 0;\nor stop after \u003Cturn_cap> turns.\n```\n\n**`verify-iterate`:**\n\n```\n\u003Ctask>-verification.md latest \"## Verdict\" block shows GREEN with\n0 Criticals AND every Critical from the previous Verdict block has a\n\"Resolution:\" line in this block;\nor stop after 3 iterations.\n```\n\nThe iterate cap is fixed at 3 (heuristic: more than 3 verification iterations\non the same plan typically indicates the plan needs a human re-think, not\nanother mechanical pass).\n\n### Step 4: Validate the condition\n\nSelf-check before returning. The Python reference implementation is\n`aa_ma.goal_synthesis.validate_condition(condition: str, turn_cap_value: int)\n-> ValidationResult` where `ValidationResult = ValidationOk | ValidationError`\n(both are frozen dataclasses; `ValidationError.reason` is one of the canonical\ntokens listed under Failure Modes below). Checks:\n\n1. Condition references at least 2 distinct observable artefacts from the\n   canonical table above. Detected via regex against artefact-signature\n   substrings (`provenance.log`, `tasks.md`, `git tag`, `make ci` \u002F\n   `pytest`, `[AA-MA Plan]`, `verification.md`).\n2. `turn_cap` is an integer in `[1, 30]`.\n3. Total condition length is ≤ 4 000 characters (Claude Code `\u002Fgoal` limit).\n4. Condition avoids any case-insensitive whole-word match of vague terms:\n   `done`, `working`, `correct`, `good`, `ready`. The banned-word list is\n   exported as `aa_ma.goal_synthesis.BANNED_VAGUE_TERMS`.\n\nIf any check fails, return `SYNTHESIS_FAILED` with the specific reason. Do\n**not** return a degraded condition.\n\n### Step 5: Compute the condition hash\n\nThe hash is the deterministic audit primitive for cross-referencing a bound\ngoal between `provenance.log`, sibling sessions, and future replay.\n\nReference implementation: `aa_ma.goal_synthesis.condition_hash(condition: str)\n-> str`. Equivalent shell:\n\n```bash\nprintf '%s' \"$CONDITION_LF_NORMALISED\" | sha256sum | cut -c1-12\n```\n\nWhere `$CONDITION_LF_NORMALISED` is the condition with:\n\n- all `\\r\\n` and `\\r` replaced by `\\n`\n- trailing whitespace on each line stripped\n- no trailing newline at end of string\n- UTF-8 encoded\n\nThe first 12 hex characters of the SHA-256 digest are the hash. Two sessions\nbinding the same condition (semantically and byte-for-byte after normalisation)\nproduce the same hash.\n\n### Step 6: Return structured result\n\n```yaml\nstatus: SYNTHESIZED | SYNTHESIS_FAILED\nmode: full-execute | verify-iterate\ncondition: |\n  \u003Cthe full condition string>\nturn_cap: \u003Cint>\ncondition_hash: \u003C12-hex>     # only when status=SYNTHESIZED\nobservable_artifacts: [\u003Clist of artefact identifiers referenced>]\nplan_inputs:\n  acceptance_criteria_count: \u003Cint>\n  milestone_count: \u003Cint>\n  effort_estimate: \u003Cstring from plan.md>\nsynthesis_warnings: [\u003Clist of any non-blocking concerns>]\n```\n\n## Canonical Verdict & Event Vocabulary\n\nThis is the single authoritative enum for `\u002Fgoal`-integration provenance lines.\nAll other docs reference this table; they do not restate it.\n\n| Event token | Where emitted | Allowed value tokens |\n|---|---|---|\n| `GOAL_BOUND` | After `AskUserQuestion → Bind` (full-execute §2.5) | `turn_cap=\u003Cint>` and `condition_hash=\u003C12-hex>` |\n| `GOAL_BIND_DECLINED` | User chose `[Skip \u002Fgoal]` at §2.5 | `user_choice` |\n| `GOAL_SYNTHESIS_SKIPPED` | Synthesis returned `SYNTHESIS_FAILED` | `reason={missing_plan, nothing_to_do, plan_incomplete, condition_too_long, condition_too_vague, turn_cap_out_of_range, observable_artifacts_insufficient}` |\n| `GOAL_FINAL` | At plan completion (full-execute §6) | `verdict={MET, UNMET, TURN_CAP_HIT, CLEARED, NOT_BOUND}`, `turns=\u003Cint>`, `reason='\u003Cshort>'` |\n| `VERIFY_ITERATE` | At iterate-mode termination (verify-plan §4.5) | `verdict={GREEN, YELLOW, RED}`, `iterations=\u003Cint>`, `criticals=\u003Cint>`, `outcome={MET, EXHAUSTED, USER_HALTED}` |\n| `VERIFY_ITERATE_SKIPPED` | `--iterate` requested but `\u002Fgoal` unavailable or synthesis failed | `reason=\u003Ctoken>` |\n\nAudit one-liner (covers every event token above):\n\n```bash\ngrep -E '^\\[.*\\] (GOAL_|VERIFY_ITERATE)' \\\n  .claude\u002Fdev\u002Factive\u002F\u003Ctask>\u002F\u003Ctask>-provenance.log\n```\n\n## Worked Example\n\nInput:\n\n- `task-name`: `add-jwt-auth`\n- `task-dir`: `.claude\u002Fdev\u002Factive\u002Fadd-jwt-auth\u002F`\n- `mode`: `full-execute`\n- `plan.md` has 4 milestones, 11 acceptance criteria total, Effort: \"M (3-5 days)\"\n- `tasks.md` shows 3 milestones PENDING, 1 COMPLETE\n\nOutput:\n\n```yaml\nstatus: SYNTHESIZED\nmode: full-execute\ncondition: |\n  All remaining milestones in add-jwt-auth\u002Ftasks.md have Status: COMPLETE;\n  add-jwt-auth-provenance.log contains a \"MILESTONE COMPLETE\" line for each;\n  git tag add-jwt-auth-complete exists;\n  `make ci` exits 0;\n  or stop after 5 turns.\nturn_cap: 5            # max(4, ceil(min(3 * 1.5, 30))) = max(4, 5) = 5\ncondition_hash: a3f2b1c8d4e7\nobservable_artifacts: [tasks.md Status, provenance.log lines, git tag, test exit code]\nplan_inputs:\n  acceptance_criteria_count: 11\n  milestone_count: 4\n  effort_estimate: \"M (3-5 days)\"\nsynthesis_warnings: []\n```\n\n## Anti-Patterns\n\n| Anti-pattern | Why it fails |\n|---|---|\n| \"Feature is complete\" | Not observable — Haiku has nothing to check |\n| \"All tests pass\" without saying *how the agent surfaces test results* | Haiku doesn't see tool output; the agent must `cat` results into the transcript |\n| Per-milestone goals | `\u002Fgoal` is one-per-session; replacing a goal mid-run loses cross-turn continuity |\n| `turn_cap > 30` | Cost ceiling fails; AFK runs can burn through tokens unnoticed |\n| No turn cap | Same as above — `\u002Fgoal` will keep retrying indefinitely if the condition is unmet |\n| Subjective criteria (`good`, `ready`, `correct`, `working`, `done`) | Haiku cannot evaluate subjective claims |\n\n## Integration Points\n\n- **Called by:** `\u002Fexecute-aa-ma-full` §2.5; `\u002Fverify-plan --iterate`\n- **Uses:** `Read` tool to load plan.md and tasks.md; `aa_ma.goal_synthesis`\n  Python helpers\n- **Does NOT call:** `\u002Fgoal` directly — returns the condition string for the\n  caller to invoke\n- **Related skills:** `aa-ma-execution` (operator reference); `plan-verification`\n  (consumed by the iterate-mode condition)\n\n## Failure Modes\n\n| Reason token | Cause | Resolution |\n|---|---|---|\n| `missing_plan` | `plan.md` missing or empty | Run `\u002Faa-ma-plan` first |\n| `nothing_to_do` | No PENDING milestones | Run `\u002Farchive-aa-ma` |\n| `plan_incomplete` | Acceptance Criteria section absent from plan | Re-run `\u002Faa-ma-plan` or `\u002Fverify-plan` |\n| `condition_too_long` | Condition exceeds 4 000 chars | Narrow scope or trim per-milestone criteria |\n| `condition_too_vague` | Condition matches a banned vague term | Reword to reference observable artefacts |\n| `observable_artifacts_insufficient` | Fewer than 2 artefact references in the condition | Add explicit artefact-targeting clauses |\n| `turn_cap_out_of_range` | User-provided override is \u003C 1 or > 30 | Pick a value in `[1, 30]` |\n\n---\n\n**End of goal-condition-synthesis\u002FSKILL.md**\n",{"name":5,"description":7},"main","cd9a2962c9a7e0797fe440f7b1ba4ceccc16ae0d","claude-code\u002Fskills\u002Fgoal-condition-synthesis",1,"https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge","https:\u002F\u002Fgithub.com\u002Fsnewhouse","Data Scientist, Bioinformatician, Dad, Husband, MS warrior","2026-11-05 06:45:12",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add snewhouse\u002Faa-ma-forge --skill goal-condition-synthesis",{"tool":58,"command":59},"bunx","bunx skills add snewhouse\u002Faa-ma-forge --skill goal-condition-synthesis",{"tool":61,"command":62},"pnpm","pnpm dlx skills add snewhouse\u002Faa-ma-forge --skill goal-condition-synthesis","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fgoal-condition-synthesis\u002FSKILL.md",true,[],[67,92,118,137,161,191],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":78,"publishedAt":39},"01M6MZ588SD5DDH59H18PRNWEV","deploy-helper","You can use this to help with deploy stuff, deploying, deployments, releases, shipping, pushing to prod, going live, rollouts.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fevals\u002Fskill-draft\u002Fdraft\u002FSKILL.md",[73],{"categoryNo":74,"categoryName":75,"taxonomyType":76,"taxonomyTypeDesc":77},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[79,80,81,82,83,84,85,86,87,88,89,90,91],"deploy","deploy helper","helper","you","live","with","can","rollouts","shipping","use","deployments","releases","help",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":109,"publishedAt":39},"01M6MZ54NEKRYXGMJ1KJWYMKM7","writing-for-agents","Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fwriting-for-agents\u002FSKILL.md",[98,101,104],{"categoryNo":99,"categoryName":100,"taxonomyType":76,"taxonomyTypeDesc":77},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":102,"categoryName":103,"taxonomyType":76,"taxonomyTypeDesc":77},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":105,"categoryName":106,"taxonomyType":107,"taxonomyTypeDesc":108},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[110,111,112,113,88,114,115,116,117],"writing","writing for agents","for","line","instructions","read","editing","documents",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":124,"publishedAt":39},"01M6MZ500T0FH1G8TBSQV7G5G2","verify-plan","Slash entry for plan verification: runs plan-verification on an existing AA-MA plan, writes [task]-verification.md, and with --iterate loops until the plan converges. Use when the user types \u002Fverify-plan or wants the verification report saved.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fverify-plan\u002FSKILL.md",[],[125,34,126,127,128,88,129,84,130,131,132,133,134,24,135,112,136],"verify","verify plan","loops","task","user","verification","report","types","plan verification","entry","Existing","saved",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":39},"01M6MZ4V9ST4K54NT1SRBGCE7P","verify-impl","Post-impl adversarial review symmetric to \u002Fverify-plan. Dispatches up to 5 parallel audit agents (code-reviewer, security-auditor, tdd-sequence-auditor, context7-evidence-auditor, future-proofing-auditor) based on the milestone's plan-declared Audit-Profile. CRITICAL findings surface via AskUserQuestion accept\u002Fdispute\u002Fdefer panel before §7.3 user authorization. Introduced in v0.8.0 per ADR-0005. Invoked by Phase 6.8 of \u002Fexecute-aa-ma-milestone.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Fverify-impl\u002FSKILL.md",[],[144,145,125,146,147,148,149,150,151,152,153,154,155,156,157,34,158,37,159,160],"impl","verify impl","adversarial","post","panel","via","critical","review","context7","up","evidence","reviewer","parallel","adr","audit","tdd","milestone",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":171,"publishedAt":39},"01M6MZ4K7CC9PMJ1KEY3F53RS1","understand-codebase","Onboard to a new, inherited, or shared codebase. Read it, understand it, map it, and learn its conventions, versioning, tests, tech stack, rules (AGENTS.md \u002F CLAUDE.md \u002F .cursorrules \u002F etc.), build\u002Frun\u002FCI, integrations, security posture, and repo health — then produce an honest pros\u002Fcons verdict, a \"contribute safely\" playbook, and an \"add a feature\" playbook, written to ONBOARDING.md at the repo root plus a .claude\u002Fonboarding\u002F set of deep-dives — and optionally author an AGENTS.md if one is missing, or review and propose improvements to an existing one. Tiered (Quick \u002F Standard \u002F Deep). Reuses codemem (index + diagrams), gsd-map-codebase, system-mapping, code-intelligence, impact-analysis rather than re-implementing them; Deep tier runs a TeamCreate agent-team. Keywords: new codebase, shared codebase, inherited code, onboard, understand this repo, how do I contribute, how do I add a feature, ramp up, get oriented, ONBOARDING.md, AGENTS.md, codebase walkthrough, joining a project.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Funderstand-codebase\u002FSKILL.md",[167,168],{"categoryNo":102,"categoryName":103,"taxonomyType":76,"taxonomyTypeDesc":77},{"categoryNo":169,"categoryName":170,"taxonomyType":107,"taxonomyTypeDesc":108},"01JBSEEDCAT000000000000038","人力资源",[172,173,174,153,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190],"understand codebase","codebase","understand","walkthrough","analysis","SET","ci","learn","diagrams","repo health","implementing","re","quick","impact","get","project","deep","shared","map",{"skillNo":192,"name":193,"nameZh":6,"description":194,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":195,"categories":196,"keywords":197,"publishedAt":39},"01M6MZ4D1ZC8MTW064QXY6WC76","token-compression","Output token compression for AA-MA workflows. Reduces response tokens by 40-75% while preserving full technical accuracy. Three intensity levels mapped to execution modes: lite (HITL), full (general), ultra (AFK). Auto-activates during AA-MA execution based on task Mode field. Manual activation via \u002Fcompress lite|full|ultra.","https:\u002F\u002Fgithub.com\u002Fsnewhouse\u002Faa-ma-forge\u002Fblob\u002Fmain\u002Fclaude-code\u002Fskills\u002Ftoken-compression\u002FSKILL.md",[],[198,199,200,201,202,203,204,112,205,206,149,207,208,209,210,128,211,212,213,214],"compression","token compression","token","workflows","output","modes","accuracy","mode","manual","intensity","tokens","hitl","three","general","auto","technical","execution"]