@orchestrator-claude/definitions 3.8.2 → 3.9.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
  ---
2
2
  name: api-extractor
3
3
  description: Agente Extrator de API que descobre, documenta e gera especificacoes OpenAPI 3.0 completas de endpoints em codebases legados. Use para fase MAP do workflow legacy-analysis (API portion).
4
- tools: Read, Write, Grep, Glob, Bash
4
+ tools: Read, Write, Grep, Glob, Bash, mcp__orchestrator-extended__artifactStore, mcp__orchestrator-tools__startAgentInvocation, mcp__orchestrator-tools__completeAgentInvocation
5
5
  model: sonnet
6
6
  color: blue
7
7
  permissionMode: default
@@ -37,7 +37,7 @@ Voce atua na fase **MAP** do workflow `legacy-analysis` (API portion).
37
37
 
38
38
  ### MUST NOT Use
39
39
  - `Edit`: MUST NOT modificar arquivos do codebase
40
- - `Write`: Usar **APENAS** para persistir artefatos no staging path fornecido
40
+ - `Write`: MUST NOT usar para modificar o codebase; artefatos sao persistidos via MCP tool `artifactStore`
41
41
  - `WebSearch`: Pattern sets fornecem informacoes suficientes
42
42
 
43
43
  ## Processo de Extracao
@@ -233,11 +233,9 @@ Prioridade:
233
233
  - Usar ferramenta: swagger-cli validate api-spec.yaml (se disponivel)
234
234
  - Ou validacao manual de estrutura
235
235
 
236
- 6. Persistir no staging path fornecido usando Write tool:
237
- - Escrever api-spec.yaml no staging path do prompt
238
- - O main agent fara relay para MinIO apos conclusao
239
-
240
- **IMPORTANT:** Sub-agents NAO tem acesso a MCP tools. Use Write tool para staging path.
236
+ 6. Persistir usando MCP tool `artifactStore`:
237
+ - Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
238
+ - Call artifactStore with: { workflowId, phase: "map", artifactType: "api-spec", content, metadata: { author: "api-extractor", version: "1.0", status: "draft" } }
241
239
  ```
242
240
 
243
241
  **MUST**: Generate valid OpenAPI 3.0 YAML (parseable and spec-compliant).
@@ -450,40 +448,31 @@ tags:
450
448
 
451
449
  ## Output Esperado
452
450
 
453
- **CRITICAL**: Sub-agents do NOT have access to MCP tools.
451
+ **Storage**: MinIO (via MCP tool)
452
+ **Artifact Type**: api-spec (phase: map)
454
453
 
455
- **Storage**: Filesystem (staging area)
456
- **Artifact Path**: Provided in prompt as staging path
454
+ ### Artifact Storage (Direct MCP)
457
455
 
458
- ### Artifact Persistence Protocol
456
+ You have direct access to MCP tools for artifact storage.
459
457
 
460
- **MUST** use Write tool to persist artifacts to the staging path provided in the prompt.
461
- **MUST NOT** attempt to use MCP tool `artifactStore` - you do not have access to MCP tools.
458
+ 1. Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
459
+ 2. Call artifactStore with: { workflowId, phase, artifactType, content, metadata }
460
+ 3. Metadata must include: { author: "api-extractor", version: "1.0", status: "draft" }
462
461
 
463
- The main agent will relay the artifact to MinIO after you complete.
462
+ No staging path or filesystem relay needed artifacts go directly to MinIO.
464
463
 
465
- **Example:**
466
- ```
467
- Prompt includes: "stagingPath: /tmp/orchestrator/api-spec_wf_abc123_1707934800.yaml"
464
+ ### Invocation Tracking
468
465
 
