Skip to content
Back to skills

Clarify

ASecurity

Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.

  • 8 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 20, 2026
ai-agentsgoshellgitapisecurityperformance

Works with

  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned November 27, 2026

npx -y skills add akka/ai-marketplace --skill clarify --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Clarify?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Clarify
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/akka-clarify/badge)](https://www.skillsdirectory.com/skills/akka-clarify)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: clarify
description: "Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec."
---

## User Input

You **MUST** consider the user input before proceeding (if not empty).

## Before anything else

This command keeps a run in the idea's record when the akka CLI has one: the
`akka_run_start` MCP tool is available, or the output of `akka specify run start
--help` contains `--station`. A CLI without it predates the idea record. With
such a CLI, say so once and carry this command out as before: skip every step
marked **Idea record**, and open no run.

**Idea record: a console run.** Call the `akka_run_context` MCP tool first when
it is available: it answers `{ console, idea, station, run, spec, topic,
questions, sentBack }`, and `console: true` means the console started this command. Only
without that tool, the console started it when `AKKA_RUN_ID` is set in its
environment, or when the command has no shell to run the akka CLI in. The
console has already opened the run and enforced the rules for it, so in a
console run the run is open from the first step: its id is the `run`
`akka_run_context` answered. Any stop before the normal close, such as a
mode-check refusal, a missing argument, or a check that needs a tool this run
lacks, closes it with `akka_run_close`, that `run`, `outcome: failed` and the
reason. So in a console run: the feature is `akka_run_context`'s `spec` (for
`/akka:discover`, the topic is its `topic`), and the command never searches for
one; skip every step that finds, adopts, starts or links an idea, and never ask
a person a question: wherever this command would ask one, it closes the run with
`outcome: waiting` and `question` set to the question (`--outcome waiting
--question "<question>"` on the CLI); the owner answers in the console, and the
re-run reads the answer from `akka_run_context`'s `questions` (`{station, run,
question, answer}`) and does not ask it again; run the mode check with `--idea`
set to the `idea` `akka_run_context` answered, and skip it when it cannot run
here or no idea is known; open the run by calling `akka_run_start` with
`command` and `args` only, no `idea` and no `station`, and the CLI joins the
console's run; close it as usual; and skip the carry-on step, because the
console moves the idea on. A run with no shell for the akka CLI that
`akka_run_context` answers `console: false` for is not a console run and keeps
no record: open no run, ask nothing about ideas or lanes, and carry the command
out as before the idea record, skipping every step marked **Idea record**.

**Idea record: a station sent back to.** When `akka_run_context` answers
`sentBack` (`{ from, reason, by, at }`), the idea was sent back to this station
from `from`, and `reason` says why. Work on that reason first: read it as the
instruction for this run from `by`, change this station's outputs where the
reason points, and keep what it does not touch. `sentBack` is `null` when no
send-back opened this station's visit.

**Idea record: clarify in a console run.** Nobody answers questions in a console
run, so do not run the questioning loop. Fold in the owner's answers first, as
the next paragraph says. Write each question the scan would ask into the spec as
a `[NEEDS CLARIFICATION: <question>]` marker at the place it concerns; the
console shows each as a wait for the owner to answer. Report them, and close the
run as usual, with `FEATURE_SPEC` as its output.

**Answers given in the console.** In every run, before the scan: for each `- Q:
<question> → A: <answer>` line under `## Clarifications` whose `[NEEDS
CLARIFICATION: <question>]` marker is still in the spec, integrate the answer as
an accepted answer is integrated below, and remove the marker. These answers do
not count against the question limit.

**Idea record: find the idea.** On a laptop run, find the feature this command
works on first: call `akka_sdd_list_specs` and identify the target feature as
the first step below does. Its idea is the one in `akka specify idea list
--json` whose `spec` is the feature's folder name (`NNN-name`); an idea is never
found from the git branch. When that idea has `derived: true`, it has no record
yet: adopt it with `akka specify ideas adopt --idea <id>`, then use it. When no
idea has it, read the mode with `akka specify mode`. In À la carte mode, open no
run: say in one line that this run is not recorded, and continue. In Enforced
mode, stop: the project's specs and topics get their ideas once with `akka
specify ideas adopt`, and this command runs after that. Pass the idea's id as
`--idea <id>` to the mode check and `idea` to the run start.

Run `akka specify mode --allows clarify`, adding `--idea <id>` when the idea
record found the idea. With a CLI that predates the idea record, add
`--as-engine` when you are carrying this command out as a step of the sequence
`/akka:specify` drives in Enforced mode, rather than because a person invoked
it. It exits non-zero when the project's mode does not permit the command. On a
non-zero exit, print its message verbatim and stop. Do not continue, and do not
work around it. The one exception is a CLI that rejects `--allows` as an unknown
flag: it predates the mode check (older than 3.0.74), so say so and continue
without the check.

With the idea record, Enforced mode runs a station command when the idea's
previous station is done and approved, and the CLI's run start decides;
`/akka:specify` does not drive the sequence. With an older CLI, Enforced mode
gives the sequence to the engine, so a step it sequences is refused to a person
and permitted to the engine. A refusal with a reason of its own, such as
re-running setup, stands either way. The message names the remedy.

Under enforcement an unresolved question is settled by `/akka:specify`, so the
CLI refuses this command to the engine as well. `--as-engine` does not lift this
one.

**Idea record: open the run.** On a laptop run, call the `akka_run_start` MCP
tool with `station: clarify`, `command: /akka:clarify`, `idea` set to the idea
found above and `args` set to the user input. Where the tool is not available,
run `akka specify run start --station clarify --command /akka:clarify --idea
<id> --args "<the user input>" --json`, with the input quoted as one argument. A
run is never started without its idea. It answers JSON: `recorded`, and for a
recorded run its `idea` and `run.id`. Keep both: the last steps use them.

- When it answers `recorded: false`, continue without a run, and say in one line
  that this run is not recorded, with its `reason`.
- A refusal by rule is an error whose JSON is `{refused, message, remedy}`,
  `refused` naming the rule: `paused`, `limit`, `shipped`, `dropped`,
  `approval`, `order`, `no-idea-enforced`, `idea-unresolved` or `console-run`. Print `message` and `remedy` verbatim and stop.
- Any other error, one without `refused` (such as no login), does not stop the
  command: continue without a run, and say in one line that this run is not
  recorded.

**Idea record: a run that fails is closed too.** Once the run is open, every way
the command ends closes it. When the work fails (a build or tests fail, or a
step stops the command early), call `akka_run_close` with `run`, `outcome:
failed` and `error` set to what failed, in one line, then stop. Where the tool
is not available, run `akka specify run close --run <id> --outcome failed
--error "<what failed>"`. When the person stops the command, close the run with
`outcome: stopped`. This holds in a console run too. The close step below is for
the work's normal end.

## Outline

Goal: Detect and reduce ambiguity or missing decision points in the active feature specification and record the clarifications directly in the spec file.

Note: This clarification workflow is expected to run (and be completed) BEFORE invoking `/akka:plan`. If the user explicitly states they are skipping clarification (e.g., exploratory spike), you may proceed, but must warn that downstream rework risk increases.

Execution steps:

1. Call the `akka_sdd_list_specs` MCP tool to find features. From the response, identify the target feature's directory (FEATURE_DIR) and spec file path (FEATURE_SPEC). If no features exist, instruct the user to run `/akka:specify` first.
   - `FEATURE_DIR`
   - `FEATURE_SPEC`
   - (Optionally capture `IMPL_PLAN`, `TASKS` for future chained flows.)
   - If JSON parsing fails, abort and instruct user to re-run `/akka:specify` or verify feature branch environment.

2. Load the current spec file. Perform a structured ambiguity & coverage scan using this taxonomy. For each category, mark status: Clear / Partial / Missing. Produce an internal coverage map used for prioritization (do not output raw map unless no questions will be asked).

   Functional Scope & Behavior:
   - Core user goals & success criteria
   - Explicit out-of-scope declarations
   - User roles / personas differentiation

   Domain & Data Model:
   - Entities, attributes, relationships
   - Identity & uniqueness rules
   - Lifecycle/state transitions
   - Data volume / scale assumptions

   Interaction & UX Flow:
   - Critical user journeys / sequences
   - Error/empty/loading states
   - Accessibility or localization notes

   Non-Functional Quality Attributes:
   - Performance (latency, throughput targets)
   - Scalability (horizontal/vertical, limits)
   - Reliability & availability (uptime, recovery expectations)
   - Observability (logging, metrics, tracing signals)
   - Security & privacy (authN/Z, data protection, threat assumptions)
   - Compliance / regulatory constraints (if any)

   Integration & External Dependencies:
   - External services/APIs and failure modes
   - Data import/export formats
   - Protocol/versioning assumptions

   Edge Cases & Failure Handling:
   - Negative scenarios
   - Rate limiting / throttling
   - Conflict resolution (e.g., concurrent edits)

   Constraints & Tradeoffs:
   - Technical constraints (language, storage, hosting)
   - Explicit tradeoffs or rejected alternatives

   Terminology & Consistency:
   - Canonical glossary terms
   - Avoided synonyms / deprecated terms

   Completion Signals:
   - Acceptance criteria testability
   - Measurable Definition of Done style indicators

   Misc / Placeholders:
   - TODO markers / unresolved decisions
   - Ambiguous adjectives ("robust", "intuitive") lacking quantification

   For each category with Partial or Missing status, add a candidate question opportunity unless:
   - Clarification would not materially change implementation or validation strategy
   - Information is better deferred to planning phase (note internally)

3. Generate (internally) a prioritized queue of candidate clarification questions (maximum 5). Do NOT output them all at once. Apply these constraints:
    - Maximum of 10 total questions across the whole session.
    - Each question must be answerable with EITHER:
       - A short multiple‑choice selection (2–5 distinct, mutually exclusive options), OR
       - A one-word / short‑phrase answer (explicitly constrain: "Answer in <=5 words").
    - Only include questions whose answers materially impact architecture, data modeling, task decomposition, test design, UX behavior, operational readiness, or compliance validation.
    - Ensure category coverage balance: attempt to cover the highest impact unresolved categories first; avoid asking two low-impact questions when a single high-impact area (e.g., security posture) is unresolved.
    - Exclude questions already answered, trivial stylistic preferences, or plan-level execution details (unless blocking correctness).
    - Favor clarifications that reduce downstream rework risk or prevent misaligned acceptance tests.
    - If more than 5 categories remain unresolved, select the top 5 by (Impact * Uncertainty) heuristic.

4. Sequential questioning loop (interactive):
    - Present EXACTLY ONE question at a time.
    - For multiple‑choice questions:
       - **Analyze all options** and determine the **most suitable option** based on:
          - Best practices for the project type
          - Common patterns in similar implementations
          - Risk reduction (security, performance, maintainability)
          - Alignment with any explicit project goals or constraints visible in the spec
       - Present your **recommended option prominently** at the top with clear reasoning (1-2 sentences explaining why this is the best choice).
       - Format as: `**Recommended:** Option [X] - <reasoning>`
       - Then render all options as a Markdown table:

       | Option | Description |
       |--------|-------------|
       | A | <Option A description> |
       | B | <Option B description> |
       | C | <Option C description> (add D/E as needed up to 5) |
       | Short | Provide a different short answer (<=5 words) (Include only if free-form alternative is appropriate) |

       - After the table, add: `You can reply with the option letter (e.g., "A"), accept the recommendation by saying "yes" or "recommended", or provide your own short answer.`
    - For short‑answer style (no meaningful discrete options):
       - Provide your **suggested answer** based on best practices and context.
       - Format as: `**Suggested:** <your proposed answer> - <brief reasoning>`
       - Then output: `Format: Short answer (<=5 words). You can accept the suggestion by saying "yes" or "suggested", or provide your own answer.`
    - After the user answers:
       - If the user replies with "yes", "recommended", or "suggested", use your previously stated recommendation/suggestion as the answer.
       - Otherwise, validate the answer maps to one option or fits the <=5 word constraint.
       - If ambiguous, ask for a quick disambiguation (count still belongs to same question; do not advance).
       - Once satisfactory, record it in working memory (do not yet write to disk) and move to the next queued question.
    - Stop asking further questions when:
       - All critical ambiguities resolved early (remaining queued items become unnecessary), OR
       - User signals completion ("done", "good", "no more"), OR
       - You reach 5 asked questions.
    - Never reveal future queued questions in advance.
    - If no valid questions exist at start, immediately report no critical ambiguities.

5. Integration after EACH accepted answer (incremental update approach):
    - Maintain in-memory representation of the spec (loaded once at start) plus the raw file contents.
    - For the first integrated answer in this session:
       - Ensure a `## Clarifications` section exists (create it just after the highest-level contextual/overview section per the spec template if missing).
       - Under it, create (if not present) a `### Session YYYY-MM-DD` subheading for today.
    - Append a bullet line immediately after acceptance: `- Q: <question> → A: <final answer>`.
    - Then immediately apply the clarification to the most appropriate section(s):
       - Functional ambiguity → Update or add a bullet in Functional Requirements.
       - User interaction / actor distinction → Update User Stories or Actors subsection (if present) with clarified role, constraint, or scenario.
       - Data shape / entities → Update Data Model (add fields, types, relationships) preserving ordering; note added constraints succinctly.
       - Non-functional constraint → Add/modify measurable criteria in Non-Functional / Quality Attributes section (convert vague adjective to metric or explicit target).
       - Edge case / negative flow → Add a new bullet under Edge Cases / Error Handling (or create such subsection if template provides placeholder for it).
       - Terminology conflict → Normalize term across spec; retain original only if necessary by adding `(formerly referred to as "X")` once.
    - If the clarification invalidates an earlier ambiguous statement, replace that statement instead of duplicating; leave no obsolete contradictory text.
    - Save the spec file AFTER each integration to minimize risk of context loss (atomic overwrite).
    - Preserve formatting: do not reorder unrelated sections; keep heading hierarchy intact.
    - Keep each inserted clarification minimal and testable (avoid narrative drift).

