sdd-agent-platform 0.1.0 → 0.2.0

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.
@@ -1,7 +1,7 @@
1
1
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
2
  import { createHash } from 'node:crypto';
3
3
  import path from 'node:path';
4
- export const SDD_VERSION = '0.1.0';
4
+ export const SDD_VERSION = '0.2.0';
5
5
  export const AI_ENTRY_CONTRACT = 'sdd-ai-entry-v1';
6
6
  export const CLAUDE_CODE_TOOL_ID = 'claude-code';
7
7
  export const claudeCodeAdapter = {
@@ -14,27 +14,88 @@ export const claudeCodeAdapter = {
14
14
  kind: 'skill',
15
15
  relativePath: '.claude/skills/sdd/SKILL.md',
16
16
  title: 'SDD Platform',
17
- body: `# SDD Platform\n\nUse the local or globally installed \`sdd\` CLI as the source of truth for this repository's SDD workflow.\n\nStart by running:\n\n\`\`\`bash\nsdd status\nsdd instructions overview --json\n\`\`\`\n\nRespect the returned boundaries. Do not treat this generated file as the workflow brain; refresh it with \`sdd update\` when drift is reported.\n`
17
+ body: `# SDD Platform\n\nUse the local or globally installed \`sdd\` CLI as the source of truth for this repository's SDD workflow.\n\nStart by running \`sdd status\`. Run \`sdd instructions overview --json\` only when the next action is unclear or you need the full dynamic command contract.\n\nUse \`sdd status\` for branch/source context and the recommended next command, but summarize only blockers, current task, and next action instead of replaying the full status output. For risky changes, run \`sdd lifecycle decide --from-text <text>\` before spec/plan work. Respect the returned boundaries. Do not treat this generated file as the workflow brain; refresh it with \`sdd update\` when drift is reported.\n`
18
18
  },
19
19
  {
20
20
  id: 'sdd-root',
21
21
  kind: 'command',
22
22
  relativePath: '.claude/commands/sdd.md',
23
23
  title: 'SDD',
24
- body: `Run the SDD platform workflow entrypoint for this repository.\n\n1. Run \`sdd status\` and report documents, task counts, latest run, gaps, and the recommended next command.\n2. Follow the recommended next command from CLI/core output; do not infer dynamic state from this generated markdown.\n3. If status points to the starter \`ONBOARDING-1\` task, refine or replace the existing starter docs under \`specs/<branch>/\`; do not create parallel documents.\n4. If status points to gaps, drift, or doctor/update work, handle that maintenance action before do/verify.\n5. If status recommends a task, run \`sdd tasks inspect <task_id>\` and use the task Boundary and Acceptance before offering \`/sdd:do\`.\n6. If status recommends sync-back, run \`sdd sync-back inspect <run_id> --task <task_id>\` and follow apply_policy: direct-safe tasks may apply directly, confirm-required tasks need human confirmation and \`--approved\`.\n`
24
+ body: `Use SDD as the natural-language intent router for this repository while keeping CLI/core output as the source of truth.
25
+
26
+ 1. Accept the user's natural-language intent, then run \`sdd status\` first and report only workflow state, blocker/current task, and the recommended next command; do not paste or restate full status unless asked.
27
+ 2. Dynamic routing comes from CLI/core output, not this generated markdown; follow the recommended next command before choosing a dedicated \`/sdd:*\` entry.
28
+ 3. If the intent is still ambiguous after status, ask one clarifying question before spec/plan/do/verify/sync-back work.
29
+ 4. For risky requests that mention state-machine, concurrency, database, SQL, security, API/schema, CI/build, or external unknowns, run \`sdd lifecycle decide --from-text <text>\` before spec/plan work.
30
+ 5. If status reports workflow_status=not_started, use \`/sdd:spec\` to create the current Git branch partition; do not use \`sdd init\` as the workflow branch entry.
31
+ 6. If status points to gaps, drift, or doctor/update work, handle that maintenance action before do/verify.
32
+ 7. If status recommends a task, run \`sdd tasks inspect <task_id>\` and use the task Boundary and Acceptance before offering \`/sdd:do\`.
33
+ 8. If status recommends do, verify, or sync-back, follow the dedicated \`/sdd:do\`, \`/sdd:verify\`, or sync-back CLI path instead of inferring completion from chat.
34
+ 9. If status recommends sync-back, run \`sdd sync-back inspect --task <task_id>\` by default and follow apply_policy; pass an explicit run id only for replay/CI/old-run inspection. Direct-safe tasks may apply directly, confirm-required tasks need human confirmation and \`--approved\`.
35
+ `
25
36
  },
37
+ commandEntry('sdd-doctor', '.claude/commands/sdd/doctor.md', 'doctor', 'Check project config, scoped run evidence, generated AI entry drift, and use sdd run archive <run_id> for failed exploratory runs.'),
38
+ commandEntry('sdd-update', '.claude/commands/sdd/update.md', 'update', 'Refresh managed generated AI entries when drift is reported.'),
26
39
  {
27
- id: 'sdd-init',
40
+ id: 'sdd-spec',
28
41
  kind: 'command',
29
- relativePath: '.claude/commands/sdd/init.md',
30
- title: 'SDD init',
31
- body: `Initialize or refresh the SDD project configuration, starter semantic documents, and generated AI entries.\n\nRun:\n\n\`\`\`bash\nsdd init --ai claude-code\nsdd status\n\`\`\`\n\nDefault init creates \`.sdd/project.yml\`, \`.sdd/runs/\`, starter \`specs/<branch>/spec.md\`, \`plan.md\`, \`tasks.md\`, and managed Claude Code entries. Existing semantic documents are preserved unless \`--force\` is explicit.\n\nThen follow the returned CLI/core instruction payload and refine the starter docs before implementation.\n`
42
+ relativePath: '.claude/commands/sdd/spec.md',
43
+ title: 'SDD spec',
44
+ body: `Create or refine the SDD spec document as the workflow partition entry, not a technical design. Omit --branch to use the current Git branch partition; pass --branch <name> only when intentionally writing another partition. Agent visibility: scout may gather bounded context; spec-reviewer may review objective, scope, acceptance, and risk gates; evidence lands in spec review artifacts.
45
+
46
+ Run:
47
+
48
+ \`\`\`bash
49
+ sdd status
50
+ sdd instructions spec --json
51
+ \`\`\`
52
+
53
+ Then create or refine \`specs/<partition>/spec.md\` with objective/customer value, problem/intent, users/actors, user stories or scenarios, in-scope/out-of-scope boundaries, functional and non-functional requirements, acceptance criteria with stable IDs such as AC-1, assumptions/dependencies, risks/hard gates, open questions, and lifecycle decision reference.
54
+
55
+ Repeated /sdd:spec calls represent requirement revisions. If plan/tasks/run evidence already exists, status must expose stale downstream hash state before plan/tasks/do continues.
56
+
57
+ Do not design implementation in \`spec.md\`; stop before plan work when requirements, acceptance IDs, or risk gates are unclear.
58
+ `
59
+ },
60
+ {
61
+ id: 'sdd-plan',
62
+ kind: 'command',
63
+ relativePath: '.claude/commands/sdd/plan.md',
64
+ title: 'SDD plan',
65
+ body: `Refine the existing SDD plan document as a deliverable technical solution, not a lightweight approach summary. Include based_on_spec_hash from status so later /sdd:spec revisions can mark this plan stale. Agent visibility: scout/planner/spec-reviewer may participate; evidence lands in plan or review artifacts.
66
+
67
+ Run:
68
+
69
+ \`\`\`bash
70
+ sdd instructions plan --json
71
+ \`\`\`
72
+
73
+ Then write or refine \`specs/<branch>/plan.md\` as the technical bridge from approved spec to task-ready execution. Include background, goals/non-goals, current state, target design, architecture/component impact, interaction/sequence design, state/data design, API/schema design, concurrency/transaction/consistency design, key decisions, alternatives, risk control, rollout/rollback, validation matrix, and task breakdown rationale.
74
+
75
+ Use PlantUML fences for diagrams when useful: component diagrams for impact surface, sequence/activity diagrams for workflows and concurrency, state diagrams for state-machine risk, and deployment/data diagrams when release or data topology matters. Apply risk-driven requirements before task writing: state-machine risk needs a state diagram; concurrency risk needs sequence/activity plus consistency design; database risk needs data/transaction/rollback design; api_schema risk needs interface/schema compatibility; security/sql risk needs explicit risk controls.
76
+
77
+ Stop before creating tasks when the technical solution is incomplete or has unresolved design gaps.
78
+ `
79
+ },
80
+ {
81
+ id: 'sdd-tasks',
82
+ kind: 'command',
83
+ relativePath: '.claude/commands/sdd/tasks.md',
84
+ title: 'SDD tasks',
85
+ body: `Refine the existing SDD tasks document as an executable evidence contract, not a plain TODO list or project-management backlog. Include based_on_plan_hash from status so later plan/spec revisions can mark these tasks stale. Agent visibility: planner/reviewer may participate; execution evidence later lands in implement/review/validation artifacts.
86
+
87
+ Run:
88
+
89
+ \`\`\`bash
90
+ sdd instructions tasks --json
91
+ sdd tasks format
92
+ \`\`\`
93
+
94
+ Then write or refine \`specs/<branch>/tasks.md\` from the approved spec and plan. Include Delivery Map, Wave Plan, task blocks with acceptance_refs and plan_refs, affected_files, validation, risk, agent_fit, allowed_agents, required_artifacts, verification_availability, autonomy, plus companion sections for Boundary, Acceptance, Definition of Done, Evidence Expectations, and Implementation Notes.
95
+
96
+ Keep metadata inside the \`\`\`sdd-task fenced block and companion sections outside it. Stop before \`sdd do task\` when task boundary, acceptance refs, plan refs, or evidence requirements are unclear.
97
+ `
32
98
  },
33
- commandEntry('sdd-doctor', '.claude/commands/sdd/doctor.md', 'doctor', 'Check project config, scoped run evidence, generated AI entry drift, and use sdd run archive <run_id> for failed exploratory runs.'),
34
- commandEntry('sdd-update', '.claude/commands/sdd/update.md', 'update', 'Refresh managed generated AI entries when drift is reported.'),
35
- commandEntry('sdd-spec', '.claude/commands/sdd/spec.md', 'spec', 'Create if missing during init, otherwise refine the existing SDD spec document for requirements, scope, non-goals, and acceptance.'),
36
- commandEntry('sdd-plan', '.claude/commands/sdd/plan.md', 'plan', 'Create if missing during init, otherwise refine the existing SDD plan document for approach, impact, risks, and validation strategy.'),
37
- workflowCommandEntry('sdd-tasks', '.claude/commands/sdd/tasks.md', 'tasks', 'Create if missing during init, otherwise refine existing graph-ready SDD task blocks from an approved spec and plan.', 'sdd tasks format'),
38
99
  {
39
100
  id: 'sdd-do',
40
101
  kind: 'command',
@@ -52,13 +113,16 @@ sdd tasks inspect <task_id>
52
113
 
53
114
  Workflow:
54
115
 
116
+ Agent evidence flow: scout gathers bounded context only; implementer edits only inside the selected task boundary; reviewer records review evidence; debugger is optional after review failure; validator records validation and acceptance mapping. Artifact flags use run-relative paths such as \`artifacts/implement-<task_id>.md\`, \`artifacts/review-<task_id>.md\`, and \`artifacts/validation-<task_id>.md\`; physical files live under \`.sdd/runs/<run_id>/artifacts/\`. This command entry does not authorize autonomous background execution.
117
+
118
+
55
119
  1. Resolve exactly one task id from the user request or from the \`sdd status\` recommended next command. Stop and ask if it is ambiguous.
56
120
  2. Read \`sdd tasks inspect <task_id>\` and restate the task Boundary, Acceptance, gaps, and validation commands.
57
121
  3. Work only inside the selected task boundary; do not expand scope without a checkpoint.
58
- 4. Before creating explicit result artifacts, use \`sdd artifact template artifacts/<agent>-<task_id>.md --task <task_id> --agent <agent>\` and keep source/test files in \`## Evidence\`, not in \`sdd-result.artifacts\`.
122
+ 4. Before creating explicit result artifacts, use templates such as \`sdd artifact template artifacts/implement-<task_id>.md --task <task_id> --agent implementer\`, \`sdd artifact template artifacts/review-<task_id>.md --task <task_id> --agent reviewer\`, and \`sdd artifact template artifacts/validation-<task_id>.md --task <task_id> --agent validator\`; save the physical file under \`.sdd/runs/<run_id>/artifacts/\`, pass the run-relative \`artifacts/<file>\` path to CLI flags, and keep source/test files in \`## Evidence\`, not in \`sdd-result.artifacts\`.
59
123
  5. Run \`sdd artifact validate <run_id> <artifact> --task <task_id> --agent <agent>\` before passing artifacts into \`sdd do task <task_id>\`.
60
124
  6. Run \`sdd do task <task_id>\` with explicit artifact paths when evidence is available; this path records Phase 3 artifact ingestion evidence for doctor.
61
- 7. Report run id, status, artifacts, and gaps. If completed, recommend \`sdd verify task <task_id> --run <run_id>\`.
125
+ 7. Report the run id, status, agent evidence artifacts, gaps, and next gate. If completed, recommend \`sdd verify task <task_id> --branch <branch>\`; pass \`--run <run_id>\` only for explicit replay/CI/old-run inspection.
62
126
 
63
127
  Do not create worktrees, auto commit, or mark missing evidence as PASS.
64
128
  `
@@ -68,14 +132,14 @@ Do not create worktrees, auto commit, or mark missing evidence as PASS.
68
132
  kind: 'command',
69
133
  relativePath: '.claude/commands/sdd/verify.md',
70
134
  title: 'SDD verify',
71
- body: `Verify task acceptance coverage from review and validation evidence.\n\nRun:\n\n\`\`\`bash\nsdd status\nsdd run inspect <run_id>\nsdd instructions verify --json\n\`\`\`\n\nWorkflow:\n\n1. Resolve exactly one run id and task id from \`sdd status\`, the latest run, or the user request. Stop and ask if either is ambiguous.\n2. Inspect \`sdd run inspect <run_id>\` before verifying so state, events, artifacts, validation, and sync-back are visible.\n3. Ensure the validator artifact includes exact task Acceptance text, preferably generated with \`sdd artifact template artifacts/validation-<task_id>.md --task <task_id> --agent validator\`.\n4. Run \`sdd artifact validate <run_id> <artifact> --task <task_id> --agent validator\` before goal-level verify.\n5. Run \`sdd verify task <task_id> --run <run_id>\` for goal-level acceptance coverage.\n6. If verify PASS, run \`sdd sync-back inspect <run_id> --task <task_id>\` and follow apply_policy.\n7. Direct-safe tasks may run \`sdd sync-back apply\` directly; confirm-required tasks require human confirmation and \`--approved\` before writing \`tasks.md\`.\n\nDo not auto-fix failures, force push, or mark completed when blocking gaps remain.\n`
135
+ body: `Verify task acceptance coverage from review and validation evidence. By default, verify resolves the latest eligible run from the current/requested partition plus task id; pass \`--run <run_id>\` only for replay, CI, or old-run inspection.\n\nRun:\n\n\`\`\`bash\nsdd status\nsdd instructions verify --json\n\`\`\`\n\nWorkflow:\n\n1. Resolve exactly one task id and workflow partition from \`sdd status\`, the recommended command, or the user request. Stop and ask if either is ambiguous.\n2. Omit \`--run\` by default so CLI/core resolves the latest eligible partition/task run; inspect an explicit run only when the user or CI names one.\n3. Ensure the validator artifact includes exact task Acceptance text, preferably generated with \`sdd artifact template artifacts/validation-<task_id>.md --task <task_id> --agent validator\`; pass the run-relative artifact path while storing the physical file under \`.sdd/runs/<run_id>/artifacts/\`.\n4. Run \`sdd artifact validate <run_id> <artifact> --task <task_id> --agent validator\` before goal-level verify.\n5. Run \`sdd verify task <task_id> --branch <branch>\` for goal-level acceptance coverage, adding \`--run <run_id>\` only for explicit old-run replay.\n6. If verify PASS, run \`sdd sync-back inspect --branch <branch> --task <task_id>\` and follow apply_policy.\n7. Direct-safe tasks may run \`sdd sync-back apply --branch <branch> --task <task_id>\` directly; confirm-required tasks require human confirmation and \`--approved\` before writing \`tasks.md\`.\n\nDo not auto-fix failures, force push, or mark completed when blocking gaps remain.\n`
72
136
  },
73
137
  {
74
138
  id: 'sdd-instructions',
75
139
  kind: 'command',
76
140
  relativePath: '.claude/commands/sdd/instructions.md',
77
141
  title: 'SDD instructions',
78
- body: `Fetch dynamic SDD instructions and follow the status-first decision tree to the next actionable step.\n\nRun:\n\n\`\`\`bash\nsdd status\nsdd instructions overview --json\n\`\`\`\n\nThen apply this decision tree:\n\n- **If status reports gaps or drift**: run the recommended command. For generated entry drift, run \`sdd update\`, then \`sdd doctor\` again.\n- **If status recommends a task**: run \`sdd tasks inspect <task_id>\`, then offer \`/sdd:do\` inside the approved task boundary.\n- **If status recommends run inspection**: run \`sdd run inspect <run_id>\` and report state, events, artifacts, validation, and sync-back.\n- **After a task completes**: run \`sdd verify task <task_id> --run <run_id>\` for acceptance coverage.\n- **After verify PASS**: run \`sdd sync-back inspect <run_id> --task <task_id>\` and follow apply_policy: direct-safe tasks may apply directly, confirm-required tasks need human confirmation and \`--approved\`.\n\nAlways report the result to the user. Do not loop in maintenance checks when status already gives a next workflow action.\n`
142
+ body: `Fetch dynamic SDD instructions and follow the status-first decision tree to the next actionable step.\n\nRun:\n\n\`\`\`bash\nsdd status\nsdd instructions overview --json\n\`\`\`\n\nThen apply this decision tree:\n\n- **If status reports gaps or drift**: run the recommended command. For generated entry drift, run \`sdd update\`, then \`sdd doctor\` again.\n- **If status recommends a task**: run \`sdd tasks inspect <task_id>\`, then offer \`/sdd:do\` inside the approved task boundary.\n- **If status recommends verify or sync-back**: use the task id and partition from status/recommended command; omit \`--run\` unless an explicit run is named for replay, CI, or old-run inspection.\n- **If the next change has state-machine, concurrency, database, SQL, security, API/schema, CI/build, or external unknown risk**: run \`sdd lifecycle decide --from-text <text>\` and respect hard gates before spec/plan work.\n- **After a task completes**: run \`sdd verify task <task_id> --branch <branch>\` for acceptance coverage; CLI/core resolves the latest eligible run.\n- **After verify PASS**: run \`sdd sync-back inspect --branch <branch> --task <task_id>\` and follow apply_policy: direct-safe tasks may apply directly, confirm-required tasks need human confirmation and \`--approved\`.\n\nReport only the selected next action, blockers, and commands you will run; do not paste full JSON/status output unless the user asks. Do not loop in maintenance checks when status already gives a next workflow action.\n`
79
143
  }
80
144
  ];