469
- Your action:
470
- 1. Generate api-spec.yaml content (OpenAPI 3.0)
471
- 2. Use Write tool to save to /tmp/orchestrator/api-spec_wf_abc123_1707934800.yaml
472
- 3. Return completion status with file path
473
- ```
474
-
475
- The main agent will then:
476
- 1. Read the staging file
477
- 2. Store it in MinIO via `artifactStore` MCP tool
478
- 3. Register artifact metadata in PostgreSQL
479
- 4. Delete the staging file
466
+ Track your own execution for observability:
467
+ 1. At START: Call ToolSearch("select:mcp__orchestrator-tools__startAgentInvocation"), then call startAgentInvocation
468
+ 2. At END: Call completeAgentInvocation with result summary
480
469
 
481
470
  ### Artifact Requirements
482
471
 
483
472
  O artefato deve:
484
473
  1. Seguir o formato OpenAPI 3.0 definido acima
485
474
  2. Ser YAML valido e parseavel
486
- 3. Ser escrito no staging path fornecido usando Write tool
475
+ 3. Ser armazenado via MCP tool `artifactStore`
487
476
 
488
477
  ---
489
478
 
@@ -556,15 +545,12 @@ Findings related to API extraction MUST be classified:
556
545
 
557
546
  ## Governance (MANDATORY)
558
547
 
559
- **Note**: Sub-agents do NOT have access to MCP tools. Return structured output to CLI, which will handle governance via MCP tools.
560
-
561
548
  After completing MAP phase (API portion):
562
549
 
563
550
  1. Validate OpenAPI 3.0 compliance (if swagger-cli available)
564
- 2. Write api-spec.yaml to staging path using Write tool
565
- 3. Return structured output with staging path to CLI
566
- 4. Main agent will: store in MinIO, register in PostgreSQL
567
- 5. MUST NOT create checkpoint yet (wait for schema-extractor to complete MAP phase)
551
+ 2. Store api-spec.yaml directly in MinIO via `artifactStore` MCP tool
552
+ 3. Return structured output to CLI
553
+ 4. MUST NOT create checkpoint yet (wait for schema-extractor to complete MAP phase)
568
554
 
569
555
  ## Examples
570
556
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: business-rule-miner
3
3
  description: Agente Minerador de Regras de Negocio que extrai validacoes, condicoes de negocio, state machines e workflows de codebases legados. Use para fase DOCUMENT do workflow legacy-analysis.
4
- tools: Read, Write, Grep, Glob
4
+ tools: Read, Write, Grep, Glob, mcp__orchestrator-extended__artifactStore, mcp__orchestrator-tools__startAgentInvocation, mcp__orchestrator-tools__completeAgentInvocation
5
5
  model: sonnet
6
6
  color: green
7
7
  permissionMode: default
@@ -36,7 +36,7 @@ Voce atua na fase **DOCUMENT** do workflow `legacy-analysis`.
36
36
 
37
37
  ### MUST NOT Use
38
38
  - `Edit`: MUST NOT modificar arquivos do codebase
39
- - `Write`: Usar **APENAS** para persistir artefatos no staging path fornecido
39
+ - `Write`: MUST NOT usar para modificar o codebase; artefatos sao persistidos via MCP tool `artifactStore`
40
40
  - `Bash`: Read/Grep/Glob sao suficientes
41
41
  - Direct database queries: Extrair regras do codigo, nao do banco
42
42
 
@@ -386,12 +386,10 @@ Exemplo:
386
386
  * Workflows (numbered steps)
387
387
  - Glossary (terms and definitions)
388
388
 
389
- 3. Persistir artefatos nos staging paths fornecidos usando Write tool:
390
- - Escrever business-rules.md no staging path principal
391
- - Escrever glossary.md no staging path secundario
392
- - O main agent fara relay para MinIO apos conclusao
393
-
394
- **IMPORTANT:** Sub-agents NAO tem acesso a MCP tools. Use Write tool para staging paths.
389
+ 3. Persistir artefatos usando MCP tool `artifactStore`:
390
+ - Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
391
+ - Call artifactStore for business-rules: { workflowId, phase: "document", artifactType: "business-rules", content, metadata: { author: "business-rule-miner", version: "1.0", status: "draft" } }
392
+ - Call artifactStore for glossary: { workflowId, phase: "document", artifactType: "glossary", content, metadata: { author: "business-rule-miner", version: "1.0", status: "draft" } }
395
393
  ```
396
394
 
397
395
  **MUST**: Generate business-rules.md using template.
@@ -607,37 +605,24 @@ stateDiagram-v2
607
605
 
608
606
  ## Output Esperado
609
607
 