6. Validation (performed after EACH write plus final pass):
   - Clarifications session contains exactly one bullet per accepted answer (no duplicates).
   - Total asked (accepted) questions ≤ 5.
   - Updated sections contain no lingering vague placeholders the new answer was meant to resolve.
   - No contradictory earlier statement remains (scan for now-invalid alternative choices removed).
   - Markdown structure valid; only allowed new headings: `## Clarifications`, `### Session YYYY-MM-DD`.
   - Terminology consistency: same canonical term used across all updated sections.

7. Write the updated spec back to `FEATURE_SPEC`.

8. **Report existing diagrams.** If `FEATURE_DIR/spec-visualize.md` or `FEATURE_DIR/plan-visualize.md` exists, mention in the completion report that it may be stale and suggest running `/akka:visualize` for this feature when the user wants updated diagrams. Leave all diagram files untouched; visualization is optional.

9. Report completion (after questioning loop ends or early termination):
   - Number of questions asked & answered.
   - Path to updated spec.
   - Sections touched (list names).
   - Potentially stale diagram paths and the optional `/akka:visualize` suggestion, if any were found in step 8.
   - Coverage summary table listing each taxonomy category with Status: Resolved (was Partial/Missing and addressed), Deferred (exceeds question quota or better suited for planning), Clear (already sufficient), Outstanding (still Partial/Missing but low impact).
   - If any Outstanding or Deferred remain, recommend whether to proceed to `/akka:plan` or run `/akka:clarify` again later post-plan.
   - Suggested next command. If policy-decision markers remain, recommend `/akka:clarify` again, not `/akka:plan`.

