Skip to content

chore: bootstrap .specify/ from iklo reference (#39 T4) - #44

Open
owkwo-bot wants to merge 1 commit into
mainfrom
issue-39-t4-specify-bootstrap
Open

chore: bootstrap .specify/ from iklo reference (#39 T4)#44
owkwo-bot wants to merge 1 commit into
mainfrom
issue-39-t4-specify-bootstrap

Conversation

@owkwo-bot

@owkwo-bot owkwo-bot commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

T4 (last) of #39 (chore: adopt repo-standard, stage=in-progress): bootstraps .specify/ from ~/REPO/ME/iklo/.specify/, the reference implementation the repo-standard design doc names for the in-progress tier.

  • templates/, scripts/bash/, workflows/, integrations/ are copied verbatim -- verified byte-identical via a per-directory diff -rq against iklo's tree. Nothing guiltty-specific to adapt there.
  • .specify/memory/constitution.md is authored fresh: six principles derived from docs/spec.md's Boundaries section, plus a Workflow section describing this repo's actual pull-request-process/map-issue-to-tasks/fix-mapped-issue shipping flow (predates .specify/, stays as-is -- spec-kit is additive).
  • Deliberately not copied: iklo's root-level init-options.json/integration.json (speckit's own generated tool-state, outside T4's defined directory-shape scope).
  • Skimmed the vendored scripts for tool dependencies -- they all degrade gracefully (jqpython3 → text/awk fallback), so mise.toml is untouched. Flagging jq as an optional-robustness follow-up rather than adding it unilaterally.

Merge-order note: T1/T2/T3 (repo.toml, AGENTS.md, specs/) are still open as of this PR. The constitution references AGENTS.md and specs/decisions/ by name/path only, not as live markdown links, since it can't assume those PRs land first -- avoiding exactly the dead-link problem its own Principle VI ("docs that contradict reality are bugs") warns against. Once all four PRs are merged those references will actually resolve; no further edit needed at that point since they're plain-text mentions already.

Test plan

  • diff -rq per copied directory against iklo's .specify/ -- byte-identical
  • Executable bit preserved on the 5 .sh scripts (verified in the commit's 100755 modes)
  • constitution.md read end-to-end and fact-checked against docs/spec.md, docs/spec-ci.md, and the real crate tree -- no leftover iklo content, no stale claims
  • Independently reviewed via pr-review-toolkit:review-pr -- caught and fixed the AGENTS.md/specs/decisions/ dead-link risk described above

Part of #39. This is the last of the four T1-T4 tasks in tasks/issue-39-chore-adopt-repo-standard-stage-in-progress.md.

🧙 Built with WOZCODE

Summary by Sourcery

Bootstrap the spec-kit .specify/ directory into the repo, adding core scripts, templates, workflows, and a project-specific constitution to support Spec-Driven Development workflows.

Enhancements:

  • Add shared bash utilities and setup scripts for creating features, plans, tasks, and prerequisite checks within the spec-kit workflow.
  • Introduce reusable markdown templates for specifications, implementation plans, task lists, constitutions, and checklists to standardize feature documentation.
  • Register a speckit workflow definition and workflow registry entries to orchestrate the end-to-end specify → plan → tasks → implement cycle.
  • Define a repo-specific constitution capturing architectural principles, development constraints, workflow, and governance for future spec-kit usage.

Summary by cubic

Bootstraps .specify/ from the iklo reference and adds a repo-specific constitution to adopt the in-progress repo-standard tier. This enables spec-kit templates, scripts, and workflows without changing the current PR/issue process.

  • New Features

    • Added .specify/ with templates/, scripts/bash/, workflows/, and integrations/ (byte-identical to iklo).
    • Added .specify/memory/constitution.md with six principles and the repo’s workflow/governance.
    • Bundled workflow registry and manifests for copilot and speckit.
    • Excluded root init-options.json and integration.json.
  • Migration

    • No new required deps; scripts degrade gracefully (jqpython3 → text/awk); mise.toml unchanged.
    • Merge order: references to AGENTS.md and specs/decisions/ are plain text until T1–T3 merge.
    • Use the bundled speckit flow: /speckit.specify/speckit.plan/speckit.tasks/speckit.implement.

Written for commit 25e5ae0. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added a complete Speckit workflow covering specification, review, planning, task creation, and implementation with approval checkpoints.
    • Added commands for creating features, preparing plans, setting up tasks, and validating prerequisites.
    • Added JSON and human-readable output options for workflow utilities.
    • Added customizable templates for specifications, plans, tasks, checklists, and project constitutions.
    • Added support for project-specific template overrides and workflow integrations.
  • Documentation

    • Added project governance and development guidelines through a configurable constitution.

T4 of issue #39: adds .specify/ (memory/, templates/, scripts/bash/,
workflows/, integrations/), the last piece of the in-progress repo-
standard tier.

templates/, scripts/bash/, workflows/, and integrations/ are copied
verbatim from ~/REPO/ME/iklo/.specify/ (verified byte-identical via
per-directory diff) -- project-agnostic spec-kit tooling, nothing
guiltty-specific to adapt. Deliberately not copied: iklo's root-level
init-options.json/integration.json, speckit's own generated tool-state
bookkeeping, outside T4's defined directory-shape scope.

.specify/memory/constitution.md is authored fresh for guiltty: six
principles derived from docs/spec.md's Boundaries section (backend-
agnostic core, no panics on recoverable paths, ask-first on new deps,
test-first, pre-1.0 breaking changes must be called out not silent,
doc staleness is a bug) plus a Workflow section describing this repo's
actual pull-request-process/map-issue-to-tasks/fix-mapped-issue
shipping flow (predates .specify/, stays as-is -- spec-kit is additive,
not a replacement).

Skimmed .specify/scripts/bash/*.sh for tool dependencies: all of them
already degrade gracefully (jq -> python3 -> text/awk fallback) rather
than hard-requiring anything, so mise.toml is untouched; jq noted as an
optional-robustness follow-up in the PR description instead.

T1-T3 (repo.toml, AGENTS.md, specs/) are still open PRs at the time of
this commit, so the constitution avoids asserting live links to
AGENTS.md/specs/decisions/ that could 404 depending on merge order --
named by path instead, per its own Principle VI.

Independently re-verified via pr-review-toolkit:review-pr before
pushing; caught and fixed exactly that dead-link risk.

Co-Authored-By: WOZCODE <contact@withwoz.com>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@sourcery-ai

sourcery-ai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Reviewer's Guide

Bootstraps the repo-standard Spec Kit structure under .specify/ by copying core templates/scripts/workflows from the iklo reference implementation, adding a guiltty-specific constitution, and wiring Bash helpers and templates that drive the /speckit.* feature workflow (specify → plan → tasks → implement).

Sequence diagram for the speckit full SDD workflow

sequenceDiagram
    actor Developer
    participant speckit_workflow as speckit_workflow.yml
    participant specify_cmd as speckit.specify
    participant plan_cmd as speckit.plan
    participant tasks_cmd as speckit.tasks
    participant implement_cmd as speckit.implement

    Developer->>speckit_workflow: start speckit workflow
    speckit_workflow->>specify_cmd: speckit.specify (inputs.spec)
    speckit_workflow-->>Developer: review-spec gate
    alt approve
        speckit_workflow->>plan_cmd: speckit.plan (inputs.spec)
        speckit_workflow-->>Developer: review-plan gate
        alt approve
            speckit_workflow->>tasks_cmd: speckit.tasks (inputs.spec)
            speckit_workflow->>implement_cmd: speckit.implement (inputs.spec)
        else reject
            speckit_workflow-->>Developer: abort workflow (plan rejected)
        end
    else reject
        speckit_workflow-->>Developer: abort workflow (spec rejected)
    end
Loading

Sequence diagram for Bash feature path resolution and tasks setup

sequenceDiagram
    participant create_feature as create-new-feature.sh
    participant setup_plan as setup-plan.sh
    participant setup_tasks as setup-tasks.sh
    participant check_prereq as check-prerequisites.sh
    participant common_sh as common.sh

    create_feature->>common_sh: get_repo_root
    common_sh->>common_sh: find_specify_root / resolve_specify_init_dir
    create_feature->>common_sh: resolve_template(spec-template)
    create_feature->>common_sh: _persist_feature_json(REPO_ROOT, FEATURE_DIR)

    setup_plan->>common_sh: get_feature_paths
    setup_plan->>common_sh: resolve_template(plan-template)

    setup_tasks->>common_sh: get_feature_paths
    setup_tasks->>common_sh: resolve_template(tasks-template)

    check_prereq->>common_sh: get_feature_paths(--no-persist)
    check_prereq->>common_sh: has_jq
    check_prereq-->>check_prereq: validate plan.md / tasks.md / optional docs
Loading

File-Level Changes

Change Details Files
Introduce shared Spec Kit Bash utilities and feature-path resolution used by all speckit commands.
  • Add common.sh with repo-root discovery, feature directory resolution and persistence, JSON helpers, template resolution and composition, and integration invoke-separator parsing with jq/python/awk fallbacks.
  • Provide get_feature_paths() to centralize REPO_ROOT/CURRENT_BRANCH/FEATURE_DIR and doc-path exports, including SPECIFY_FEATURE_DIRECTORY and feature.json handling.
  • Add helpers for resolving speckit command formatting and basic file/dir existence checks used by other scripts.
.specify/scripts/bash/common.sh
Add CLI script to create new feature branches and spec directories under specs/, aligned with Spec Kit conventions.
  • Parse CLI flags for JSON output, dry-run, existing-branch reuse, short-name override, explicit number, and timestamp mode.
  • Generate sanitized branch names from feature descriptions with stop-word filtering, acronym handling, and GitHub’s 244-byte limit enforcement.
  • Create specs/<###-slug>/ directories and seed spec.md from spec-template, persisting feature.json and emitting shell export hints; support JSON/plain outputs with jq fallback.
.specify/scripts/bash/create-new-feature.sh
Add scripts to set up plan.md, tasks.md prerequisites and report available feature docs.
  • Implement check-prerequisites.sh to resolve feature paths (with optional non-persist mode), validate plan.md/tasks.md presence based on flags, and emit available docs list in text/JSON formats.
  • Implement setup-plan.sh to copy plan-template into plan.md if missing, using resolve_template and emitting basic path metadata.
  • Implement setup-tasks.sh to resolve tasks-template through the override stack, validate spec/plan presence, and report available docs and chosen template in text/JSON formats.
.specify/scripts/bash/check-prerequisites.sh
.specify/scripts/bash/setup-plan.sh
.specify/scripts/bash/setup-tasks.sh
Bootstrap core Spec Kit markdown templates for specs, plans, tasks, constitutions, and checklists.
  • Add spec-template.md describing user-story-first, prioritized, independently-testable specs with acceptance scenarios, requirements, success criteria, and assumptions placeholders.
  • Add plan-template.md documenting implementation plan structure, technical context fields, project structure variants, and complexity tracking aligned with SDD workflow.
  • Add tasks-template.md describing phase- and user-story-organized task lists, parallelism markers, and execution order guidance.
  • Add constitution-template.md and checklist-template.md as generic scaffolds for project constitutions and checklists to be filled by speckit commands.
.specify/templates/spec-template.md
.specify/templates/plan-template.md
.specify/templates/tasks-template.md
.specify/templates/constitution-template.md
.specify/templates/checklist-template.md
Define guiltty-specific constitution and governance for Spec Kit usage and repo constraints.
  • Author .specify/memory/constitution.md with six principles (backend-agnostic core, error-handling, dependency policy, test-first, explicit breaking changes, docs-as-bugs), Rust/tooling constraints, and workflow/governance sections.
  • Reference existing docs (docs/spec.md, docs/spec-ci.md, docs/design/*), AGENTS.md, and specs/decisions/ as ADR locations without hard markdown links to avoid dead-link risk before other chore: adopt repo-standard (stage=in-progress) #39 tasks land.
.specify/memory/constitution.md
Register Spec Kit workflows and integration manifests for this repo.
  • Add speckit workflow.yml describing the full SDD cycle (specify → review → plan → review → tasks → implement) with integration auto-selection and inputs for spec text and scope.
  • Introduce workflow-registry.json stub for registering workflows (content not shown in diff but file created).
  • Add empty integration manifest JSON files for Copilot and Speckit to be filled by the Spec Kit engine, enabling integration discovery.
.specify/workflows/speckit/workflow.yml
.specify/workflows/workflow-registry.json
.specify/integrations/copilot.manifest.json
.specify/integrations/speckit.manifest.json

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

owkwo-bot has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The PR adds the .specify foundation for Spec-Driven Development. It includes shared Bash utilities, feature lifecycle scripts, Markdown templates, repository governance, integration manifests, and a Speckit workflow with review gates.

Changes

Spec-Driven Development Bootstrap

Layer / File(s) Summary
Repository rules and shared runtime
.specify/memory/constitution.md, .specify/scripts/bash/common.sh
Defines repository development rules and shared functions for feature state, paths, JSON handling, integration commands, and layered templates.
Feature creation and specification
.specify/scripts/bash/create-new-feature.sh, .specify/templates/spec-template.md
Creates feature directories and specifications with naming, numbering, collision, dry-run, persistence, and output support.
Plan and task setup
.specify/scripts/bash/setup-plan.sh, .specify/scripts/bash/setup-tasks.sh, .specify/templates/*
Adds plan and task setup commands and templates for phased implementation, checklists, testing, dependencies, and parallel execution.
Prerequisite validation
.specify/scripts/bash/check-prerequisites.sh
Validates feature inputs and reports available documents in text or JSON format.
Speckit workflow registration and integration metadata
.specify/workflows/*, .specify/integrations/*
Registers the Speckit workflow, defines its inputs and approval gates, and records integration metadata and checksums.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Developer
  participant SpeckitWorkflow
  participant Specify
  participant Review
  participant Plan
  participant Tasks
  participant Implement
  Developer->>SpeckitWorkflow: Submit specification and scope
  SpeckitWorkflow->>Specify: Generate specification
  Specify-->>Review: Return specification
  Review-->>SpeckitWorkflow: Approve specification
  SpeckitWorkflow->>Plan: Generate implementation plan
  Plan-->>Review: Return plan
  Review-->>SpeckitWorkflow: Approve plan
  SpeckitWorkflow->>Tasks: Generate tasks
  Tasks-->>Implement: Provide task list
  Implement-->>Developer: Execute implementation
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: bootstrapping the .specify/ directory from the iklo reference.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch issue-39-t4-specify-bootstrap

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 2 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path=".specify/scripts/bash/create-new-feature.sh" line_range="218-227" />
<code_context>
+MAX_BRANCH_LENGTH=244
</code_context>
<issue_to_address>
**issue (bug_risk):** Branch length check uses character count instead of byte count, which can exceed GitHub’s 244-byte limit with non-ASCII names.

Please compute the branch name length in bytes rather than characters, e.g.:

```sh
LC_ALL=C
len=$(printf '%s' "$BRANCH_NAME" | wc -c)
```

Then use `len` for the limit check and any “[] bytes” messaging, so the validation and diagnostics match GitHub’s 244-byte constraint for UTF‑8 names.
</issue_to_address>

### Comment 2
<location path=".specify/templates/tasks-template.md" line_range="66" />
<code_context>
+
+Examples of foundational tasks (adjust based on your project):
+
+- [ ] T004 Setup database schema and migrations framework
+- [ ] T005 [P] Implement authentication/authorization framework
+- [ ] T006 [P] Setup API routing and middleware structure
</code_context>
<issue_to_address>
**nitpick (typo):** Use "set up" instead of "setup" when it functions as a verb phrase.

This applies to checklist items like "T004 Setup database schema..." and "T006 Setup API routing...", where "setup" is used as a verb. Please update these to "Set up" to match standard usage and keep the template grammatically consistent.

Suggested implementation:

```
- [ ] T004 Set up database schema and migrations framework

```

```
- [ ] T006 [P] Set up API routing and middleware structure

```

```
- [ ] T009 Set up environment configuration management

```
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines +218 to +227
MAX_BRANCH_LENGTH=244
if [ ${#BRANCH_NAME} -gt $MAX_BRANCH_LENGTH ]; then
# Calculate how much we need to trim from suffix
# Account for prefix length: timestamp (15) + hyphen (1) = 16, or sequential (3) + hyphen (1) = 4
PREFIX_LENGTH=$(( ${#FEATURE_NUM} + 1 ))
MAX_SUFFIX_LENGTH=$((MAX_BRANCH_LENGTH - PREFIX_LENGTH))

# Truncate suffix at word boundary if possible
TRUNCATED_SUFFIX=$(echo "$BRANCH_SUFFIX" | cut -c1-$MAX_SUFFIX_LENGTH)
# Remove trailing hyphen if truncation created one

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): Branch length check uses character count instead of byte count, which can exceed GitHub’s 244-byte limit with non-ASCII names.

Please compute the branch name length in bytes rather than characters, e.g.:

LC_ALL=C
len=$(printf '%s' "$BRANCH_NAME" | wc -c)

Then use len for the limit check and any “[…] bytes” messaging, so the validation and diagnostics match GitHub’s 244-byte constraint for UTF‑8 names.


Examples of foundational tasks (adjust based on your project):

- [ ] T004 Setup database schema and migrations framework

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick (typo): Use "set up" instead of "setup" when it functions as a verb phrase.

This applies to checklist items like "T004 Setup database schema..." and "T006 Setup API routing...", where "setup" is used as a verb. Please update these to "Set up" to match standard usage and keep the template grammatically consistent.

Suggested implementation:

- [ ] T004 Set up database schema and migrations framework

- [ ] T006 [P] Set up API routing and middleware structure

- [ ] T009 Set up environment configuration management

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.specify/scripts/bash/common.sh (1)

1-2: 📐 Maintainability & Code Quality | 🔵 Trivial

Keep .specify/scripts/bash/common.sh byte-identical.

Its SHA-256 matches .specify/integrations/speckit.manifest.json. ShellCheck reports only SC2155, SC2221, and SC2222. Report these warnings upstream instead of editing the vendored file.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.specify/scripts/bash/common.sh around lines 1 - 2, Do not modify
.specify/scripts/bash/common.sh; preserve it byte-identical, including the
existing ShellCheck SC2155, SC2221, and SC2222 warnings. Report those warnings
upstream instead of applying local edits.

Source: Linters/SAST tools

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.specify/templates/tasks-template.md:
- Line 10: Update the Prerequisites declaration in the tasks template so spec.md
is unconditionally required, removing the “required for user stories” qualifier
while preserving the other prerequisite entries.

In @.specify/workflows/speckit/workflow.yml:
- Around line 37-40: Address the unused scope input in the workflow definition:
either forward inputs.scope through the supported speckit.* command contract so
backend-only and frontend-only affect execution, or remove the scope declaration
until scoped execution is implemented. Ensure no misleading selectable values
remain without corresponding behavior.

---

Nitpick comments:
In @.specify/scripts/bash/common.sh:
- Around line 1-2: Do not modify .specify/scripts/bash/common.sh; preserve it
byte-identical, including the existing ShellCheck SC2155, SC2221, and SC2222
warnings. Report those warnings upstream instead of applying local edits.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 28f70726-4ece-4933-b8c5-5c9e4a2c4e7e

📥 Commits

Reviewing files that changed from the base of the PR and between 8cc5e85 and 25e5ae0.

📒 Files selected for processing (15)
  • .specify/integrations/copilot.manifest.json
  • .specify/integrations/speckit.manifest.json
  • .specify/memory/constitution.md
  • .specify/scripts/bash/check-prerequisites.sh
  • .specify/scripts/bash/common.sh
  • .specify/scripts/bash/create-new-feature.sh
  • .specify/scripts/bash/setup-plan.sh
  • .specify/scripts/bash/setup-tasks.sh
  • .specify/templates/checklist-template.md
  • .specify/templates/constitution-template.md
  • .specify/templates/plan-template.md
  • .specify/templates/spec-template.md
  • .specify/templates/tasks-template.md
  • .specify/workflows/speckit/workflow.yml
  • .specify/workflows/workflow-registry.json


**Input**: Design documents from `/specs/[###-feature-name]/`

**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Make spec.md an unconditional prerequisite.

.specify/scripts/bash/setup-tasks.sh exits when spec.md is absent, regardless of whether the feature contains user stories. The current wording advertises a story-less path that the script does not support.

Proposed wording
-**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
+**Prerequisites**: plan.md (required), spec.md (required), research.md, data-model.md, contracts/
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
**Prerequisites**: plan.md (required), spec.md (required), research.md, data-model.md, contracts/
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.specify/templates/tasks-template.md at line 10, Update the Prerequisites
declaration in the tasks template so spec.md is unconditionally required,
removing the “required for user stories” qualifier while preserving the other
prerequisite entries.

Comment on lines +37 to +40
scope:
type: string
default: "full"
enum: ["full", "backend-only", "frontend-only"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Forward or remove the unused scope input.

inputs.scope is declared on Lines 37-40, but no workflow step references it. Selecting backend-only or frontend-only therefore produces the same execution as full.

Pass scope through the supported speckit.* command contract, or remove the input until scoped execution is implemented.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.specify/workflows/speckit/workflow.yml around lines 37 - 40, Address the
unused scope input in the workflow definition: either forward inputs.scope
through the supported speckit.* command contract so backend-only and
frontend-only affect execution, or remove the scope declaration until scoped
execution is implemented. Ensure no misleading selectable values remain without
corresponding behavior.

@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

🔴 Issues 1 medium

Alerts:
⚠ 1 issue (≤ 0 issues of at least minor severity)

Results:
1 new issue

Category Results
Performance 1 medium

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

11 issues found across 15 files

Confidence score: 3/5

  • In .specify/scripts/bash/create-new-feature.sh, --number handling can overflow or crash on non-numeric input, producing wrong feature prefixes or opaque failures that can misroute generated work — validate digit-only input and enforce a supported numeric range before arithmetic.
  • .specify/scripts/bash/check-prerequisites.sh and .specify/scripts/bash/setup-plan.sh can report success when required inputs/templates are missing, which lets pipelines proceed with invalid state (including blank plan.md) and fail later in harder-to-debug ways — make both checks fail fast on missing spec.md/template artifacts.
  • In .specify/scripts/bash/common.sh, fallback parsing can treat null/non-string feature_directory values as literal directory names on jq/python-less systems, risking writes to unintended paths — only emit a value for quoted strings and otherwise return empty as documented.
  • Config/docs drift across .specify/integrations/copilot.manifest.json, .specify/memory/constitution.md, .specify/templates/tasks-template.md, and .specify/workflows/speckit/workflow.yml creates misleading guarantees (nonexistent hashed files, stale crate ownership, required-file wording mismatch, unused scope input) that can cause incorrect operator assumptions — reconcile these sources with current repository behavior and either wire up or remove unused workflow inputs.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".specify/scripts/bash/create-new-feature.sh">

<violation number="1" location=".specify/scripts/bash/create-new-feature.sh:212">
P3: When a user passes `--number` a non-numeric value (e.g. a typo), the script dies under `set -e` with bash's terse `value too great for base` error instead of a helpful message. Add a numeric check when parsing `--number` (and guard the arithmetic) so invalid input is reported cleanly and the script doesn't abort on an opaque internal error.</violation>

<violation number="2" location=".specify/scripts/bash/create-new-feature.sh:212">
P2: Very large `--number` values wrap in Bash arithmetic and produce a negative, unrelated feature prefix instead of failing. Validate digit-only input and its supported numeric range before this conversion so `--number` cannot silently target the wrong feature directory.</violation>
</file>

<file name=".specify/scripts/bash/check-prerequisites.sh">

<violation number="1" location=".specify/scripts/bash/check-prerequisites.sh:127">
P2: Task prerequisite checks report success when `spec.md` is missing, so callers can advance past this check and then fail in `setup-tasks.sh`. Validate `$FEATURE_SPEC` alongside `$IMPL_PLAN` and return the existing `/speckit.specify` guidance.</violation>
</file>

<file name=".specify/scripts/bash/setup-plan.sh">

<violation number="1" location=".specify/scripts/bash/setup-plan.sh:21">
P3: Misspelled or unsupported options are silently accepted, then may create or overwrite setup state as though invocation succeeded. Reject the catch-all argument, consistent with the other setup scripts.</violation>

<violation number="2" location=".specify/scripts/bash/setup-plan.sh:61">
P2: A missing template leaves an empty `plan.md` that downstream setup treats as a valid implementation plan. Fail with a template-resolution error instead of reporting successful setup with a blank artifact.</violation>
</file>

<file name=".specify/integrations/copilot.manifest.json">

<violation number="1" location=".specify/integrations/copilot.manifest.json:6">
P2: This integration manifest records SHA-256 hashes for 22 files (.github/agents/*, .github/prompts/*, .vscode/settings.json) that do not exist in this repository — they were copied verbatim from iklo. Since speckit.manifest.json correctly references files present under .specify/, the copilot manifest is the only inconsistent one: any tooling that verifies/installs by this manifest will flag every entry as missing. Consider regenerating the manifest for this repo or omitting it until the referenced files land.</violation>
</file>

<file name=".specify/memory/constitution.md">

<violation number="1" location=".specify/memory/constitution.md:64">
P2: Principle VI asserts `docs/spec.md`'s crate list "was fixed" after the `guiltty-sprite` extraction, but today that list still omits `guiltty-sprite` and still describes sprites as living in `guiltty-core`. Since this document governs the repo and explicitly calls doc/code contradictions bugs, this inaccurate claim should be corrected (or the crate list actually fixed in this PR) before it spreads the exact staleness the principle warns about.</violation>
</file>

<file name=".specify/scripts/bash/common.sh">

<violation number="1" location=".specify/scripts/bash/common.sh:124">
P2: On jq/python-less environments, a null or non-string `feature_directory` becomes a literal directory name instead of producing the documented empty value. Emit output only for a quoted string so downstream scripts report the missing feature directory rather than creating a malformed path.</violation>
</file>

<file name=".specify/workflows/speckit/workflow.yml">

<violation number="1" location=".specify/workflows/speckit/workflow.yml:37">
P3: The `scope` input is declared with a `full`/`backend-only`/`frontend-only` enum and a default, but no step in the workflow consumes it. Only `inputs.integration` and `inputs.spec` are referenced in `steps`, so callers can set `scope` and it will have zero effect on the executed commands. Either wire it into the step inputs (e.g. pass it as an arg to `speckit.tasks`/`implement`) or drop the input so the workflow's contract doesn't advertise a knob it ignores.</violation>
</file>

<file name=".specify/templates/tasks-template.md">

<violation number="1" location=".specify/templates/tasks-template.md:10">
P2: The template documents spec.md as 'required for user stories', but setup-tasks.sh unconditionally exits if spec.md is missing, with no story-based conditional. Update the wording to reflect that spec.md is always required.</violation>

<violation number="2" location=".specify/templates/tasks-template.md:66">
P3: "Setup" is used as a verb in these sample task descriptions (T004, T006, T009); when functioning as a verb phrase it should be "Set up" (two words) for grammatical consistency.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

fi

# Force base-10 interpretation to prevent octal conversion (e.g., 010 → 8 in octal, but should be 10 in decimal)
FEATURE_NUM=$(printf "%03d" "$((10#$BRANCH_NUMBER))")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Very large --number values wrap in Bash arithmetic and produce a negative, unrelated feature prefix instead of failing. Validate digit-only input and its supported numeric range before this conversion so --number cannot silently target the wrong feature directory.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/scripts/bash/create-new-feature.sh, line 212:

<comment>Very large `--number` values wrap in Bash arithmetic and produce a negative, unrelated feature prefix instead of failing. Validate digit-only input and its supported numeric range before this conversion so `--number` cannot silently target the wrong feature directory.</comment>

<file context>
@@ -0,0 +1,301 @@
+    fi
+
+    # Force base-10 interpretation to prevent octal conversion (e.g., 010 → 8 in octal, but should be 10 in decimal)
+    FEATURE_NUM=$(printf "%03d" "$((10#$BRANCH_NUMBER))")
+    BRANCH_NAME="${FEATURE_NUM}-${BRANCH_SUFFIX}"
+fi
</file context>

exit 1
fi

if [[ ! -f "$IMPL_PLAN" ]]; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Task prerequisite checks report success when spec.md is missing, so callers can advance past this check and then fail in setup-tasks.sh. Validate $FEATURE_SPEC alongside $IMPL_PLAN and return the existing /speckit.specify guidance.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/scripts/bash/check-prerequisites.sh, line 127:

<comment>Task prerequisite checks report success when `spec.md` is missing, so callers can advance past this check and then fail in `setup-tasks.sh`. Validate `$FEATURE_SPEC` alongside `$IMPL_PLAN` and return the existing `/speckit.specify` guidance.</comment>

<file context>
@@ -0,0 +1,195 @@
+    exit 1
+fi
+
+if [[ ! -f "$IMPL_PLAN" ]]; then
+    echo "ERROR: plan.md not found in $FEATURE_DIR" >&2
+    echo "Run /speckit.plan first to create the implementation plan." >&2
</file context>

echo "Warning: Plan template not found"
fi
# Create a basic plan file if template doesn't exist
touch "$IMPL_PLAN"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: A missing template leaves an empty plan.md that downstream setup treats as a valid implementation plan. Fail with a template-resolution error instead of reporting successful setup with a blank artifact.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/scripts/bash/setup-plan.sh, line 61:

<comment>A missing template leaves an empty `plan.md` that downstream setup treats as a valid implementation plan. Fail with a template-resolution error instead of reporting successful setup with a blank artifact.</comment>

<file context>
@@ -0,0 +1,83 @@
+            echo "Warning: Plan template not found"
+        fi
+        # Create a basic plan file if template doesn't exist
+        touch "$IMPL_PLAN"
+    fi
+fi
</file context>

@@ -0,0 +1,28 @@
{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This integration manifest records SHA-256 hashes for 22 files (.github/agents/, .github/prompts/, .vscode/settings.json) that do not exist in this repository — they were copied verbatim from iklo. Since speckit.manifest.json correctly references files present under .specify/, the copilot manifest is the only inconsistent one: any tooling that verifies/installs by this manifest will flag every entry as missing. Consider regenerating the manifest for this repo or omitting it until the referenced files land.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/integrations/copilot.manifest.json, line 6:

<comment>This integration manifest records SHA-256 hashes for 22 files (.github/agents/*, .github/prompts/*, .vscode/settings.json) that do not exist in this repository — they were copied verbatim from iklo. Since speckit.manifest.json correctly references files present under .specify/, the copilot manifest is the only inconsistent one: any tooling that verifies/installs by this manifest will flag every entry as missing. Consider regenerating the manifest for this repo or omitting it until the referenced files land.</comment>

<file context>
@@ -0,0 +1,28 @@
+  "version": "0.12.18",
+  "installed_at": "2026-07-17T15:07:12.587971+00:00",
+  "files": {
+    ".github/agents/speckit.analyze.agent.md": "07e1e9f997bce9e06d3823ecf1ed315bb62381b81e7d6a7aef19c5087c320e70",
+    ".github/agents/speckit.clarify.agent.md": "595ae8988179a91780ce10e258afcccaa313b0924a79e720c66226e31af7ec00",
+    ".github/agents/speckit.constitution.agent.md": "e0d1d7c237d4657914dcccb6ea0c3a3a10d8d1d9a36b198282e22b3d0b9a55e5",
</file context>

only get more misleading the longer they're left. Fix doc staleness
encountered while touching the affected area in the same PR, not a
follow-up (`docs/spec.md`'s crate list went stale exactly this way after
the `guiltty-sprite` extraction, and was fixed as part of the same repo-

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Principle VI asserts docs/spec.md's crate list "was fixed" after the guiltty-sprite extraction, but today that list still omits guiltty-sprite and still describes sprites as living in guiltty-core. Since this document governs the repo and explicitly calls doc/code contradictions bugs, this inaccurate claim should be corrected (or the crate list actually fixed in this PR) before it spreads the exact staleness the principle warns about.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/memory/constitution.md, line 64:

<comment>Principle VI asserts `docs/spec.md`'s crate list "was fixed" after the `guiltty-sprite` extraction, but today that list still omits `guiltty-sprite` and still describes sprites as living in `guiltty-core`. Since this document governs the repo and explicitly calls doc/code contradictions bugs, this inaccurate claim should be corrected (or the crate list actually fixed in this PR) before it spreads the exact staleness the principle warns about.</comment>

<file context>
@@ -0,0 +1,107 @@
+only get more misleading the longer they're left. Fix doc staleness
+encountered while touching the affected area in the same PR, not a
+follow-up (`docs/spec.md`'s crate list went stale exactly this way after
+the `guiltty-sprite` extraction, and was fixed as part of the same repo-
+standard bootstrap this constitution belongs to -- see issue #39).
+
</file context>


**Input**: Design documents from `/specs/[###-feature-name]/`

**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: The template documents spec.md as 'required for user stories', but setup-tasks.sh unconditionally exits if spec.md is missing, with no story-based conditional. Update the wording to reflect that spec.md is always required.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/templates/tasks-template.md, line 10:

<comment>The template documents spec.md as 'required for user stories', but setup-tasks.sh unconditionally exits if spec.md is missing, with no story-based conditional. Update the wording to reflect that spec.md is always required.</comment>

<file context>
@@ -0,0 +1,252 @@
+
+**Input**: Design documents from `/specs/[###-feature-name]/`
+
+**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
+
+**Tests**: The examples below include test tasks. Tests are OPTIONAL - only include them if explicitly requested in the feature specification.
</file context>
Suggested change
**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
**Prerequisites**: plan.md (required), spec.md (required), research.md, data-model.md, contracts/

fi

# Force base-10 interpretation to prevent octal conversion (e.g., 010 → 8 in octal, but should be 10 in decimal)
FEATURE_NUM=$(printf "%03d" "$((10#$BRANCH_NUMBER))")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: When a user passes --number a non-numeric value (e.g. a typo), the script dies under set -e with bash's terse value too great for base error instead of a helpful message. Add a numeric check when parsing --number (and guard the arithmetic) so invalid input is reported cleanly and the script doesn't abort on an opaque internal error.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/scripts/bash/create-new-feature.sh, line 212:

<comment>When a user passes `--number` a non-numeric value (e.g. a typo), the script dies under `set -e` with bash's terse `value too great for base` error instead of a helpful message. Add a numeric check when parsing `--number` (and guard the arithmetic) so invalid input is reported cleanly and the script doesn't abort on an opaque internal error.</comment>

<file context>
@@ -0,0 +1,301 @@
+    fi
+
+    # Force base-10 interpretation to prevent octal conversion (e.g., 010 → 8 in octal, but should be 10 in decimal)
+    FEATURE_NUM=$(printf "%03d" "$((10#$BRANCH_NUMBER))")
+    BRANCH_NAME="${FEATURE_NUM}-${BRANCH_SUFFIX}"
+fi
</file context>

exit 0
;;
*)
ARGS+=("$arg")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: Misspelled or unsupported options are silently accepted, then may create or overwrite setup state as though invocation succeeded. Reject the catch-all argument, consistent with the other setup scripts.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/scripts/bash/setup-plan.sh, line 21:

<comment>Misspelled or unsupported options are silently accepted, then may create or overwrite setup state as though invocation succeeded. Reject the catch-all argument, consistent with the other setup scripts.</comment>

<file context>
@@ -0,0 +1,83 @@
+            exit 0
+            ;;
+        *)
+            ARGS+=("$arg")
+            ;;
+    esac
</file context>

type: string
default: "auto"
prompt: "Integration to use (e.g. claude, copilot, gemini; 'auto' uses the project's initialized integration)"
scope:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: The scope input is declared with a full/backend-only/frontend-only enum and a default, but no step in the workflow consumes it. Only inputs.integration and inputs.spec are referenced in steps, so callers can set scope and it will have zero effect on the executed commands. Either wire it into the step inputs (e.g. pass it as an arg to speckit.tasks/implement) or drop the input so the workflow's contract doesn't advertise a knob it ignores.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/workflows/speckit/workflow.yml, line 37:

<comment>The `scope` input is declared with a `full`/`backend-only`/`frontend-only` enum and a default, but no step in the workflow consumes it. Only `inputs.integration` and `inputs.spec` are referenced in `steps`, so callers can set `scope` and it will have zero effect on the executed commands. Either wire it into the step inputs (e.g. pass it as an arg to `speckit.tasks`/`implement`) or drop the input so the workflow's contract doesn't advertise a knob it ignores.</comment>

<file context>
@@ -0,0 +1,77 @@
+    type: string
+    default: "auto"
+    prompt: "Integration to use (e.g. claude, copilot, gemini; 'auto' uses the project's initialized integration)"
+  scope:
+    type: string
+    default: "full"
</file context>


Examples of foundational tasks (adjust based on your project):

- [ ] T004 Setup database schema and migrations framework

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: "Setup" is used as a verb in these sample task descriptions (T004, T006, T009); when functioning as a verb phrase it should be "Set up" (two words) for grammatical consistency.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .specify/templates/tasks-template.md, line 66:

<comment>"Setup" is used as a verb in these sample task descriptions (T004, T006, T009); when functioning as a verb phrase it should be "Set up" (two words) for grammatical consistency.</comment>

<file context>
@@ -0,0 +1,252 @@
+
+Examples of foundational tasks (adjust based on your project):
+
+- [ ] T004 Setup database schema and migrations framework
+- [ ] T005 [P] Implement authentication/authorization framework
+- [ ] T006 [P] Setup API routing and middleware structure
</file context>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant