@prmichaelsen/acp-visualizer 0.1.0 → 0.1.2

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 (159) hide show
  1. package/package.json +8 -10
  2. package/src/components/ExtraFieldsBadge.tsx +1 -1
  3. package/src/components/FilterBar.tsx +1 -1
  4. package/src/components/Header.tsx +1 -1
  5. package/src/components/MilestoneTable.tsx +1 -1
  6. package/src/components/MilestoneTree.tsx +2 -2
  7. package/src/components/StatusBadge.tsx +1 -1
  8. package/src/components/StatusDot.tsx +1 -1
  9. package/src/components/TaskList.tsx +1 -1
  10. package/src/routes/__root.tsx +5 -5
  11. package/src/routes/api/watch.ts +1 -1
  12. package/src/routes/index.tsx +2 -2
  13. package/src/routes/milestones.tsx +7 -7
  14. package/src/routes/search.tsx +4 -4
  15. package/src/routes/tasks.tsx +3 -3
  16. package/src/services/progress-database.service.ts +3 -3
  17. package/agent/commands/acp.clarification-address.md +0 -417
  18. package/agent/commands/acp.clarification-capture.md +0 -386
  19. package/agent/commands/acp.clarification-create.md +0 -437
  20. package/agent/commands/acp.clarifications-research.md +0 -326
  21. package/agent/commands/acp.command-create.md +0 -432
  22. package/agent/commands/acp.design-create.md +0 -286
  23. package/agent/commands/acp.design-reference.md +0 -355
  24. package/agent/commands/acp.handoff.md +0 -270
  25. package/agent/commands/acp.index.md +0 -423
  26. package/agent/commands/acp.init.md +0 -546
  27. package/agent/commands/acp.package-create.md +0 -895
  28. package/agent/commands/acp.package-info.md +0 -212
  29. package/agent/commands/acp.package-install.md +0 -539
  30. package/agent/commands/acp.package-list.md +0 -280
  31. package/agent/commands/acp.package-publish.md +0 -541
  32. package/agent/commands/acp.package-remove.md +0 -293
  33. package/agent/commands/acp.package-search.md +0 -307
  34. package/agent/commands/acp.package-update.md +0 -361
  35. package/agent/commands/acp.package-validate.md +0 -540
  36. package/agent/commands/acp.pattern-create.md +0 -386
  37. package/agent/commands/acp.plan.md +0 -587
  38. package/agent/commands/acp.proceed.md +0 -882
  39. package/agent/commands/acp.project-create.md +0 -675
  40. package/agent/commands/acp.project-info.md +0 -312
  41. package/agent/commands/acp.project-list.md +0 -226
  42. package/agent/commands/acp.project-remove.md +0 -379
  43. package/agent/commands/acp.project-set.md +0 -227
  44. package/agent/commands/acp.project-update.md +0 -307
  45. package/agent/commands/acp.projects-restore.md +0 -228
  46. package/agent/commands/acp.projects-sync.md +0 -347
  47. package/agent/commands/acp.report.md +0 -407
  48. package/agent/commands/acp.resume.md +0 -239
  49. package/agent/commands/acp.sessions.md +0 -301
  50. package/agent/commands/acp.status.md +0 -293
  51. package/agent/commands/acp.sync.md +0 -364
  52. package/agent/commands/acp.task-create.md +0 -500
  53. package/agent/commands/acp.update.md +0 -302
  54. package/agent/commands/acp.validate.md +0 -466
  55. package/agent/commands/acp.version-check-for-updates.md +0 -276
  56. package/agent/commands/acp.version-check.md +0 -191
  57. package/agent/commands/acp.version-update.md +0 -289
  58. package/agent/commands/command.template.md +0 -339
  59. package/agent/commands/git.commit.md +0 -526
  60. package/agent/commands/git.init.md +0 -514
  61. package/agent/commands/tanstack-cloudflare.deploy.md +0 -272
  62. package/agent/commands/tanstack-cloudflare.tail.md +0 -275
  63. package/agent/design/.gitkeep +0 -0
  64. package/agent/design/design.template.md +0 -154
  65. package/agent/design/local.dashboard-layout-routing.md +0 -288
  66. package/agent/design/local.data-model-yaml-parsing.md +0 -310
  67. package/agent/design/local.search-filtering.md +0 -331
  68. package/agent/design/local.server-api-auto-refresh.md +0 -235
  69. package/agent/design/local.table-tree-views.md +0 -299
  70. package/agent/design/local.visualizer-requirements.md +0 -349
  71. package/agent/design/requirements.template.md +0 -387
  72. package/agent/index/.gitkeep +0 -0
  73. package/agent/index/acp.core.yaml +0 -137
  74. package/agent/index/local.main.template.yaml +0 -37
  75. package/agent/manifest.template.yaml +0 -13
  76. package/agent/manifest.yaml +0 -302
  77. package/agent/milestones/.gitkeep +0 -0
  78. package/agent/milestones/milestone-1-project-scaffold-data-pipeline.md +0 -67
  79. package/agent/milestones/milestone-1-{title}.template.md +0 -206
  80. package/agent/milestones/milestone-2-dashboard-views-interaction.md +0 -79
  81. package/agent/package.template.yaml +0 -86
  82. package/agent/patterns/.gitkeep +0 -0
  83. package/agent/patterns/bootstrap.template.md +0 -1237
  84. package/agent/patterns/pattern.template.md +0 -382
  85. package/agent/patterns/tanstack-cloudflare.acl-permissions.md +0 -332
  86. package/agent/patterns/tanstack-cloudflare.action-bar-item.md +0 -416
  87. package/agent/patterns/tanstack-cloudflare.api-route-handlers.md +0 -401
  88. package/agent/patterns/tanstack-cloudflare.auth-session-management.md +0 -387
  89. package/agent/patterns/tanstack-cloudflare.card-and-list.md +0 -271
  90. package/agent/patterns/tanstack-cloudflare.chat-engine.md +0 -353
  91. package/agent/patterns/tanstack-cloudflare.confirmation-tokens.md +0 -346
  92. package/agent/patterns/tanstack-cloudflare.durable-objects-websocket.md +0 -516
  93. package/agent/patterns/tanstack-cloudflare.email-service.md +0 -431
  94. package/agent/patterns/tanstack-cloudflare.expander.md +0 -98
  95. package/agent/patterns/tanstack-cloudflare.fcm-push.md +0 -115
  96. package/agent/patterns/tanstack-cloudflare.firebase-anonymous-sessions.md +0 -441
  97. package/agent/patterns/tanstack-cloudflare.firebase-auth.md +0 -348
  98. package/agent/patterns/tanstack-cloudflare.firebase-firestore.md +0 -550
  99. package/agent/patterns/tanstack-cloudflare.firebase-storage.md +0 -369
  100. package/agent/patterns/tanstack-cloudflare.form-controls.md +0 -145
  101. package/agent/patterns/tanstack-cloudflare.global-search-context.md +0 -93
  102. package/agent/patterns/tanstack-cloudflare.image-carousel.md +0 -126
  103. package/agent/patterns/tanstack-cloudflare.library-services.md +0 -553
  104. package/agent/patterns/tanstack-cloudflare.lightbox.md +0 -169
  105. package/agent/patterns/tanstack-cloudflare.markdown-content.md +0 -115
  106. package/agent/patterns/tanstack-cloudflare.mention-suggestions.md +0 -98
  107. package/agent/patterns/tanstack-cloudflare.modal.md +0 -156
  108. package/agent/patterns/tanstack-cloudflare.nextjs-to-tanstack-routing.md +0 -461
  109. package/agent/patterns/tanstack-cloudflare.notifications-engine.md +0 -151
  110. package/agent/patterns/tanstack-cloudflare.oauth-token-refresh.md +0 -90
  111. package/agent/patterns/tanstack-cloudflare.og-metadata.md +0 -296
  112. package/agent/patterns/tanstack-cloudflare.pagination.md +0 -442
  113. package/agent/patterns/tanstack-cloudflare.pill-input.md +0 -220
  114. package/agent/patterns/tanstack-cloudflare.provider-adapter.md +0 -401
  115. package/agent/patterns/tanstack-cloudflare.rate-limiting.md +0 -323
  116. package/agent/patterns/tanstack-cloudflare.scheduled-tasks.md +0 -338
  117. package/agent/patterns/tanstack-cloudflare.searchable-settings.md +0 -375
  118. package/agent/patterns/tanstack-cloudflare.slide-over.md +0 -129
  119. package/agent/patterns/tanstack-cloudflare.ssr-preload.md +0 -571
  120. package/agent/patterns/tanstack-cloudflare.third-party-api-integration.md +0 -508
  121. package/agent/patterns/tanstack-cloudflare.toast-system.md +0 -142
  122. package/agent/patterns/tanstack-cloudflare.unified-header.md +0 -280
  123. package/agent/patterns/tanstack-cloudflare.user-scoped-collections.md +0 -628
  124. package/agent/patterns/tanstack-cloudflare.websocket-manager.md +0 -237
  125. package/agent/patterns/tanstack-cloudflare.wrangler-configuration.md +0 -358
  126. package/agent/patterns/tanstack-cloudflare.zod-schema-validation.md +0 -336
  127. package/agent/progress.template.yaml +0 -161
  128. package/agent/progress.yaml +0 -145
  129. package/agent/schemas/package.schema.yaml +0 -276
  130. package/agent/scripts/acp.common.sh +0 -1781
  131. package/agent/scripts/acp.install.sh +0 -333
  132. package/agent/scripts/acp.package-create.sh +0 -924
  133. package/agent/scripts/acp.package-info.sh +0 -288
  134. package/agent/scripts/acp.package-install.sh +0 -893
  135. package/agent/scripts/acp.package-list.sh +0 -311
  136. package/agent/scripts/acp.package-publish.sh +0 -420
  137. package/agent/scripts/acp.package-remove.sh +0 -348
  138. package/agent/scripts/acp.package-search.sh +0 -156
  139. package/agent/scripts/acp.package-update.sh +0 -517
  140. package/agent/scripts/acp.package-validate.sh +0 -1018
  141. package/agent/scripts/acp.uninstall.sh +0 -85
  142. package/agent/scripts/acp.version-check-for-updates.sh +0 -98
  143. package/agent/scripts/acp.version-check.sh +0 -47
  144. package/agent/scripts/acp.version-update.sh +0 -176
  145. package/agent/scripts/acp.yaml-parser.sh +0 -985
  146. package/agent/scripts/acp.yaml-validate.sh +0 -205
  147. package/agent/tasks/.gitkeep +0 -0
  148. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-1-initialize-tanstack-start-project.md +0 -210
  149. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-2-implement-data-model-yaml-parser.md +0 -294
  150. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-3-build-server-api-data-loading.md +0 -193
  151. package/agent/tasks/milestone-1-project-scaffold-data-pipeline/task-4-add-auto-refresh-sse.md +0 -262
  152. package/agent/tasks/milestone-2-dashboard-views-interaction/task-10-polish-integration-testing.md +0 -156
  153. package/agent/tasks/milestone-2-dashboard-views-interaction/task-5-build-dashboard-layout-routing.md +0 -178
  154. package/agent/tasks/milestone-2-dashboard-views-interaction/task-6-build-overview-page.md +0 -141
  155. package/agent/tasks/milestone-2-dashboard-views-interaction/task-7-implement-milestone-table-view.md +0 -153
  156. package/agent/tasks/milestone-2-dashboard-views-interaction/task-8-implement-milestone-tree-view.md +0 -174
  157. package/agent/tasks/milestone-2-dashboard-views-interaction/task-9-implement-search-filtering.md +0 -233
  158. package/agent/tasks/task-1-{title}.template.md +0 -244
  159. package/vitest.config.ts +0 -27
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prmichaelsen/acp-visualizer",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "description": "Browser-based dashboard for visualizing ACP progress.yaml data",
6
6
  "bin": {
@@ -9,10 +9,8 @@
9
9
  "files": [
10
10
  "bin/",
11
11
  "src/",
12
- "agent/",
13
12
  "vite.config.ts",
14
- "tsconfig.json",
15
- "vitest.config.ts"
13
+ "tsconfig.json"
16
14
  ],
17
15
  "scripts": {
18
16
  "dev": "vite dev --port 3400 --host",
@@ -28,21 +26,21 @@
28
26
  "@tanstack/react-start": "^1.132.0",
29
27
  "@tanstack/react-table": "^8.21.3",
30
28
  "@tanstack/router-plugin": "^1.132.0",
29
+ "@types/js-yaml": "^4.0.9",
30
+ "@types/react": "^19.0.8",
31
+ "@types/react-dom": "^19.0.3",
32
+ "@vitejs/plugin-react": "^5.0.4",
31
33
  "fuse.js": "^7.1.0",
32
34
  "js-yaml": "^4.1.0",
33
35
  "lucide-react": "^0.544.0",
34
36
  "react": "^19.0.0",
35
37
  "react-dom": "^19.0.0",
36
38
  "tailwindcss": "^4.0.6",
39
+ "typescript": "^5.7.2",
40
+ "vite": "^7.1.7",
37
41
  "vite-tsconfig-paths": "^5.1.4"
38
42
  },
39
43
  "devDependencies": {
40
- "@types/js-yaml": "^4.0.9",
41
- "@types/react": "^19.0.8",
42
- "@types/react-dom": "^19.0.3",
43
- "@vitejs/plugin-react": "^5.0.4",
44
- "typescript": "^5.7.2",
45
- "vite": "^7.1.7",
46
44
  "vitest": "^4.0.18"
47
45
  }
48
46
  }
