@nextsparkjs/ai-workflow 0.1.0-beta.92 → 0.1.0-beta.95

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.
package/README.md CHANGED
@@ -71,16 +71,45 @@ claude/
71
71
  └── sessions/ # Created on setup (empty)
72
72
  ```
73
73
 
74
+ ## Auto-Sync on Update
75
+
76
+ When you run `pnpm update` in a consumer project, this package automatically syncs your `.claude/` directory via postinstall. Framework-managed files are updated while your custom files and configs are preserved.
77
+
78
+ Requirements for auto-sync:
79
+ - `.claude/` must already exist (run `nextspark setup:ai` first)
80
+ - `pnpm.onlyBuiltDependencies` must include `@nextsparkjs/ai-workflow` in your root `package.json`
81
+
82
+ You can also trigger a manual sync at any time:
83
+
84
+ ```bash
85
+ nextspark sync:ai
86
+ ```
87
+
88
+ ## Troubleshooting
89
+
90
+ Set `NEXTSPARK_DEBUG=1` to enable verbose logging in the postinstall script:
91
+
92
+ ```bash
93
+ NEXTSPARK_DEBUG=1 pnpm update @nextsparkjs/ai-workflow
94
+ ```
95
+
96
+ This prints detection steps (project root, monorepo check, `.claude/` location) to help diagnose sync issues.
97
+
74
98
  ## For Monorepo Contributors
75
99
 
76
- If you're developing the NextSpark framework itself, use the sync script to copy your working `.claude/` directory into this package before publishing:
100
+ The `packages/ai-workflow/claude/` directory is **intentionally gitignored** (except config JSONs). The source of truth is the repo's `.claude/` working directory. Content is synced into the package at two points:
101
+
102
+ 1. **`pnpm pkg:pack`** — `pack.sh` runs `sync.mjs` automatically before creating the tarball
103
+ 2. **`prepack` script** — `package.json` runs `sync.mjs` as a safety net before any `npm pack`
104
+
105
+ This means the published npm package always contains all agents, commands, skills, etc. — even though git does not track them in `packages/ai-workflow/claude/`.
106
+
107
+ To sync manually (e.g. for local testing):
77
108
 
78
109
  ```bash
79
110
  node packages/ai-workflow/scripts/sync.mjs
80
111
  ```
81
112
 
82
- This syncs agents, commands, skills, templates, workflows, docs, and schemas while preserving the consumer config templates (context.json, workspace.json, team.json, github.json).
83
-
84
113
  ## Versioning
85
114
 
86
115
  This package versions independently from `@nextsparkjs/core`. Agent, command, and skill updates ship here without requiring a core release.
@@ -70,14 +70,12 @@ curl -s http://localhost:5173/api/health || echo "Server not ready"
70
70
  ### 2. Read Test Credentials
71
71
 
72
72
  ```typescript
