Skip to content
Back to skills

Specify

ASecurity

Create or update the feature specification from a natural language feature description.

  • 8 stars
  • 0 votes
  • 0 copies
  • 8 views
  • Added September 20, 2026
developmentgoshellreactexpresstestinggitapidatabasesecurityperformance

Works with

  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned November 27, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Specify?

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

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

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: specify
description: "Create or update the feature specification from a natural language feature description."
---

## User Input

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

In a project with a `discovery/` folder this command relies on the discovery gates in `akka specify conform`, which need an akka CLI with discovery support. Check first: run `akka specify probes --help`. If its list of commands does not include `findings`, the CLI predates discovery. Tell the person so, name what is missing (the discovery gates and `akka specify probes findings`), and stop, because a spec may rely only on confirmed findings and this CLI cannot check them. Treat an `unknown command` or `unknown flag` error from any `akka specify` call the same way, naming the subcommand or flag. A project without `discovery/` needs neither and skips this check.

## 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: specify in a console run.** Skip the `akka specify probes --help`
check above: any CLI with `akka_run_context` has `probes findings`. Present no
clarification questions: leave the `[NEEDS CLARIFICATION]` markers in the spec
for `/akka:clarify`, and the console shows them as waits. Skip the
exit-condition loop and `akka specify conditions author`, and say in one line
that they are left for a person on a laptop. Close the run as usual.

## Outline

The text the user typed after `/akka:specify` in the triggering message **is** the feature description. Assume you always have it available in this conversation even if `the user's request` appears literally below. Do not ask the user to repeat it unless they provided an empty command.

Given that feature description, do this:

0. **Prerequisite check**: Before doing anything else, verify the environment is ready:
   - Call `akka_sdd_list_specs` — if this MCP tool is not available, the Akka MCP server is not configured. Stop and tell the user: *"The Akka MCP server is not running. Run `/akka:setup` first to configure your project, or run `akka specify init .` from the terminal."*
   - Check if the current directory has a `pom.xml` or `.akka/` directory. If neither exists, warn: *"This doesn't look like an Akka project directory. Run `/akka:setup` to scaffold a new project, or `cd` into an existing one."*
   - If both checks pass, proceed.

1. **Generate a concise short name** (2-4 words) for the spec folder:
   - Analyze the feature description and extract the most meaningful keywords
   - Create a 2-4 word short name that captures the essence of the feature
   - Use action-noun format when possible (e.g., "add-user-auth", "fix-payment-bug")
   - Preserve technical terms and acronyms (OAuth2, API, JWT, etc.)
   - Keep it concise but descriptive enough to understand the feature at a glance
   - Examples:
     - "I want to add user authentication" → "user-auth"
     - "Implement OAuth2 integration for the API" → "oauth2-api-integration"
     - "Create a dashboard for analytics" → "analytics-dashboard"
     - "Fix payment processing timeout bug" → "fix-payment-timeout"

2. **Find the next spec number**:

   a. Call `akka_sdd_list_specs` and find the highest number N among the spec folders matching
   `specs/[0-9]+-<short-name>`. Only folders with the exact short-name pattern count.

   b. **Only with no idea record** (a CLI that predates it, see "Before anything else"), and never in a
   console run, which has no shell for git: also check the branches for the same pattern. Run `git fetch`,
   then `git ls-remote --heads origin | grep -E 'refs/heads/[0-9]+-<short-name>$'` and
   `git branch | grep -E '^[* ]*[0-9]+-<short-name>$'`, and raise N to the highest number they show. A
   recorded idea creates no branch.

   c. Use N+1 as the number, or 1 when nothing matched. The id is that number, zero-padded to three digits,
   a hyphen, and the short name from step 1 (`002-user-auth`). It is FEATURE_DIR's folder name. The folder
   is not created here: step 2f creates it, after the run is opened.