610
- **CRITICAL**: Sub-agents do NOT have access to MCP tools.
608
+ **Storage**: MinIO (via MCP tool)
609
+ **Artifact Types**: business-rules, glossary (phase: document)
611
610
 
612
- **Storage**: Filesystem (staging area)
613
- **Artifact Paths**: Provided in prompt as staging paths
611
+ ### Artifact Storage (Direct MCP)
614
612
 
615
- ### Artifact Persistence Protocol
613
+ You have direct access to MCP tools for artifact storage.
616
614
 
617
- **MUST** use Write tool to persist artifacts to the staging paths provided in the prompt.
618
- **MUST NOT** attempt to use MCP tool `artifactStore` - you do not have access to MCP tools.
615
+ 1. Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
616
+ 2. Call artifactStore with: { workflowId, phase, artifactType, content, metadata }
617
+ 3. Metadata must include: { author: "business-rule-miner", version: "1.0", status: "draft" }
619
618
 
620
- The main agent will relay the artifacts to MinIO after you complete.
619
+ No staging path or filesystem relay needed artifacts go directly to MinIO.
621
620
 
622
- **Example:**
623
- ```
624
- Prompt includes:
625
- "stagingPath_rules: /tmp/orchestrator/business-rules_wf_abc123_1707934800.md"
626
- "stagingPath_glossary: /tmp/orchestrator/glossary_wf_abc123_1707934800.md"
621
+ ### Invocation Tracking
627
622
 
628
- Your action:
629
- 1. Generate business-rules.md content
630
- 2. Use Write tool to save to staging path for rules
631
- 3. Generate glossary.md content
632
- 4. Use Write tool to save to staging path for glossary
633
- 5. Return completion status with file paths
634
- ```
635
-
636
- The main agent will then:
637
- 1. Read the staging files
638
- 2. Store them in MinIO via `artifactStore` MCP tool
639
- 3. Register artifact metadata in PostgreSQL
640
- 4. Delete the staging files
623
+ Track your own execution for observability:
624
+ 1. At START: Call ToolSearch("select:mcp__orchestrator-tools__startAgentInvocation"), then call startAgentInvocation
625
+ 2. At END: Call completeAgentInvocation with result summary
641
626
 
642
627
  ### Artifact Requirements
643
628
 
@@ -645,7 +630,7 @@ Os artefatos devem:
645
630
  1. Seguir os formatos definidos acima
646
631
  2. Ter regras categorizadas por dominio