73
- // Read API keys from config
74
- await Read('.claude/config/agents.json')
75
-
76
- // Extract test credentials
73
+ // Read test credentials from active theme's dev config
74
+ // Located in: contents/themes/{activeTheme}/config/dev.config.ts → devKeyring
77
75
  const testCredentials = {
78
76
  superadmin: {
79
77
  email: 'superadmin@cypress.com',
80
- password: 'configured_password', // From agents.json (testing.superadmin.password)
78
+ password: 'configured_password', // From theme dev.config → devKeyring
81
79
  apiKey: 'sk_test_...'
82
80
  },
83
81
  admin: {
@@ -264,7 +262,7 @@ await Read(`${sessionPath}/plan.md`) // For expected endpoints
264
262
  await Read(`${sessionPath}/context.md`) // For backend status
265
263
  await Read(`${sessionPath}/progress.md`) // For current progress
266
264
  await Read(`${sessionPath}/tests.md`) // For existing test documentation
267
- await Read('.claude/config/agents.json') // For test credentials
265
+ // Read test credentials from active theme's dev.config.ts devKeyring
268
266
  ```
269
267
 
270
268
  ### Step 2: Execute Tests
@@ -368,35 +368,6 @@ See: core/lib/entities/system-fields.ts
368
368
  - Phase 14-15: QA (manual + automation)
369
369
  - Phase 16-19: Finalization (review + unit tests + docs + demo)
370
370
 
371
- ## ClickUp Configuration (MANDATORY REFERENCE)
372
-
373
- **BEFORE any ClickUp interaction, you MUST read the pre-configured ClickUp details:**
374
-
375
- All ClickUp connection details are pre-configured in `.claude/.claude/config/agents.json`. **NEVER search or fetch these values manually.** Always use the values from the configuration file:
376
-
377
- - **Workspace ID**: `tools.clickup.workspaceId`
378
- - **Space ID**: `tools.clickup.space.id`
379
- - **List ID**: `tools.clickup.defaultList.id`
380
- - **User**: `tools.clickup.user.name` / `tools.clickup.user.id`
381
-
382
- **Usage Pattern:**
383
- ```typescript
384
- // ❌ NEVER DO THIS - Don't search for workspace/space/list
385
- const hierarchy = await clickup.getWorkspaceHierarchy()
386
- const spaces = await clickup.searchSpaces()
387
-
388
- // ✅ ALWAYS DO THIS - Use pre-configured values from .claude/config/agents.json
389
- // Read `.claude/.claude/config/agents.json` to get:
390
- // - Workspace ID: tools.clickup.workspaceId
391
- // - Space ID: tools.clickup.space.id
392
- // - List ID: tools.clickup.defaultList.id
393
-
394
- await clickup.updateTask(taskId, {
395
- // Use task ID from notification, workspace pre-configured
396
- description: updatedDescription
397
- })
398
- ```
399
-
400
371
  ## Your Core Mission
401
372
 
402
373
  You are the guardian and visionary of the project's architectural integrity. Your primary responsibilities are:
@@ -1375,7 +1346,6 @@ Remember: Translate business requirements into actionable technical plans. Maint
1375
1346
  ## Context Files
1376
1347
 
1377
1348
  Always reference:
1378
- - `.claude/.claude/config/agents.json` - For ClickUp configuration (Workspace ID, Space ID, List ID, credentials)
1379
1349
  - `.claude/skills/clickup-integration/templates/task.md` - For task template structure (Implementation Plan + QA Plan)
1380
1350
  - `.claude/skills/clickup-integration/mcp.md` - For ClickUp MCP usage guide
1381
1351
  - `.claude/config/workflow.md` - For complete development workflow and phase responsibilities
@@ -80,30 +80,6 @@ At the start of task:execute, scope is documented in context.md showing allowed
80
80
 
81
81
  **If backend-validator or api-tester FAIL:** They will call you back to fix issues before retrying.
82
82
 
83
- ## ClickUp Configuration (MANDATORY REFERENCE)
84
-
85
- **BEFORE any ClickUp interaction, you MUST read the pre-configured ClickUp details:**
86
-
87
- All ClickUp connection details are pre-configured in `.claude/.claude/config/agents.json`. **NEVER search or fetch these values manually.** Always use the values from the configuration file:
88
-
89
- - **Workspace ID**: `tools.clickup.workspaceId`
90
- - **Space ID**: `tools.clickup.space.id`
91
- - **List ID**: `tools.clickup.defaultList.id`
92
- - **User**: `tools.clickup.user.name` / `tools.clickup.user.id`
93
-
94
- **Usage Pattern:**
95
- ```typescript
96
- // ❌ NEVER DO THIS - Don't search for workspace/space/list
97
- const hierarchy = await clickup.getWorkspaceHierarchy()
98
-
99
- // ✅ ALWAYS DO THIS - Use pre-configured values from .claude/config/agents.json
100
- // Read .claude/config/agents.json to get Workspace ID, Space ID, List ID
101
- // Then interact with tasks directly
102
-
103
- await clickup.updateTaskStatus(taskId, "in progress")
104
- await clickup.addComment(taskId, "🚀 Starting backend development")
105
- ```
106
-
107
83
  ## Entity Presets (USE AS REFERENCE)
108
84
 
109
85
  **When creating or modifying entities, use presets as reference:**
@@ -255,7 +231,8 @@ await Read('.rules/testing.md') // For testing requirements
255
231
  await Read('.rules/planning.md') // For complex tasks (3+ steps)
256
232
 
257
233
  // 2. Determine project context
258
- const isCore = await checkProjectContext()
234
+ const context = await Read('.claude/config/context.json')
235
+ const isCore = context.context === 'monorepo'
259
236
 
260
237
  // 3. Use TodoWrite for complex tasks
261
238
  if (task.stepsCount >= 3) {
@@ -720,8 +697,8 @@ ${sessionPath}/progress.md
720
697
  **After implementing each endpoint, you MUST test it:**
721
698
 
722
699
  ```bash
723
- # Use super admin API key from .claude/.claude/config/agents.json (testing.apiKey)
724
- API_KEY="<read from .claude/.claude/config/agents.json: testing.apiKey>"
700
+ # Use super admin API key from active theme dev.config → devKeyring
701
+ API_KEY="<from active theme dev.config → devKeyring>"
725
702
 
726
703
  # Test GET
727
704
  curl -X GET http://localhost:5173/api/v1/users/USER_ID \
@@ -1011,7 +988,6 @@ Do you approve this security addition?
1011
988
  ## Context Files
1012
989
 
1013
990
  Always reference:
1014
- - `.claude/.claude/config/agents.json` - For test credentials and API keys
1015
991
  - `.claude/config/workflow.md` - For complete development workflow v4.0 (19 phases)
1016
992
  - `${sessionPath}/plan.md` - For technical plan
1017
993
  - `${sessionPath}/context.md` - For coordination context
@@ -75,30 +75,6 @@ grep -rn "@/contents" core/ --include="*.ts" --include="*.tsx"
75
75
  **Pre-conditions:** qa-automation (Phase 15) MUST be PASSED
76
76
  **Post-conditions:** unit-test-writer (Phase 17) follows after my review
77
77
 
78
- ## ClickUp Configuration (MANDATORY REFERENCE)
79
-
80
- **BEFORE any ClickUp interaction, you MUST read the pre-configured ClickUp details:**
81
-
82
- All ClickUp connection details are pre-configured in `.claude/.claude/config/agents.json`. **NEVER search or fetch these values manually.** Always use the values from the configuration file:
83
-
84
- - **Workspace ID**: `tools.clickup.workspaceId`
85
- - **Space ID**: `tools.clickup.space.id`
86
- - **List ID**: `tools.clickup.defaultList.id`
87
- - **User**: `tools.clickup.user.name` / `tools.clickup.user.id`
88
-
89
- **Usage Pattern:**
90
- ```typescript
91
- // ❌ NEVER DO THIS - Don't search for workspace/space/list
92
- const hierarchy = await clickup.getWorkspaceHierarchy()
93
-
94
- // ✅ ALWAYS DO THIS - Use pre-configured values from .claude/config/agents.json
95
- // Read .claude/config/agents.json to get Workspace ID, Space ID, List ID
96
- // Then read task and add review comments
97
-
98
- const task = await clickup.getTaskById(taskId)
99
- await clickup.addComment(taskId, reviewMarkdown)
100
- ```
101
-
102
78
  ## Core Responsibilities
103
79
 
104
80
  ### 1. Project Context Detection (CRITICAL FIRST STEP)
@@ -861,9 +837,7 @@ Structure your review as follows:
861
837
  - Performance acceptable
862
838
  - Project rules followed
863
839
 
864
- ## Session-Based Workflow with ClickUp Integration (MANDATORY)
865
-
866
- **CRITICAL: Code Reviewer is one of the 3 agents that DOES write to ClickUp (PM, QA, Code Reviewer) - ONLY for review comments**
840
+ ## Session-Based Workflow (MANDATORY)
867
841
 
868
842
  ### When to Perform Code Review
869
843
 
@@ -1452,8 +1426,6 @@ export const ProfileForm = React.memo(({ user }: { user: User }) => {
1452
1426
  ## Context Files
1453
1427
 
1454
1428
  Always reference:
1455
- - `.claude/.claude/config/agents.json` - For ClickUp configuration (Workspace ID, Space ID, List ID)
1456
- - `.claude/skills/clickup-integration/mcp.md` - For ClickUp MCP usage guide (reading tasks, adding comments)
1457
1429
  - `.claude/config/workflow.md` - For complete development workflow (Phase 5: Code Review)
1458
1430
  - `.rules/` directory - For all project rules to validate against
1459
1431
 
@@ -387,7 +387,7 @@ VALUES
387
387
 
388
388
  -- Super Admin (for Cypress tests) - uses different password
389
389
  ('55555555-5555-5555-5555-555555555555', 'Cypress Super Admin', 'superadmin@cypress.com', true,
390
- -- This user may have a different password configured in agents.json
390
+ -- This user may have a different password configured in theme dev.config → devKeyring
391
391
  '3db9e98e2b4d3caca97fdf2783791cbc:34b293de615caf277a237773208858e960ea8aa10f1f5c5c309b632f192cac34d52ceafbd338385616f4929e4b1b6c055b67429c6722ffdb80b01d9bf4764866',
392
392
  NOW(), NOW())
393
393
  ON CONFLICT ("id") DO NOTHING;
@@ -97,23 +97,6 @@ This will ensure you follow the correct patterns for:
97
97
 
98
98
  ---
99
99
 
100
- ## ClickUp Configuration
101
-
102
- **CRITICAL**: Before starting work, read the ClickUp configuration:
103
-
104
- ```typescript
105
- await Read('.claude/config/agents.json')
106
- ```
107
-
108
- This file contains:
109
- - Pre-configured workspace ID
110
- - Team member IDs and names
111
- - ClickUp list IDs for different task types
112
-
113
- Use these IDs instead of looking them up each time.
114
-
115
- ---
116
-
117
100
  ## Parallel Execution with Task Tool
118
101
 
119
102
  You have access to the `Task` and `TaskOutput` tools for parallel execution. Use them wisely.
@@ -1099,13 +1082,7 @@ Before starting work, read these configuration files:
1099
1082
  await Read('core/docs/15-documentation-system/01-overview.md')
1100
1083
  await Read('core/docs/15-documentation-system/03-core-vs-theme-docs.md')
1101
1084
 
1102
- // 2. ClickUp configuration (workspace ID, team members, list IDs)
1103
- await Read('.claude/config/agents.json')
1104
-
1105
- // 3. ClickUp MCP tool documentation (how to use ClickUp tools)
1106
- await Read('.claude/skills/clickup-integration/mcp.md')
1107
-
1108
- // 4. Session workflow guide (session file structure and patterns)
1085
+ // 2. Session workflow guide (session file structure and patterns)
1109
1086
  await Read('.claude/sessions/README.md')
1110
1087
  ```
1111
1088
 
@@ -70,30 +70,6 @@ You are an elite Frontend Developer specializing in Next.js 15, TypeScript, Tail
70
70
 
71
71
  **If frontend-validator or functional-validator FAIL:** They will call you back to fix issues before retrying.
72
72
 
73
- ## ClickUp Configuration (MANDATORY REFERENCE)
74
-
75
- **BEFORE any ClickUp interaction, you MUST read the pre-configured ClickUp details:**
76
-
77
- All ClickUp connection details are pre-configured in `.claude/.claude/config/agents.json`. **NEVER search or fetch these values manually.** Always use the values from the configuration file:
78
-
79
- - **Workspace ID**: `tools.clickup.workspaceId`
80
- - **Space ID**: `tools.clickup.space.id`
81
- - **List ID**: `tools.clickup.defaultList.id`
82
- - **User**: `tools.clickup.user.name` / `tools.clickup.user.id`
83
-
84
- **Usage Pattern:**
85
- ```typescript
86
- // ❌ NEVER DO THIS - Don't search for workspace/space/list
87
- const hierarchy = await clickup.getWorkspaceHierarchy()
88
-
89
- // ✅ ALWAYS DO THIS - Use pre-configured values from .claude/config/agents.json
90
- // Read .claude/config/agents.json to get Workspace ID, Space ID, List ID
91
- // Then update task status and add comments directly with task ID
92
-
93
- await clickup.updateTaskStatus(taskId, "in progress")
94
- await clickup.addComment(taskId, "🚀 Starting frontend development")
95
- ```
96
-
97
73
  ## Context Awareness
98
74
 
99
75
  **CRITICAL:** Before creating any components or files, read `.claude/config/context.json` to understand the environment.
@@ -1249,7 +1225,6 @@ Do you approve this addition or prefer I remove it?
1249
1225
  ## Context Files
1250
1226
 
1251
1227
  Always reference:
1252
- - `.claude/.claude/config/agents.json` - For test credentials and configuration
1253
1228
  - `.claude/config/workflow.md` - For complete development workflow v4.0 (19 phases)
1254
1229
  - `${sessionPath}/plan.md` - For technical plan
1255
1230
  - `${sessionPath}/context.md` - For coordination context
@@ -145,36 +145,26 @@ await Read('core/docs/13-plugins/01-plugin-overview.md')
145
145
  | Page customization | `core/docs/18-page-builder/` |
146
146
  | Development phases | `.rules/planning.md` |
147
147
 
148
- ## ClickUp Configuration (MANDATORY REFERENCE)
148
+ ## Task Manager Configuration (MANDATORY REFERENCE)
149
149
 
150
- **BEFORE any ClickUp interaction, you MUST read the pre-configured ClickUp details:**
150
+ **BEFORE any task manager interaction, you MUST read the workspace configuration:**
151
151
 
152
- All ClickUp connection details are pre-configured in `.claude/.claude/config/agents.json`. **NEVER search or fetch these values manually.** Always use the values from the configuration file:
152
+ ```typescript
153
+ // 1. Read workspace config for task manager settings
154
+ const workspace = await Read('.claude/config/workspace.json')
155
+ // → workspace.taskManager.provider (e.g., "clickup", "jira", "asana")
156
+ // → workspace.taskManager.config (provider-specific settings: workspaceId, defaultList, etc.)
153
157
 
154
- - **Workspace ID**: `tools.clickup.workspaceId`
155
- - **Space ID**: `tools.clickup.space.id`
156
- - **List ID**: `tools.clickup.defaultList.id`
157
- - **User**: `tools.clickup.user.name` / `tools.clickup.user.id`
158
+ // 2. Read team config for user mapping
159
+ const team = await Read('.claude/config/team.json')
160
+ // Find active user via workspace.activeUser → team.members[].ids.taskManager
158
161
 
159
- **Usage Pattern:**
160
- ```typescript
161
- // ❌ NEVER DO THIS - Don't search for workspace/space/list
162
- const hierarchy = await clickup.getWorkspaceHierarchy()
163
- const spaces = await clickup.searchSpaces()
164
-
165
- // ✅ ALWAYS DO THIS - Use pre-configured values from .claude/config/agents.json
166
- // Read `.claude/.claude/config/agents.json` to get:
167
- // - Workspace ID: tools.clickup.workspaceId
168
- // - Space ID: tools.clickup.space.id
169
- // - List ID: tools.clickup.defaultList.id
170
-
171
- await clickup.createTask({
172
- list_id: "<read from agents.json: tools.clickup.defaultList.id>", // From .claude/config/agents.json
173
- name: "Task name",
174
- // ... rest of task config
175
- })
162
+ // 3. Load the integration skill matching the provider
163
+ // e.g., .claude/skills/clickup-integration/SKILL.md
176
164
  ```
177
165
 
166
+ **NEVER hardcode provider-specific IDs.** Always read from `workspace.json → taskManager.config`.
167
+
178
168
  ## Core Responsibilities
179
169
 
180
170
  You are responsible for:
@@ -262,10 +252,11 @@ If a consumer project identifies a core improvement:
262
252
  ## Task Creation Guidelines
263
253
 
264
254
  Before creating any task, you MUST:
265
- 1. Read and understand `.claude/.claude/config/agents.json` for ClickUp configuration (IDs, credentials)
266
- 2. Read the task template from `.claude/skills/clickup-integration/templates/task.md`
267
- 3. Determine the correct ClickUp board based on project context
268
- 4. Follow the task template structure specified in the template file
255
+ 1. Read `.claude/config/workspace.json` for task manager configuration (`taskManager.provider`, `taskManager.config`)
256
+ 2. Read `.claude/config/team.json` to resolve user IDs from `activeUser`
257
+ 3. Read the task template from the matching integration skill (e.g., `.claude/skills/clickup-integration/templates/task.md`)
258
+ 4. Determine the correct board/list based on `workspace.json taskManager.config`
259
+ 5. Follow the task template structure specified in the template file
269
260
 
270
261
  ### Task Template Structure
271
262
 
@@ -366,8 +357,9 @@ Before finalizing any task, verify:
366
357
  ## Context Files
367
358
 
368
359
  Always reference:
369
- - `.claude/.claude/config/agents.json` - For ClickUp configuration (Workspace ID, Space ID, List ID, credentials)
370
- - `.claude/skills/clickup-integration/templates/task.md` - For task template structure
360
+ - `.claude/config/workspace.json` - For task manager configuration (`taskManager.provider`, `taskManager.config`)
361
+ - `.claude/config/team.json` - For user mapping (`activeUser` → `members[].ids.taskManager`)
362
+ - `.claude/skills/clickup-integration/templates/task.md` - For task template structure (when using ClickUp)
371
363
  - `.claude/skills/clickup-integration/mcp.md` - For ClickUp MCP usage guide
372
364
  - `.claude/config/workflow.md` - For complete development workflow
373
365
  - Project-specific CLAUDE.md files - For understanding the codebase architecture and existing patterns (to ensure requirements align with technical capabilities)
@@ -375,10 +367,10 @@ Always reference:
375
367
  ## ClickUp Task Creation Workflow
376
368
 
377
369
  ### Step 1: Read Configuration
378
- 1. Load `.claude/.claude/config/agents.json` to get ClickUp IDs
379
- 2. Load `.claude/skills/clickup-integration/templates/task.md` to get task template
380
- 3. Determine project context (core vs client)
381
- 4. Identify correct ClickUp board (Boilerplate for core)
370
+ 1. Load `.claude/config/workspace.json` to get task manager settings (`taskManager.provider`, `taskManager.config`)
371
+ 2. Load `.claude/config/team.json` to resolve active user's task manager ID
372
+ 3. Load the task template from the matching integration skill
373
+ 4. Determine project context (core vs client) from `.claude/config/context.json`
382
374
 
383
375
  ### Step 2: Create Task in ClickUp (IN SPANISH)
384
376
  1. Use ClickUp MCP `createTask`
@@ -387,7 +379,7 @@ Always reference:
387
379
  - **Initial Status:** **backlog**
388
380
  - **Priority:** High/Medium/Low based on business impact
389
381
  - **Tags:** feature/bug/enhancement/refactor
390
- - **Assign to:** User from `tools.clickup.user.name` (ID: `tools.clickup.user.id`)
382
+ - **Assign to:** Active user (from `workspace.json → activeUser` `team.json → members[].ids.taskManager`)
391
383
  - **Context:** Why, Impact, Benefits, User Story
392
384
  - **Acceptance Criteria:** NUMBERED LIST focused on business (NOT technical, NOT checkboxes)
393
385
  3. Leave **Implementation Plan** and **QA Plan** EMPTY (for architecture-supervisor)
@@ -548,7 +540,7 @@ cp .claude/templates/clickup_task.md \
548
540
  **Created By:** product-manager
549
541
  **Task ID:** 86abc123
550
542
  **Task URL:** https://app.clickup.com/t/86abc123
551
- **Assigned To:** <read from agents.json: tools.clickup.user.name> (ID: <read from agents.json: tools.clickup.user.id>)
543
+ **Assigned To:** <from workspace.json activeUser + team.json taskManager ID>
552
544
  **Status:** backlog
553
545
  **Priority:** normal
554
546
 
@@ -839,7 +831,7 @@ cp .claude/templates/scope.json \
839
831
  - Task ID: 86abc123
840
832
  - URL: https://app.clickup.com/t/86abc123
841
833
  - Status: backlog
842
- - Assigned: <read from agents.json: tools.clickup.user.name>
834
+ - Assigned: <from workspace.json activeUser>
843
835
 
844
836
  **Session:**
845
837
  - Folder: .claude/sessions/2025-01-19-user-profile-edit-v1/
@@ -922,7 +914,7 @@ await clickup.addComment(taskId, `
922
914
  Task ID: 86abc123
923
915
  URL: https://app.clickup.com/t/86abc123
924
916
  Status: backlog
925
- Assigned: <read from agents.json: tools.clickup.user.name>
917
+ Assigned: <from workspace.json activeUser>
926
918
  File: \`clickup_task_feature.md\`
927
919
 
928
920
  Next step: Architecture-supervisor will create the technical plan
@@ -934,9 +926,9 @@ When using ClickUp MCP to create tasks:
934
926
  ```typescript
935
927
  // Example task creation
936
928
  const task = await clickup.createTask({
937
- list_id: "<read from agents.json: tools.clickup.defaultList.id>", // From .claude/config/agents.json
929
+ list_id: "<from workspace.json → taskManager.config.defaultList>",
938
930
  name: "Implementar edición de perfil de usuario",
939
- assignees: ["<read from agents.json: tools.clickup.user.id>"], // From .claude/config/agents.json
931
+ assignees: ["<from team.json → members[activeUser].ids.taskManager>"],
940
932
  markdown_description: ` // ⚠️ CRITICAL: Use markdown_description, NOT description
941
933
  ## 📋 Contexto
942
934
 
@@ -67,8 +67,6 @@ Use thorough analysis before implementing ANY change.
67
67
  ├── agents/ # 22+ agent definitions
68
68
  ├── commands/ # Slash commands
69
69
  ├── config/
70
- │ ├── agents.json # Credentials & IDs (NEVER commit)
71
- │ ├── agents.example.json # Template for new developers
72
70
  │ ├── workflow.md # Workflow documentation
73
71
  │ └── workflow.example.md # Template
74
72
  ├── sessions/ # Session data (gitignored)
@@ -94,8 +92,6 @@ packages/ai-workflow/claude/ # PUBLISHABLE PACKAGE (synced from .
94
92
  |----------|---------|------------|
95
93
  | `.claude/` | Developer's working directory | **gitignored** |
96
94
  | `packages/ai-workflow/claude/` | Publishable package (synced from `.claude/`) | **committed** |
97
- | `.claude/config/agents.json` | Real credentials | **gitignored** |
98
- | `.claude/config/agents.example.json` | Placeholder template | can be committed |
99
95
 
100
96
  ---
101
97
 
@@ -105,14 +101,14 @@ packages/ai-workflow/claude/ # PUBLISHABLE PACKAGE (synced from .
105
101
 
106
102
  ```typescript
107
103
  // Step 1: Check if this is the core framework
108
- await Read('.claude/config/agents.json')
109
- // Look for: "isCore": true in project section
104
+ await Read('.claude/config/context.json')
105
+ // Look for: "context": "monorepo" (core) or "consumer" (derived)
110
106
 
111
107
  // Step 2: Verify ai-workflow package exists
112
108
  await Glob('packages/ai-workflow/claude/**/*')
113
109
 
114
110
  // Step 3: Determine action
115
- if (projectIsCore && aiWorkflowExists) {
111
+ if (context === 'monorepo' && aiWorkflowExists) {
116
112
  // This is the CORE FRAMEWORK - remind to run sync before publishing
117
113
  // After modifying .claude/, run: node packages/ai-workflow/scripts/sync.mjs
118
114
  } else {
@@ -127,31 +123,15 @@ if (projectIsCore && aiWorkflowExists) {
127
123
 
128
124
  **Agents must NEVER contain hardcoded configuration data.**
129
125
 
130
- ### Configuration Structure (`agents.json`)
131
-
132
- ```json
133
- {
134
- "project": {
135
- "name": "Project Name",
136
- "isCore": true|false
137
- },
138
- "testing": {
139
- "superadmin": {
140
- "email": "superadmin@cypress.com",
141
- "password": "..."
142
- },
143
- "apiKey": "sk_test_..."
144
- },
145
- "tools": {
146
- "clickup": {
147
- "workspaceId": "...",
148
- "space": { "name": "...", "id": "..." },
149
- "defaultList": { "name": "...", "id": "..." },
150
- "user": { "name": "...", "id": "..." }
151
- }
152
- }
153
- }
154
- ```
126
+ ### Configuration Sources
127
+
128
+ | Data | Source |
129
+ |------|--------|
130
+ | Project type (monorepo/consumer) | `.claude/config/context.json` → `context` |
131
+ | Task manager settings | `.claude/config/workspace.json` → `taskManager` |
132
+ | Active user & team members | `.claude/config/workspace.json` → `activeUser` + `.claude/config/team.json` |
133
+ | Test credentials & API keys | Active theme `dev.config.ts` → `devKeyring` |
134
+ | Git workflow conventions | `.claude/config/github.json` |
155
135
 
156
136
  ### Reference Patterns in Agents
157
137
 
@@ -159,12 +139,11 @@ if (projectIsCore && aiWorkflowExists) {
159
139
  # ❌ NEVER DO THIS - Hardcoded values
160
140
  - Workspace ID: 90132320273
161
141
  - User: Pablo Capello (ID: 3020828)
162
- API_KEY="sk_test_62fc..."
163
142
 
164
143
  # ✅ ALWAYS DO THIS - JSON path references
165
- - **Workspace ID**: `tools.clickup.workspaceId`
166
- - **User**: `tools.clickup.user.name` / `tools.clickup.user.id`
167
- API_KEY="<read from agents.json: testing.apiKey>"
144
+ - **Task Manager Config**: `workspace.json → taskManager.config`
145
+ - **Active User**: `workspace.json → activeUser` + `team.json → members[].ids`
146
+ - **Test Credentials**: Active theme `dev.config.ts` → `devKeyring`
168
147
  ```
169
148
 
170
149
  ---
@@ -307,8 +286,8 @@ await Write({
307
286
  ### 4. Modifying Configuration
308
287
 
309
288
  ```typescript
310
- // Step 1: ONLY modify .claude/config/agents.json for real values
311
- // Step 2: Update .claude/config/agents.example.json with structure changes
289
+ // Step 1: Modify .claude/config/workspace.json for task manager settings
290
+ // Step 2: Update .claude/config/team.json for team member changes
312
291
  // Step 3: If core project, run sync to update ai-workflow package
313
292
 
314
293
  // NEVER put real credentials in: