[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75347EPC7HAZ33VDSMP2C2J":3,"skill-same:01M75347EPC7HAZ33VDSMP2C2J":59},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":30,"commitSha":31,"skillDirectory":32,"forksCount":33,"repositoryHtmlUrl":34,"repositoryHomepageUrl":6,"ownerHtmlUrl":35,"ownerBlogUrl":36,"ownerDescription":37,"updatedAt":38,"install":39,"resources":52},"01M75347EPC7HAZ33VDSMP2C2J","x-internal-normalize-args",null,"Parses an argv string against a declarative JSON schema with typed flags (boolean, string, integer, enum), defaults, mutually-exclusive groups, and deprecation warnings, then emits a normalized `{parsed, warnings, errors}` envelope on stdout. Replaces ~150 lines of inline argv parsing inlined inside `x-implement-epic`, `x-implement-story`, and `x-orchestrate-epic`, giving every orchestrator identical flag-validation syntax and error messages. Third skill in the x-internal-* convention (after x-internal-update-status pilot and x-internal-write-report): internal visibility, non-user-invocable, subdir scoping under internal\u002Fops\u002F.","review-bench\u002Federcnj_ia-dev-environment","review-bench","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F286778065?v=4","01M7517F9NTEPDZDAXJBR30FWT","ReviewBench","01M7517FAC9F4P7TGWCNJ8VYVW",0,"MIT","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-cqrs-es\u002F.claude\u002Fskills\u002Fx-internal-normalize-args\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: x-internal-normalize-args\ndescription: \"Parses an argv string against a declarative JSON schema with typed flags (boolean, string, integer, enum), defaults, mutually-exclusive groups, and deprecation warnings, then emits a normalized `{parsed, warnings, errors}` envelope on stdout. Replaces ~150 lines of inline argv parsing inlined inside `x-implement-epic`, `x-implement-story`, and `x-orchestrate-epic`, giving every orchestrator identical flag-validation syntax and error messages. Third skill in the x-internal-* convention (after x-internal-update-status pilot and x-internal-write-report): internal visibility, non-user-invocable, subdir scoping under internal\u002Fops\u002F.\"\nvisibility: internal\nuser-invocable: false\nallowed-tools: Bash\nargument-hint: \"--schema \u003Cjson-or-@path> --argv \u003Cstring>\"\ncategory: internal-ops\ncontext-budget: medium\nrequires-capabilities: []\n---\n\n## Global Output Policy\n\n- **Language**: English ONLY.\n- **Tone**: Technical, Direct, and Concise.\n- **Efficiency**: Remove all conversational fillers and greetings to save tokens.\n\n> 🔒 **INTERNAL SKILL**\n> Esta skill é invocada apenas por outras skills (orquestradores).\n> NÃO é destinada a invocação direta pelo usuário.\n> Caller principal: x-implement-epic, x-implement-story, x-orchestrate-epic.\n> Terceira skill da convenção `x-internal-*` (após x-internal-update-status,\n> a story PILOTO 0049-0005, e x-internal-write-report, story 0049-0006):\n> frontmatter `visibility: internal`, subdir `internal\u002Fops\u002F`, marker 🔒 e\n> filtragem do menu `\u002Fhelp` via generator.\n\n# Skill: x-internal-normalize-args\n\n## Purpose\n\nParse a Bash-style argv string against a declarative JSON schema and produce\na normalized envelope describing:\n\n1. `parsed` — map of flag name → typed value (after defaults applied).\n2. `warnings` — list of deprecation notices emitted for seen `deprecated` flags.\n3. `errors` — list of validation errors (populated only on non-zero exit).\n\nThis removes the ~150 lines of ad-hoc argv parsing currently duplicated inside\n`x-implement-epic`, `x-implement-story`, and `x-orchestrate-epic` (catalogued\nin EPIC-0049 story-0049-0007 dependency matrix), so future orchestrators can\ndeclare their flag surface once — as a schema — and reuse the same parser,\nthe same error codes, and the same deprecation-warning policy.\n\n## Convention Anchors (x-internal-*)\n\n| Aspect | Value | Rationale |\n| :--- | :--- | :--- |\n| Path | `internal\u002Fops\u002Fx-internal-normalize-args\u002F` | `internal\u002F` prefix scopes visibility; `ops\u002F` aligns with sibling runtime-ops skills |\n| Frontmatter `visibility` | `internal` | Generator filters these from `\u002Fhelp` menu |\n| Frontmatter `user-invocable` | `false` | Declarative complement to `visibility: internal` |\n| Body marker | `> 🔒 **INTERNAL SKILL**` block as first non-frontmatter content | Visible to humans browsing the repo; no parsing required |\n| Allowed tools | `Bash` only | Minimal surface; parser is a single shell pipeline built on `jq` |\n| Naming | `x-internal-{subject}-{action}` | Mirrors Rule 04 skill taxonomy; `args-normalize` = subject+action |\n\nAudit rule: Rule 22 (Lifecycle Integrity) validates every skill under\n`internal\u002F**` satisfies all 6 anchors above. Violations fail the\n`LifecycleIntegrityAuditTest`.\n\n## Triggers\n\nBare-slash form is intentionally omitted — this skill is never invoked\nby a human typing `\u002Fx-internal-normalize-args` in chat. All invocations\nfollow Rule 13 INLINE-SKILL pattern from a calling orchestrator:\n\n```markdown\nSkill(skill: \"x-internal-normalize-args\",\n      args: \"--schema @.claude\u002Fschemas\u002Fx-implement-epic.args.json \\\n             --argv \\\"EPIC-0049 --parallel --auto-merge-strategy squash\\\"\")\n```\n\n## Parameters\n\n| Parameter | Required | Default | Description |\n| :--- | :--- | :--- | :--- |\n| `--schema \u003Cjson-or-@path>` | M | — | Declarative schema describing flags, defaults, mutually-exclusive groups, and deprecations. Inline JSON string OR `@path\u002Fto\u002Fschema.json` read from disk |\n| `--argv \u003Cstring>` | M | — | Bash-quoted argv string exactly as the caller received it (positional tokens preserved; `--flag value` and `--flag=value` both honoured) |\n\n## Schema Contract\n\nThe schema is a JSON object with two top-level keys: `flags` (required array)\nand `mutuallyExclusive` (optional array of arrays of flag names).\n\n```json\n{\n  \"flags\": [\n    {\"name\": \"--parallel\", \"type\": \"boolean\", \"default\": false},\n    {\"name\": \"--story-id\", \"type\": \"string\"},\n    {\"name\": \"--max-retries\", \"type\": \"integer\", \"default\": 3},\n    {\"name\": \"--auto-merge-strategy\", \"type\": \"enum\",\n     \"values\": [\"merge\", \"squash\", \"rebase\"], \"default\": \"merge\"},\n    {\"name\": \"--no-merge\", \"type\": \"boolean\",\n     \"deprecated\": \"use --auto-merge-strategy=\u003Cstrategy> instead\"}\n  ],\n  \"mutuallyExclusive\": [\n    [\"--auto-merge\", \"--no-merge\", \"--interactive-merge\"]\n  ]\n}\n```\n\n### Per-flag fields\n\n| Field | Required | Description |\n| :--- | :--- | :--- |\n| `name` | M | Flag token including leading `--` (double-dash mandatory). Unique across `flags[]` |\n| `type` | M | One of `boolean`, `string`, `integer`, `enum` |\n| `values` | M if `type=enum` | Non-empty array of allowed string values |\n| `default` | O | Typed default applied when the flag is absent from argv. For `boolean`, default is `false` unless set explicitly |\n| `deprecated` | O | Non-empty string to emit as a warning when the flag appears in argv. Flag is still parsed and returned in `parsed` |\n\n### `mutuallyExclusive`\n\nEach inner array lists flag names; at most one may be present in argv.\nViolation triggers exit 2 (`MUTUALLY_EXCLUSIVE`). Empty or absent outer\narray disables the check. Names MUST match `flags[].name` exactly;\nreferences to unknown flags are a schema error.\n\n## Response Contract\n\nOn success (exit 0), the skill writes a single-line JSON object to stdout:\n\n| Field | Type | Always Present | Description |\n| :--- | :--- | :--- | :--- |\n| `parsed` | `Object` | yes | Map of flag-name (no leading `--`, kebab preserved) to typed value. Includes every schema-declared flag (explicit or defaulted); omits flags with no default that were absent from argv |\n| `warnings` | `List\u003CString>` | yes | Deprecation messages emitted for each `deprecated` flag seen in argv (message = the schema's `deprecated` string verbatim). Empty array if none |\n| `errors` | `List\u003CString>` | yes | Validation errors. Empty array on success. Populated and echoed to stderr on non-zero exit |\n\nOn non-zero exit, stderr carries the same human-readable error messages;\nstdout still emits a best-effort envelope with `errors` populated and\n`parsed` containing whatever was resolvable before the failure.\n\n## Exit Codes\n\n| Code | Name | Condition | Message Format |\n| :--- | :--- | :--- | :--- |\n| 0 | SUCCESS | Parse completed; all validations passed | — |\n| 1 | INVALID_SCHEMA | Schema JSON is malformed or violates contract | `Schema validation failed: \u003Cdetail>` |\n| 2 | MUTUALLY_EXCLUSIVE | Two or more flags from one `mutuallyExclusive` group seen | `Flags \u003CA>, \u003CB> are mutually exclusive` |\n| 3 | UNKNOWN_FLAG | argv contains a `--flag` not declared in `flags[]` | `Unknown flag '\u003C--xxx>'` |\n| 4 | INVALID_ENUM_VALUE | enum flag value outside `values[]` | `Invalid value '\u003Cv>' for \u003C--flag> (allowed: \u003Cv1,v2,...>)` |\n| 64 | USAGE | Missing `--schema` or `--argv`; unknown skill-level flag | Usage banner on stderr |\n| 127 | MISSING_DEPENDENCY | `jq` absent on `PATH` | `jq is required` |\n\nInteger parsing failures (non-numeric token for `type=integer`) and boolean\nparsing failures (value for `type=boolean` is neither `true`, `false`, `1`,\n`0`, nor absent) are reported under exit 1 with `INVALID_SCHEMA` subcategory\n`TYPE_COERCION_FAILED` in the message — the schema declared the type, so\nmalformed argv violates the schema contract from the parser's perspective.\n\n## Argv Grammar (Summary)\n\nThe parser consumes standard Bash-style argv tokens: `--flag value`,\n`--flag=value`, implicit `true` for booleans, positional tokens (preserved\nunder `parsed._positional`), and the POSIX `--` terminator. Full grammar,\nquoting rules, and boolean-negation semantics in\n[`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §1.\n\n## Workflow (High-Level)\n\n| Step | Summary |\n| :--- | :--- |\n| 1 | Parse skill-level flags (`--schema`, `--argv`). Reject unknowns with exit 64 |\n| 2 | Validate schema JSON shape via `jq` (flags array, types, enum `values[]`, unique names, mutex references) |\n| 3 | Tokenise argv into positional array (quote-aware via `xargs`) |\n| 4 | Walk tokens: `--flag[=value]` matched against schema, else `UNKNOWN_FLAG` |\n| 5 | Apply defaults; validate enum values |\n| 6 | Check mutually-exclusive groups |\n| 7 | Emit deprecation warnings for seen `deprecated` flags |\n| 8 | Print `{parsed, warnings, errors}` envelope on stdout; exit with numbered code |\n\nPer-step details, jq pipelines, and the canonical Bash implementation\nskeleton live in [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §2.\n\n## Examples (Minimal)\n\n### Defaults applied (empty argv)\n\nSchema `{\"flags\":[{\"name\":\"--auto-merge-strategy\",\"type\":\"enum\",\n\"values\":[\"merge\",\"squash\"],\"default\":\"merge\"}]}`, argv `\"\"`.\n\nStdout: `{\"parsed\":{\"auto-merge-strategy\":\"merge\"},\"warnings\":[],\"errors\":[]}`.\nExit 0.\n\n### Happy path parse\n\nSchema with `--parallel` (boolean) and `--auto-merge-strategy` (enum),\nargv `\"--parallel --auto-merge-strategy squash\"`.\n\nStdout: `{\"parsed\":{\"parallel\":true,\"auto-merge-strategy\":\"squash\"},\"warnings\":[],\"errors\":[]}`.\nExit 0.\n\n### Mutually-exclusive violation\n\nargv `\"--auto-merge --no-merge\"` with mutex group.\nStderr: `Flags --auto-merge, --no-merge are mutually exclusive`. Exit 2.\n\n### Deprecation warning\n\nargv `\"--no-merge\"` against schema with `\"deprecated\":\"use --auto-merge-strategy=merge instead\"`.\n`warnings[]` carries the schema string verbatim; exit 0.\n\n### Enum invalid value\n\nargv `\"--auto-merge-strategy invalid\"` against enum `[\"merge\",\"squash\",\"rebase\"]`.\nStderr: `Invalid value 'invalid' for --auto-merge-strategy (allowed: merge,squash,rebase)`. Exit 4.\n\nSix more examples — `--flag=value` form, positional preservation, unknown\nflag, invalid schema (missing `--`), boolean coercion failure, integer\ncoercion failure — in [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §3.\n\n## Outputs\n\n| Artifact | Path | Description |\n| :--- | :--- | :--- |\n| Response envelope | stdout | Single-line JSON with `parsed`, `warnings`, `errors` |\n| Human-readable errors | stderr | One line per error; same text that populates `errors[]` |\n\nThis skill writes NO files. The `parsed` envelope is the sole side effect,\nconsumed by the invoking orchestrator.\n\n## Error Handling (Quick Reference)\n\n| Scenario | Action |\n| :--- | :--- |\n| Missing `--schema` or `--argv` | Usage banner on stderr; exit 64 |\n| `jq` absent on `PATH` | Exit 127 with `jq is required` |\n| `--schema @path` unreadable | Exit 1 (`INVALID_SCHEMA`) with the path echoed |\n| Schema has zero `flags[]` entries | Exit 1 (`INVALID_SCHEMA`) |\n| `flags[].name` missing `--` prefix | Exit 1 with the offending name |\n| `type=enum` without `values[]` | Exit 1 |\n| `mutuallyExclusive` references unknown flag | Exit 1 with the unknown name |\n| Unknown `--flag` in argv | Exit 3 (`UNKNOWN_FLAG`) |\n| enum value outside `values[]` | Exit 4 (`INVALID_ENUM_VALUE`) |\n| `mutuallyExclusive` group violated | Exit 2 (`MUTUALLY_EXCLUSIVE`) |\n| Integer \u002F boolean coercion failure | Exit 1 with `TYPE_COERCION_FAILED` detail |\n\nComplete error-handling matrix, including argv tokenisation failures and\npath-traversal guards, in [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §4.\n\n## Performance Contract\n\n- Parse \u003C 50 ms for schemas with ≤ 30 flags and argv ≤ 20 tokens (DoD-local\n  target of story-0049-0007).\n- Memory usage bounded by schema size + argv size; the parser builds the\n  response envelope in-memory via `jq` streaming.\n- Deterministic output: identical schema + argv produces byte-identical\n  stdout and exit code across runs.\n- Idempotent under repeated invocations; no shared state between calls.\n\n## Testing\n\nStory-0049-0007 ships 12 acceptance test scenarios covering defaults,\nhappy-path parse, `--flag=value` form, positional preservation, mutex\nviolations, unknown flag, enum invalid value, deprecation warning, and\nfour invalid-schema \u002F coercion cases. Full matrix in\n[`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §5.\n\nGoldens under\n`src\u002Ftest\u002Fresources\u002Fgolden\u002Finternal\u002Fops\u002Fx-internal-normalize-args\u002F` lock\nthe SKILL.md rendering. Coverage requirement: ≥ 95% line \u002F ≥ 90%\nbranch across the invoking Bash codepaths.\n\n## Generator Filter Contract\n\nThe `ia-dev-env` generator MUST exclude skills with\n`visibility: internal` from:\n\n1. The `.claude\u002FREADME.md` skill-inventory table.\n2. The `\u002Fhelp` menu listing surfaced by Claude Code.\n3. User-facing autocomplete in the chat input.\n\nInternal skills are still copied into `.claude\u002Fskills\u002F` (flat layout)\nso `Skill(skill: \"x-internal-normalize-args\")` invocations from other\nskills resolve correctly. The invariant — set by the pilot story\n(0049-0005) — holds here: **user cannot see it; orchestrators can\ninvoke it.**\n\n## Telemetry\n\nInternal skills DO NOT emit `phase.start` \u002F `phase.end` markers —\ntelemetry is produced by the invoking orchestrator (the `phase` wrapping\nthe orchestrator's own step is the correct aggregation boundary).\nPassive hooks still capture `tool.call` for the underlying `Bash`\ninvocation.\n\nReference: Rule 13 (Skill Invocation Protocol), Rule 22 (Lifecycle\nIntegrity Audit), ADR-0010 (Interactive Gates Convention — exempts\ninternal skills from the 3-option menu contract).\n\n## Integration Notes\n\n| Skill | Relationship | Context |\n| :--- | :--- | :--- |\n| `x-implement-epic` | caller | Replaces inline argv parsing in Phase 0 (~150 LOC — story-0049-0018) |\n| `x-implement-story` | caller | Replaces inline argv parsing in Phase 0 (~150 LOC — story-0049-0019) |\n| `x-orchestrate-epic` | caller | Shares the same schema convention; parses epic-level flags |\n| `x-internal-update-status` | peer | Pilot sibling `x-internal-*` skill; both scoped under `internal\u002Fops\u002F` |\n| `x-internal-write-report` | peer | Second sibling `x-internal-*` skill; no shared runtime state |\n\nDownstream stories that depend on this skill: story-0049-0018\n(x-implement-epic consumes it), story-0049-0019 (x-implement-story\nconsumes it).\n","## Global Output Policy\n\n- **Language**: English ONLY.\n- **Tone**: Technical, Direct, and Concise.\n- **Efficiency**: Remove all conversational fillers and greetings to save tokens.\n\n> 🔒 **INTERNAL SKILL**\n> Esta skill é invocada apenas por outras skills (orquestradores).\n> NÃO é destinada a invocação direta pelo usuário.\n> Caller principal: x-implement-epic, x-implement-story, x-orchestrate-epic.\n> Terceira skill da convenção `x-internal-*` (após x-internal-update-status,\n> a story PILOTO 0049-0005, e x-internal-write-report, story 0049-0006):\n> frontmatter `visibility: internal`, subdir `internal\u002Fops\u002F`, marker 🔒 e\n> filtragem do menu `\u002Fhelp` via generator.\n\n# Skill: x-internal-normalize-args\n\n## Purpose\n\nParse a Bash-style argv string against a declarative JSON schema and produce\na normalized envelope describing:\n\n1. `parsed` — map of flag name → typed value (after defaults applied).\n2. `warnings` — list of deprecation notices emitted for seen `deprecated` flags.\n3. `errors` — list of validation errors (populated only on non-zero exit).\n\nThis removes the ~150 lines of ad-hoc argv parsing currently duplicated inside\n`x-implement-epic`, `x-implement-story`, and `x-orchestrate-epic` (catalogued\nin EPIC-0049 story-0049-0007 dependency matrix), so future orchestrators can\ndeclare their flag surface once — as a schema — and reuse the same parser,\nthe same error codes, and the same deprecation-warning policy.\n\n## Convention Anchors (x-internal-*)\n\n| Aspect | Value | Rationale |\n| :--- | :--- | :--- |\n| Path | `internal\u002Fops\u002Fx-internal-normalize-args\u002F` | `internal\u002F` prefix scopes visibility; `ops\u002F` aligns with sibling runtime-ops skills |\n| Frontmatter `visibility` | `internal` | Generator filters these from `\u002Fhelp` menu |\n| Frontmatter `user-invocable` | `false` | Declarative complement to `visibility: internal` |\n| Body marker | `> 🔒 **INTERNAL SKILL**` block as first non-frontmatter content | Visible to humans browsing the repo; no parsing required |\n| Allowed tools | `Bash` only | Minimal surface; parser is a single shell pipeline built on `jq` |\n| Naming | `x-internal-{subject}-{action}` | Mirrors Rule 04 skill taxonomy; `args-normalize` = subject+action |\n\nAudit rule: Rule 22 (Lifecycle Integrity) validates every skill under\n`internal\u002F**` satisfies all 6 anchors above. Violations fail the\n`LifecycleIntegrityAuditTest`.\n\n## Triggers\n\nBare-slash form is intentionally omitted — this skill is never invoked\nby a human typing `\u002Fx-internal-normalize-args` in chat. All invocations\nfollow Rule 13 INLINE-SKILL pattern from a calling orchestrator:\n\n```markdown\nSkill(skill: \"x-internal-normalize-args\",\n      args: \"--schema @.claude\u002Fschemas\u002Fx-implement-epic.args.json \\\n             --argv \\\"EPIC-0049 --parallel --auto-merge-strategy squash\\\"\")\n```\n\n## Parameters\n\n| Parameter | Required | Default | Description |\n| :--- | :--- | :--- | :--- |\n| `--schema \u003Cjson-or-@path>` | M | — | Declarative schema describing flags, defaults, mutually-exclusive groups, and deprecations. Inline JSON string OR `@path\u002Fto\u002Fschema.json` read from disk |\n| `--argv \u003Cstring>` | M | — | Bash-quoted argv string exactly as the caller received it (positional tokens preserved; `--flag value` and `--flag=value` both honoured) |\n\n## Schema Contract\n\nThe schema is a JSON object with two top-level keys: `flags` (required array)\nand `mutuallyExclusive` (optional array of arrays of flag names).\n\n```json\n{\n  \"flags\": [\n    {\"name\": \"--parallel\", \"type\": \"boolean\", \"default\": false},\n    {\"name\": \"--story-id\", \"type\": \"string\"},\n    {\"name\": \"--max-retries\", \"type\": \"integer\", \"default\": 3},\n    {\"name\": \"--auto-merge-strategy\", \"type\": \"enum\",\n     \"values\": [\"merge\", \"squash\", \"rebase\"], \"default\": \"merge\"},\n    {\"name\": \"--no-merge\", \"type\": \"boolean\",\n     \"deprecated\": \"use --auto-merge-strategy=\u003Cstrategy> instead\"}\n  ],\n  \"mutuallyExclusive\": [\n    [\"--auto-merge\", \"--no-merge\", \"--interactive-merge\"]\n  ]\n}\n```\n\n### Per-flag fields\n\n| Field | Required | Description |\n| :--- | :--- | :--- |\n| `name` | M | Flag token including leading `--` (double-dash mandatory). Unique across `flags[]` |\n| `type` | M | One of `boolean`, `string`, `integer`, `enum` |\n| `values` | M if `type=enum` | Non-empty array of allowed string values |\n| `default` | O | Typed default applied when the flag is absent from argv. For `boolean`, default is `false` unless set explicitly |\n| `deprecated` | O | Non-empty string to emit as a warning when the flag appears in argv. Flag is still parsed and returned in `parsed` |\n\n### `mutuallyExclusive`\n\nEach inner array lists flag names; at most one may be present in argv.\nViolation triggers exit 2 (`MUTUALLY_EXCLUSIVE`). Empty or absent outer\narray disables the check. Names MUST match `flags[].name` exactly;\nreferences to unknown flags are a schema error.\n\n## Response Contract\n\nOn success (exit 0), the skill writes a single-line JSON object to stdout:\n\n| Field | Type | Always Present | Description |\n| :--- | :--- | :--- | :--- |\n| `parsed` | `Object` | yes | Map of flag-name (no leading `--`, kebab preserved) to typed value. Includes every schema-declared flag (explicit or defaulted); omits flags with no default that were absent from argv |\n| `warnings` | `List\u003CString>` | yes | Deprecation messages emitted for each `deprecated` flag seen in argv (message = the schema's `deprecated` string verbatim). Empty array if none |\n| `errors` | `List\u003CString>` | yes | Validation errors. Empty array on success. Populated and echoed to stderr on non-zero exit |\n\nOn non-zero exit, stderr carries the same human-readable error messages;\nstdout still emits a best-effort envelope with `errors` populated and\n`parsed` containing whatever was resolvable before the failure.\n\n## Exit Codes\n\n| Code | Name | Condition | Message Format |\n| :--- | :--- | :--- | :--- |\n| 0 | SUCCESS | Parse completed; all validations passed | — |\n| 1 | INVALID_SCHEMA | Schema JSON is malformed or violates contract | `Schema validation failed: \u003Cdetail>` |\n| 2 | MUTUALLY_EXCLUSIVE | Two or more flags from one `mutuallyExclusive` group seen | `Flags \u003CA>, \u003CB> are mutually exclusive` |\n| 3 | UNKNOWN_FLAG | argv contains a `--flag` not declared in `flags[]` | `Unknown flag '\u003C--xxx>'` |\n| 4 | INVALID_ENUM_VALUE | enum flag value outside `values[]` | `Invalid value '\u003Cv>' for \u003C--flag> (allowed: \u003Cv1,v2,...>)` |\n| 64 | USAGE | Missing `--schema` or `--argv`; unknown skill-level flag | Usage banner on stderr |\n| 127 | MISSING_DEPENDENCY | `jq` absent on `PATH` | `jq is required` |\n\nInteger parsing failures (non-numeric token for `type=integer`) and boolean\nparsing failures (value for `type=boolean` is neither `true`, `false`, `1`,\n`0`, nor absent) are reported under exit 1 with `INVALID_SCHEMA` subcategory\n`TYPE_COERCION_FAILED` in the message — the schema declared the type, so\nmalformed argv violates the schema contract from the parser's perspective.\n\n## Argv Grammar (Summary)\n\nThe parser consumes standard Bash-style argv tokens: `--flag value`,\n`--flag=value`, implicit `true` for booleans, positional tokens (preserved\nunder `parsed._positional`), and the POSIX `--` terminator. Full grammar,\nquoting rules, and boolean-negation semantics in\n[`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §1.\n\n## Workflow (High-Level)\n\n| Step | Summary |\n| :--- | :--- |\n| 1 | Parse skill-level flags (`--schema`, `--argv`). Reject unknowns with exit 64 |\n| 2 | Validate schema JSON shape via `jq` (flags array, types, enum `values[]`, unique names, mutex references) |\n| 3 | Tokenise argv into positional array (quote-aware via `xargs`) |\n| 4 | Walk tokens: `--flag[=value]` matched against schema, else `UNKNOWN_FLAG` |\n| 5 | Apply defaults; validate enum values |\n| 6 | Check mutually-exclusive groups |\n| 7 | Emit deprecation warnings for seen `deprecated` flags |\n| 8 | Print `{parsed, warnings, errors}` envelope on stdout; exit with numbered code |\n\nPer-step details, jq pipelines, and the canonical Bash implementation\nskeleton live in [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §2.\n\n## Examples (Minimal)\n\n### Defaults applied (empty argv)\n\nSchema `{\"flags\":[{\"name\":\"--auto-merge-strategy\",\"type\":\"enum\",\n\"values\":[\"merge\",\"squash\"],\"default\":\"merge\"}]}`, argv `\"\"`.\n\nStdout: `{\"parsed\":{\"auto-merge-strategy\":\"merge\"},\"warnings\":[],\"errors\":[]}`.\nExit 0.\n\n### Happy path parse\n\nSchema with `--parallel` (boolean) and `--auto-merge-strategy` (enum),\nargv `\"--parallel --auto-merge-strategy squash\"`.\n\nStdout: `{\"parsed\":{\"parallel\":true,\"auto-merge-strategy\":\"squash\"},\"warnings\":[],\"errors\":[]}`.\nExit 0.\n\n### Mutually-exclusive violation\n\nargv `\"--auto-merge --no-merge\"` with mutex group.\nStderr: `Flags --auto-merge, --no-merge are mutually exclusive`. Exit 2.\n\n### Deprecation warning\n\nargv `\"--no-merge\"` against schema with `\"deprecated\":\"use --auto-merge-strategy=merge instead\"`.\n`warnings[]` carries the schema string verbatim; exit 0.\n\n### Enum invalid value\n\nargv `\"--auto-merge-strategy invalid\"` against enum `[\"merge\",\"squash\",\"rebase\"]`.\nStderr: `Invalid value 'invalid' for --auto-merge-strategy (allowed: merge,squash,rebase)`. Exit 4.\n\nSix more examples — `--flag=value` form, positional preservation, unknown\nflag, invalid schema (missing `--`), boolean coercion failure, integer\ncoercion failure — in [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §3.\n\n## Outputs\n\n| Artifact | Path | Description |\n| :--- | :--- | :--- |\n| Response envelope | stdout | Single-line JSON with `parsed`, `warnings`, `errors` |\n| Human-readable errors | stderr | One line per error; same text that populates `errors[]` |\n\nThis skill writes NO files. The `parsed` envelope is the sole side effect,\nconsumed by the invoking orchestrator.\n\n## Error Handling (Quick Reference)\n\n| Scenario | Action |\n| :--- | :--- |\n| Missing `--schema` or `--argv` | Usage banner on stderr; exit 64 |\n| `jq` absent on `PATH` | Exit 127 with `jq is required` |\n| `--schema @path` unreadable | Exit 1 (`INVALID_SCHEMA`) with the path echoed |\n| Schema has zero `flags[]` entries | Exit 1 (`INVALID_SCHEMA`) |\n| `flags[].name` missing `--` prefix | Exit 1 with the offending name |\n| `type=enum` without `values[]` | Exit 1 |\n| `mutuallyExclusive` references unknown flag | Exit 1 with the unknown name |\n| Unknown `--flag` in argv | Exit 3 (`UNKNOWN_FLAG`) |\n| enum value outside `values[]` | Exit 4 (`INVALID_ENUM_VALUE`) |\n| `mutuallyExclusive` group violated | Exit 2 (`MUTUALLY_EXCLUSIVE`) |\n| Integer \u002F boolean coercion failure | Exit 1 with `TYPE_COERCION_FAILED` detail |\n\nComplete error-handling matrix, including argv tokenisation failures and\npath-traversal guards, in [`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §4.\n\n## Performance Contract\n\n- Parse \u003C 50 ms for schemas with ≤ 30 flags and argv ≤ 20 tokens (DoD-local\n  target of story-0049-0007).\n- Memory usage bounded by schema size + argv size; the parser builds the\n  response envelope in-memory via `jq` streaming.\n- Deterministic output: identical schema + argv produces byte-identical\n  stdout and exit code across runs.\n- Idempotent under repeated invocations; no shared state between calls.\n\n## Testing\n\nStory-0049-0007 ships 12 acceptance test scenarios covering defaults,\nhappy-path parse, `--flag=value` form, positional preservation, mutex\nviolations, unknown flag, enum invalid value, deprecation warning, and\nfour invalid-schema \u002F coercion cases. Full matrix in\n[`references\u002Ffull-protocol.md`](references\u002Ffull-protocol.md) §5.\n\nGoldens under\n`src\u002Ftest\u002Fresources\u002Fgolden\u002Finternal\u002Fops\u002Fx-internal-normalize-args\u002F` lock\nthe SKILL.md rendering. Coverage requirement: ≥ 95% line \u002F ≥ 90%\nbranch across the invoking Bash codepaths.\n\n## Generator Filter Contract\n\nThe `ia-dev-env` generator MUST exclude skills with\n`visibility: internal` from:\n\n1. The `.claude\u002FREADME.md` skill-inventory table.\n2. The `\u002Fhelp` menu listing surfaced by Claude Code.\n3. User-facing autocomplete in the chat input.\n\nInternal skills are still copied into `.claude\u002Fskills\u002F` (flat layout)\nso `Skill(skill: \"x-internal-normalize-args\")` invocations from other\nskills resolve correctly. The invariant — set by the pilot story\n(0049-0005) — holds here: **user cannot see it; orchestrators can\ninvoke it.**\n\n## Telemetry\n\nInternal skills DO NOT emit `phase.start` \u002F `phase.end` markers —\ntelemetry is produced by the invoking orchestrator (the `phase` wrapping\nthe orchestrator's own step is the correct aggregation boundary).\nPassive hooks still capture `tool.call` for the underlying `Bash`\ninvocation.\n\nReference: Rule 13 (Skill Invocation Protocol), Rule 22 (Lifecycle\nIntegrity Audit), ADR-0010 (Interactive Gates Convention — exempts\ninternal skills from the 3-option menu contract).\n\n## Integration Notes\n\n| Skill | Relationship | Context |\n| :--- | :--- | :--- |\n| `x-implement-epic` | caller | Replaces inline argv parsing in Phase 0 (~150 LOC — story-0049-0018) |\n| `x-implement-story` | caller | Replaces inline argv parsing in Phase 0 (~150 LOC — story-0049-0019) |\n| `x-orchestrate-epic` | caller | Shares the same schema convention; parses epic-level flags |\n| `x-internal-update-status` | peer | Pilot sibling `x-internal-*` skill; both scoped under `internal\u002Fops\u002F` |\n| `x-internal-write-report` | peer | Second sibling `x-internal-*` skill; no shared runtime state |\n\nDownstream stories that depend on this skill: story-0049-0018\n(x-implement-epic consumes it), story-0049-0019 (x-implement-story\nconsumes it).\n",{"name":5,"category":24,"visibility":25,"description":7,"allowed-tools":26,"argument-hint":27,"context-budget":28,"user-invocable":20,"requires-capabilities":29},"internal-ops","internal","Bash","--schema \u003Cjson-or-@path> --argv \u003Cstring>","medium",[],"main","952a630c6f38d193a349d86fa18db1de8843e837","src\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-cqrs-es\u002F.claude\u002Fskills\u002Fx-internal-normalize-args",1,"https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment","https:\u002F\u002Fgithub.com\u002Freview-bench","https:\u002F\u002Freview-bench.ai","An open benchmark for AI code review.","2026-10-27 06:56:37",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-internal-normalize-args",{"tool":45,"command":46},"bunx","bunx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-internal-normalize-args",{"tool":48,"command":49},"pnpm","pnpm dlx skills add review-bench\u002Federcnj_ia-dev-environment --skill x-internal-normalize-args","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-cqrs-es\u002F.claude\u002Fskills\u002Fx-internal-normalize-args\u002FSKILL.md",true,[53],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Ffull-protocol.md","REFERENCE","参考文档",11123,"https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring-cqrs-es\u002F.claude\u002Fskills\u002Fx-internal-normalize-args\u002Freferences\u002Ffull-protocol.md",[60,67,74,81,88,95],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M757M8J48TQ1Y3X25GSJBXAS","x-parallel-eval","Detects and classifies file-collision risks between work units (tasks, stories, or epic phases) before parallel execution. Reads ## File Footprint blocks produced by x-task-plan \u002F x-story-plan, applies the parallelism-heuristics knowledge pack (hard \u002F regen \u002F soft categories + hotspot overrides), and emits a collision matrix + serialization recommendation in Markdown (default) or JSON.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fx-parallel-eval\u002FSKILL.md",[],[],{"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":73,"publishedAt":19},"01M757M57XMR9546S69466HDWT","parallelism-heuristics","Canonical catalog of file-collision heuristics for parallel task, story, and epic execution. Defines the File Footprint block format, the three Conflict Categories (hard \u002F regen \u002F soft), a hotspot list of high-contention paths, and the degrade-with-warning policy. Consumed by x-task-plan, x-story-plan, x-epic-map, x-parallel-eval, and x-dev-*-implement.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fparallelism-heuristics\u002FSKILL.md",[],[],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":19},"01M757M11SZ8P1VCQABT08QVYA","x-watch-pr-ci","Polls a PR's CI checks and Copilot review status, blocking until checks complete or timeout. Returns one of 8 stable exit codes (SUCCESS=0, CI_PENDING_PROCEED=10, CI_FAILED=20, TIMEOUT=30, PR_ALREADY_MERGED=40, NO_CI_CONFIGURED=50, PR_CLOSED=60, PR_NOT_FOUND=70). Writes a versioned state-file for session resume.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-watch-pr-ci\u002FSKILL.md",[],[],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":19},"01M757KW53K8KFPGADFB4PH949","x-validate-docs","Documentation freshness gate: validates 6 dimensions (readme, api-specs, grpc-proto, adr, skill-docs, system-architecture) against code changes in a PR. Stack-aware — only validates targets declared\u002Fauto-detected from ProjectConfig.documentation.targets. Returns exit non-zero on staleness; produces structured report.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-validate-docs\u002FSKILL.md",[],[],{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":19},"01M757KQZHSA10MKC0CR571D60","x-update-system-architecture","Incrementally updates docs\u002Farchitecture\u002Fsystem.md after an epic completes. Appends new entries to the Decision Log (§11) using x-internal-write-report --append (dedup by ## ID: marker) and surgically inserts component\u002Fintegration changes into sections 1-10 via Edit. Idempotent: re-running with the same epic produces a byte-identical system.md.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-update-system-architecture\u002FSKILL.md",[],[],{"skillNo":96,"name":97,"nameZh":6,"description":98,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":99,"categories":100,"keywords":101,"publishedAt":19},"01M757KKBT5Q1SVF8DMJBVF46M","x-update-architecture","Incrementally updates the service architecture document with changes from architecture plans. Adds new components, integrations, flows, and ADR references without rewriting existing content. Use after implementation to keep architecture documentation current.","https:\u002F\u002Fgithub.com\u002Freview-bench\u002Federcnj_ia-dev-environment\u002Fblob\u002Fmain\u002Fsrc\u002Ftest\u002Fresources\u002Fgolden\u002Fjava-spring\u002Fplatform-claude-code\u002F.claude\u002Fskills\u002Fx-update-architecture\u002FSKILL.md",[],[]]