2e. **Idea record: start the idea and open the run.** In a console run, skip the idea steps here and open the run by calling `akka_run_start` with `command: /akka:specify` and `args` only; the CLI joins the console's run, and its close links the spec from the outputs. On a laptop run, Discover is optional in every mode, so a new idea may start here. `/akka:specify` always records against a new idea or the idea of the discovery topic this feature continues, never an idea found from the git branch. Below, `<NNN-name>` is the id from step 2c. When the feature continues a discovery topic (the person names it, or the spec rests on its findings), look for that topic's idea in `akka specify idea list --json`: the idea whose `topic` is the topic's folder name and whose `spec` is null. When that idea has `derived: true`, it has no record yet: adopt it with `akka specify ideas adopt --idea <id>`, then use it. If there is one, link it to this spec with `akka specify idea link --idea <idea> --spec <NNN-name>`. Otherwise start a new idea: ask the person how it ships, Deploy to Akka (`akka`) or Commit to internal systems (`internal`), with your suggestion, then run `akka specify idea new --spec <NNN-name> --lane <lane> "<words>"` with the feature description as its words, quoted as one argument. When the adopt, `idea link` or `idea new` fails, in Enforced mode (`akka specify mode`) stop with the CLI's message; otherwise open no run, say in one line that this run is not recorded, and continue. Then open the run against that idea: call the `akka_run_start` MCP tool with `station: specify`, `command: /akka:specify`, `idea` set to it and `args` set to the user input. Where the tool is not available, run `akka specify run start --station specify --command /akka:specify --idea <idea> --args "<the user input>" --json`, with the input quoted as one argument. It answers JSON: `recorded`, and for a recorded run its `idea` and `run.id`. Keep both: the closing 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, before step 2f, so no spec folder is created. 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. 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 closing steps are for the work's normal end.

2f. **Create the spec folder.** Only when step 2e has not stopped the command, call the `akka_sdd_create_spec` MCP tool with feature_name set to a short, hyphenated name derived from the user's feature description (e.g. "user-authentication"), `number` (N+1) and `short_name` parameters, along with the feature description. The tool creates a numbered feature directory under the specs directory, initializes spec.md from the template, and returns the path. Use this path as FEATURE_SPEC and its parent directory as FEATURE_DIR.

   **IMPORTANT**: The tool output contains `spec_file`. Its `branch_name` is only a folder name: the command creates no git branch from it.

3. Load `akka_sdd_get_template` to understand required sections.

