@bfirestone45/opencode-arc 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/README.md +41 -0
  2. package/agents/arc-doc-writer.md +44 -0
  3. package/agents/arc-evaluator.md +188 -0
  4. package/agents/arc-implementer.md +229 -0
  5. package/agents/arc-issue-tracker.md +162 -0
  6. package/agents/arc-reviewer.md +91 -0
  7. package/commands/arc-blocked.md +12 -0
  8. package/commands/arc-close.md +33 -0
  9. package/commands/arc-create.md +48 -0
  10. package/commands/arc-db.md +19 -0
  11. package/commands/arc-dep.md +35 -0
  12. package/commands/arc-docs.md +53 -0
  13. package/commands/arc-init.md +27 -0
  14. package/commands/arc-list.md +29 -0
  15. package/commands/arc-migrate-paths.md +14 -0
  16. package/commands/arc-onboard.md +12 -0
  17. package/commands/arc-paths.md +34 -0
  18. package/commands/arc-plugin.md +30 -0
  19. package/commands/arc-prime.md +7 -0
  20. package/commands/arc-project.md +35 -0
  21. package/commands/arc-quickstart.md +11 -0
  22. package/commands/arc-ready.md +15 -0
  23. package/commands/arc-self.md +33 -0
  24. package/commands/arc-server.md +24 -0
  25. package/commands/arc-show.md +17 -0
  26. package/commands/arc-stats.md +12 -0
  27. package/commands/arc-team.md +30 -0
  28. package/commands/arc-update.md +30 -0
  29. package/commands/arc-which.md +13 -0
  30. package/index.js +153 -0
  31. package/package.json +43 -0
  32. package/skills/arc/SKILL.md +210 -0
  33. package/skills/arc/_formatting.md +26 -0
  34. package/skills/arc-brainstorm/SKILL.md +103 -0
  35. package/skills/arc-debug/SKILL.md +62 -0
  36. package/skills/arc-finish/SKILL.md +57 -0
  37. package/skills/arc-implement/SKILL.md +269 -0
  38. package/skills/arc-plan/SKILL.md +98 -0
  39. package/skills/arc-review/SKILL.md +159 -0
  40. package/skills/arc-verify/SKILL.md +60 -0
  41. package/version.txt +1 -0