10. **Close the run**. If a run was opened, call the `akka_run_close` MCP tool with `run` set to its id, `outcome: ok`, and `outputs` set to `FEATURE_SPEC` as a project-relative path, or to none when no answer was integrated. Where the tool is not available, run `akka specify run close --run <id> --outcome ok` with `--file <path>` for the spec. On an error, print its message; the clarifications already written stand. After the close, run `git status --porcelain -- .akka/record/` and end the final message with one line naming the files it lists, such as "Record files to commit with your work: .akka/record/<id>/…". This command does not commit the record. When git is not available, the line says the record is in `.akka/record/<id>/`.

11. **Carry on or stop.** In a console run, skip this step: the console moves the idea on. If a run was opened, run `akka specify idea next --idea <idea> --from clarify --json`, where `<idea>` is the `idea` the run start returned. It answers `{ go, next, reason }`. When `go` is true, carry on into `next.command` in this conversation, following its own instructions. Otherwise stop, print `reason`, and name `next.command` when there is one. Without a run, stop and name the next command.

Behavior rules:

- Policy-decision markers (thresholds, access permissions, retention, sensitive-data rules, approvals) are not subject to the specify marker limit: put them first in the question queue and never infer an answer. Any not reached within the 5-question limit stay as markers for the next run.
- If no meaningful ambiguities found (or all potential questions would be low-impact), respond: "No critical ambiguities detected worth formal clarification." and suggest proceeding.
- If spec file missing, instruct user to run `/akka:specify` first (do not create a new spec here).
- Never exceed 5 total asked questions (clarification retries for a single question do not count as new questions).
- Avoid speculative tech stack questions unless the absence blocks functional clarity.
- Respect user early termination signals ("stop", "done", "proceed").
- If no questions asked due to full coverage, output a compact coverage summary (all categories Clear) then suggest advancing.
- If quota reached with unresolved high-impact categories remaining, explicitly flag them under Deferred with rationale.