4. Follow this execution flow:

    1. Parse user description from Input
       If empty: ERROR "No feature description provided"
    2. Extract key concepts from description
       Identify: actors, actions, data, constraints
       For agent features, apply the conditional "Agent behavior, protection, and evaluation requirements" guidance below.
    3. For unclear aspects:
       - Make informed guesses based on context and industry standards
       - Only mark with [NEEDS CLARIFICATION: specific question] if:
         - The choice significantly impacts feature scope or user experience
         - Multiple reasonable interpretations exist with different implications
         - No reasonable default exists
       - **LIMIT: Maximum 3 [NEEDS CLARIFICATION] markers for routine details; policy decisions and `confirm F-...` markers always keep their marker and do not count toward the limit** (see "Policy decisions are not reasonable defaults")
       - Prioritize clarifications by impact: scope > security/privacy > user experience > technical details
    4. Fill User Scenarios & Testing section
       If no clear user flow: ERROR "Cannot determine user scenarios"
    5. Generate Functional Requirements
       Each requirement must be testable
       Use reasonable defaults for unspecified details (document assumptions in Assumptions section)
       Annotate any requirement that is not your own decision. A requirement
       imposed from outside is `(constrained, <rung>)`; one read off a system
       that already exists is `(observed, <rung>)`. The rung is `inspected`,
       `documented`, or `exercised: <probe>`. Leave a requirement you chose
       unannotated, except in a modernization with discovery (step 8). Success criteria are
       annotated the same way, because the provenance check counts them too.
    6. Define Success Criteria
       Create measurable, technology-agnostic outcomes
       Include both quantitative metrics (time, performance, volume) and qualitative measures (user satisfaction, task completion)
       Each criterion must be verifiable without implementation details
    7. Identify Key Entities (if data involved)
    8. If the project has a `discovery/` folder, set the header markers. Without one, leave both as `no` and skip the rest of this step: what they require (approved mocks, a measured baseline, an annotation on every requirement) relies on `/akka:discover`. Write `**User Interface**: yes` if the feature adds or changes screens a person uses, and `**Modernization**: yes` if it replaces or rebuilds a system that already exists; otherwise leave each as `no`. A user interface needs approved mocks (`/akka:discover <topic> mock`) and a modernization needs a measured baseline in plan.md before the feature can ship. A spec that rests on findings from a topic whose track is modernization is a modernization.
       When the spec is a modernization, every functional requirement and every success criterion declares where it came from, `(decided)` included, and an observed requirement cites its finding and copies its rung (step 9): `- **FR-004** (observed, exercised: sequence): ... [F-PAY-40]`. Switch on the condition that checks this, `PROJ-PROVENANCE-DECLARED`, which ships off because turning it on is a statement about the specification. Write this to a temporary file, run `akka specify conditions author --file <file>`, and delete the file. It carries the built-in definition's fields, so the condition stays an author-time gate that closes on its own; only the level changes:
       ```yaml
       conditions:
         - id: PROJ-PROVENANCE-DECLARED
           tier: project
           dod_type: documentation-training
           invariant: "every requirement declares where it came from"
           signal: filesystem
           probe: requirement provenance annotations
           pass: "requirements_without_provenance == 0"
           autonomy: auto
           check: provenance-declared
           default_level: on-but-dev-configurable
           ship_tier: author
       ```
       Re-running it replaces the same condition, so a later run of this command does no harm. Where the exit-condition set is dormant it resolves once the set is active.
    9. If the project has a `discovery/` folder, ground each requirement in it:
       - Read every finding line under `discovery/`, in every topic folder and at the root (`- [F-<CODE>-<n>] <claim> | evidence: ... | status: ...`; the project-level set at the root writes `F-<n>`), and use them as the source for requirements, Key Entities (from each topic's `concepts.md` and the shared list in `discovery/concepts.md`) and success criteria (from research outcomes and the baseline).
       - Every functional requirement bullet cites at least one finding by its identifier in square brackets, anywhere on the bullet: `- **FR-003**: System MUST mark a subscriber unconfirmed after three soft bounces within 24 hours [F-PAY-40]`. A requirement may cite findings from several topics.
       - Cite only findings whose status is `confirmed`. If a requirement needs a finding that is not yet confirmed, mark it `[NEEDS CLARIFICATION: confirm F-<CODE>-<n> with /akka:discover <topic> confirm]` instead of citing it. If more than three requirements wait on unconfirmed findings, stop before writing the spec and recommend `/akka:discover <topic> confirm` first.
       - A requirement built on a finding with a rung copies it into its annotation: `- **FR-003** (observed, exercised: sequence): ... [F-PAY-40]`. The first word says where the requirement comes from (`observed` for a behaviour of the existing system, `constrained` for a rule imposed from outside, `decided` for a choice), never the finding's status: `inferred` and `confirmed` are not annotation words. So a requirement on a confirmed finding at rung inspected reads `(observed, inspected)`. `observed` and `constrained` always name the rung that established them (`inspected`, `documented` or `exercised: <probe>`); a constraint taken from a document reads `(constrained, documented)`.
       - A requirement that is purely the user's own choice still cites the confirmed finding that records the choice (a finding with evidence `stated: <who>, <date>`).
    10. Fill the Traceability table. Without a `discovery/` folder a short form is enough: Source may name the user story (`User Story 1`) and Test its scenario (`scenario 2`). In either case write one row `| FR-001 | <source> | <test> |` for every functional requirement and every success criterion, and no row for an identifier that is not one. Source names where the requirement comes from (the findings it cites, such as `F-PAY-3`, or the user story or input); Test names the acceptance scenario or the test that verifies it (`User Story 1, scenario 2`). Neither cell is left empty. Keep the heading `## Traceability`: the spec schema check reads the table under it, and a requirement missing from it fails the check.
    11. Return: SUCCESS (spec ready for planning)

5. Write the specification to SPEC_FILE using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.

6. **Specification Quality Validation**: After writing the initial spec, validate it against quality criteria:

   a. **Create Spec Quality Checklist**: Generate a checklist file at `FEATURE_DIR/checklists/requirements.md` using the checklist template structure with these validation items:

      ```markdown
      # Specification Quality Checklist: [FEATURE NAME]

      **Purpose**: Validate specification completeness and quality before proceeding to planning
      **Created**: [DATE]
      **Feature**: [Link to spec.md]

      ## Content Quality

      - [ ] No implementation details (languages, frameworks, APIs)
      - [ ] Focused on user value and business needs
      - [ ] Written for non-technical stakeholders
      - [ ] All mandatory sections completed

      ## Requirement Completeness

      - [ ] No [NEEDS CLARIFICATION] markers remain
      - [ ] Requirements are testable and unambiguous
      - [ ] Success criteria are measurable
      - [ ] Success criteria are technology-agnostic (no implementation details)
      - [ ] All acceptance scenarios are defined
      - [ ] Edge cases are identified
      - [ ] Scope is clearly bounded
      - [ ] Dependencies and assumptions identified

      ## Feature Readiness

      - [ ] All functional requirements have clear acceptance criteria
      - [ ] User scenarios cover primary flows
      - [ ] Feature meets measurable outcomes defined in Success Criteria
      - [ ] No implementation details leak into specification

      ## Notes

      - Items marked incomplete require spec updates before `/akka:clarify` or `/akka:plan`
      ```

   b. **Run Validation Check**: Review the spec against each checklist item:
      - For each item, determine if it passes or fails
      - Document specific issues found (quote relevant spec sections)

   c. **Handle Validation Results**:

      - **If all items pass**: Mark checklist complete and proceed to step 6

      - **If items fail (excluding [NEEDS CLARIFICATION])**:
        1. List the failing items and specific issues
        2. Update the spec to address each issue
        3. Re-run validation until all items pass (max 3 iterations)
        4. If still failing after 3 iterations, document remaining issues in checklist notes and warn user

      - **If [NEEDS CLARIFICATION] markers remain**:
        1. Extract all [NEEDS CLARIFICATION: ...] markers from the spec
        2. **LIMIT CHECK**: If more than 3 routine markers exist (policy decisions and `confirm F-...` markers are not routine), keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest. Never guess policy decisions or the confirmation of a finding: they keep their markers, and the spec is not ready until they are resolved
        3. For each clarification needed (max 3), present options to user in this format:

           ```markdown
           ## Question [N]: [Topic]

           **Context**: [Quote relevant spec section]

           **What we need to know**: [Specific question from NEEDS CLARIFICATION marker]

           **Suggested Answers**:

           | Option | Answer | Implications |
           |--------|--------|--------------|
           | A      | [First suggested answer] | [What this means for the feature] |
           | B      | [Second suggested answer] | [What this means for the feature] |
           | C      | [Third suggested answer] | [What this means for the feature] |
           | Custom | Provide your own answer | [Explain how to provide custom input] |

           **Your choice**: _[Wait for user response]_
           ```

        4. **CRITICAL - Table Formatting**: Ensure markdown tables are properly formatted:
           - Use consistent spacing with pipes aligned
           - Each cell should have spaces around content: `| Content |` not `|Content|`
           - Header separator must have at least 3 dashes: `|--------|`
           - Test that the table renders correctly in markdown preview
        5. Number questions sequentially (Q1, Q2, Q3 - max 3 total)
        6. Present all questions together before waiting for responses
        7. Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
        8. Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
        9. Re-run validation after all clarifications are resolved

   d. **Update Checklist**: After each validation iteration, update the checklist file with current pass/fail status

7. **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.

8. Report completion with spec file path, checklist results, and any potentially stale diagram paths.

9. **Idea record: 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 SPEC_FILE and `FEATURE_DIR/checklists/requirements.md` as project-relative paths. Where the tool is not available, run `akka specify run close --run <id> --outcome ok` with one `--file <path>` for each output. On an error, print its message; the spec already written stands. 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>/`.

10. **Idea record: end waiting for the owner's approval.** When a run was opened, the spec now waits for the owner's approval before the next station runs, in either mode. Say so, and say how to give it: on the idea in the console's Ideas page, or `akka specify idea approve <idea> spec`, where `<idea>` is the idea the run start returned. Do not carry out `/akka:plan` or any later station. Name the next command for after the approval (`/akka:clarify` or `/akka:plan`) and stop. Without a run, name the next command and stop.

11. **On a run that keeps no record (a CLI that predates the idea record, or no shell with `console: false`), the next step depends on the mode, exactly as before the idea record.** Run `akka specify mode` and read it.

   - **À la carte** — recommend the next command (`/akka:clarify` or
     `/akka:plan`) and stop. The developer drives.
   - **Enforced** — do not name a command the engine sequences. Those steps are
     refused when a person invokes them, so recommending one hands the developer
     a dead end. Carry out the sequence yourself instead, in order, following each
     command's own instructions from this same conversation: plan, tasks,
     implement, build, conform. You are the engine while you do this, so each
     step's opening gate check is run with `--as-engine`; without it the step
     refuses itself and the sequence stops at its first line. Stop when a step
     reports something only a person can settle, and say what it is. A finding
     that needs confirming is settled with `/akka:discover <topic> confirm`, which
     enforcement leaves to the person.

## General Guidelines

## Quick Guidelines

- Focus on **WHAT** users need and **WHY**.
- Avoid HOW to implement (no tech stack, APIs, code structure).
- Written for business stakeholders, not developers.
- DO NOT create any checklists that are embedded in the spec. That will be a separate command.

### Section Requirements

- **Mandatory sections**: Must be completed for every feature
- **Optional sections**: Include only when relevant to the feature
- When a section doesn't apply, remove it entirely (don't leave as "N/A")

### For AI Generation

When creating this spec from a user prompt:

1. **Make informed guesses**: Use context, industry standards, and common patterns to fill gaps
2. **Document assumptions**: Record reasonable defaults in the Assumptions section
3. **Limit clarifications**: Maximum 3 [NEEDS CLARIFICATION] markers for routine details, not counting policy decisions or `confirm F-...` markers, which are never guessed - use only for critical decisions that:
   - Significantly impact feature scope or user experience
   - Have multiple reasonable interpretations with different implications
   - Lack any reasonable default
4. **Prioritize clarifications**: scope > security/privacy > user experience > technical details
5. **Think like a tester**: Every vague requirement should fail the "testable and unambiguous" checklist item
6. **Common areas needing clarification** (only if no reasonable default exists):
   - Feature scope and boundaries (include/exclude specific use cases)
   - User types and roles (if multiple conflicting interpretations possible)
   - Security/compliance requirements (when legally/financially significant)

**Examples of reasonable defaults** (don't ask about these):

- Performance targets: Standard web/mobile app expectations unless specified
- Error handling: User-friendly messages with appropriate fallbacks
- Authentication method: Standard session-based or OAuth2 for web apps
- Integration patterns: Use project-appropriate patterns (REST/GraphQL for web services, function calls for libraries, CLI args for tools, etc.)

**Policy decisions are not reasonable defaults.** Do not invent consequential thresholds, access permissions, retention periods, sensitive-data rules, or approval requirements. Reuse established requirements when available; otherwise mark each with [NEEDS CLARIFICATION]. These markers are not capped at 3: ask up to 3 here and leave the rest for `/akka:clarify`. A spec with open policy markers is not ready for `/akka:plan`.

### Agent behavior, protection, and evaluation requirements

Apply this guidance only when the feature involves agents or model-generated behavior. Use the description, existing service requirements, policies, and configuration to answer these questions first; ask only where a missing decision affects scope or acceptance. Do not add controls or a governance workflow merely because an agent exists.

- **Enforcement boundaries**: Identify what must be checked before sending input to a model, executing a tool, or delivering a reply. State whether a violation blocks the operation, transforms data, or is recorded for review. Define behavior when the check fails to run or cannot reach a decision. Where a classifier informs the check, define the meaning of labels or scores, the decision criteria, and handling of uncertainty, invalid output, or classifier failure; distinguish the classification signal from the action taken on it.
- **Streaming**: Establish whether replies must stream immediately or pass a complete-response check before delivery. Surface conflicting requirements: a check after delivery cannot prevent disclosure of content already streamed.
- **Sensitive data**: Identify the data to protect, the agents in scope, and the relevant destinations: model input, tool results, logs, or external responses. Specify the required transformation or restriction for each; do not assume one sanitizer covers every boundary or historical records.
- **Retrospective evaluation**: Define the quality criteria, which interactions to assess, whether failed interactions are included, the required coverage or sampling, and the expected response to adverse findings. An assessment after completion cannot prevent the action it assesses. Define which decisions and assessments must be traceable, with the identifiers, policy/model versions, and outcomes needed for investigation, subject to the data-handling requirements.
- **Access control**: Establish which users, services, and components may invoke each operation. Distinguish component identity, end-user permissions, and tool authorization, including resource and purpose restrictions where required.

Keep requirements focused on observable behavior and free of Akka SDK interfaces or component names. Record constraints stated by the user (existing implementations, required Akka SDK version) under Assumptions (add the section if the template lacks one); `/akka:plan` selects the mechanisms.

### Success Criteria Guidelines

Success criteria must be:

1. **Measurable**: Include specific metrics (time, percentage, count, rate)
2. **Technology-agnostic**: No mention of frameworks, languages, databases, or tools
3. **User-focused**: Describe outcomes from user/business perspective, not system internals
4. **Verifiable**: Can be tested/validated without knowing implementation details

For probabilistic model behavior, define acceptance over an agreed, representative dataset with repeated trials, measurable error limits, and a stated aggregation rule. Include adverse and uncertain cases where relevant. Use stakeholder-approved targets; one passing example or a model's self-reported confidence does not establish quality. Leave the choice of verification tooling to Plan.

**Good examples**:

- "Users can complete checkout in under 3 minutes"
- "System supports 10,000 concurrent users"
- "95% of searches return results in under 1 second"
- "Task completion rate improves by 40%"
- "Across the 200-case approved support dataset, run 5 times each, fewer than 1% of replies are harmful and at least 95% of benign requests are answered"

**Bad examples** (implementation-focused):

- "API response time is under 200ms" (too technical, use "Users see results instantly")
- "Database can handle 1000 TPS" (implementation detail, use user-facing metric)
- "React components render efficiently" (framework-specific)
- "Redis cache hit rate above 80%" (technology-specific)

## Exit conditions and the feedback loop

Akka Specify turns requirements into machine-checked **exit conditions**, each backed by a **check** that delegates to the ecosystem's own tooling. In Enforced mode the engine will not let the build advance until every check passes and has been reviewed. In À la carte mode every check is advisory — the user always sees the full picture and the run never blocks on a failing condition.

**The discovery gates run whenever there is a `discovery/` folder.** In a project with one, the seven discovery gates (`PROC-FINDINGS-CONFIRMED`, `PROC-SPEC-CITES-FINDINGS`, `PROC-UNDERSTANDING-SETTLED`, `PROC-MOCKS-APPROVED`, `PROC-BASELINE-RECORDED`, `PROC-MODEL-PLAN-PRESENT` and `PROC-FINDINGS-PROBE-RAN`) are evaluated in every mode, including a new project's default, by an akka CLI that scopes them in for a `discovery/` folder. The Story conditions (`STORY-CONCEPTS-VISUAL` and `STORY-CITES-CONFIRMED`) are not among them: they are evaluated only when the project turns them on. After writing the spec, run `akka specify conform` and fix any discovery gate that is red before recommending `/akka:plan`. An older CLI leaves the gates out in À la carte mode unless exit conditions are honoured, and then reports READY_TO_SHIP without them. So check that the output lists the discovery gate rows (`PROC-FINDINGS-CONFIRMED`, `PROC-SPEC-CITES-FINDINGS` and the other `PROC-` discovery gates). If it does not, say plainly that the discovery gates were not evaluated, and do not treat the verdict as passing them. In a project without `discovery/` they report not applicable.

**Check next whether the rest of this loop applies.** Run `akka specify mode`. In À la carte mode the rest of the exit-condition set is dormant until the developer asks for it, and the rest of this section is then **skipped**: capture nothing, create no auditors, call no `akka_ec_*` tool, and report no verdict beyond the discovery gates. Treat `/akka:specify` as spec-and-plan work and nothing more. The dormant state is not a gap to close and not something to talk the user into — mention exit conditions only if they ask what else is available, and never more than once. If the developer does ask for checks, run `akka specify mode a-la-carte --exit-conditions=honor` and then follow this loop with every result advisory.

When the set is active, on each `/akka:specify <feedback>` turn:

### 1. Capture feedback as exit conditions

For each requirement the feedback expresses:

1. **Classify** — an answer to an open decision (set the value in an existing condition), a new checkable invariant (a new exit condition), a revealed-inadequate check (tighten it), or a one-off/subjective item (do the task, or ask — do not invent a check).
2. **Falsifiability gate** — only create an exit condition if you can state a *binary* pass predicate that is FALSE exactly when the requirement is violated, over an observable signal. If you cannot, ask a clarifying question instead of inventing a meaningless check.
3. **Define the condition** — id, tier, dod_type, a one-line invariant, and how it is checked.
4. **Choose the check by delegation** — prefer the tool that already decides this (`tsc --noEmit`, `mvn compile`/`test`, `go build`, a linter). Author it as a declarative command: `{run: [...], applies_to: {requirement, module}}`. Write bespoke logic only when no tool observes the invariant.
5. **Must not** — do not create a check that always passes, that could pass while the invariant is false, that is subjective without a probe, that is over-broad, or that duplicates an existing condition.
6. Record it with `akka_ec_capture` (the condition as JSON). The check will not run until the human approves it.

### 2. Surface the exit conditions for the human, at the exit-condition level

Present the new/changed exit conditions in plain language — *"I'd like to add these exit conditions,"* each with a one-line description and **how I'll check it** — and ask the human to approve / adjust / skip. Never phrase this as "approve running a command"; it is always about the checks. When the human approves, call `akka_ec_approve` with the condition id.

### 3. Review the checks adversarially

Before finishing a turn (and always before ship), for each check attempt to construct an input where **the check passes while its invariant is false**. If you can, the check is inadequate — fix it or ask. Then call `akka_ec_adequacy_submit` to record the review for the current checks.

### 4. Report plainly

After any feedback, call `akka_ec_conform`, then present `akka_ec_summary` to the user **verbatim** — it is the plain outcome (decisions needed / building / ready). Do NOT restate internal condition ids, check keys, or the words "auditor" / "coverage gate" / "adequacy review". Offer *"say 'show details' for the full checklist"* for the manifest.

### Routing and mode

Once a build is active, treat every reply as feedback and run this loop — the user does not need to prefix `/akka:specify` each time. The gates are state-based, so a reply that is not recorded simply does not advance the build and the pending item re-surfaces (a stall, never a false pass). This capture-and-review logic is identical wherever the exit-condition set is active; Enforced mode additionally blocks on the gates. Where the set is dormant the loop does not run at all, so there are no gates to stall on.

### Companion generators

Two surfaces beyond code have their own generator commands, each paired with an exit-condition family the engine verifies:

- `/akka:harnesses` generates the enterprise-configuration assets (CI, scanning, supply-chain, content style packages) into `/harnesses/` and records them in `.akka/harnesses.lock`. Its family is activated / configured / attested.
- `/akka:docs` generates the rendered documentation under `docs/`. Its family is language, structure, completeness, and tone.

Generation runs in the assistant; the engine detects the surfaces, verifies deterministically, and records the attestations the assistant submits. Both follow the same mode invariant — advisory where the exit-condition set is active in À la carte, blocking in Enforced — so a coverage gap in a harness or a page reds the same single gate as an uncovered code module. Both generators still run while the set is dormant; they simply produce no conditions and no gate.

## Done When

- [ ] The mode was read before any `akka_ec_*` call, and where the exit-condition set was dormant nothing was captured, approved or audited beyond the discovery gates.
- [ ] Where the set was active: any checkable requirement in the feedback was captured as an exit condition + check via `akka_ec_capture`, surfaced for approval at the exit-condition level, and approved via `akka_ec_approve`.
- [ ] Where the set was active: the active checks were reviewed adversarially and `akka_ec_adequacy_submit` was called; the plain `akka_ec_summary` (never internal ids) was shown to the user.
- [ ] A short-name and next feature number were derived from `akka_sdd_list_specs` (and, with no idea record, the remote and local branches); the highest existing N was used and N+1 was passed to `akka_sdd_create_spec`.
- [ ] A refused run stopped the command before `akka_sdd_create_spec` ran, so no spec folder was created.
- [ ] `akka_sdd_create_spec` ran in step 2f, after the run was opened or with none recorded, and created a numbered FEATURE_DIR and returned SPEC_FILE.
- [ ] The specification was written to SPEC_FILE using the template structure, with all mandatory sections filled and section order preserved.
- [ ] Success Criteria are measurable, technology-agnostic, user-focused, and verifiable.
- [ ] With a `discovery/` folder, the `**User Interface**` and `**Modernization**` header markers are set to yes or no; without one, both are `no`.
- [ ] Where the project has a `discovery/` folder, every functional requirement bullet cites at least one confirmed finding by its identifier, such as `[F-PAY-3]`, and `akka specify conform` lists the discovery gates with none red, or the report says they were not evaluated.
- [ ] The Traceability table has one row for every FR and SC, each with a source and a test (short form without `discovery/`).
- [ ] Every requirement that is not a decision carries its origin and rung; where the spec is a modernization in a project with `discovery/`, every functional requirement and success criterion carries an annotation, each observed one cites its `F-<CODE>-<n>` finding, and `PROJ-PROVENANCE-DECLARED` was switched on with `akka specify conditions author`.
- [ ] No more than 3 `[NEEDS CLARIFICATION]` markers for routine details remain (surplus resolved by informed guesses documented in Assumptions); no policy decision or finding confirmation was guessed, and open ones remain as markers.
- [ ] `FEATURE_DIR/checklists/requirements.md` was created and every non-`[NEEDS CLARIFICATION]` item passes (or the user was warned after 3 failed iterations).
- [ ] 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.
- [ ] Completion was reported with spec file path and checklist results.
- [ ] With the idea record, the run was opened before the spec folder was created, against a new idea started with `--spec` or the continued topic's idea linked to the spec, and closed with `akka_run_close` naming the spec and its checklist; or the CLI was reported as predating the idea record.
- [ ] With a run, the command ended waiting for the owner's approval of the spec, with no later station carried out and the next command named. With a CLI that predates the idea record, the mode was read and the next step matched it: a recommendation in À la carte, and the sequence carried out here in Enforced, with no command named that the gate would refuse.

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 development →

Comments

Loading comments…

Newsletter

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