Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
4b3e2bf
docs(openspec): propose sqlc-feature-parity change
kvdomingo Sep 24, 2026
28daaaa
chore(tooling): move CI to sqlc 1.31.1 and examples to SQLAlchemy 2
kvdomingo Sep 24, 2026
e1c04d4
chore(testdata): regenerate fixtures and examples with sqlc 1.31.1
kvdomingo Sep 24, 2026
a42bb8c
feat(ast): add ListComp, With, BinOp, Tuple, ellipsis and class type …
kvdomingo Sep 24, 2026
e724fda
fix(printer): escape string literals, print docstrings, pass and else
kvdomingo Sep 24, 2026
0ce41a1
fix(codegen): escape Python keywords and sanitize enum member names
kvdomingo Sep 24, 2026
47e344e
refactor(codegen): record imports while building, share one querier b…
kvdomingo Sep 24, 2026
c388667
test(testdata): cover emit_modern_types and emit_aware_datetime
kvdomingo Sep 24, 2026
cfa845a
feat(config): add overrides, rename, omit_unused_structs, omit_sqlc_v…
kvdomingo Sep 24, 2026
2b6255c
feat(querier): accept sessions and cast row values
kvdomingo Sep 24, 2026
9537816
feat(querier): generic queriers, query docstrings and sqlc.embed()
kvdomingo Sep 24, 2026
caa9612
feat(querier): support :copyfrom, :batchexec, :batchone and :batchmany
kvdomingo Sep 24, 2026
c0c093c
feat(querier): emit QuerierProtocol and AsyncQuerierProtocol
kvdomingo Sep 24, 2026
4a02869
feat(querier): typed query errors behind emit_query_errors
kvdomingo Sep 24, 2026
331217c
test(ci): feature matrix fixtures, compile and mypy --strict in CI
kvdomingo Sep 24, 2026
e1ade01
test(examples): exercise new features against Postgres
kvdomingo Sep 24, 2026
b072401
docs: document new options, commands and fork migration
kvdomingo Sep 24, 2026
8d8cec1
ci: update postgres
kvdomingo Oct 4, 2026
b94b7cd
ci: install sqlalchemy asyncio extras
kvdomingo Oct 4, 2026
9ae703b
chore(go): bump to Go 1.27
kvdomingo Oct 4, 2026
ada94ca
ci: add zizmor, pre-commit hooks
kvdomingo Oct 4, 2026
14313ce
ci: autogenerate release version
kvdomingo Oct 4, 2026
9207557
docs(readme): match the implementation and the automated release
kvdomingo Oct 4, 2026
148d24d
ci(release): start versioning at v1.0.0
kvdomingo Oct 4, 2026
7dba9d6
docs: update readme
kvdomingo Oct 4, 2026
f636b4c
docs(readme): document override aliases, generic py_type, rename prec…
kvdomingo Oct 4, 2026
0022430
fix(codegen): escape shadowing params, dedupe param names, import eve…
kvdomingo Oct 4, 2026
4e063cc
fix(codegen): escape builtin-named params, keep deduped names unique
kvdomingo Oct 4, 2026
ce08f6c
fix(codegen): escape builtin-named methods, reject models.sql query f…
kvdomingo Oct 4, 2026
a6a6c02
fix(codegen): reject duplicate method names, rename generic type para…
kvdomingo Oct 4, 2026
4ca45c8
fix(codegen): scope duplicate-name checks per query file, catch const…
kvdomingo Oct 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 65 additions & 27 deletions .agents/skills/openspec-apply-change/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,23 @@ metadata:

Implement tasks from an OpenSpec change.

**Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.

