Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## Why

`cli-init` still carries the requirement "Codex install destination overrides the fallback for the same directory", which specifies machinery that no longer exists: an `AGENTS_FALLBACK` tool descriptor, and a "state-based cleanup helper" that resolves a descriptor by `installDir` and must prefer Codex over that fallback. `grep -rn "AGENTS_FALLBACK" packages/cli/src` finds nothing. `TOOLS` in `packages/cli/src/install/install.ts` is detection-only, the fixed `SHIM_TARGETS` catalog has a single `.agents` row (`label: "Agent Skills"`, `generic: true`), `DEFAULT_SHIM_DIR` is `.agents`, and `packages/cli/src/install/state.ts` has no tool-descriptor lookup at all: it diffs manifest targets by directory name.

Its scenarios are stale, contradicted, or covered elsewhere:

- "Codex detection labels the .agents/ install as Codex" requires the install summary to name Codex for `.agents/skills/` writes. "Wizard prompts the user to choose install locations" now says the `.agents/` target SHALL be reported in the install summary as `Agent Skills`, and names Codex on the picker row instead ("Codex is named in the tool list"). The two requirements contradict each other; the newer one matches the code.
- "Lookup by installDir resolves to Codex over fallback" tests a helper and a descriptor that do not exist.
- "Fallback still resolvable for legacy state without Codex detection" is covered by "Agents fallback install" (".agents stub written when no tools detected") and by "Wizard prompts the user to choose install locations" ("Manifest-recorded locations are pre-checked", "Agents is the default when nothing is detected or installed").

## What Changes

- Remove the requirement "Codex install destination overrides the fallback for the same directory" from `cli-init`. No behavior is dropped; no code changes.

## Delivery shape

Single PR. The change is one spec deletion with no implementation, so the spec edit and the archive land together.

## Capabilities

### New Capabilities

None.

### Modified Capabilities

- `cli-init`: one stale requirement removed.

## Impact

- `openspec/specs/cli-init/spec.md` only. No code, tests, or release note.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## REMOVED Requirements

### Requirement: Codex install destination overrides the fallback for the same directory

**Reason**: It specifies an `AGENTS_FALLBACK` descriptor and a state-based cleanup helper that resolves descriptors by `installDir`, neither of which exists. `TOOLS` is detection-only, `SHIM_TARGETS` offers one `.agents` row, and `install/state.ts` diffs manifest targets by directory without any descriptor lookup. Its summary-labelling scenario contradicts "Wizard prompts the user to choose install locations", which reports the `.agents/` target as `Agent Skills`.

**Migration**: None needed. Naming Codex for `.agents/` is specified by "Wizard prompts the user to choose install locations" ("Codex is named in the tool list"). Installing to `.agents/` with nothing detected, or when the manifest records `.agents/`, is specified by "Agents fallback install" and by that same wizard requirement ("Agents is the default when nothing is detected or installed", "Manifest-recorded locations are pre-checked").
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## 1. Remove the stale requirement

- [x] 1.1 Confirm `grep -rn "AGENTS_FALLBACK" packages/cli/src` finds nothing and that each scenario of "Codex install destination overrides the fallback for the same directory" is stale, contradicted, or covered by another `cli-init` requirement
- [x] 1.2 Add a `## REMOVED Requirements` delta for it; verify `pnpm openspec validate remove-agents-fallback-requirement --strict` passes
- [x] 1.3 Archive the change and verify, by diffing the sorted `#### Scenario` lines of `openspec/specs/cli-init/spec.md` before and after, that only the removed requirement's three scenarios disappeared
24 changes: 0 additions & 24 deletions openspec/specs/cli-init/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -208,30 +208,6 @@ Skills SHALL be installed to `.agents/skills/<name>/SKILL.md` (Codex's documente
- **WHEN** Codex is detected and the install plan is built
- **THEN** no command files SHALL be written for Codex

### Requirement: Codex install destination overrides the fallback for the same directory

When Codex is detected, the install plan SHALL treat `.agents/` as the Codex target rather than the generic agents fallback. The state-based cleanup helper that resolves a tool descriptor by `installDir` SHALL prefer registered tool entries (including Codex) over the `AGENTS_FALLBACK` descriptor when both share the same `installDir` value. The user-facing install summary SHALL name "Codex" as the target for `.agents/skills/` writes when `.codex/` is present, instead of the generic fallback labeling.

#### Scenario: Codex detection labels the .agents/ install as Codex

- **WHEN** `.codex/` is present and `taskless init` runs
- **THEN** the install summary SHALL identify the `.agents/skills/` writes as belonging to Codex
- **AND** SHALL NOT use the "no tools detected, installing fallback" wording

#### Scenario: Lookup by installDir resolves to Codex over fallback

- **WHEN** the state-based cleanup helper looks up a tool descriptor by `installDir = ".agents"`
- **AND** Codex is registered in the tool array
- **THEN** the lookup SHALL return the Codex descriptor, not `AGENTS_FALLBACK`

#### Scenario: Fallback still resolvable for legacy state without Codex detection

- **WHEN** a previous install state recorded `.agents/` as the target
- **AND** `.codex/` does not exist in the working directory
- **AND** no other tools are detected
- **THEN** the install SHALL proceed using the fallback path
- **AND** files SHALL still be written to `.agents/skills/`

### Requirement: Agents fallback install

`.agents/` is an ordinary selectable tool target, a peer of `.claude/`, `.cursor/`, and `.opencode/`. When `.agents/` is selected, a reference skill stub SHALL be installed to `.agents/skills/<name>/SKILL.md`. The `.agents/` target SHALL NOT receive commands. When no tools are detected, `.agents/` SHALL be the default selected target so a `taskless init` with zero detected tools still produces a usable install.
Expand Down
Loading