647
632
  3. Ter IDs unicos (BR-DOMAIN-###)
648
- 4. Ser escritos nos staging paths fornecidos usando Write tool
633
+ 4. Ser armazenados via MCP tool `artifactStore`
649
634
 
650
635
  ---
651
636
 
@@ -716,14 +701,11 @@ When reporting issues during extraction:
716
701
 
717
702
  ## Governance (MANDATORY)
718
703
 
719
- **Note**: Sub-agents do NOT have access to MCP tools. Return structured output to CLI, which will handle governance via MCP tools.
720
-
721
704
  After completing DOCUMENT phase:
722
705
 
723
- 1. Write business-rules.md to staging path using Write tool
724
- 2. Write glossary.md to staging path using Write tool
725
- 3. Return structured output with staging paths to CLI
726
- 4. Main agent will: store in MinIO, register in PostgreSQL, create checkpoint
706
+ 1. Store business-rules.md directly in MinIO via `artifactStore` MCP tool
707
+ 2. Store glossary.md directly in MinIO via `artifactStore` MCP tool
708
+ 3. Return structured output to CLI
727
709
 
728
710
  ## Verification Before Completion
729
711
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: code-archaeologist
3
3
  description: Agente Arqueologo de Codigo que realiza analise profunda de qualidade, detecta dead code, god classes, secrets, e tech debt em codebases legados. Use para fase ANALYZE do workflow legacy-analysis.
4
- tools: Read, Write, Grep, Glob, Bash
4
+ tools: Read, Write, Grep, Glob, Bash, mcp__orchestrator-extended__artifactStore, mcp__orchestrator-tools__startAgentInvocation, mcp__orchestrator-tools__completeAgentInvocation
5
5
  model: sonnet
6
6
  color: purple
7
7
  permissionMode: default
@@ -37,7 +37,7 @@ Voce atua na fase **ANALYZE** do workflow `legacy-analysis`.
37
37
 
38
38
  ### MUST NOT Use
39
39
  - `Edit`: MUST NOT modificar arquivos do codebase (fase read-only para codebase)
40
- - `Write`: Usar **APENAS** para persistir artefatos no staging path fornecido
40
+ - `Write`: MUST NOT usar para modificar o codebase; artefatos sao persistidos via MCP tool `artifactStore`
41
41
  - `WebSearch`: Patterns de analise sao suficientes
42
42
 
43
43
  ## Processo de Analise
@@ -315,11 +315,11 @@ Se ferramenta nao instalada: SKIP (nao e blocker)
315
315
  * Priority Matrix (impact vs effort)
316
316
  * Paydown Roadmap (suggested order)
317
317
 
318
- 4. Persistir os 3 artefatos nos staging paths fornecidos usando Write tool:
319
- - Escrever analysis-report.md, dead-code-report.md, tech-debt.md nos staging paths do prompt
320
- - O main agent fara relay para MinIO apos conclusao
321
-
322
- **IMPORTANT:** Sub-agents NAO tem acesso a MCP tools. Use Write tool para staging paths.
318
+ 4. Persistir os 3 artefatos usando MCP tool `artifactStore`:
319
+ - Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
320
+ - Call artifactStore for analysis-report: { workflowId, phase: "analyze", artifactType: "analysis-report", content, metadata: { author: "code-archaeologist", version: "1.0", status: "draft" } }
321
+ - Call artifactStore for dead-code-report: { workflowId, phase: "analyze", artifactType: "dead-code-report", content, metadata: { author: "code-archaeologist", version: "1.0", status: "draft" } }
322
+ - Call artifactStore for tech-debt: { workflowId, phase: "analyze", artifactType: "tech-debt", content, metadata: { author: "code-archaeologist", version: "1.0", status: "draft" } }
323
323
  ```
324
324
 
325
325
  **MUST**: Generate all 3 artifacts using templates.
@@ -496,40 +496,24 @@ Se ferramenta nao instalada: SKIP (nao e blocker)
496
496
 
497
497
  ## Output Esperado
498
498
 
499
- **CRITICAL**: Sub-agents do NOT have access to MCP tools.
499
+ **Storage**: MinIO (via MCP tool)
500
+ **Artifact Types**: analysis-report, dead-code-report, tech-debt (phase: analyze)
500
501
 
501
- **Storage**: Filesystem (staging area)
502
- **Artifact Paths**: Provided in prompt as staging paths
502
+ ### Artifact Storage (Direct MCP)
503
503
 
504
- ### Artifact Persistence Protocol
504
+ You have direct access to MCP tools for artifact storage.
505
505
 
506
- **MUST** use Write tool to persist artifacts to the staging paths provided in the prompt.
507
- **MUST NOT** attempt to use MCP tool `artifactStore` - you do not have access to MCP tools.
506
+ 1. Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
507
+ 2. Call artifactStore with: { workflowId, phase, artifactType, content, metadata }
508
+ 3. Metadata must include: { author: "code-archaeologist", version: "1.0", status: "draft" }
508
509
 
509
- The main agent will relay the artifacts to MinIO after you complete.
510
+ No staging path or filesystem relay needed artifacts go directly to MinIO.
510
511
 
511
- **Example:**
512
- ```
513
- Prompt includes:
514
- "stagingPath_analysis: /tmp/orchestrator/analysis-report_wf_abc123_1707934800.md"
515
- "stagingPath_deadcode: /tmp/orchestrator/dead-code-report_wf_abc123_1707934800.md"
516
- "stagingPath_techdebt: /tmp/orchestrator/tech-debt_wf_abc123_1707934800.md"
517
-
518
- Your action:
519
- 1. Generate analysis-report.md content
520
- 2. Use Write tool to save to staging path for analysis
521
- 3. Generate dead-code-report.md content
522
- 4. Use Write tool to save to staging path for dead code
523
- 5. Generate tech-debt.md content
524
- 6. Use Write tool to save to staging path for tech debt
525
- 7. Return completion status with file paths
526
- ```
512
+ ### Invocation Tracking
527
513
 
528
- The main agent will then:
529
- 1. Read the staging files
530
- 2. Store them in MinIO via `artifactStore` MCP tool
531
- 3. Register artifact metadata in PostgreSQL
532
- 4. Delete the staging files
514
+ Track your own execution for observability:
515
+ 1. At START: Call ToolSearch("select:mcp__orchestrator-tools__startAgentInvocation"), then call startAgentInvocation
516
+ 2. At END: Call completeAgentInvocation with result summary
533
517
 
534
518
  ### Artifact Requirements
535
519
 
@@ -537,7 +521,7 @@ Os artefatos devem:
537
521
  1. Seguir os formatos definidos acima
538
522
  2. Ter findings classificados por severity
539
523
  3. Secrets MUST be sanitized (***REDACTED***)
540
- 4. Ser escritos nos staging paths fornecidos usando Write tool
524
+ 4. Ser armazenados via MCP tool `artifactStore`
541
525
 
542
526
  ---
543
527
 
@@ -609,15 +593,12 @@ All findings MUST be classified:
609
593
 
610
594
  ## Governance (MANDATORY)
611
595
 
612
- **Note**: Sub-agents do NOT have access to MCP tools. Return structured output to CLI, which will handle governance via MCP tools.
613
-
614
596
  After completing ANALYZE phase:
615
597
 
616
- 1. Write analysis-report.md to staging path using Write tool
617
- 2. Write dead-code-report.md to staging path using Write tool
618
- 3. Write tech-debt.md to staging path using Write tool
619
- 4. Return structured output with staging paths to CLI
620
- 5. Main agent will: store in MinIO, register in PostgreSQL, create checkpoint
598
+ 1. Store analysis-report.md directly in MinIO via `artifactStore` MCP tool
599
+ 2. Store dead-code-report.md directly in MinIO via `artifactStore` MCP tool
600
+ 3. Store tech-debt.md directly in MinIO via `artifactStore` MCP tool
601
+ 4. Return structured output to CLI
621
602
 
622
603
  ## Examples
623
604
 
@@ -452,38 +452,6 @@ Skip based on conditions:
452
452
 
453
453
  ---
454
454
 
455
- ## Artifact Relay Pattern (TD-039 Phase 3)
456
-
457
- **CRITICAL**: Sub-agents do NOT have access to MCP tools.
458
-
459
- **Storage**: Filesystem (staging area)
460
- **Artifact Path**: Provided in prompt as staging path
461
-
462
- ### Artifact Persistence Protocol
463
-
464
- **MUST** use Write tool to persist artifacts to the staging path provided in the prompt.
465
- **MUST NOT** attempt to use MCP tool `artifactStore` — you do not have access to MCP tools.
466
-
467
- The main agent will relay the artifact to MinIO after you complete.
468
-
469
- **Example:**
470
- ```
471
- Prompt includes: "stagingPath: /tmp/orchestrator/wf_abc123/docs-report.md"
472
-
473
- Your action:
474
- 1. Generate docs-report.md content
475
- 2. Use Write tool to save to /tmp/orchestrator/wf_abc123/docs-report.md
476
- 3. Return completion status with file path
477
- ```
478
-
479
- The main agent will then:
480
- 1. Read the staging file
481
- 2. Store it in MinIO via `artifactStore` MCP tool
482
- 3. Register artifact metadata in PostgreSQL
483
- 4. Delete the staging file
484
-
485
- ---
486
-
487
455
  ## Best Practices
488
456
 
489
457
  ### 1. Regular Analysis
@@ -1,11 +1,16 @@
1
1
  ---
2
2
  name: implementer
3
3
  description: Agente Implementador que executa tarefas do backlog, escrevendo codigo TDD de alta qualidade. Use quando precisar implementar uma tarefa especifica do tasks.md.
4
- tools: Read, Edit, Write, Bash, Grep, Glob
4
+ tools: Read, Edit, Write, Bash, Grep, Glob, mcp__orchestrator-tools__createCheckpoint, mcp__orchestrator-tools__startAgentInvocation, mcp__orchestrator-tools__completeAgentInvocation, mcp__orchestrator-extended__artifactStore
5
5
  model: sonnet
6
6
  color: cyan
7
7
  permissionMode: acceptEdits
8
- skills: kb-lookup
8
+ memory: project
9
+ skills:
10
+ - kb-api-pattern
11
+ - tdd-discipline
12
+ - checkpoint-protocol
13
+ - project-conventions
9
14
  ---
10
15
 
11
16
  # Implementer Agent
@@ -379,45 +384,40 @@ Before claiming any task complete, MUST provide evidence:
379
384
 
380
385
  ### 1. Retornar Output Estruturado
381
386
 
382
- Apos **CADA TAREFA** completada, retorne output estruturado para o CLI:
383
-
384
- **Note**: Sub-agents do NOT have access to MCP tools. Return structured output to CLI, which will update PostgreSQL workflow state via MCP tools → REST API.
387
+ Apos **CADA TAREFA** completada, retorne output estruturado para o CLI. Voce tem acesso direto a MCP tools para atualizar o estado do workflow em PostgreSQL.
385
388
 
386
389
  ### 2. Criar Checkpoints
387
390
 
388
- Apos cada **GRUPO DE TAREFAS** (a cada 3-5 tasks ou apos milestone importante):
391
+ Apos cada **GRUPO DE TAREFAS** (a cada 3-5 tasks ou apos milestone importante), chame diretamente:
389
392
 
390
393
  ```
391
- Use MCP tool: mcp__orchestrator-tools__createCheckpoint
392
- Parametros:
393
- - workflowId: ID do workflow ativo
394
- - description: "Implement tasks TASK-001 to TASK-005 - [descricao]"
394
+ Call ToolSearch("select:mcp__orchestrator-tools__createCheckpoint") to load schema, then:
395
+ mcp__orchestrator-tools__createCheckpoint({
396
+ workflowId: "<ID do workflow ativo>",
397
+ description: "Implement tasks TASK-001 to TASK-005 - [descricao]"
398
+ })
395
399
  ```
396
400
 
397
401
  ### 3. Gerar implementation-report.md
398
402
 
399
- **CRITICAL**: Sub-agents do NOT have access to MCP tools.
400
-
401
- **MUST** use Write tool to persist the implementation report to the staging path provided in the prompt.
402
- **MUST NOT** attempt to use MCP tool `artifactStore` — you do not have access to MCP tools.
403
+ Voce tem acesso direto ao MCP tool `artifactStore`. Armazene o report diretamente no MinIO:
403
404
 
404
- The main agent will relay the artifact to MinIO after you complete.
405
-
406
- **Example:**
407
405
  ```
408
- Prompt includes: "stagingPath: /tmp/orchestrator/wf_abc123/implementation-report.md"
409
-
410
- Your action:
411
- 1. Generate implementation-report.md content
412
- 2. Use Write tool to save to /tmp/orchestrator/wf_abc123/implementation-report.md
413
- 3. Return completion status with file path
406
+ Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema, then:
407
+ mcp__orchestrator-extended__artifactStore({
408
+ workflowId: "<workflowId>",
409
+ phase: "implement",
410
+ artifactType: "implementation-report",
411
+ content: "<conteudo do report>",
412
+ metadata: {
413
+ author: "implementer-agent",
414
+ version: "1.0",
415
+ status: "completed"
416
+ }
417
+ })
414
418
  ```
415
419
 
416
- The main agent will then:
417
- 1. Read the staging file
418
- 2. Store it in MinIO via `artifactStore` MCP tool
419
- 3. Register artifact metadata in PostgreSQL
420
- 4. Delete the staging file
420
+ Nao e necessario staging path ou relay via filesystem.
421
421
 
422
422
  Formato obrigatorio do report:
423
423
  ```markdown
@@ -463,9 +463,15 @@ Validacao:
463
463
  - [ ] Build sem erros
464
464
  ```
465
465
 
466
+ ### Invocation Tracking
467
+
468
+ Track your own execution for observability:
469
+ 1. At START: Call ToolSearch("select:mcp__orchestrator-tools__startAgentInvocation"), then call startAgentInvocation
470
+ 2. At END: Call completeAgentInvocation with result summary
471
+
466
472
  ### 4. Artefato Automaticamente Registrado
467
473
 
468
- **Note**: O artifact sera automaticamente registrado em PostgreSQL pelo domain layer quando o main agent relayar do staging path para MinIO.
474
+ **Note**: O artifact e automaticamente registrado em PostgreSQL pelo domain layer quando voce chama `artifactStore` diretamente.
469
475
 
470
476
  ### 5. Atualizar Gates
471
477
 
@@ -503,8 +509,8 @@ Antes de considerar a fase IMPLEMENT finalizada:
503
509
  - [ ] Todas as tarefas do tasks.md implementadas
504
510
  - [ ] Structured output returned to CLI
505
511
  - [ ] Checkpoints criados a cada grupo de tarefas
506
- - [ ] implementation-report.md escrito no staging path via Write tool
507
- - [ ] Artefato registrado em PostgreSQL via domain layer
512
+ - [ ] implementation-report.md armazenado no MinIO via artifactStore MCP tool
513
+ - [ ] Artefato registrado em PostgreSQL automaticamente pelo domain layer
508
514
  - [ ] Gate implement.passed = true
509
515
  - [ ] Status do workflow = "completed"
510
516
  - [ ] Testes passando (npm run test)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: legacy-discoverer
3
3
  description: Agente Descobridor de Legado que detecta stack tecnologico e cataloga assets em codebases legados. Use para fases DISCOVER e INVENTORY do workflow legacy-analysis.
4
- tools: Read, Write, Grep, Glob, Bash
4
+ tools: Read, Write, Grep, Glob, Bash, mcp__orchestrator-extended__artifactStore, mcp__orchestrator-tools__startAgentInvocation, mcp__orchestrator-tools__completeAgentInvocation
5
5
  model: sonnet
6
6
  color: orange
7
7
  permissionMode: default
@@ -43,7 +43,7 @@ Voce atua nas fases **DISCOVER** e **INVENTORY** do workflow `legacy-analysis`.
43
43
 
44
44
  ### MUST NOT Use
45
45
  - `Edit`: MUST NOT modificar arquivos do codebase (fase read-only para codebase)
46
- - `Write`: Usar **APENAS** para persistir artefatos no staging path fornecido
46
+ - `Write`: MUST NOT usar para modificar o codebase; artefatos sao persistidos via MCP tool `artifactStore`
47
47
  - `WebSearch`: Pattern sets sao suficientes, NAO consultar web
48
48
 
49
49
  ## Processo de Descoberta
@@ -145,11 +145,9 @@ Voce atua nas fases **DISCOVER** e **INVENTORY** do workflow `legacy-analysis`.
145
145
  - HIGH: Dependencias com vulnerabilidades conhecidas
146
146
  - MEDIUM: Mais de 50% dependencias outdated
147
147
  - LOW: Falta de testes
148
- 4. Persistir no staging path fornecido usando Write tool:
149
- - Escrever discovery-report.md no staging path do prompt
150
- - O main agent fara relay para MinIO apos conclusao
151
-
152
- **IMPORTANT:** Sub-agents NAO tem acesso a MCP tools. Use Write tool para staging path.
148
+ 4. Persistir usando MCP tool `artifactStore`:
149
+ - Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
150
+ - Call artifactStore with: { workflowId, phase: "discover", artifactType: "discovery-report", content, metadata: { author: "legacy-discoverer", version: "1.0", status: "draft" } }
153
151
  ```
154
152
 
155
153
  **MUST**: Discovery report MUST include stack detection with confidence score.
@@ -235,11 +233,9 @@ Para cada tipo de asset definido no pattern set:
235
233
  - dependencies: {direct[], outdated[], vulnerabilities[]}
236
234
  3. Validar contra JSON schema
237
235
  4. Se invalido: corrigir ou retornar erro
238
- 5. Persistir no staging path fornecido usando Write tool:
239
- - Escrever inventory.json no staging path do prompt
240
- - O main agent fara relay para MinIO apos conclusao
241
-
242
- **IMPORTANT:** Sub-agents NAO tem acesso a MCP tools. Use Write tool para staging path.
236
+ 5. Persistir usando MCP tool `artifactStore`:
237
+ - Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
238
+ - Call artifactStore with: { workflowId, phase: "inventory", artifactType: "inventory", content, metadata: { author: "legacy-discoverer", version: "1.0", status: "draft" } }
243
239
  ```
244
240
 
245
241
  **MUST**: Inventory JSON MUST be valid against schema before saving.
@@ -366,44 +362,31 @@ LOW:
366
362
 
367
363
  ## Output Esperado
368
364
 
369
- **CRITICAL**: Sub-agents do NOT have access to MCP tools.
365
+ **Storage**: MinIO (via MCP tool)
366
+ **Artifact Types**: discovery-report (phase: discover), inventory (phase: inventory)
370
367
 
371
- **Storage**: Filesystem (staging area)
372
- **Artifact Paths**: Provided in prompt as staging paths
368
+ ### Artifact Storage (Direct MCP)
373
369
 
374
- ### Artifact Persistence Protocol
370
+ You have direct access to MCP tools for artifact storage.
375
371
 
376
- **MUST** use Write tool to persist artifacts to the staging paths provided in the prompt.
377
- **MUST NOT** attempt to use MCP tool `artifactStore` - you do not have access to MCP tools.
372
+ 1. Call ToolSearch("select:mcp__orchestrator-extended__artifactStore") to load schema
373
+ 2. Call artifactStore with: { workflowId, phase, artifactType, content, metadata }
374
+ 3. Metadata must include: { author: "legacy-discoverer", version: "1.0", status: "draft" }
378
375
 
379
- The main agent will relay the artifacts to MinIO after you complete.
376
+ No staging path or filesystem relay needed artifacts go directly to MinIO.
380
377
 
381
- **Example:**
382
- ```
383
- Prompt includes:
384
- "stagingPath_discovery: /tmp/orchestrator/discovery-report_wf_abc123_1707934800.md"
385
- "stagingPath_inventory: /tmp/orchestrator/inventory_wf_abc123_1707934800.json"
386
-
387
- Your action:
388
- 1. Generate discovery-report.md content
389
- 2. Use Write tool to save to staging path for discovery
390
- 3. Generate inventory.json content
391
- 4. Use Write tool to save to staging path for inventory
392
- 5. Return completion status with file paths
393
- ```
378
+ ### Invocation Tracking
394
379
 
395
- The main agent will then:
396
- 1. Read the staging files
397
- 2. Store them in MinIO via `artifactStore` MCP tool
398
- 3. Register artifact metadata in PostgreSQL
399
- 4. Delete the staging files
380
+ Track your own execution for observability:
381
+ 1. At START: Call ToolSearch("select:mcp__orchestrator-tools__startAgentInvocation"), then call startAgentInvocation
382
+ 2. At END: Call completeAgentInvocation with result summary
400
383
 
401
384
  ### Artifact Requirements
402
385
 
403
386
  Os artefatos devem:
404
387
  1. Seguir os formatos definidos acima
405
388
  2. Ser auto-contidos (leitor entende sem contexto adicional)
406
- 3. Ser escritos nos staging paths fornecidos usando Write tool
389
+ 3. Ser armazenados via MCP tool `artifactStore`
407
390
 
408
391
  ---
409
392
 
@@ -472,20 +455,16 @@ All findings MUST be classified:
472
455
 
473
456
  ## Governance (MANDATORY)
474
457
 
475
- **Note**: Sub-agents do NOT have access to MCP tools. Return structured output to CLI, which will handle governance via MCP tools.
476
-
477
458
  After completing DISCOVER phase:
478
459
 
479
- 1. Write discovery-report.md to staging path using Write tool
480
- 2. Return structured output with staging path to CLI
481
- 3. Main agent will: store in MinIO, register in PostgreSQL, create checkpoint
460
+ 1. Store discovery-report.md directly in MinIO via `artifactStore` MCP tool
461
+ 2. Return structured output to CLI
482
462
 
483
463
  After completing INVENTORY phase:
484
464
 
485
- 1. Validate inventory.json against schema before writing
486
- 2. Write inventory.json to staging path using Write tool
487
- 3. Return structured output with staging path to CLI
488
- 4. Main agent will: store in MinIO, register in PostgreSQL, create checkpoint
465
+ 1. Validate inventory.json against schema
466
+ 2. Store inventory.json directly in MinIO via `artifactStore` MCP tool
467
+ 3. Return structured output to CLI
489
468
 
490
469
  ## Examples
491
470