81
145
  }
@@ -109,7 +173,7 @@ export async function checkAiToolEntryDrift(projectRoot, options = {}) {
109
173
  }
110
174
  export function summarizeAiProjectionStatus(results) {
111
175
  const statuses = results.flatMap((result) => result.entries.map((entry) => entry.status));
112
- if (statuses.some((status) => status === 'foreign' || status === 'conflict' || status === 'drifted' || status === 'missing')) {
176
+ if (statuses.some((status) => status === 'foreign' || status === 'conflict' || status === 'drifted' || status === 'user-modified' || status === 'missing')) {
113
177
  return 'FAIL';
114
178
  }
115
179
  if (statuses.some((status) => status === 'skipped')) {
@@ -132,7 +196,7 @@ function workflowCommandEntry(id, relativePath, action, summary, helperCommand)
132
196
  kind: 'command',
133
197
  relativePath,
134
198
  title: `SDD ${action}`,
135
- body: `${summary}\n\nRun:\n\n\`\`\`bash\nsdd instructions ${action} --json\n${helperCommand}\n\`\`\`\n\nUse the helper command output as the canonical format reference, keep companion sections such as #### Boundary and #### Acceptance outside the fenced metadata block, then follow the returned CLI/core instruction payload.\n`
199
+ body: `${summary}\n\nRun:\n\n\`\`\`bash\nsdd instructions ${action} --json\n${helperCommand}\n\`\`\`\n\nUse the helper command output as the canonical format reference. Keep harness metadata such as agent_fit, verification_availability, autonomy, allowed_agents, and required_artifacts inside the fenced sdd-task block; keep companion sections such as #### Boundary and #### Acceptance outside the fence. Then follow the returned CLI/core instruction payload.\n`
136
200
  };
137
201
  }
138
202
  function renderProjectedEntry(adapter, entry) {
@@ -155,7 +219,10 @@ function renderProjectedEntry(adapter, entry) {
155
219
  kind: entry.kind,
156
220
  relativePath: entry.relativePath,
157
221
  content: `${frontmatter}\n\n${entry.body}`,
158
- hash
222
+ hash,
223
+ version: SDD_VERSION,
224
+ ownership: 'sdd-managed',
225
+ sourceContract: AI_ENTRY_CONTRACT
159
226
  };
160
227
  }
161
228
  async function applyEntry(projectRoot, projected, checkOnly) {
@@ -184,11 +251,14 @@ async function applyEntry(projectRoot, projected, checkOnly) {
184
251
  if (current.hash === projected.hash && current.bodyHash === projected.hash) {
185
252
  return statusReport(projected, 'unchanged', 'Managed AI entry is current.');
186
253
  }
254
+ if (current.bodyHash !== current.hash) {
255
+ return statusReport(projected, 'user-modified', 'Managed AI entry has user modifications outside the recorded hash.', 'Review manually; sdd update will not overwrite user-modified entries by default.');
256
+ }
187
257
  if (!checkOnly) {
188
258
  await writeFile(absolutePath, projected.content, 'utf8');
189
259
  return statusReport(projected, 'updated', 'Managed AI entry refreshed.');
190
260
  }
191
- return statusReport(projected, 'drifted', 'Managed AI entry content drifted.', 'Run sdd update.');
261
+ return statusReport(projected, 'drifted', 'Managed AI entry template drifted from the platform projection.', 'Run sdd update.');
192
262
  }
193
263
  function inspectManagedEntry(content) {
194
264
  const body = content.replace(/^---\n[\s\S]*?\n---\n\n?/, '');
@@ -214,9 +284,30 @@ function statusReport(projected, status, message, action) {
214
284
  relativePath: projected.relativePath,
215
285
  status,
216
286
  message,
217
- action
287
+ action,
288
+ manifest: manifestEntry(projected, status),
289
+ driftStatus: driftStatusFor(status)
218
290
  };
219
291
  }
292
+ function manifestEntry(projected, status) {
293
+ return {
294
+ path: projected.relativePath,
295
+ artifactId: projected.id,
296
+ tool: projected.tool,
297
+ version: projected.version,
298
+ hash: `sha256:${projected.hash}`,
299
+ ownership: projected.ownership,
300
+ driftStatus: driftStatusFor(status),
301
+ sourceContract: projected.sourceContract,
302
+ lastProjectedAt: new Date().toISOString()
303
+ };
304
+ }
305
+ function driftStatusFor(status) {
306
+ if (status === 'unchanged' || status === 'created' || status === 'updated') {
307
+ return 'current';
308
+ }
309
+ return status;
310
+ }
220
311
  function isNodeError(error) {
221
312
  return error instanceof Error && 'code' in error;
222
313
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ai-tools.js","sourceRoot":"","sources":["../../../../packages/core/src/ai-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM,CAAC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAkDjD,MAAM,CAAC,MAAM,iBAAiB,GAAkB;IAC9C,EAAE,EAAE,mBAAmB;IACvB,WAAW,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