Context for prioritization: the user's request

## Done When

- [ ] The active FEATURE_DIR and FEATURE_SPEC were resolved via `akka_sdd_list_specs` (or the user was told to run `/akka:specify` first).
- [ ] A structured ambiguity & coverage scan was performed across every taxonomy category with a Clear / Partial / Missing status.
- [ ] No more than 5 questions were asked in total; each was answerable with a short multiple-choice selection or a `<=5`-word short answer.
- [ ] Each accepted answer produced exactly one bullet under `## Clarifications` → `### Session YYYY-MM-DD` and was integrated into the correct target section (Functional Requirements, User Stories, Data Model, Non-Functional / Quality Attributes, Edge Cases, or terminology).
- [ ] Every `[NEEDS CLARIFICATION]` marker the answer settles was removed, and the requirement it produced has a row in the Traceability table naming a source and a test. A marker left in the specification reds PROJ-SPEC-SCHEMA.
- [ ] Any earlier statement invalidated by a clarification was replaced, not duplicated.
- [ ] The spec file was saved to FEATURE_SPEC after each integration and passes validation (no lingering vague placeholders the new answer was meant to resolve; markdown structure valid; only allowed new headings added).
- [ ] Existing diagrams affected by the source update were reported as potentially stale, with `/akka:visualize` suggested as an optional next step; all diagram files were left untouched.
- [ ] The final report listed questions asked/answered, sections touched, a coverage summary (Resolved / Deferred / Clear / Outstanding), and the suggested next command.
- [ ] The run was opened with `akka_run_start` after the mode check, against the idea found from its feature, and closed with `akka_run_close` at the end, or the CLI was reported as predating the idea record.
- [ ] With a run, the command carried on into `next.command` only when `akka specify idea next` answered `go: true`; otherwise it stopped, printed the reason and named the next command.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.