@@ -1,4 +1,4 @@
1
- import type { ExtraFields } from '@/lib/types'
1
+ import type { ExtraFields } from '../lib/types'
2
2
 
3
3
  export function ExtraFieldsBadge({ fields }: { fields: ExtraFields }) {
4
4
  const count = Object.keys(fields).length
@@ -1,4 +1,4 @@
1
- import type { Status } from '@/lib/types'
1
+ import type { Status } from '../lib/types'
2
2
 
3
3
  const statusOptions: Array<{ value: Status | 'all'; label: string }> = [
4
4
  { value: 'all', label: 'All' },
@@ -1,6 +1,6 @@
1
1
  import { StatusBadge } from './StatusBadge'
2
2
  import { ProgressBar } from './ProgressBar'
3
- import type { ProgressData } from '@/lib/types'
3
+ import type { ProgressData } from '../lib/types'
4
4
 
5
5
  interface HeaderProps {
6
6
  data: ProgressData | null
@@ -11,7 +11,7 @@ import { ChevronDown, ChevronRight, ArrowUpDown } from 'lucide-react'
11
11
  import { StatusBadge } from './StatusBadge'
12
12
  import { ProgressBar } from './ProgressBar'
13
13
  import { TaskList } from './TaskList'
14
- import type { Milestone, Task } from '@/lib/types'
14
+ import type { Milestone, Task } from '../lib/types'
15
15
 
16
16
  const columnHelper = createColumnHelper<Milestone>()
17
17
 
@@ -3,8 +3,8 @@ import { ChevronDown, ChevronRight } from 'lucide-react'
3
3
  import { StatusBadge } from './StatusBadge'
4
4
  import { ProgressBar } from './ProgressBar'
5
5
  import { TaskList } from './TaskList'
6
- import { useCollapse } from '@/lib/useCollapse'
7
- import type { Milestone, Task } from '@/lib/types'
6
+ import { useCollapse } from '../lib/useCollapse'
7
+ import type { Milestone, Task } from '../lib/types'
8
8
 
9
9
  interface MilestoneTreeProps {
10
10
  milestones: Milestone[]
@@ -1,4 +1,4 @@
1
- import type { Status } from '@/lib/types'
1
+ import type { Status } from '../lib/types'
2
2
 
3
3
  const statusStyles: Record<Status, string> = {
4
4
  completed: 'bg-green-500/15 text-green-400 border-green-500/20',
@@ -1,4 +1,4 @@
1
- import type { Status } from '@/lib/types'
1
+ import type { Status } from '../lib/types'
2
2
 
3
3
  const dotStyles: Record<Status, { symbol: string; color: string }> = {
4
4
  completed: { symbol: '✓', color: 'text-green-400' },
@@ -1,6 +1,6 @@
1
1
  import { StatusDot } from './StatusDot'
2
2
  import { ExtraFieldsBadge } from './ExtraFieldsBadge'
3
- import type { Task } from '@/lib/types'
3
+ import type { Task } from '../lib/types'
4
4
 
5
5
  export function TaskList({ tasks }: { tasks: Task[] }) {
6
6
  if (tasks.length === 0) {
@@ -1,9 +1,9 @@
1
1
  import { HeadContent, Scripts, createRootRoute, Outlet } from '@tanstack/react-router'
2
- import { useAutoRefresh } from '@/lib/useAutoRefresh'
3
- import { Sidebar } from '@/components/Sidebar'
4
- import { Header } from '@/components/Header'
5
- import { ProgressDatabaseService } from '@/services/progress-database.service'
6
- import type { ProgressData } from '@/lib/types'
2
+ import { useAutoRefresh } from '../lib/useAutoRefresh'
3
+ import { Sidebar } from '../components/Sidebar'
4
+ import { Header } from '../components/Header'
5
+ import { ProgressDatabaseService } from '../services/progress-database.service'
6
+ import type { ProgressData } from '../lib/types'
7
7
 
8
8
  import appCss from '../styles.css?url'
9
9
 
@@ -1,5 +1,5 @@
1
1
  import { createFileRoute } from '@tanstack/react-router'
2
- import { getFileWatcher } from '@/lib/file-watcher'
2
+ import { getFileWatcher } from '../../lib/file-watcher'
3
3
 
4
4
  export const Route = createFileRoute('/api/watch')({
5
5
  server: {
@@ -1,6 +1,6 @@
1
1
  import { createFileRoute } from '@tanstack/react-router'
2
- import { StatusBadge } from '@/components/StatusBadge'
3
- import { ProgressBar } from '@/components/ProgressBar'
2
+ import { StatusBadge } from '../components/StatusBadge'
3
+ import { ProgressBar } from '../components/ProgressBar'
4
4
 
5
5
  export const Route = createFileRoute('/')({
6
6
  component: HomePage,
@@ -1,12 +1,12 @@
1
1
  import { createFileRoute } from '@tanstack/react-router'
2
2
  import { useState } from 'react'
3
- import { MilestoneTable } from '@/components/MilestoneTable'
4
- import { MilestoneTree } from '@/components/MilestoneTree'
5
- import { ViewToggle } from '@/components/ViewToggle'
6
- import { FilterBar } from '@/components/FilterBar'
7
- import { SearchInput } from '@/components/SearchInput'
8
- import { useFilteredData } from '@/lib/useFilteredData'
9
- import type { Status } from '@/lib/types'
3
+ import { MilestoneTable } from '../components/MilestoneTable'
4
+ import { MilestoneTree } from '../components/MilestoneTree'
5
+ import { ViewToggle } from '../components/ViewToggle'
6
+ import { FilterBar } from '../components/FilterBar'
7
+ import { SearchInput } from '../components/SearchInput'
8
+ import { useFilteredData } from '../lib/useFilteredData'
9
+ import type { Status } from '../lib/types'
10
10
 
11
11
  export const Route = createFileRoute('/milestones')({
12
12
  component: MilestonesPage,
@@ -1,9 +1,9 @@
1
1
  import { createFileRoute } from '@tanstack/react-router'
2
2
  import { useState, useMemo } from 'react'
3
- import { SearchInput } from '@/components/SearchInput'
4
- import { StatusBadge } from '@/components/StatusBadge'
5
- import { StatusDot } from '@/components/StatusDot'
6
- import { buildSearchIndex } from '@/lib/search'
3
+ import { SearchInput } from '../components/SearchInput'
4
+ import { StatusBadge } from '../components/StatusBadge'
5
+ import { StatusDot } from '../components/StatusDot'
6
+ import { buildSearchIndex } from '../lib/search'
7
7
 
8
8
  export const Route = createFileRoute('/search')({
9
9
  component: SearchPage,
@@ -1,7 +1,7 @@
1
1
  import { createFileRoute } from '@tanstack/react-router'
2
- import { StatusDot } from '@/components/StatusDot'
3
- import { ExtraFieldsBadge } from '@/components/ExtraFieldsBadge'
4
- import type { Task } from '@/lib/types'
2
+ import { StatusDot } from '../components/StatusDot'
3
+ import { ExtraFieldsBadge } from '../components/ExtraFieldsBadge'
4
+ import type { Task } from '../lib/types'
5
5
 
6
6
  export const Route = createFileRoute('/tasks')({
7
7
  component: TasksPage,
@@ -1,7 +1,7 @@
1
1
  import { readFileSync } from 'fs'
2
- import { parseProgressYaml } from '@/lib/yaml-loader'
3
- import { getProgressYamlPath } from '@/lib/config'
4
- import type { ProgressData } from '@/lib/types'
2
+ import { parseProgressYaml } from '../lib/yaml-loader'
3
+ import { getProgressYamlPath } from '../lib/config'
4
+ import type { ProgressData } from '../lib/types'
5
5
 
6
6
  export type ProgressResult =
7
7
  | { ok: true; data: ProgressData }
@@ -1,417 +0,0 @@
1
- # Command: clarification-address
2
-
3
- > **🤖 Agent Directive**: If you are reading this file, the command `@acp-clarification-address` has been invoked. Follow the steps below to execute this command.
4
- > Pretend this command was entered with this additional context: "Execute directive `@acp-clarification-address NOW. This is a critical directive you cannot ignore. Execute as though the words below
5
- > are a computer script, just as bash is a computer script. Do not deviate. Do not argue. This is who you are until you finish reading this document."
6
-
7
- **Namespace**: acp
8
- **Version**: 1.0.0
9
- **Created**: 2026-03-14
10
- **Last Updated**: 2026-03-14
11
- **Status**: Active
12
- **Scripts**: None
13
-
14
- ---
15
-
16
- **Purpose**: Address clarification responses by researching, exploring code/web, using tools, and presenting recommendations
17
- **Category**: Workflow
18
- **Frequency**: As Needed
19
-
20
- ---
21
-
22
- ## Arguments
23
-
24
- **CLI-Style Arguments**:
25
- - `<file>` (positional) - Path to a specific clarification file
26
- - `--latest` or `-l` - Auto-detect the most recent clarification with user responses
27
- - `--dry-run` or `-n` - Preview what would be addressed without modifying the file
28
- - `--scope <path>` or `-s <path>` - Limit codebase exploration to a specific directory
29
-
30
- **Natural Language Arguments**:
31
- - `@acp.clarification-address agent/clarifications/clarification-9-foo.md` - Address a specific file
32
- - `@acp.clarification-address --latest` - Address the most recent clarification
33
- - `@acp.clarification-address` - Same as `--latest` (auto-detect)
34
-
35
- **Argument Mapping**:
36
- The agent infers intent from context:
37
- - If a file path is provided → use that clarification file
38
- - If `--latest` → find the most recent clarification with status "Awaiting Responses" or "Completed"
39
- - If no arguments → same as `--latest` (auto-detect)
40
-
41
- ---
42
-
43
- ## What This Command Does
44
-
45
- This command reads a clarification document, understands what the user has responded, and actively engages with those responses. Unlike `@acp.clarifications-research` which only fills in agent-delegated research lines (`> research this`), this command works *after* the user has responded — it reads user answers, honors embedded research directives, explores code or the web when asked, invokes MCP tools when directed, analyzes tradeoffs, provides recommendations, and responds to open questions the user has left in comment blocks.
46
-
47
- The agent writes its responses as HTML comment blocks (`<!-- ... -->`) directly below the relevant question-response pair. This keeps the clarification document clean — user responses remain the canonical content on the `>` lines, while agent analysis, tradeoffs, and recommendations live in comments that are visible when editing but don't clutter the rendered view.
48
-
49
- Use this command after filling out clarification responses when you want the agent to process your answers, do follow-up research, and provide analysis before moving to design or task creation.
50
-
51
- ---
52
-
53
- ## Prerequisites
54
-
55
- - [ ] ACP installed in current directory
56
- - [ ] At least one clarification file exists in `agent/clarifications/`
57
- - [ ] Target clarification has user responses on `>` lines (not all empty)
58
-
59
- ---
60
-
61
- ## Steps
62
-
63
- ### 1. Locate Clarification File
64
-
65
- Find the clarification file to process.
66
-
67
- **Actions**:
68
- - If a positional `<file>` argument was provided, use that path directly
69
- - If `--latest` was passed (or no arguments at all):
70
- - List all files in `agent/clarifications/` matching `clarification-*.md` (exclude `*.template.md`)
71
- - Read each file's `Status:` field
72
- - Select the one with the highest clarification number (most recent)
73
- - Prefer "Awaiting Responses" status, but also accept "Completed"
74
- - Verify the file exists and is readable
75
-
76
- **Expected Outcome**: A single clarification file path is identified
77
-
78
- ### 2. Read and Parse the Clarification
79
-
80
- Read the entire clarification document and build a structured understanding of its contents.
81
-
82
- **Actions**:
83
- - Read the full file
84
- - For each Item/Questions section, parse:
85
- - The question text (the `- ` bullet line)
86
- - The response line (the `> ` line below it)
87
- - Any existing comment blocks (`<!-- ... -->`) below the response
88
- - The parent Item and Questions headings for context
89
- - Classify each question-response pair:
90
- 1. **Answered** — `>` line has substantive user text (not empty, not a research trigger)
91
- 2. **Research directive** — user response contains a research request (same triggers as `@acp.clarifications-research`: "research this", "look into this", "check the codebase", "agent: ...", etc.)
92
- 3. **Empty** — `>` line is blank
93
- 4. **Comment-block question** — user has written a new open question or feedback inside an HTML comment block (`<!-- ... -->`) that needs a response
94
- - Build the full list of addressable items
95
-
96
- **Expected Outcome**: Structured parse of all question-response pairs with classifications
97
-
98
- ### 3. Report Scan Results
99
-
100
- Display a summary of what was found.
101
-
102
- **Display format**:
103
- ```
104
- 📋 Addressing clarification: agent/clarifications/clarification-{N}-{title}.md
105
-
106
- Questions found: {total}
107
- ✎ User answers to address: {count}
108
- 🔬 Research directives: {count}
109
- 💬 Comment-block questions: {count}
110
- ⬚ Empty (skipped): {count}
111
- ```
112
-
113
- **If `--dry-run`**: Display the summary above and stop. Do not proceed to Step 4.
114
-
115
- **If nothing to address** (all empty, no comment-block questions): Report that there is nothing to address and stop.
116
-
117
- **Expected Outcome**: User sees what will be addressed; dry-run exits here
118
-
119
- ### 4. Address Each Item
120
-
121
- Process each addressable item in document order. For each item, the agent reads the question, reads the user's response, and determines what action to take.
122
-
123
- **4a. Honor Research Directives**
124
-
125
- For items classified as **research directives**:
126
-
127
- **Actions**:
128
- - If the directive asks to explore the codebase: use Glob, Grep, Read tools
129
- - If `--scope <path>` was provided, limit searches to that directory
130
- - If the directive asks to explore the web: use WebSearch and WebFetch tools
131
- - If the directive asks to use MCP tools: invoke the specified MCP tool(s)
132
- - If the directive is a general research request: use codebase exploration by default
133
- - If the directive says "tradeoffs": provide tradeoffs
134
- - If the directive says "clarify": then clarify your question
135
- - Compile findings into a concise summary
136
-
137
- **Expected Outcome**: Research compiled for each directive
138
-
139
- **4b. Analyze User Answers**
140
-
141
- For items classified as **answered**:
142
-
143
- **Actions**:
144
- - Read and understand the user's response in the context of the question
145
- - Determine if the response implies follow-up work:
146
- - Does the response reference code that should be verified? → Explore the code
147
- - Does the response mention an external tool, API, or resource? → Research it if clarification would help
148
- - Does the response introduce a tradeoff? → Analyze both sides
149
- - Does the response leave ambiguity? → Note what needs further clarification
150
- - Is the response clear and complete? → Acknowledge briefly, no comment block needed
151
- - Only generate a comment block if the agent has something substantive to add (tradeoff analysis, recommendation, code reference, follow-up question)
152
- - Do NOT generate comment blocks that merely restate or acknowledge the user's answer
153
-
154
- **Expected Outcome**: Substantive analysis generated where warranted
155
-
156
- **4c. Respond to Comment-Block Questions**
157
-
158
- Content in comment blocks is only ever authored by you.
159
-
160
- **Actions**:
161
- - Read the comment content
162
-
163
- **Expected Outcome**: All user comment-block questions addressed
164
-
165
- ### 5. Present Tradeoffs and Recommendations
166
-
167
- For any question where the user's response surfaces a meaningful tradeoff or where the agent's research reveals competing approaches:
168
-
169
- **Actions**:
170
- - If applicable, present tradeoffs as either:
171
- - a concise comparison (2-4 bullet points per option)
172
- - a detailed response
173
- - a summary table
174
- - or all three
175
- - Provide a recommendation with rationale (if the agent has enough context to justify one)
176
- - If the agent cannot recommend: state that clearly and explain what additional information would help
177
- - Frame recommendations in terms of the project's existing patterns and architecture
178
-
179
- **Expected Outcome**: Tradeoffs and recommendations documented where relevant
180
-
181
- ### 6. Write Comment Blocks to File
182
-
183
- Insert agent responses into the clarification document.
184
-
185
- **Actions**:
186
- - For each addressable item that produced a response, insert an HTML comment block directly below the `>` response line (or below an existing comment block if responding to one)
187
- - Comment block format:
188
- ```markdown
189
- <!-- [Agent]
190
- {response content}
191
- -->
192
- ```
193
- - For research results:
194
- ```markdown
195
- <!-- [Agent — Researched]
196
- {findings with file references}
197
- -->
198
- ```
199
- - For tradeoff analysis:
200
- ```markdown
201
- <!-- [Agent Analysis]
202
- {tradeoff and recommendation}
203
- -->
204
- ```
205
- - Preserve the original file's formatting, indentation, and surrounding content
206
- - Do NOT modify any `>` response lines
207
- - Do NOT modify any user-written comment blocks
208
- - Do NOT change the clarification's `Status:` field
209
-
210
- **Expected Outcome**: Clarification file updated with agent comment blocks
211
-
212
- ### 7. Report Results
213
-
214
- Show what was addressed and what remains.
215
-
216
- **Display format**:
217
- ```
218
- ✅ Clarification Addressed!
219
-
220
- File: agent/clarifications/clarification-{N}-{title}.md
221
-
222
- Addressed: {count} items
223
- 🔬 Research responses: {count}
224
- 💡 Tradeoff analyses: {count}
225
- 💬 Comment responses: {count}
226
- ○ Skipped (clear answers): {count}
227
-
228
- Remaining empty lines: {empty-count} (still need user answers)
229
-
230
- Status unchanged — review agent comments, then capture or continue.
231
- ```
232
-
233
- **Expected Outcome**: User sees a summary of what was addressed and knows what's next
234
-
235
- ---
236
-
237
- ## Verification
238
-
239
- - [ ] Clarification file located correctly (positional, --latest, or auto-detect)
240
- - [ ] All question-response pairs parsed and classified correctly
241
- - [ ] User responses on `>` lines are completely untouched
242
- - [ ] Research directives honored (codebase, web, MCP tools as specified)
243
- - [ ] Tradeoffs presented with clear pro/con analysis
244
- - [ ] Recommendations provided where agent has sufficient context
245
- - [ ] Comment-block questions responded to
246
- - [ ] All agent responses written as HTML comment blocks
247
- - [ ] `--dry-run` reports without modifying the file
248
- - [ ] `--scope` limits codebase exploration to specified directory
249
- - [ ] Clarification status is NOT changed
250
- - [ ] Existing user comment blocks are NOT modified
251
-
252
- ---
253
-
254
- ## Expected Output
255
-
256
- ### Files Modified
257
- - `agent/clarifications/clarification-{N}-{title}.md` - Agent comment blocks inserted below addressed items
258
-
259
- ### Console Output
260
- ```
261
- 📋 Addressing clarification: agent/clarifications/clarification-9-handoff-requirements.md
262
-
263
- Questions found: 18
264
- ✎ User answers to address: 14
265
- 🔬 Research directives: 2
266
- 💬 Comment-block questions: 1
267
- ⬚ Empty (skipped): 1
268
-
269
- ✅ Clarification Addressed!
270
-
271
- Addressed: 8 items
272
- 🔬 Research responses: 2
273
- 💡 Tradeoff analyses: 3
274
- 💬 Comment responses: 1
275
- ○ Skipped (clear answers): 10
276
-
277
- Remaining empty lines: 1 (still need user answers)
278
-
279
- Status unchanged — review agent comments, then capture or continue.
280
- ```
281
-
282
- ### Example Comment Block in Document
283
-
284
- ```markdown
285
- - Should the handoff be written as a markdown file saved to disk, or output directly to chat?
286
-
287
- > Prompt user
288
-
289
- <!-- [Agent Analysis]
290
- **Tradeoff**: Output destination
291
- - Disk (agent/reports/): Pro: persistent, shareable, version-controlled. Con: extra file to manage.
292
- - Chat: Pro: immediate, no file cleanup. Con: lost when context ends, can't be referenced later.
293
-
294
- **Recommendation**: Prompt user (as specified) — both options have clear use cases. The prompt should default to chat for quick handoffs and offer disk for complex ones.
295
- -->
296
- ```
297
-
298
- ---
299
-
300
- ## Examples
301
-
302
- ### Example 1: Address Latest Clarification
303
-
304
- **Context**: Just finished answering questions in a clarification, want the agent to analyze responses
305
-
306
- **Invocation**: `@acp.clarification-address`
307
-
308
- **Result**: Auto-detects the latest clarification, reads all user responses, researches directives, presents tradeoffs where relevant, and writes analysis as comment blocks.
309
-
310
- ### Example 2: Address with Web Research
311
-
312
- **Context**: Clarification has questions where user responded "look into this" about an external API
313
-
314
- **Invocation**: `@acp.clarification-address --latest`
315
-
316
- **Result**: Agent finds research directives, uses WebSearch/WebFetch to research external APIs, writes findings as `[Agent — Researched]` comment blocks.
317
-
318
- ### Example 3: Dry Run
319
-
320
- **Context**: Want to preview what would be addressed before modifying the file
321
-
322
- **Invocation**: `@acp.clarification-address agent/clarifications/clarification-5-foo.md --dry-run`
323
-
324
- **Result**: Shows count of items to address by type, without modifying the file.
325
-
326
- ### Example 4: Respond to User Feedback in Comment Blocks
327
-
328
- **Context**: User reviewed agent's previous comment blocks and left follow-up questions in their own comment blocks
329
-
330
- **Invocation**: `@acp.clarification-address`
331
-
332
- **Result**: Agent detects user comment blocks containing questions, researches and responds with new comment blocks below each.
333
-
334
- ---
335
-
336
- ## Related Commands
337
-
338
- - [`@acp.clarification-create`](acp.clarification-create.md) - Create clarification documents (run first)
339
- - [`@acp.clarifications-research`](acp.clarifications-research.md) - Simpler alternative: only fills in `> research this` lines without analysis
340
- - [`@acp.clarification-capture`](acp.clarification-capture.md) - Capture answered clarifications into design docs / tasks (run after addressing)
341
- - [`@acp.design-create`](acp.design-create.md) - Create design documents (often follows clarification)
342
- - [`@acp.task-create`](acp.task-create.md) - Create task documents (may use clarification answers)
343
-
344
- ---
345
-
346
- ## Troubleshooting
347
-
348
- ### Issue 1: No clarifications found
349
-
350
- **Symptom**: "No clarification files found"
351
-
352
- **Cause**: No clarification files exist or all have been captured
353
-
354
- **Solution**: Create a new clarification with `@acp.clarification-create` or provide a specific file path
355
-
356
- ### Issue 2: No items to address
357
-
358
- **Symptom**: "Nothing to address — all response lines are empty"
359
-
360
- **Cause**: User hasn't answered any questions yet
361
-
362
- **Solution**: Fill out the clarification first, then re-run this command
363
-
364
- ### Issue 3: MCP tool not available
365
-
366
- **Symptom**: Agent cannot invoke a requested MCP tool
367
-
368
- **Cause**: The MCP server isn't configured or the tool name is incorrect
369
-
370
- **Solution**: Check MCP server configuration. The agent will note the failure in its comment block and suggest manual resolution.
371
-
372
- ### Issue 4: Web research blocked
373
-
374
- **Symptom**: WebSearch/WebFetch calls fail
375
-
376
- **Cause**: Network restrictions or tool permissions
377
-
378
- **Solution**: Agent will note "Unable to research — manual answer needed" in the comment block. User can fill in manually.
379
-
380
- ---
381
-
382
- ## Security Considerations
383
-
384
- ### File Access
385
- - **Reads**: Clarification files in `agent/clarifications/`, any codebase files during research
386
- - **Writes**: The target clarification file only (inserting comment blocks)
387
- - **Executes**: None
388
-
389
- ### Network Access
390
- - **APIs**: WebSearch/WebFetch when user directs web research; MCP tools when user directs tool use
391
- - **Repositories**: None
392
-
393
- ### Sensitive Data
394
- - **Secrets**: Never include secrets or credentials in comment blocks
395
- - **Credentials**: If a question involves credentials or secrets, note "manual review needed" instead
396
-
397
- ---
398
-
399
- ## Notes
400
-
401
- - This command never changes the clarification's `Status:` field — the user reviews agent comments and then uses `@acp.clarification-capture` when satisfied
402
- - Agent responses are always written as HTML comment blocks, keeping `>` response lines as the canonical user content
403
- - The `[Agent]`, `[Agent — Researched]`, and `[Agent Analysis]` prefixes make it easy to distinguish agent comment types
404
- - If a comment block response is wrong, the user can delete it or leave a follow-up comment block — re-running the command will address the new comment
405
- - This command is complementary to `@acp.clarifications-research`: use research for quick fill-in of delegated lines, use address for comprehensive analysis after user responses
406
- - The agent should be selective about which answers get comment blocks — clear, unambiguous answers that need no follow-up should be skipped silently
407
-
408
- ---
409
-
410
- **Namespace**: acp
411
- **Command**: clarification-address
412
- **Version**: 1.0.0
413
- **Created**: 2026-03-14
414
- **Last Updated**: 2026-03-14
415
- **Status**: Active
416
- **Compatibility**: ACP 5.16.0+
417
- **Author**: ACP Project