.claude/skills/openspec-propose-gate/SKILL.md
Scaffold a new OpenSpec change proposal from a Phase 0 hard gate in the 1Code enterprise fork. Use when the user asks to "create the OpenSpec proposal for gate
npx skillsauth add jrmatherly/1dev openspec-propose-gateInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Create an OpenSpec change proposal that implements exactly one Phase 0 hard gate from docs/enterprise/auth-strategy.md §6. This skill enforces the "gate text is exact scope, not a minimum" rule documented in CLAUDE.md — the proposal must match the gate's scope as written in §6, not an expanded version.
/openspec-propose-gate with a gate numberbunx @fission-ai/[email protected] --version returns 1.2.0 (if not, fall back to openspec on PATH or ask user)CLAUDE.md Phase 0 progress blockopenspec/changes/<name>/git status --short returns empty) — do NOT mix OpenSpec scaffolding with other uncommitted changesRead docs/enterprise/auth-strategy.md §6 using sed -n via Bash (the file exceeds the Read tool's 10k-token cap — see CLAUDE.md "claude-mem Read-tool interaction" note):
grep -n "^### Phase 0 Hard Gate #" docs/enterprise/auth-strategy.md
Then read the specific gate's section. The gate text is the literal scope of the proposal — do not expand it with design decisions, architecture sketches, or three-segment models. Those belong in separate proposals if they become needed.
Use kebab-case, verb-led, descriptive:
add-binary-checksum-verification or harden-binary-downloaderremove-upstream-sandbox-oauth (this specific name was audited and chosen in the 2026-04-08 session)add-feature-flag-infrastructure (already exists — unarchived)Prefer positive/action framing ("remove", "add", "harden", "replace") over neutral ("refactor"). The naming follows the existing repo style — check openspec/changes/ for precedent.
bunx @fission-ai/[email protected] new change <change-id> \
--description "Gate #N: <short description from §6>"
This creates openspec/changes/<change-id>/ with placeholder files.
OpenSpec 1.2.0 provides per-artifact instructions:
bunx @fission-ai/[email protected] instructions proposal --change <change-id>
bunx @fission-ai/[email protected] instructions specs --change <change-id>
bunx @fission-ai/[email protected] instructions tasks --change <change-id>
bunx @fission-ai/[email protected] instructions design --change <change-id> # optional
Use the exact template structure each command returns. Do NOT invent your own format — the strict validator rejects ##### (5 hashtag) scenarios silently, and scenarios without a Requirement parent will also fail.
proposal.mdRequired sections (from openspec instructions proposal):
## Why
<1-2 sentences on the gate's purpose, quoting §6 text verbatim>
## What Changes
- **REMOVE** ...
- **ADD** ...
- **MODIFY** ...
## Capabilities
### New Capabilities
- `capability-kebab-name`: <description>
### Modified Capabilities
(none, OR list existing capability whose requirements are changing)
## Impact
Affected files: <list>
Downstream work unblocked: <list future gates/proposals>
Critical: If the gate adds to an existing capability, check whether that capability's baseline exists at openspec/specs/<capability>/spec.md. If not (the capability is still inside an unarchived change), use ## ADDED Requirements on a new capability instead of ## MODIFIED Requirements on the unarchived one. This is the OpenSpec 1.2.0 baseline constraint documented in CLAUDE.md.
specs/<capability>/spec.mdEach Requirement MUST be followed by at least one Scenario with exactly 4 hashtags:
## ADDED Requirements
### Requirement: <imperative name>
The system SHALL <normative behavior using SHALL or MUST>.
#### Scenario: <scenario name>
- **WHEN** <precondition>
- **THEN** <expected behavior>
- **AND** <additional expectation>
#### Scenario: <second scenario if needed>
- **WHEN** ...
- **THEN** ...
For REMOVED Requirements:
## REMOVED Requirements
### Requirement: <name being removed>
**Reason**: <why it's being removed>
**Migration**: <what replaces it>
tasks.mdThe apply phase parses - [ ] N.M Task description checkboxes. Group by concern, not by file:
## 1. Pre-flight / regression guard red
- [ ] 1.1 Write regression guard at tests/regression/<name>.test.ts
- [ ] 1.2 Run `bun test` and verify ASSERTION failure (not compile error)
- [ ] 1.3 Confirm red state before proceeding to green
## 2. Implementation
- [ ] 2.1 ...
- [ ] 2.2 ...
## 3. Verification (four quality gates)
- [ ] 3.1 `bun run ts:check` baseline unchanged
- [ ] 3.2 `bun run build` exits 0
- [ ] 3.3 `bun test` all regression guards green
- [ ] 3.4 `bun audit` clean
## 4. Documentation
- [ ] 4.1 Update CLAUDE.md Phase 0 progress block
- [ ] 4.2 Mark gate complete in strategy doc cross-references
design.mdInclude a design.md ONLY if the gate has genuine architectural decisions that don't fit in the proposal (<500 words) or the spec (normative text only). Examples: enum shape choices, state machine diagrams, migration strategies. For simple deletion gates, skip design.md entirely.
bunx @fission-ai/[email protected] validate <change-id> --strict --no-interactive
Must return Change '<change-id>' is valid before the user reviews. If validation fails, the error message names the failing assertion — fix and re-run. Common failures:
### or ##### instead of ####)## ADDED|MODIFIED|REMOVED|RENAMED Requirements header in a delta fileAfter validation passes, show the user:
find openspec/changes/<change-id> -type f)Then ask: "Proposal scaffolded and validates. Ready to implement, or do you want changes first?"
Do NOT start implementing without explicit approval.
The #1 failure mode this skill prevents is scope creep. The gate's text in auth-strategy-envoy-gateway.md §6 is the exact scope. If you find yourself wanting to:
...stop. That's a SEPARATE OpenSpec change. File it as a follow-up proposal name in the current proposal's "Downstream work unblocked" bullet list. Do NOT bundle it into Layer 1.
Violating this rule in the Gate #8 prior session triggered a 4-reviewer audit that found 6 Critical and 6 High findings — all because a deletion-only gate was scope-expanded to include env-var injection, feature flag additions, and a three-segment credential model.
docs/enterprise/auth-strategy.md — the frozen strategy doc with Phase 0 §6 gate textopenspec/changes/add-feature-flag-infrastructure/ — reference for a multi-requirement proposal with complete spec + tasksopenspec/changes/retire-mock-api-translator/ — reference for a scoped deletion proposalopenspec/config.yaml — schema config (must be spec-driven)openspec directly in the Bash tool's non-login shell (PATH issue) — always use bunx @fission-ai/[email protected]## MODIFIED Requirements against an unarchived baseline — use ## ADDED Requirements on a new capability instead#### scenarios as ### or ##### — silent validator failuredevelopment
Background knowledge for AI agents before editing any file that handles authentication tokens or spawn environment variables in the 1Code enterprise fork. Triggers when touching src/main/lib/trpc/routers/claude.ts, claude-code.ts, claude/env.ts, feature-flags.ts, or claude-token.ts. Reminds the agent to consult the frozen Envoy Gateway strategy doc (auth-strategy-envoy-gateway.md v2.1) sections that impose hard rules on credential handling.
tools
Background knowledge for safely bumping the pinned versions of Claude CLI binary, Codex CLI binary, Electron, Vite, Tailwind, or Shiki in this repo. Each pin is load-bearing for a different reason — this skill encodes the per-pin rationale and the regression test that must pass before the bump can land. Use proactively whenever editing package.json, scripts/download-claude-binary.mjs, scripts/download-codex-binary.mjs, or any file that mentions these versions. Claude-only (background knowledge, not user-invocable).
development
Use when reading or writing any file under src/renderer/ that calls remoteTrpc.* or fetch(${apiUrl}/...). Verifies the call site is documented in docs/enterprise/upstream-features.md and warns if a new upstream-backend dependency is being introduced without a corresponding F-entry. This skill enforces the enterprise-fork posture documented in CLAUDE.md.
development
End-of-task sync — update CLAUDE.md, rebuild code graph, sync Serena memories, check roadmap drift, and commit. Run after completing any significant work to ensure all drift surfaces are current.