file-doc-task
Implements STANDARDS rule #4: feature / user-facing work must assess whether
it needs customer-facing documentation, and — only when it does — file a linked
documentation-planning JIRA task using the doc team's standard template.
The created ticket is for the documentation team to plan from; it is not
the documentation itself.
Idempotent — create or update
This skill is create-or-update, not create-or-skip. It is safe to run more
than once for the same feature, by design:
- No ticket yet → file a new
DOC-ready: ticket.
- Ticket exists but is stale (its description no longer reflects what was
actually built, or fields that were open questions are now answerable) →
update the existing ticket in place via
editJiraIssue.
- Ticket exists and is current → link to it and stop (no edit).
This idempotency is what makes the two invocation points below safe — the
finalize pass reconciles the early draft rather than duplicating it.
Two invocation points
A pipeline may call this skill at either or both of these points. The decision
gate in the next section asks the docs question only once — once a ticket
(or a recorded "no") exists, later runs skip straight to reconcile.
- Early — draft from specs (optional, recommended for spec-driven work).
Right after the design/tasks are reviewed and locked but before/while code is
written. The ticket is drafted from the intended behavior in the specs
and design, so it is available early to guide development and hold the work
accountable to a stated customer outcome. The PR may not exist yet — record
Pull request / repo link as pending and add a matching open question.
- Finalize — reconcile to as-built (always). After the PR is opened. If a
draft ticket already exists, fetch it and update it so the description
reflects what was actually shipped (and fill in the now-known PR link). If no
early draft was created (e.g. a resumed pipeline, or a non-spec-driven
workflow), this pass creates the ticket fresh — same as a single finalize-only
call.
When to use
- A spec-driven workflow has reviewed and locked its design/tasks and wants an
early draft to guide development (e.g. the SDD pipeline, right after its
Step 4 spec-review gate).
- A development workflow has just finished a feature or user-facing
change and opened a PR (e.g. the SDD pipeline
finish phase, the bug-fix
pipeline finalize phase for a user-visible fix) — to create or reconcile
the ticket.
- A developer explicitly asks to create or update a doc task / DOC-ready ticket
/ hand off to the docs team.
When NOT to use
- Pure refactors, internal-only fixes, test-only changes, build/CI/dependency
chores. These are out of scope for STANDARDS rule #4 — skip silently.
The decision gate (do this first)
Classify the change. If it is not a feature or user-facing change, stop —
this skill does not apply.
Check for a prior decision so the gate is asked only once across the
early + finalize passes. This skill has no Jira search/JQL tool — only
getJiraIssue, which requires a key — so detection of an existing ticket is
limited to these in-tools means, in order:
- The caller passes a known doc-task key (e.g.
.sdd-meta.json's doc_task)
→ skip the question and go to Reconcile an existing ticket below. This
is the reliable path; spec-driven pipelines persist the key on the early
pass precisely so the finalize pass can find it.
- Otherwise, if you know the engineering ticket key, fetch it with
getJiraIssue and inspect its issue links for one titled
DOC-ready: <feature>. If found, treat its key as the doc-task key and go
to Reconcile an existing ticket.
- The caller passes a recorded "no" (docs previously confirmed not required)
→ stop silently; do not re-ask.
- Otherwise (first run, no key, no linked ticket found) → ask the gate in
step 3. Because there is no search fallback, callers that may run this
skill more than once must persist and pass back the doc-task key to
avoid duplicate filings.
Ask the developer explicitly (only when there is no prior decision):
"This looks customer-facing. Does it require customer-facing
documentation (release note, user/admin guide, API reference)?
[yes / no]"
- If the answer is no → do not create a ticket. Record the decision in
the dev workflow output (e.g. "Docs: not required — confirmed by
") and stop. Later passes see this and skip silently.
- If yes → continue to Creating the ticket.
Never decide "yes" on the developer's behalf. The whole point of the gate is
that a human confirms customer impact.
Reconcile an existing ticket
Run this when step 2 found an existing DOC-ready: ticket — either via a
passed-in key or via a DOC-ready: link discovered on the engineering ticket
(there is no Jira search tool). The goal is to keep the one ticket current,
never to file a second one.
- Fetch it with
getJiraIssue (description + labels + links).
- Rebuild the description from the current workflow context using the same
template and authoring rules as a fresh create (see Creating the ticket) —
in the finalize pass this means describing as-built behavior and filling
the now-known
Pull request / repo link, resolving open questions that the
implementation has answered.
- Compare the rebuilt description to the existing one:
- Materially stale (behavior, customer impact, PR link, or previously
open questions have changed) →
editJiraIssue to update the description.
Preserve the ready-for-docs and AI_generated labels and the existing
link to the engineering ticket. Do not change the summary unless the
customer-facing feature name itself changed.
- Already current → make no edit; just confirm the link.
Never fabricate to fill a gap — unsourced fields stay as open questions under
Internal notes, exactly as on create.
- Report back the ticket key, its URL, whether you updated or left it
unchanged, and any remaining open questions.
Creating the ticket
Load the config from policy/doc-task.yaml (project key, issue type,
link type, default component/assignee). If the project key is still the
unset placeholder, STOP and tell the developer the doc-task project must be
configured first — do not guess a project.
Load the template from references/doc-task-template.md and build the
description using exactly that structure and authoring rules. The rules
are load-bearing — especially:
- Plain English, active voice.
- Do not invent UI text, behavior, steps, defaults, limits, permissions,
supported environments, or unsupported scenarios.
- Any field you cannot source → leave the placeholder and add a matching line
under Internal notes as an open question. Never fabricate.
Source the fields from the workflow context:
Related engineering ticket → the MOB ticket driving the work.
Engineering SME → assignee of that ticket.
Pull request / repo link → the PR the workflow just opened
(gh pr view --json url). On an early draft there is no PR yet — record
pending and add a matching open question under Internal notes; the
finalize reconcile pass fills it in.
Design or spec / Confluence → from the SDD design doc or linked spec, if any.
- On an early draft, describe the intended behavior from the specs and
design — not as-built — and lean on Internal notes open questions for
anything the implementation hasn't settled yet.
Create the issue via createJiraIssue:
- Summary:
DOC-ready: <customer-facing feature name>
- Labels: include both
ready-for-docs and AI_generated under
additional_fields.labels — e.g.
additional_fields: { "labels": ["ready-for-docs", "AI_generated"] }.
createJiraIssue has no top-level labels param; labels passed anywhere
else are silently dropped and never land on the ticket. The rule-2
inject-ai-generated-label hook blocks the call and forces a retry if
AI_generated is missing — so add it up front rather than relying on
auto-injection.
- Project / issue type: from
policy/doc-task.yaml.
- Description: the filled template from step 2.
Link it to the engineering ticket via createIssueLink using the link
type in policy/doc-task.yaml (default: relates to).
Report back the new doc-task key, its URL, and a one-line list of any
fields left as open questions so the developer/docs team knows what's
missing.
Output
On create (new ticket — early draft or finalize):
Doc task filed: <DOC-KEY> — DOC-ready: <feature> [draft from specs | as-built]
Linked to: <MOB-KEY> (<link type>)
Open questions for docs (<n>): <comma-separated field names, or "none">
On reconcile (ticket already existed):
Doc task [updated | unchanged — already current]: <DOC-KEY> — DOC-ready: <feature>
Linked to: <MOB-KEY> (<link type>)
Open questions for docs (<n>): <comma-separated field names, or "none">
If the gate answer was "no":
Doc task: not required — confirmed by <author> for <MOB-KEY>.
Notes
- This skill creates or updates a planning ticket only. It does not write
docs, edit Confluence, or modify the engineering ticket beyond the link.
- It is idempotent — safe to run more than once. The prior-decision check
(gate step 2) routes repeat runs to reconcile instead of double-filing, and
asks the human docs question only once.
- Spec-driven pipelines may call it early (draft from specs, to guide
development) and at finalize (reconcile to as-built). Simpler workflows can
call it once at finalize. Either way, honor the gate: a "no" is a valid,
complete outcome.
Related
references/doc-task-template.md — the exact ticket structure and rules.
policy/doc-task.yaml — deployment-specific JIRA project/issue-type config.
- STANDARDS.md rule #4 — the rule this skill enforces.
1---2name: file-doc-task3description: File or update a documentation-planning JIRA task for a customer-facing feature, using the documentation team's standard template. Idempotent create-or-update — safe to run early (draft a DOC-ready ticket from the specs/design to guide development) and again at finalize (reconcile the description against what was actually shipped). For FEATURE or USER-FACING work the skill first asks once whether the change needs customer-facing documentation, and only creates the ticket if it does. Also use when a developer explicitly asks to "create a doc task", "file a docs ticket", "DOC-ready ticket", "update the doc task", or hand work off to the documentation team. Do NOT use for pure refactors, internal-only fixes, or build/dependency chores.4---56# file-doc-task78Implements **STANDARDS rule #4**: feature / user-facing work must assess whether9it needs customer-facing documentation, and — only when it does — file a linked10documentation-planning JIRA task using the doc team's standard template.1112The created ticket is for the **documentation team to plan from**; it is *not*13the documentation itself.1415## Idempotent — create or update1617This skill is **create-or-update**, not create-or-skip. It is safe to run more18than once for the same feature, by design:1920- **No ticket yet** → file a new `DOC-ready:` ticket.21- **Ticket exists but is stale** (its description no longer reflects what was22 actually built, or fields that were open questions are now answerable) →23 **update** the existing ticket in place via `editJiraIssue`.24- **Ticket exists and is current** → link to it and stop (no edit).2526This idempotency is what makes the two invocation points below safe — the27finalize pass reconciles the early draft rather than duplicating it.2829## Two invocation points3031A pipeline may call this skill at either or both of these points. The decision32gate in the next section asks the docs question **only once** — once a ticket33(or a recorded "no") exists, later runs skip straight to reconcile.34351. **Early — draft from specs (optional, recommended for spec-driven work).**36 Right after the design/tasks are reviewed and locked but before/while code is37 written. The ticket is drafted from the **intended** behavior in the specs38 and design, so it is available early to guide development and hold the work39 accountable to a stated customer outcome. The PR may not exist yet — record40 `Pull request / repo link` as `pending` and add a matching open question.412. **Finalize — reconcile to as-built (always).** After the PR is opened. If a42 draft ticket already exists, fetch it and **update** it so the description43 reflects what was actually shipped (and fill in the now-known PR link). If no44 early draft was created (e.g. a resumed pipeline, or a non-spec-driven45 workflow), this pass creates the ticket fresh — same as a single finalize-only46 call.4748## When to use4950- A spec-driven workflow has reviewed and locked its design/tasks and wants an51 **early draft** to guide development (e.g. the SDD pipeline, right after its52 Step 4 spec-review gate).53- A development workflow has just finished a **feature** or **user-facing54 change** and opened a PR (e.g. the SDD pipeline `finish` phase, the bug-fix55 pipeline `finalize` phase for a user-visible fix) — to create or **reconcile**56 the ticket.57- A developer explicitly asks to create or update a doc task / DOC-ready ticket58 / hand off to the docs team.5960## When NOT to use6162- Pure refactors, internal-only fixes, test-only changes, build/CI/dependency63 chores. These are out of scope for STANDARDS rule #4 — skip silently.6465## The decision gate (do this first)66671. **Classify the change.** If it is not a feature or user-facing change, stop —68 this skill does not apply.69702. **Check for a prior decision** so the gate is asked only once across the71 early + finalize passes. This skill has **no Jira search/JQL tool** — only72 `getJiraIssue`, which requires a key — so detection of an existing ticket is73 limited to these in-tools means, in order:74 - The caller passes a known doc-task key (e.g. `.sdd-meta.json`'s `doc_task`)75 → skip the question and go to **Reconcile an existing ticket** below. This76 is the reliable path; spec-driven pipelines persist the key on the early77 pass precisely so the finalize pass can find it.78 - Otherwise, if you know the engineering ticket key, fetch it with79 `getJiraIssue` and inspect its issue links for one titled80 `DOC-ready: <feature>`. If found, treat its key as the doc-task key and go81 to **Reconcile an existing ticket**.82 - The caller passes a recorded "no" (docs previously confirmed not required)83 → stop silently; do not re-ask.84 - Otherwise (first run, no key, no linked ticket found) → ask the gate in85 step 3. Because there is no search fallback, callers that may run this86 skill more than once **must** persist and pass back the doc-task key to87 avoid duplicate filings.88893. **Ask the developer explicitly** (only when there is no prior decision):9091 > "This looks customer-facing. Does it require customer-facing92 > documentation (release note, user/admin guide, API reference)?93 > [yes / no]"9495 - If the answer is **no** → do not create a ticket. Record the decision in96 the dev workflow output (e.g. "Docs: not required — confirmed by97 <author>") and stop. Later passes see this and skip silently.98 - If **yes** → continue to **Creating the ticket**.99100 Never decide "yes" on the developer's behalf. The whole point of the gate is101 that a human confirms customer impact.102103## Reconcile an existing ticket104105Run this when step 2 found an existing `DOC-ready:` ticket — either via a106passed-in key or via a `DOC-ready:` link discovered on the engineering ticket107(there is no Jira search tool). The goal is to keep the one ticket current,108never to file a second one.1091101. **Fetch it** with `getJiraIssue` (description + labels + links).1112. **Rebuild the description** from the current workflow context using the same112 template and authoring rules as a fresh create (see *Creating the ticket*) —113 in the finalize pass this means describing **as-built** behavior and filling114 the now-known `Pull request / repo link`, resolving open questions that the115 implementation has answered.1163. **Compare** the rebuilt description to the existing one:117 - **Materially stale** (behavior, customer impact, PR link, or previously118 open questions have changed) → `editJiraIssue` to update the description.119 Preserve the `ready-for-docs` and `AI_generated` labels and the existing120 link to the engineering ticket. Do not change the summary unless the121 customer-facing feature name itself changed.122 - **Already current** → make no edit; just confirm the link.123 Never fabricate to fill a gap — unsourced fields stay as open questions under124 *Internal notes*, exactly as on create.1254. **Report back** the ticket key, its URL, whether you updated or left it126 unchanged, and any remaining open questions.127128## Creating the ticket1291301. **Load the config** from `policy/doc-task.yaml` (project key, issue type,131 link type, default component/assignee). If the project key is still the132 unset placeholder, STOP and tell the developer the doc-task project must be133 configured first — do not guess a project.1341352. **Load the template** from `references/doc-task-template.md` and build the136 description using **exactly** that structure and authoring rules. The rules137 are load-bearing — especially:138 - Plain English, active voice.139 - **Do not invent** UI text, behavior, steps, defaults, limits, permissions,140 supported environments, or unsupported scenarios.141 - Any field you cannot source → leave the placeholder and add a matching line142 under **Internal notes** as an open question. Never fabricate.1431443. **Source the fields** from the workflow context:145 - `Related engineering ticket` → the MOB ticket driving the work.146 - `Engineering SME` → assignee of that ticket.147 - `Pull request / repo link` → the PR the workflow just opened148 (`gh pr view --json url`). On an **early draft** there is no PR yet — record149 `pending` and add a matching open question under *Internal notes*; the150 finalize reconcile pass fills it in.151 - `Design or spec` / `Confluence` → from the SDD design doc or linked spec, if any.152 - On an **early draft**, describe the **intended** behavior from the specs and153 design — not as-built — and lean on *Internal notes* open questions for154 anything the implementation hasn't settled yet.1551564. **Create the issue** via `createJiraIssue`:157 - **Summary:** `DOC-ready: <customer-facing feature name>`158 - **Labels:** include **both** `ready-for-docs` **and** `AI_generated` under159 `additional_fields.labels` — e.g.160 `additional_fields: { "labels": ["ready-for-docs", "AI_generated"] }`.161 `createJiraIssue` has no top-level `labels` param; labels passed anywhere162 else are silently dropped and never land on the ticket. The rule-2163 `inject-ai-generated-label` hook *blocks* the call and forces a retry if164 `AI_generated` is missing — so add it up front rather than relying on165 auto-injection.166 - **Project / issue type:** from `policy/doc-task.yaml`.167 - **Description:** the filled template from step 2.1681695. **Link it** to the engineering ticket via `createIssueLink` using the link170 type in `policy/doc-task.yaml` (default: `relates to`).1711726. **Report back** the new doc-task key, its URL, and a one-line list of any173 fields left as open questions so the developer/docs team knows what's174 missing.175176## Output177178On create (new ticket — early draft or finalize):179180```181Doc task filed: <DOC-KEY> — DOC-ready: <feature> [draft from specs | as-built]182 Linked to: <MOB-KEY> (<link type>)183 Open questions for docs (<n>): <comma-separated field names, or "none">184```185186On reconcile (ticket already existed):187188```189Doc task [updated | unchanged — already current]: <DOC-KEY> — DOC-ready: <feature>190 Linked to: <MOB-KEY> (<link type>)191 Open questions for docs (<n>): <comma-separated field names, or "none">192```193194If the gate answer was "no":195196```197Doc task: not required — confirmed by <author> for <MOB-KEY>.198```199200## Notes201202- This skill **creates or updates a planning ticket only**. It does not write203 docs, edit Confluence, or modify the engineering ticket beyond the link.204- It is **idempotent** — safe to run more than once. The prior-decision check205 (gate step 2) routes repeat runs to reconcile instead of double-filing, and206 asks the human docs question only once.207- Spec-driven pipelines may call it **early** (draft from specs, to guide208 development) and **at finalize** (reconcile to as-built). Simpler workflows can209 call it once at finalize. Either way, honor the gate: a "no" is a valid,210 complete outcome.211212## Related213214- `references/doc-task-template.md` — the exact ticket structure and rules.215- `policy/doc-task.yaml` — deployment-specific JIRA project/issue-type config.216- STANDARDS.md rule #4 — the rule this skill enforces.