speckit.spex.submit

speckit.spex.submit is a command for coding agents from rhuss/cc-spex. It costs 15 tokens per session (6,194 once invoked), scanned A, original, Apache-2.0.

A command that sends your committed code to the shared repository and opens a pull request for team review. With watch mode, it continues checking the pull request's automated checks after creation.

In plain words
What is it for?
Use it when you are ready to publish a branch, create a pull request, and optionally monitor its CI results.
Why use it?
It puts the usual push-and-request-review steps in one repeatable workflow. Watching helps you notice whether continuous integration, the automated build and test system, passes or fails.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/rhuss/cc-spex/speckit.spex.submit
Clone the repo
git clone --depth 1 https://github.com/rhuss/cc-spex

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for speckit.spex.submit

README.md
[![agentmods](https://agentmods.dev/badge/commands/rhuss/cc-spex/speckit.spex.submit.svg)](https://agentmods.dev/commands/rhuss/cc-spex/speckit.spex.submit)
Your own site
<a href="https://agentmods.dev/commands/rhuss/cc-spex/speckit.spex.submit"><img src="https://agentmods.dev/badge/commands/rhuss/cc-spex/speckit.spex.submit.svg" alt="Measured on agentmods" height="20"></a>
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,194 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.06194
Opus 5 $0.00008 $0.03097
Sonnet 5 $0.00003 $0.01239
Haiku 4.5 $0.00002 $0.00619

Measured 5d ago against content hash d1024fe7d5e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

speckit.spex.submit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

specs/038-neutral-command-vocab/pre-rewrite-snapshot/spex/commands/speckit.spex.submit.md · 637 lines

How it starts

The opening of the file, as written. The whole thing — 637 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Submit - Push and Create PR for Team Review

Ship Pipeline Guard

If .specify/.spex-state exists and its status is running, this command is part of an autonomous pipeline. Check the ask field:

AUTONOMOUS_MODE=false
if [ -f ".specify/.spex-state" ]; then
  STATUS=$(jq -r '.status // empty' .specify/.spex-state 2>/dev/null)
  ASK=$(jq -r '.ask // "always"' .specify/.spex-state 2>/dev/null)
  if [ "$STATUS" = "running" ] && [ "$ASK" != "always" ]; then
    AUTONOMOUS_MODE=true
  fi
fi

In autonomous mode: suppress all interactive prompts.

Argument Parsing

Parse the following flags from arguments:

  • If --watch is passed, set WATCH_MODE=true. After PR creation/push, enter a monitoring loop instead of exiting.
WATCH_MODE=false
for arg in "$@"; do
  case "$arg" in
    --watch) WATCH_MODE=true ;;
  esac
done

Watch Mode Configuration

When WATCH_MODE is true, read watch configuration from .specify/extensions/spex/spex-config.yml:

if [ "$WATCH_MODE" = true ]; then
  SPEX_CONFIG=".specify/extensions/spex/spex-config.yml"
  WATCH_TIMEOUT=$(yq -r '.watch.timeout_minutes // 30' "$SPEX_CONFIG" 2>/dev/null)
  WATCH_TIMEOUT=${WATCH_TIMEOUT:-30}
  WATCH_INTERVAL=$(yq -r '.watch.poll_interval_seconds // 60' "$SPEX_CONFIG" 2>/dev/null)
  WATCH_INTERVAL=${WATCH_INTERVAL:-60}
fi

Prerequisites

Verify gh CLI

if ! command -v gh >/dev/null 2>&1; then
  echo "ERROR: The gh CLI is required for PR operations. Install it from https://cli.github.com/"
  # STOP
fi

Verify not on default branch

DEFAULT_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main")
CURRENT_BRANCH=$(git branch --show-current)
if [ "$CURRENT_BRANCH" = "$DEFAULT_BRANCH" ]; then
  echo "ERROR: Cannot submit from the default branch. Switch to a feature branch first."
  # STOP
fi

Pre-Execution Hooks

Check for extension hooks (before submit):

  • Check if .specify/extensions.yml exists in the project root.
  • If it exists, read it and look for entries under the hooks.before_submit key
  • If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, or it is null/empty, treat the hook as executable
    • If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation
  • Convert hook command names from dot notation to hyphen notation for slash command invocation (e.g., speckit.spex.flow-state becomes /speckit-spex-flow-state)
  • Determine prompt behavior based on autonomous mode: when .specify/.spex-state exists with ask of smart or never, optional hooks execute without prompting (treated as mandatory). When ask is "always" or no state file exists, optional hooks prompt as normal.
  • For each executable hook, output the following based on its optional flag:
    • Optional hook (optional: true) in interactive mode:
      ## Extension Hooks
      
      **Optional Pre-Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`
      
    • Optional hook (optional: true) in autonomous mode (ask is smart or never): Treat as mandatory (auto-execute without prompting).
    • Mandatory hook (optional: false):
      ## Extension Hooks
      
      **Automatic Pre-Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
      
      Wait for the result of the hook command before proceeding to Phase 1 Verification.
      
    • If a mandatory hook fails or is declined by the user, STOP. Output an error message indicating which hook failed and do NOT proceed to Phase 1 Verification.
  • If no hooks are registered or .specify/extensions.yml does not exist, skip silently

Read the full file on GitHub · 637 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 637 lines · 15 tokens per session scan A d1024fe7d5e9

Subscribe to this mod's changes

speckit.spex.submit is a command published in the GitHub repository rhuss/cc-spex (114 stars, last pushed 16d ago), licensed Apache-2.0. It adds 15 tokens to every session and 6,194 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.