Skip to content

Commit e778083

Browse files
committed
Merge branch 'main' of github.com:aleksandr4842/OpenSpec into codeassistant
2 parents 6828361 + 8886e3a commit e778083

135 files changed

Lines changed: 10616 additions & 5412 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@fission-ai/openspec": patch
3+
---
4+
5+
### Features
6+
7+
- **Auto-approve the OpenSpec CLI in generated skills and commands** — every generated `SKILL.md` (all tools) and every Claude Code `/opsx:*` slash command now carries `allowed-tools: Bash(openspec:*)` in its frontmatter, so agents that honor the Agent Skills standard run `openspec` commands without prompting for approval on each call; tools that don't recognize the field ignore it. Scope is limited to the `openspec` CLI; because `allowed-tools` pre-approves rather than restricts, every other tool a skill or command uses stays available under your normal permission settings.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@fission-ai/openspec": minor
3+
---
4+
5+
### New Features
6+
7+
- **TRAE command adapter** — Added command adapter for Trae IDE, enabling generation of `.trae/commands/opsx-<id>.md` files for custom slash commands

.changeset/escape-yaml-carriage-return.md

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@fission-ai/openspec": patch
3+
---
4+
5+
### Bug Fixes
6+
7+
- **`archive` exits non-zero when blocked in human mode**`openspec archive <change> -y` (and any non-`--json` invocation) no longer returns exit code 0 when validation fails and nothing is archived. The three blocking paths in human mode — delta-spec validation failure, spec rebuild failure, and rebuilt-spec validation failure — now set `process.exitCode = 1`, matching the existing `--json` behavior. Previously the command printed "Validation failed" (or "Aborted. No files were changed.") and exited 0, letting scripts and CI believe the archive succeeded. Aligns `archive` with the same exit-code guarantee already approved for `apply` instructions (#1250).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@fission-ai/openspec": patch
3+
---
4+
5+
### Bug Fixes
6+
7+
- **`validate` resolves changes like `status`**`openspec validate <change>` (and `--all`/`--changes` and the interactive selector) now resolves a change by directory existence, matching `status`/`instructions`, instead of requiring `proposal.md`. A scaffolded or still-authoring change is validated rather than reported as `Unknown item`, and a resolved-but-invalid change now exits non-zero. Delta discovery also recurses the nested `specs/<area>/<capability>/spec.md` layout. (#1182)
8+
- **Task progress reads nested/glob `tasks.md`**`openspec view`, `list`, and the `archive` incomplete-task gate now resolve task progress through the tracked-tasks artifact's `generates` glob (the same file-resolution `status` uses), so a change whose tasks live in nested `tasks.md` files is classified correctly and can no longer archive while unfinished. (#1202)
9+
- **SHALL/MUST body-keyword hint applies to main specs** — A main-spec requirement whose normative keyword sits only in the `### Requirement:` header now receives the same targeted "move it to the body line" remediation as a change delta, emitted exactly once. (#1156)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
"@fission-ai/openspec": patch
3+
---
4+
5+
### Bug Fixes
6+
7+
- **Requirement reading fidelity** — The requirement reader used by `validate <change>`, `validate <spec>`, and `archive` is now unified into one fence-, metadata-, and multi-line-aware extraction, closing the known divergences between the change-delta path and the main-spec path (the remaining ones are documented in the change's design doc):
8+
- A `SHALL`/`MUST` keyword that wraps onto a later body line is detected instead of dropped (#361).
9+
- Metadata lines (`**ID**:`, `**Priority**:`) before the description are skipped on the spec path, matching the change path (#418). A requirement written entirely as metadata (e.g. `**Constraint**: The system MUST ...`) keeps that line as its text instead of being emptied.
10+
- A fenced code block before the prose line no longer becomes the requirement text (#312).
11+
- A `#### Scenario:` inside a fenced example no longer counts as a real scenario in `validate <change>`, matching `validate <spec>`.
12+
- `SHALL`/`MUST` detection uses one whole-word predicate across all readers, and a requirement with no body text falls back to its header title on both paths.
13+
14+
Displayed requirement text (e.g. in JSON output and delta descriptions) now reflects the full requirement body rather than only its first line. Archived spec content is unchanged — the archive rebuild reads raw `### Requirement:` blocks, not the parsed text.
15+
16+
- **Surface non-canonical delta headers**`validate <change>` now emits an INFO note when an `## ADDED`/`## MODIFIED Requirements` section contains a level-3 header that is not a canonical `### Requirement:` header (one the delta reader silently skips, such as a stray `### Documentation Requirements` divider). The note never changes the `valid` result, including under `--strict` (#498).

.github/workflows/ci.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ jobs:
5454

5555
- name: Setup pnpm
5656
uses: pnpm/action-setup@v4
57-
with:
58-
version: 9
5957

6058
- name: Setup Node.js
6159
uses: actions/setup-node@v4
@@ -110,8 +108,6 @@ jobs:
110108

111109
- name: Setup pnpm
112110
uses: pnpm/action-setup@v4
113-
with:
114-
version: 9
115111

116112
- name: Setup Node.js
117113
uses: actions/setup-node@v4
@@ -149,8 +145,6 @@ jobs:
149145

150146
- name: Setup pnpm
151147
uses: pnpm/action-setup@v4
152-
with:
153-
version: 9
154148

155149
- name: Setup Node.js
156150
uses: actions/setup-node@v4
@@ -270,8 +264,6 @@ jobs:
270264
- name: Setup pnpm
271265
if: steps.changed-changesets.outputs.has_changesets == 'true'
272266
uses: pnpm/action-setup@v4
273-
with:
274-
version: 9
275267

276268
- name: Setup Node.js
277269
if: steps.changed-changesets.outputs.has_changesets == 'true'

.github/workflows/deploy-docs.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Docs site
2+
3+
# The documentation site (website/) mirrors docs/*.md via scripts/sync-docs.mjs,
4+
# which runs as the first step of `pnpm run build`. This workflow rebuilds that
5+
# mirror and deploys the static export to Cloudflare Pages:
6+
# - on every push to main that touches docs/ or website/ (deploy immediately),
7+
# - on a daily schedule (re-mirror the latest docs even if nothing pushed),
8+
# - manually via the Actions tab,
9+
# - and as a build-only check on pull requests.
10+
#
11+
# Deploys require two repository secrets: CLOUDFLARE_API_TOKEN and
12+
# CLOUDFLARE_ACCOUNT_ID. Set the site's public URL via the DOCS_SITE_URL
13+
# repository variable (used for OG/sitemap absolute URLs).
14+
15+
on:
16+
push:
17+
branches: [main]
18+
paths:
19+
- 'docs/**'
20+
- 'website/**'
21+
- '.github/workflows/deploy-docs.yml'
22+
pull_request:
23+
paths:
24+
- 'docs/**'
25+
- 'website/**'
26+
- '.github/workflows/deploy-docs.yml'
27+
schedule:
28+
# Daily at 06:00 UTC — picks up any docs changes merged since the last run.
29+
- cron: '0 6 * * *'
30+
workflow_dispatch:
31+
32+
# Never run two deploys at once; let an in-flight deploy finish.
33+
concurrency:
34+
group: deploy-docs
35+
cancel-in-progress: false
36+
37+
jobs:
38+
build-and-deploy:
39+
runs-on: ubuntu-latest
40+
permissions:
41+
contents: read
42+
steps:
43+
- uses: actions/checkout@v4
44+
45+
- name: Setup pnpm
46+
uses: pnpm/action-setup@v4
47+
48+
- uses: actions/setup-node@v4
49+
with:
50+
node-version: '20'
51+
cache: pnpm
52+
cache-dependency-path: website/pnpm-lock.yaml
53+
54+
- name: Install dependencies
55+
working-directory: website
56+
run: pnpm install --frozen-lockfile
57+
58+
- name: Build site (mirrors docs/*.md, then next build)
59+
working-directory: website
60+
env:
61+
NEXT_PUBLIC_SITE_URL: ${{ vars.DOCS_SITE_URL }}
62+
run: pnpm run build
63+
64+
# Temporarily disabled until Cloudflare setup is ready.
65+
# - name: Deploy to Cloudflare Pages
66+
# # Only deploy from main on the canonical repo. This keeps PRs build-only,
67+
# # keeps forks (no secrets) build-only, and because the wrangler command
68+
# # below hardcodes `--branch=main` (a *production* deploy) prevents a
69+
# # `workflow_dispatch` on a feature branch from overwriting the live site.
70+
# if: ${{ github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'Fission-AI/OpenSpec' }}
71+
# uses: cloudflare/wrangler-action@v3
72+
# with:
73+
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
74+
# accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
75+
# workingDirectory: website
76+
# command: pages deploy out --project-name=openspec-docs --branch=main

.github/workflows/release-prepare.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ jobs:
3434
token: ${{ steps.app-token.outputs.token }}
3535

3636
- uses: pnpm/action-setup@v4
37-
with:
38-
version: 9
3937

4038
- uses: actions/setup-node@v4
4139
with:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ CLAUDE.md
148148

149149
# Pnpm
150150
.pnpm-store/
151+
/package-lock.json
151152
result
152153

153154
# OpenCode
@@ -159,3 +160,6 @@ opencode.json
159160

160161
# Bob
161162
.bob/
163+
164+
# Trae
165+
.trae/

0 commit comments

Comments
 (0)