**Input**: Optionally specify a change name (e.g., `$openspec-apply-change (Codex) or /openspec-apply-change (other agents) add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
**Store selection:** If the user names a store (a store is a standalone OpenSpec
repo registered on this machine) or the work lives in one, run
`openspec store list --json` to discover registered store ids, then pass
`--store <id>` on the commands that read or write specs and changes
(`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`,
`doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as
sticky for the rest of the workflow. Every unscoped example of those commands
below is shorthand: before running it, append the flag. For example, run
`openspec status --change "<name>" --json --store "<id>"`, not the unscoped form
shown below. Other commands do not take the flag. Hints printed by commands
already carry the flag; keep it on follow-ups. Without a store, commands act on
the nearest local `openspec/` root.

**Input**: Optionally specify a change name (e.g.,
`$openspec-apply-change (Codex) or /openspec-apply-change (other agents) add-auth`).
If omitted, check if it can be inferred from conversation context. If vague or
ambiguous you MUST prompt for available changes.

**Steps**

Expand All @@ -23,18 +37,24 @@ Implement tasks from an OpenSpec change.
If a name is provided, use it. Otherwise:
- Infer from conversation context if the user mentioned a change
- Auto-select if only one active change exists
- If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
- If ambiguous, run `openspec list --json` to get available changes and ask
the user to select one

Always announce: "Using change: <name>" and how to override (e.g., `$openspec-apply-change (Codex) or /openspec-apply-change (other agents) <other>`).
Always announce: "Using change: <name>" and how to override (e.g.,
`$openspec-apply-change (Codex) or /openspec-apply-change (other agents) <other>`).

2. **Check status to understand the schema**

```bash
openspec status --change "<name>" --json
```

Parse the JSON to understand:
- `schemaName`: The workflow being used (e.g., "spec-driven")
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit constraints
- Which artifact contains the tasks (typically "tasks" for spec-driven, check status for others)
- `planningHome`, `changeRoot`, and `actionContext`: planning scope and edit
constraints
- Which artifact contains the tasks (typically "tasks" for spec-driven, check
status for others)

3. **Get apply instructions**

Expand All @@ -43,23 +63,31 @@ Implement tasks from an OpenSpec change.
```

This returns:
- `contextFiles`: artifact ID -> array of concrete file paths (varies by schema - could be proposal/specs/design/tasks or spec/tests/implementation/docs)
- `contextFiles`: artifact ID -> array of concrete file paths (varies by
schema - could be proposal/specs/design/tasks or
spec/tests/implementation/docs)
- Progress (total, complete, remaining)
- Task list with status
- Dynamic instruction based on current state
- Optional `context`: current required project instruction input from the selected root
- Optional `context`: current required project instruction input from the
selected root
- Optional `operationGuidance`: current advisory guidance for apply

**Handle states:**
- If `state: "blocked"` (missing artifacts): show message, suggest using `$openspec-continue-change (Codex) or /openspec-continue-change (other agents)` (if it is not installed, run `openspec status --change "<name>" --json` to see the next artifact and `openspec instructions <artifact-id> --change "<name>" --json` for how to create it)
- If `state: "blocked"` (missing artifacts): show message, suggest using
`$openspec-continue-change (Codex) or /openspec-continue-change (other agents)`
(if it is not installed, run `openspec status --change "<name>" --json` to
see the next artifact and
`openspec instructions <artifact-id> --change "<name>" --json` for how to
create it)
- If `state: "all_done"`: congratulate, suggest archive
- Otherwise: proceed to implementation

Treat `context` as a required prompt-level input. Read and consider it, and
apply relevant project facts, conventions, and constraints while implementing.
Treat `operationGuidance` as optional additive advice. Read and consider every
entry, and follow entries that are applicable and compatible with the built-in
workflow.
apply relevant project facts, conventions, and constraints while
implementing. Treat `operationGuidance` as optional additive advice. Read and
consider every entry, and follow entries that are applicable and compatible
with the built-in workflow.

Keep both fields separate from CLI-returned state, missing artifacts, tasks,
progress, `contextFiles`, and the built-in `instruction`. They are not
Expand All @@ -72,8 +100,8 @@ Implement tasks from an OpenSpec change.

4. **Read context files**

Read every file path listed under `contextFiles` from the apply instructions output.
The files depend on the schema being used:
Read every file path listed under `contextFiles` from the apply instructions
output. The files depend on the schema being used:
- **spec-driven**: proposal, specs, design, tasks
- Other schemas: follow the contextFiles from CLI output

Expand All @@ -100,7 +128,9 @@ Implement tasks from an OpenSpec change.
**Pause if:**
- Task is unclear → ask for clarification
- Implementation reveals a design issue → suggest updating artifacts
- A task needs work beyond what the spec and tasks describe, or you are tempted to drop, narrow, defer, or accept exceptions to specified behavior to make it fit → surface the added scope and ask; do not absorb it silently
- A task needs work beyond what the spec and tasks describe, or you are
tempted to drop, narrow, defer, or accept exceptions to specified behavior
to make it fit → surface the added scope and ask; do not absorb it silently
- Error or blocker encountered → report and wait for guidance
- User interrupts

Expand All @@ -114,7 +144,7 @@ Implement tasks from an OpenSpec change.

**Output During Implementation**

```
```text
## Implementing: <change-name> (schema: <schema-name>)

Working on task 3/7: <task description>
Expand All @@ -128,7 +158,7 @@ Working on task 4/7: <task description>

**Output On Completion**

```
```text
## Implementation Complete

**Change:** <change-name>
Expand All @@ -145,7 +175,7 @@ All tasks complete! You can archive this change with `$openspec-archive-change (

**Output On Pause (Issue Encountered)**

```
```text
## Implementation Paused

**Change:** <change-name>
Expand All @@ -164,25 +194,33 @@ What would you like to do?
```

**Guardrails**

- Keep going through tasks until done or blocked
- Always read context files before starting (from the apply instructions output)
- If task is ambiguous, pause and ask before implementing
- If implementation reveals issues, pause and suggest artifact updates
- Keep code changes minimal and scoped to each task
- Update task checkbox immediately after completing each task
- Pause on errors, blockers, or unclear requirements - don't guess
- When a task needs work beyond what the spec describes, surface the added scope and pause - never silently narrow, defer, or simplify away specified behavior
- Only mark a task `- [x]` when its specified behavior is fully implemented, not when it is partially done or deferred
- When a task needs work beyond what the spec describes, surface the added scope
and pause - never silently narrow, defer, or simplify away specified behavior
- Only mark a task `- [x]` when its specified behavior is fully implemented, not
when it is partially done or deferred
- Use contextFiles from CLI output, don't assume specific file names
- Do not use context or operation guidance as proof that a task is complete
- Apply relevant project context; report conflicts with controlling workflow inputs
- Apply relevant project context; report conflicts with controlling workflow
inputs
- Consider every guidance entry; explain any inapplicable or conflicting advice
- Do not copy runtime context or operation guidance into implementation files or planning artifacts
- Preserve CLI-controlled blocked/ready/all-done behavior and completion criteria
- Do not copy runtime context or operation guidance into implementation files or
planning artifacts
- Preserve CLI-controlled blocked/ready/all-done behavior and completion
criteria

**Fluid Workflow Integration**

This skill supports the "actions on a change" model:

- **Can be invoked anytime**: Before all artifacts are done (if tasks exist), after partial implementation, interleaved with other actions
- **Allows artifact updates**: If implementation reveals design issues, suggest updating artifacts - not phase-locked, work fluidly
- **Can be invoked anytime**: Before all artifacts are done (if tasks exist),
after partial implementation, interleaved with other actions
- **Allows artifact updates**: If implementation reveals design issues, suggest
updating artifacts - not phase-locked, work fluidly
Loading
Loading