Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5d634a9
spec(001): workspace-worktree-orchestration — spec, plan, tasks, agen…
Apr 19, 2026
91ef0c6
feat(worktree): implement /dev multi-repo workspace + FR-024 slash co…
Apr 19, 2026
9ae2e34
fix(review-round-1): address actionable reviewer feedback
Apr 19, 2026
4a1d213
fix(review-round-2): switch runHooks from Bun.spawnSync to async Bun.…
Apr 20, 2026
063f103
fix(review-round-3): address 8 CodeRabbit threads
Apr 20, 2026
b32a93e
fix(review-round-3b): propagate worktreeListDetailed failures via Result
Apr 20, 2026
dd94092
fix(review-round-4): address 5 CodeRabbit threads
Apr 20, 2026
5deb9dd
fix(review-round-5): address 2 CodeRabbit threads
Apr 20, 2026
42cc8e5
fix(review-round-6): address 4 CodeRabbit threads
Apr 20, 2026
ac1b7ab
Merge pull request #1 from NeverMore93/001-workspace-worktree-orchest…
NeverMore93 Apr 22, 2026
6614a91
refactor: update .gitignore, CLAUDE.md, and package.json for fork pub…
Apr 22, 2026
482bbc4
fix: address Gemini review — tsup entry path, CLAUDE.md artifact, bun…
Apr 22, 2026
667aafc
Merge pull request #2 from NeverMore93/fork-publishing-changes
NeverMore93 Apr 22, 2026
b61a1eb
chore: bump version to 0.1.1
Apr 22, 2026
4db92b3
chore: bump version to 0.5.0 (npm already has 0.4.1)
Apr 22, 2026
0fae48a
chore: rename to @nevermore93/opencode-worktree (opencode-worktree wa…
Apr 22, 2026
9b5e615
chore: rename to @wentaoyuan/opencode-worktree (use existing org)
Apr 22, 2026
6650dd1
chore: rename to @nevermore93/opencode-worktree (match github name)
Apr 22, 2026
fb03022
docs: update npm badge to scoped package name
Apr 22, 2026
2f52f7a
chore: add 'doc' directory to .gitignore
Apr 22, 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
15 changes: 15 additions & 0 deletions .agents/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CLAUDE.md

## Responsibility Boundary
- This directory owns repo-local agent integration assets and skill exposure points.
- It defines how this repository references or surfaces agent skills; it does not own product behavior.

## Allowed Content
- Skill index directories and lightweight repo-local skill wiring
- Notes that explain how repository workflows and canonical context files are exposed to agents
- Minimal metadata needed to keep repo-local agent entrypoints organized

## Forbidden Content
- Plugin source code, runtime scripts, or feature implementation logic
- Feature specs, plans, or checklists that belong under `specs/`
- Duplicated copies of shared skill content when a higher-level source of truth already exists
17 changes: 17 additions & 0 deletions .agents/skills/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# CLAUDE.md

## Responsibility Boundary
- This directory groups the skill names this repository chooses to surface for agents.
- Child skill directories inherit this contract unless they later gain their own `CLAUDE.md`.

## Allowed Content
- Per-skill directories containing `SKILL.md` and optional lightweight supporting notes
- Repo-local wrappers, links, or lightweight metadata that point to canonical context
- Skill indexes or README files that map repo workflows to external or user-scoped skills
- Naming that matches the workflow commands used in this repository

## Forbidden Content
- Product source code or runtime helpers
- Feature-specific specs or implementation notes
- Large duplicated design documents that should stay canonical elsewhere
- Shared skill libraries copied here without a clear repo-local reason
26 changes: 26 additions & 0 deletions .agents/skills/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Repo-Local Skill Surface

This repository does not vendor the actual Speckit or shared skill bodies under
`.agents/skills/`. The directories here exist only to preserve naming parity
with repo workflows and to make the intended skill surface easy to inspect.

## Current Guidance

- Prefer user-scoped Speckit skills for specification, planning, task
generation, checklisting, clarification, and implementation.
- Treat the directories under `.agents/skills/` as lightweight placeholders or
exposure points, not as the source of truth for skill content.
- For repository-specific workflow guidance, read:
- `E:/workspaces/opencode-worktree/.specify/memory/skills/project-skill-map.md`
- `E:/workspaces/opencode-worktree/.agents/skills/workspace-worktree-context/SKILL.md`

## Current Preferred Combinations

- Design clarification:
- `speckit-clarify` + read-only `explorer` subagents
- Parallel analysis:
- `dispatching-parallel-agents`
- Implementation after design closure:
- `speckit-implement`
- Governance or template updates:
- `speckit-constitution`
15 changes: 15 additions & 0 deletions .agents/skills/workspace-worktree-context/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CLAUDE.md

## Responsibility Boundary
- This directory owns the repo-local wrapper skill for the workspace-worktree design thread.
- It should point agents to canonical repository memory and feature artifacts without duplicating the full design corpus.

## Allowed Content
- `SKILL.md` and lightweight helper notes that explain how to load the right context
- Minimal metadata that keeps the wrapper skill aligned with current repository memory
- References to canonical files under `.specify/memory/` and `specs/`

## Forbidden Content
- Full copies of shared skill bodies or large duplicated design documents
- Source code or implementation scripts
- Feature specs, plans, or tasks copied out of their canonical locations
31 changes: 31 additions & 0 deletions .agents/skills/workspace-worktree-context/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: workspace-worktree-context
description: Use when working on the opencode-worktree workspace orchestration feature in this repository and you need the current code truth, ratified design decisions, or canonical context files before editing specs or implementation.
---

# Workspace Worktree Context

## Overview

This is a repo-local wrapper skill. It does not restate the design in full; it points to the canonical files that separate current implementation truth from planned workspace orchestration behavior.

## Read First

- `AGENTS.md`
- `.specify/memory/constitution.md`
- `.specify/memory/project-memory.md`
- `.specify/memory/project-context.md`
- `.specify/memory/active-feature-context.md`
- `.specify/memory/contexts/current-vs-target-state.md`
- `.specify/memory/cases/workspace-metadata-authority.md`
- `.specify/memory/cases/repo-path-resolution.md`
- `specs/001-workspace-worktree-orchestration/spec.md`
- `specs/001-workspace-worktree-orchestration/context/current-state.md`
- `specs/001-workspace-worktree-orchestration/context/target-state.md`
- `specs/001-workspace-worktree-orchestration/cases/reconcile-cases.md`

## Non-Negotiables

- Keep current shipped behavior and target feature behavior separate.
- Preserve legacy single-repo behavior unless the spec explicitly changes it.
- Do not silently resolve open storage or lifecycle questions; either follow the ratified decision or record a clarification.
15 changes: 15 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CLAUDE.md

## Responsibility Boundary
- This directory owns Claude Code integration assets for this repository.
- It exists to expose repo workflows to Claude-facing command entrypoints, not to store general project documentation.

## Allowed Content
- Claude command definitions
- Minimal Claude-specific integration notes that explain command usage
- Subdirectories dedicated to Claude integration concerns

## Forbidden Content
- Source code, SpecKit templates, or PowerShell automation
- Feature specs and design artifacts
- Duplicated command logic that belongs in `.specify/`
15 changes: 15 additions & 0 deletions .claude/commands/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# CLAUDE.md

## Responsibility Boundary
- This directory defines the Claude slash-command surfaces used by the repository workflows.
- Each file should describe one command contract and point to the shared workflow assets rather than redefining repository behavior.

## Allowed Content
- `speckit.*.md` command entrypoints
- Command-specific invocation guidance tied to this repository
- Minimal references to `.specify/` templates and scripts

## Forbidden Content
- General project docs or feature specifications
- Runtime scripts or implementation code
- Large copies of template content that should stay canonical under `.specify/templates/`
184 changes: 184 additions & 0 deletions .claude/commands/speckit.analyze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,184 @@
---
description: Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
---

## User Input

```text
$ARGUMENTS
```

You **MUST** consider the user input before proceeding (if not empty).

## Goal

Identify inconsistencies, duplications, ambiguities, and underspecified items across the three core artifacts (`spec.md`, `plan.md`, `tasks.md`) before implementation. This command MUST run only after `/speckit.tasks` has successfully produced a complete `tasks.md`.

## Operating Constraints

**STRICTLY READ-ONLY**: Do **not** modify any files. Output a structured analysis report. Offer an optional remediation plan (user must explicitly approve before any follow-up editing commands would be invoked manually).

**Constitution Authority**: The project constitution (`.specify/memory/constitution.md`) is **non-negotiable** within this analysis scope. Constitution conflicts are automatically CRITICAL and require adjustment of the spec, plan, or tasks—not dilution, reinterpretation, or silent ignoring of the principle. If a principle itself needs to change, that must occur in a separate, explicit constitution update outside `/speckit.analyze`.

## Execution Steps

### 1. Initialize Analysis Context

Run `.specify/scripts/powershell/check-prerequisites.ps1 -Json -RequireTasks -IncludeTasks` once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:

- SPEC = FEATURE_DIR/spec.md
- PLAN = FEATURE_DIR/plan.md
- TASKS = FEATURE_DIR/tasks.md

Abort with an error message if any required file is missing (instruct the user to run missing prerequisite command).
For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'\''m Groot' (or double-quote if possible: "I'm Groot").

### 2. Load Artifacts (Progressive Disclosure)

Load only the minimal necessary context from each artifact:

**From spec.md:**

- Overview/Context
- Functional Requirements
- Success Criteria (measurable outcomes — e.g., performance, security, availability, user success, business impact)
- User Stories
- Edge Cases (if present)

**From plan.md:**

- Architecture/stack choices
- Data Model references
- Phases
- Technical constraints

**From tasks.md:**

- Task IDs
- Descriptions
- Phase grouping
- Parallel markers [P]
- Referenced file paths

**From constitution:**

- Load `.specify/memory/constitution.md` for principle validation

### 3. Build Semantic Models

Create internal representations (do not include raw artifacts in output):

- **Requirements inventory**: For each Functional Requirement (FR-###) and Success Criterion (SC-###), record a stable key. Use the explicit FR-/SC- identifier as the primary key when present, and optionally also derive an imperative-phrase slug for readability (e.g., "User can upload file" → `user-can-upload-file`). Include only Success Criteria items that require buildable work (e.g., load-testing infrastructure, security audit tooling), and exclude post-launch outcome metrics and business KPIs (e.g., "Reduce support tickets by 50%").
- **User story/action inventory**: Discrete user actions with acceptance criteria
- **Task coverage mapping**: Map each task to one or more requirements or stories (inference by keyword / explicit reference patterns like IDs or key phrases)
- **Constitution rule set**: Extract principle names and MUST/SHOULD normative statements

### 4. Detection Passes (Token-Efficient Analysis)

Focus on high-signal findings. Limit to 50 findings total; aggregate remainder in overflow summary.

#### A. Duplication Detection

- Identify near-duplicate requirements
- Mark lower-quality phrasing for consolidation

#### B. Ambiguity Detection

- Flag vague adjectives (fast, scalable, secure, intuitive, robust) lacking measurable criteria
- Flag unresolved placeholders (TODO, TKTK, ???, `<placeholder>`, etc.)

#### C. Underspecification

- Requirements with verbs but missing object or measurable outcome
- User stories missing acceptance criteria alignment
- Tasks referencing files or components not defined in spec/plan

#### D. Constitution Alignment

- Any requirement or plan element conflicting with a MUST principle
- Missing mandated sections or quality gates from constitution

#### E. Coverage Gaps

- Requirements with zero associated tasks
- Tasks with no mapped requirement/story
- Success Criteria requiring buildable work (performance, security, availability) not reflected in tasks

#### F. Inconsistency

- Terminology drift (same concept named differently across files)
- Data entities referenced in plan but absent in spec (or vice versa)
- Task ordering contradictions (e.g., integration tasks before foundational setup tasks without dependency note)
- Conflicting requirements (e.g., one requires Next.js while other specifies Vue)

### 5. Severity Assignment

Use this heuristic to prioritize findings:

- **CRITICAL**: Violates constitution MUST, missing core spec artifact, or requirement with zero coverage that blocks baseline functionality
- **HIGH**: Duplicate or conflicting requirement, ambiguous security/performance attribute, untestable acceptance criterion
- **MEDIUM**: Terminology drift, missing non-functional task coverage, underspecified edge case
- **LOW**: Style/wording improvements, minor redundancy not affecting execution order

### 6. Produce Compact Analysis Report

Output a Markdown report (no file writes) with the following structure:

## Specification Analysis Report

| ID | Category | Severity | Location(s) | Summary | Recommendation |
|----|----------|----------|-------------|---------|----------------|
| A1 | Duplication | HIGH | spec.md:L120-134 | Two similar requirements ... | Merge phrasing; keep clearer version |

(Add one row per finding; generate stable IDs prefixed by category initial.)

**Coverage Summary Table:**

| Requirement Key | Has Task? | Task IDs | Notes |
|-----------------|-----------|----------|-------|

**Constitution Alignment Issues:** (if any)

**Unmapped Tasks:** (if any)

**Metrics:**

- Total Requirements
- Total Tasks
- Coverage % (requirements with >=1 task)
- Ambiguity Count
- Duplication Count
- Critical Issues Count

### 7. Provide Next Actions

At end of report, output a concise Next Actions block:

- If CRITICAL issues exist: Recommend resolving before `/speckit.implement`
- If only LOW/MEDIUM: User may proceed, but provide improvement suggestions
- Provide explicit command suggestions: e.g., "Run /speckit.specify with refinement", "Run /speckit.plan to adjust architecture", "Manually edit tasks.md to add coverage for 'performance-metrics'"

### 8. Offer Remediation

Ask the user: "Would you like me to suggest concrete remediation edits for the top N issues?" (Do NOT apply them automatically.)

## Operating Principles

### Context Efficiency

- **Minimal high-signal tokens**: Focus on actionable findings, not exhaustive documentation
- **Progressive disclosure**: Load artifacts incrementally; don't dump all content into analysis
- **Token-efficient output**: Limit findings table to 50 rows; summarize overflow
- **Deterministic results**: Rerunning without changes should produce consistent IDs and counts

### Analysis Guidelines

- **NEVER modify files** (this is read-only analysis)
- **NEVER hallucinate missing sections** (if absent, report them accurately)
- **Prioritize constitution violations** (these are always CRITICAL)
- **Use examples over exhaustive rules** (cite specific instances, not generic patterns)
- **Report zero issues gracefully** (emit success report with coverage statistics)

## Context

$ARGUMENTS
Loading