@@ -0,0 +1,13 @@
1
+ ---
2
+ description: Show which project is active and how it was resolved
3
+ ---
4
+
5
+ Run `arc which` to display the currently active project and its resolution source.
6
+
7
+ Shows:
8
+ - The active project ID and name
9
+ - Where the project was resolved from (command line flag, local config, or server path match)
10
+ - The project config file path
11
+ - Any warnings about the configuration
12
+
13
+ Useful for debugging project resolution issues when commands target the wrong project.
package/index.js ADDED
@@ -0,0 +1,153 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+
5
+ const pluginRoot = path.dirname(fileURLToPath(import.meta.url));
6
+
7
+ function readMarkdownAsset(assetPath) {
8
+ const content = fs.readFileSync(assetPath, "utf8");
9
+ const match = content.match(/^---\n([\s\S]*?)\n---\n?([\s\S]*)$/);
10
+ if (!match) {
11
+ return { frontmatter: {}, body: content.trim() };
12
+ }
13
+ return {
14
+ frontmatter: parseFrontmatter(match[1]),
15
+ body: match[2].trim(),
16
+ };
17
+ }
18
+
19
+ function parseFrontmatter(source) {
20
+ const result = {};
21
+ let currentObject;
22
+
23
+ for (const line of source.split("\n")) {
24
+ if (line.trim() === "") {
25
+ continue;
26
+ }
27
+
28
+ const nested = line.match(/^\s+([^:]+):\s*(.*)$/);
29
+ if (nested && currentObject) {
30
+ currentObject[nested[1].trim()] = parseScalar(nested[2]);
31
+ continue;
32
+ }
33
+
34
+ const entry = line.match(/^([^:]+):\s*(.*)$/);
35
+ if (!entry) {
36
+ continue;
37
+ }
38
+
39
+ const key = entry[1].trim();
40
+ const value = entry[2];
41
+ if (value === "") {
42
+ result[key] = {};
43
+ currentObject = result[key];
44
+ continue;
45
+ }
46
+
47
+ result[key] = parseScalar(value);
48
+ currentObject = undefined;
49
+ }
50
+
51
+ return result;
52
+ }
53
+
54
+ function parseScalar(value) {
55
+ const trimmed = value.trim();
56
+ if (trimmed === "true") {
57
+ return true;
58
+ }
59
+ if (trimmed === "false") {
60
+ return false;
61
+ }
62
+ return trimmed;
63
+ }
64
+
65
+ function listMarkdownFiles(directory) {
66
+ return fs
67
+ .readdirSync(directory, { withFileTypes: true })
68
+ .filter((entry) => entry.isFile() && entry.name.endsWith(".md"))
69
+ .map((entry) => path.join(directory, entry.name))
70
+ .sort();
71
+ }
72
+
73
+ function loadCommands() {
74
+ const commands = {};
75
+ const commandsDir = path.join(pluginRoot, "commands");
76
+
77
+ for (const filePath of listMarkdownFiles(commandsDir)) {
78
+ const { frontmatter, body } = readMarkdownAsset(filePath);
79
+ commands[path.basename(filePath, ".md")] = {
80
+ ...frontmatter,
81
+ template: body,
82
+ };
83
+ }
84
+
85
+ return commands;
86
+ }
87
+
88
+ function loadAgents() {
89
+ const agents = {};
90
+ const agentsDir = path.join(pluginRoot, "agents");
91
+
92
+ for (const filePath of listMarkdownFiles(agentsDir)) {
93
+ const { frontmatter, body } = readMarkdownAsset(filePath);
94
+ const permission = permissionsFromTools(frontmatter.tools);
95
+ agents[path.basename(filePath, ".md")] = {
96
+ ...frontmatter,
97
+ ...(Object.keys(permission).length > 0 ? { permission } : {}),
98
+ prompt: body,
99
+ };
100
+ }
101
+
102
+ return agents;
103
+ }
104
+
105
+ function permissionsFromTools(tools = {}) {
106
+ const supportedPermissions = new Set(["bash", "edit", "webfetch", "doom_loop", "external_directory"]);
107
+ const permission = {};
108
+
109
+ for (const [toolName, enabled] of Object.entries(tools)) {
110
+ if (supportedPermissions.has(toolName)) {
111
+ permission[toolName] = enabled ? "allow" : "deny";
112
+ }
113
+ }
114
+
115
+ return permission;
116
+ }
117
+
118
+ function addDefaults(target, defaults) {
119
+ for (const [key, value] of Object.entries(defaults)) {
120
+ if (target[key] === undefined) {
121
+ target[key] = value;
122
+ }
123
+ }
124
+ }
125
+
126
+ export const ArcPlugin = async ({ $ }) => ({
127
+ config: async (config) => {
128
+ config.command ??= {};
129
+ config.agent ??= {};
130
+ config.skills ??= {};
131
+ config.skills.paths ??= [];
132
+
133
+ addDefaults(config.command, loadCommands());
134
+ addDefaults(config.agent, loadAgents());
135
+
136
+ const skillsPath = path.join(pluginRoot, "skills");
137
+ if (!config.skills.paths.includes(skillsPath)) {
138
+ config.skills.paths.push(skillsPath);
139
+ }
140
+ },
141
+ event: async ({ event }) => {
142
+ if (event.type !== "session.created" && event.type !== "session.compacted") {
143
+ return;
144
+ }
145
+ try {
146
+ await $`arc prime`;
147
+ } catch {
148
+ // Fail open so missing or unhealthy arc never blocks OpenCode.
149
+ }
150
+ },
151
+ });
152
+
153
+ export default ArcPlugin;
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@bfirestone45/opencode-arc",
3
+ "version": "0.3.1",
4
+ "description": "Official OpenCode plugin package for arc workflow integration.",
5
+ "type": "module",
6
+ "main": "./index.js",
7
+ "module": "./index.js",
8
+ "exports": {
9
+ ".": "./index.js"
10
+ },
11
+ "files": [
12
+ "index.js",
13
+ "commands",
14
+ "agents",
15
+ "skills",
16
+ "README.md",
17
+ "CHANGELOG.md",
18
+ "version.txt"
19
+ ],
20
+ "scripts": {
21
+ "test": "node --test index.test.mjs",
22
+ "pack:dry-run": "npm pack --dry-run",
23
+ "prepublishOnly": "npm test && npm run pack:dry-run"
24
+ },
25
+ "keywords": [
26
+ "opencode",
27
+ "opencode-plugin",
28
+ "arc",
29
+ "agent-workflow"
30
+ ],
31
+ "license": "MIT",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/bfirestone/agent-marketplace",
35
+ "directory": "opencode-marketplace/plugins/arc"
36
+ },
37
+ "peerDependencies": {
38
+ "@opencode-ai/plugin": "*"
39
+ },
40
+ "publishConfig": {
41
+ "access": "public"
42
+ }
43
+ }
@@ -0,0 +1,210 @@
1
+ ---
2
+ name: arc
3
+ description: General arc CLI reference and workflow context. Use when the user asks about arc commands, issue tracking workflows, when to use arc vs TodoWrite, or needs help with arc configuration.
4
+ ---
5
+
6
+ # Arc Issue Tracker
7
+
8
+ Track complex, multi-session work with a central issue tracking system.
9
+
10
+ ## Setup
11
+
12
+ Install the OpenCode arc plugin from `opencode-marketplace/plugins/arc/`.
13
+
14
+ After installation, run `arc onboard` in any project. It will:
15
+ - Resolve project from server-side path registration (primary mechanism)
16
+ - Or detect from local project config (`~/.arc/projects/`)
17
+ - Or prompt you to run `arc init` for new projects
18
+
19
+ If you are using the CLI without the plugin:
20
+ ```bash
21
+ arc init # Initialize project
22
+ ```
23
+
24
+ The plugin is the single source of truth for agent-runtime integration. It provides:
25
+ - **SessionStart/PreCompact hooks** - runs `arc prime` automatically
26
+ - **Starter prompts and docs** - includes install metadata and command docs that point users to `arc onboard`
27
+ - **Skills and resources** - detailed guides and reference
28
+ - **Agents** - for bulk operations
29
+
30
+ ## When to Use Arc vs TodoWrite
31
+
32
+ | Use Arc | Use TodoWrite |
33
+ |---------|---------------|
34
+ | Multi-session work | Single-session tasks |
35
+ | Complex dependencies | Linear task lists |
36
+ | Discovered work patterns | Simple checklists |
37
+ | Work needing audit trail | Quick, disposable lists |
38
+
39
+ **Rule of thumb**: When in doubt, prefer arc—persistence you don't need beats lost context.
40
+
41
+ **Deep dive**: Run `arc docs boundaries` for detailed decision criteria.
42
+
43
+ ## Workflow Skills
44
+
45
+ Arc includes workflow skills that guide you through the development lifecycle with built-in process discipline.
46
+
47
+ | Skill | Purpose | Invoke when |
48
+ |-------|---------|-------------|
49
+ | `arc-brainstorm` | Design discovery through Socratic dialogue | Starting new features or significant work |
50
+ | `arc-plan` | Break design into implementation tasks | After `arc-brainstorm` approves a design |
51
+ | `arc-implement` | TDD execution via fresh subagents per task | Ready to implement planned tasks |
52
+ | `arc-debug` | 4-phase root cause investigation | Encountering bugs or test failures |
53
+ | `arc-verify` | Evidence-based completion gates | Before claiming any work is done |
54
+ | `arc-review` | Code review dispatch and triage | After implementing a task |
55
+ | `arc-finish` | Session completion protocol | Ending a work session |
56
+
57
+ ### Pipeline
58
+
59
+ ```
60
+ arc-brainstorm → arc-plan → arc-implement (per task) → arc-review → arc-finish
61
+ ↕ ↕
62
+ arc-debug arc-verify
63
+ ```
64
+
65
+ ### Execution Paths
66
+
67
+ After `arc-plan`, choose:
68
+ - **Single-agent + subagents**: Invoke `arc-implement`. Main agent orchestrates, subagents do TDD. Best for sequential tasks.
69
+ - **Agentic team (Claude Code today)**: This OpenCode port defers that execution path. Use the single-agent + subagent flow here, and only use the team-deploy surface in runtimes that explicitly support it.
70
+
71
+ ## Quick Start
72
+
73
+ Run `arc onboard` at session start to get project context and available issues.
74
+
75
+ **Project Recovery**: If local project config is missing, `arc onboard` resolves the project via server-side path registration. The server is the source of truth for project-to-directory mappings.
76
+
77
+ ## CLI Reference
78
+
79
+ Run `arc prime` for full workflow context, or `arc <command> --help` for specific commands.
80
+
81
+ **Essential commands:**
82
+ - `arc ready` - Find unblocked work
83
+ - `arc create` - Create issues
84
+ - `arc update` - Update status/fields
85
+ - `arc close` - Complete work
86
+ - `arc show` - View details
87
+ - `arc dep` - Manage dependencies
88
+ - `arc plan` - Manage plans (create, show, approve, reject, comments)
89
+ - `arc which` - Show active project and resolution source
90
+ - `arc paths` - Manage workspace path registrations
91
+ - `arc project` - Manage projects (list, create, delete, rename, merge)
92
+ - `arc self update` - Update arc CLI to latest version
93
+ - `arc db backup` - Create database backup
94
+
95
+ ## Deep Dive Documentation
96
+
97
+ **Two-step workflow:**
98
+ 1. **Search** to find which topic has the info: `arc docs search "query"`
99
+ 2. **Read** the full topic for details: `arc docs <topic>`
100
+
101
+ ```bash
102
+ # Search returns [topic] in brackets - tells you where to look
103
+ arc docs search "create issue"
104
+ # Results show: [workflows] Discovery and Issue Creation...
105
+
106
+ # Then read that topic for full content
107
+ arc docs workflows
108
+ ```
109
+
110
+ Fuzzy matching handles typos - "dependncy" finds "dependency" docs.
111
+
112
+ **Available topics** with `arc docs <topic>`:
113
+
114
+ | Command | Purpose |
115
+ |---------|---------|
116
+ | `arc docs boundaries` | When to use arc vs TodoWrite - decision matrix, integration patterns, common mistakes |
117
+ | `arc docs workflows` | Step-by-step checklists for session start, epic planning, side quests, handoff |
118
+ | `arc docs dependencies` | Dependency types (blocks, related, parent-child, discovered-from) and when to use each |
119
+ | `arc docs resumability` | Writing notes that survive compaction - templates and anti-patterns |
120
+ | `arc docs plans` | Plan patterns (inline, parent-epic, shared) with examples |
121
+ | `arc docs plugin` | OpenCode plugin installation and workflow contract |
122
+
123
+ Run `arc docs` without a topic to see an overview.
124
+
125
+ ## Agent Mode
126
+
127
+ For bulk operations (creating epics with tasks, batch updates), use the **arc-issue-tracker** agent as a subagent. This keeps arc command execution in a dedicated workflow without consuming main conversation context.
128
+
129
+ ## Dependency Types
130
+
131
+ Arc supports four dependency types:
132
+
133
+ | Type | Purpose | Affects Ready? |
134
+ |------|---------|----------------|
135
+ | **blocks** | Hard blocker - B can't start until A complete | Yes |
136
+ | **related** | Soft link - informational only | No |
137
+ | **parent-child** | Epic/subtask hierarchy | Yes |
138
+ | **discovered-from** | Track provenance of discovered work | No |
139
+
140
+ **Deep dive**: Run `arc docs dependencies` for examples and patterns.
141
+
142
+ ## Plans
143
+
144
+ Plans are ephemeral review artifacts backed by filesystem markdown files in `docs/plans/`. They support a review workflow with approval, rejection, and comments.
145
+
146
+ **CLI commands:**
147
+
148
+ | Command | Purpose |
149
+ |---------|---------|
150
+ | `arc plan create <file-path>` | Register an ephemeral plan, returns plan ID |
151
+ | `arc plan show <plan-id>` | Show plan content, status, and comments |
152
+ | `arc plan approve <plan-id>` | Approve the plan |
153
+ | `arc plan reject <plan-id>` | Reject the plan |
154
+ | `arc plan comments <plan-id>` | List review comments |
155
+
156
+ Plans go through a review cycle: create, review (with comments), then approve or reject. Approved design content is written into the epic's description field when creating implementation tasks. Run `arc docs plans` for full details.
157
+
158
+ ## Labels
159
+
160
+ Labels are global (shared across all projects) and support colors and descriptions. Use labels for cross-cutting categorization like `security`, `performance`, `tech-debt`.
161
+
162
+ ## Session Protocol
163
+
164
+ **At session start:**
165
+ ```bash
166
+ arc onboard # Get context, recover project if needed
167
+ ```
168
+
169
+ **Before ending any session:**
170
+ Invoke the `arc-finish` skill — it handles capturing remaining work, quality gates, arc updates, commit, and push. Work is NOT done until `git push` succeeds.
171
+
172
+ **Writing notes for resumability:**
173
+ ```bash
174
+ arc update <id> --stdin <<'EOF'
175
+ COMPLETED: X. IN PROGRESS: Y. NEXT: Z
176
+ EOF
177
+ ```
178
+
179
+ **Deep dive**: Run `arc docs resumability` for templates.
180
+
181
+ ## Common Workflows
182
+
183
+ ### Starting Work
184
+ ```bash
185
+ arc onboard # Get context (recovers project if needed)
186
+ arc ready # Find available work
187
+ arc show <id> # View details
188
+ arc update <id> --take # Claim work (sets session ID + in_progress)
189
+ ```
190
+
191
+ ### Creating Issues
192
+ ```bash
193
+ arc create "Title" -t task # Create task
194
+ arc create "Epic title" -t epic # Create epic
195
+ arc create "Subtask" --parent <epic-id> # Create child issue
196
+ arc dep add child-id parent-id --type parent-child # Or link existing issue to epic
197
+
198
+ # With multi-line description (use --stdin flag):
199
+ arc create "Title" -t task --stdin <<'EOF'
200
+ Description with context, acceptance criteria, etc.
201
+ EOF
202
+ ```
203
+
204
+ ### Completing Work
205
+ ```bash
206
+ arc close <id> --reason "done" # Complete issue
207
+ arc ready # See what unblocked
208
+ ```
209
+
210
+ **Deep dive**: Run `arc docs workflows` for complete checklists.
@@ -0,0 +1,26 @@
1
+ # Content Formatting Guide
2
+
3
+ The arc frontend renders GitHub Flavored Markdown with syntax highlighting. Follow these rules when writing issue descriptions, plans, comments, and notes.
4
+
5
+ ## Use
6
+ - **Fenced code blocks** with language tags: ` ```go `, ` ```bash `, ` ```json `, ` ```typescript `, ` ```sql `, ` ```yaml `, ` ```python `, ` ```html `, ` ```css `
7
+ - **Headings** (`##` and `###`) for section structure
8
+ - **Bullet lists** (`-`) for unordered items and file lists
9
+ - **Numbered lists** (`1.`) for sequential steps
10
+ - **Task lists** (`- [ ]` and `- [x]`) for checklists
11
+ - **Tables** (`| col | col |`) for structured comparisons
12
+ - **Inline code** (backticks) for file paths, function names, variable names, and CLI commands
13
+ - **Bold** (`**text**`) for emphasis on key terms
14
+ - **Blockquotes** (`>`) for important callouts or notes
15
+ - **Links** (`[text](url)`) for references
16
+
17
+ ## Avoid
18
+ - Raw HTML tags — DOMPurify strips most tags
19
+ - Code fences without language tags — always specify the language for syntax highlighting
20
+ - UPPERCASE section headers (use `##` Markdown headings instead)
21
+ - Very long single-line paragraphs — use line breaks for readability
22
+
23
+ ## Code Block Languages
24
+ Supported with syntax highlighting: go, typescript, javascript, json, bash, shell, sql, yaml, markdown, html, css, python, text
25
+
26
+ For unsupported languages, use `text` as the language tag.
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: arc-brainstorm
3
+ description: Use when starting Arc-tracked design exploration, feature discovery, architecture decisions, or trade-off analysis before implementation. Prefer this over generic brainstorming when the project uses Arc plans and issue tracking.
4
+ ---
5
+
6
+ # Arc Brainstorm
7
+
8
+ Turn an idea into an approved design artifact, register it with the Arc planner, and hand it off to `arc-plan`.
9
+
10
+ <HARD-GATE>
11
+ Do NOT write implementation code, scaffold files beyond the design document, invoke `arc-implement`, or begin execution during brainstorming. This skill ends with either an approved design in the planner and a handoff to `arc-plan`, or a saved design that is deferred for later.
12
+ </HARD-GATE>
13
+
14
+ ## Ordered Checklist
15
+
16
+ Follow these items in order.
17
+
18
+ 1. **Explore current project context**
19
+ - Check the relevant files, docs, recent changes, and existing Arc issue or plan context before proposing changes.
20
+ - Understand what already exists, what constraints are already fixed, and which project patterns should be preserved.
21
+ 2. **Run a one-question design loop**
22
+ - Ask one clarifying question at a time.
23
+ - Prefer native OpenCode multiple-choice questions when practical.
24
+ - Use open-ended questions only when bounded options would hide an important unknown.
25
+ - Do not dump a batch of questions in one message.
26
+ 3. **Propose bounded approaches**
27
+ - Present 2-3 realistic approaches with trade-offs, expected complexity, and a recommendation.
28
+ - Ask the user to approve the recommendation or choose another approach before continuing.
29
+ 4. **Present the design in approved sections**
30
+ - Build the design in clear sections such as goal, scope boundaries, chosen approach, interfaces or contracts, dependency ordering, testing expectations, and risks.
31
+ - Present one section at a time when the design is non-trivial.
32
+ - Ask for approval at each major design checkpoint before moving forward.
33
+ - If the user requests changes, revise that section and ask again.
34
+ 5. **Prepare the approved design artifact**
35
+ - Once the design is approved in-session, write it to `docs/plans/YYYY-MM-DD-<topic>.md`.
36
+ - Keep the document concise, decision-oriented, and ready for planner review.
37
+ - Include the approved goal, in-scope work, out-of-scope work, chosen approach, shared contracts, dependency notes, testing expectations, and major risks.
38
+ 6. **Register the design with Arc planner**
39
+ - Run `arc plan create <path>` using the design file path.
40
+ - Capture the returned plan ID and planner URL from the command output when available.
41
+ - If the command output does not print the planner URL directly, derive it in this order: `ARC_SERVER` from the environment, then the Arc server URL from local config.
42
+ - If no authoritative server URL is available, do not invent one; surface the `plan-id` explicitly and tell the user the planner URL could not be derived automatically.
43
+ - Surface both the `plan-id` and planner URL explicitly whenever the URL is available so the user can open or resume the review state directly.
44
+ 7. **Run the planner review loop with a native OpenCode question**
45
+ - Ask a native OpenCode question with only these outcomes:
46
+ - `approve the design`
47
+ - `feedback submitted in planner`
48
+ - `save for later`
49
+ - Do not render a plain-text approval menu.
50
+ - Include the planner URL directly in the prompt text.
51
+ 8. **Handle planner feedback truthfully**
52
+ - If the user selects `feedback submitted in planner`, run `arc plan comments <plan-id>` and `arc plan show <plan-id>`.
53
+ - Read the planner feedback, revise the same design file, and repeat the same planner review loop.
54
+ - Continue until the design is approved or deferred.
55
+ 9. **Approve and hand off**
56
+ - If the user selects `approve the design`, run `arc plan approve <plan-id>`.
57
+ - Always hand off to `arc-plan` after approval.
58
+ - Never offer direct `arc-implement` routing from `arc-brainstorm`, even for tiny tasks.
59
+ 10. **Defer cleanly when needed**
60
+ - If the user selects `save for later`, stop after confirming the design file path, `plan-id`, and planner URL.
61
+ - Do not begin planning or implementation.
62
+
63
+ ## Interaction Rules
64
+
65
+ - Ask one question at a time.
66
+ - Prefer native OpenCode multiple-choice questions when practical.
67
+ - Present 2-3 approaches before locking the design.
68
+ - Ask for approval at each major design checkpoint.
69
+ - Avoid bulk question dumps.
70
+ - Avoid plain-text approval menus.
71
+ - Do not begin implementation.
72
+
73
+ ## Design Artifact Requirements
74
+
75
+ The approved design artifact should be ready for `arc-plan` without re-inventing the design.
76
+
77
+ - Include the approved goal and success criteria.
78
+ - Include scope boundaries and explicit non-goals.
79
+ - Include the chosen approach and why it won.
80
+ - Include shared contracts or interfaces when later tasks depend on them.
81
+ - Include dependency ordering or foundation-first sequencing when needed.
82
+ - Include testing expectations and major risks.
83
+ - Keep the design truthful and bounded to what the user actually approved.
84
+
85
+ ## Planner Review Loop
86
+
87
+ Follow the review loop already defined in the ordered checklist.
88
+
89
+ - Surface both the `plan-id` and planner URL as the review state.
90
+ - If the planner URL cannot be derived from command output, `ARC_SERVER`, or local Arc config, say so explicitly instead of fabricating a link.
91
+ - Reuse the same native OpenCode question until the design is approved or deferred.
92
+ - On approval, run `arc plan approve <plan-id>` and route to `arc-plan`.
93
+
94
+ ## Completion Condition
95
+
96
+ This skill is complete when:
97
+
98
+ - the design has been explored and approved in sections,
99
+ - the approved design has been written to `docs/plans/`,
100
+ - the design has been registered with `arc plan create`,
101
+ - the `plan-id` and planner URL have been surfaced explicitly,
102
+ - the planner review loop has ended in approval or deferral, and
103
+ - approved work is handed off to `arc-plan`, while deferred work stops cleanly without planning or implementation.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: arc-debug
3
+ description: Use when debugging an arc-tracked task in OpenCode, especially for bugs, failing tests, unexpected behavior, stack traces, or requests to investigate root cause before changing code.
4
+ ---
5
+
6
+ # Arc Debug
7
+
8
+ Debug by proving what is happening before proposing a fix.
9
+
10
+ ## Core Rule
11
+
12
+ **No fixes without root cause investigation first.**
13
+
14
+ If the problem is not reproduced and supported by evidence, do not guess.
15
+
16
+ ## Process
17
+
18
+ ### 1. Reproduce the issue
19
+
20
+ - Capture the exact failing command, input, or user flow.
21
+ - Re-run it until the failure is reproducible, or record that it is intermittent.
22
+ - If it does not reproduce yet, keep gathering data instead of proposing changes.
23
+
24
+ ### 2. Gather evidence
25
+
26
+ - Read the full error output, stack trace, logs, and test failure text.
27
+ - Check recent relevant changes and the specific code path involved.
28
+ - In multi-step flows, trace the data or state across each boundary until it stops matching expectations.
29
+ - Write down the observed facts separately from assumptions.
30
+
31
+ ### 3. Identify root cause
32
+
33
+ - Form one concrete hypothesis that explains the evidence.
34
+ - Test that hypothesis with the smallest possible confirming check.
35
+ - If the check fails, discard the hypothesis and continue investigating.
36
+ - Do not recommend a fix until the root cause is identified in substance.
37
+
38
+ ### 4. Ask focused follow-up questions only when needed
39
+
40
+ - Ask one focused question only if a missing fact blocks reproduction or root-cause analysis.
41
+ - Prefer questions that unlock a specific check, such as environment, inputs, or expected behavior.
42
+ - Do not ask broad exploratory questions when the answer can be gathered from the repo or command output.
43
+
44
+ ### 5. Then fix and verify
45
+
46
+ - Change the smallest thing that addresses the root cause.
47
+ - Re-run the reproduction step and any relevant tests.
48
+ - If the fix does not hold up under verification, return to investigation.
49
+
50
+ ## Red Flags
51
+
52
+ - Proposing code changes before reproducing the issue
53
+ - Treating symptoms as the root cause
54
+ - Bundling multiple speculative fixes together
55
+ - Saying something "should work" without evidence
56
+ - Asking unfocused questions instead of collecting the next missing fact
57
+
58
+ ## Arc Notes
59
+
60
+ - Keep arc issue state truthful while investigating.
61
+ - If debugging reveals separate follow-up work, capture it in arc instead of hiding it inside the current task.
62
+ - Format any arc notes per `skills/arc/_formatting.md`.
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: arc-finish
3
+ description: Use when wrapping up arc-tracked work in OpenCode, especially at session end or when deciding whether to close, defer, commit, push, or hand off work while keeping issue and branch state accurate.
4
+ ---
5
+
6
+ # Arc Finish
7
+
8
+ Close out work by checking what remains, making one decision at a time, and leaving arc and git in a truthful state.
9
+
10
+ ## Core Rule
11
+
12
+ **Do not perform close-out actions by habit. Verify the current state first, then ask for the next decision when needed.**
13
+
14
+ ## Close-Out Protocol
15
+
16
+ ### 1. Verify remaining work
17
+
18
+ - Review the task goal, current implementation state, and latest verification evidence.
19
+ - Confirm what is done, what is still open, and what follow-up work should be captured separately.
20
+ - If completion is not yet proven, do not present the work as ready to close.
21
+
22
+ ### 2. Keep arc state truthful
23
+
24
+ - Close the issue only when the task is actually complete.
25
+ - Leave it open or move it to the truthful status when work remains.
26
+ - Record concise factual notes about what changed, what is verified, and what is still pending.
27
+
28
+ ### 3. Keep branch state truthful
29
+
30
+ - Distinguish between uncommitted changes, local commits, and pushed commits.
31
+ - Do not imply work is landed if it only exists in the working tree or on the local branch.
32
+ - If the branch still needs a user decision, say so plainly.
33
+
34
+ ### 4. Ask one native question at a time for close-out decisions
35
+
36
+ - Ask one question when a real decision is needed, such as whether to close now, create follow-up issues, commit, push, or hand off.
37
+ - Keep it native to the current state of the work, not a canned checklist.
38
+ - Do not bundle several decisions into one question.
39
+
40
+ ### 5. Execute only the chosen next step
41
+
42
+ - After the user answers, perform that step and then reassess.
43
+ - If another decision remains, ask the next one question after updating the state.
44
+
45
+ ## Red Flags
46
+
47
+ - Blind always-push behavior
48
+ - Closing issues without verified completion
49
+ - Saying a branch is clean or landed when it is only local
50
+ - Asking multiple close-out decisions at once
51
+ - Summarizing remaining work without checking it first
52
+
53
+ ## Arc Notes
54
+
55
+ - This skill is a truthful close-out decision protocol, not an unconditional push script.
56
+ - Use `arc-verify` before any final completion claim.
57
+ - Format any arc notes per `skills/arc/_formatting.md`.