Skip to content
Back to skills

Dag Result Aggregator

ASecurity

Combines and synthesizes outputs from parallel DAG branches. Handles merge strategies, conflict resolution, and result formatting. Activate on 'aggregate results', 'combine outputs', 'merge branches', 'synthesize results', 'fan-in'. NOT for execution (use dag-parallel-executor) or scheduling (use dag-task-scheduler).

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 2, 2026
toolsjavascriptgojavasqlsecurityperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 2, 2026

npx -y skills add curiositech/port-daddy --skill dag-result-aggregator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dag Result Aggregator?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dag Result Aggregator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/curiositech-dag-result-aggregator-port-daddy/badge)](https://www.skillsdirectory.com/skills/curiositech-dag-result-aggregator-port-daddy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
license: BSL-1.1
name: dag-result-aggregator
description: Combines and synthesizes outputs from parallel DAG branches. Handles merge strategies, conflict resolution, and result formatting. Activate on 'aggregate results', 'combine outputs', 'merge branches', 'synthesize results', 'fan-in'. NOT for execution (use dag-parallel-executor) or scheduling (use dag-task-scheduler).
allowed-tools:
  - Read
  - Write
  - Edit
  - Glob
  - Grep
metadata:
  category: Agent & Orchestration
  tags:
    - dag
    - orchestration
    - aggregation
    - merge
    - fan-in
  pairs-with:
    - skill: dag-parallel-executor
      reason: Receives results from parallel execution
    - skill: dag-output-validator
      reason: Validates aggregated results
    - skill: dag-context-bridger
      reason: Bridges aggregated context forward
---

You are a DAG Result Aggregator, combining outputs from parallel branches into unified results with conflict resolution.

Use [Attributed aggregation](references/attributed-aggregation.md). Preserve identity, conflict, missingness, and the declared merge/acceptance policy.

## DECISION POINTS

**Aggregation strategy selection**

```mermaid
flowchart TD
 A[Branch artifacts and receipts] --> B[Check identity, version, schema, provenance, and missingness]
 B --> C{Declared merge/partial-result policy applies?}
 C -->|No| D[Preserve branches and escalate]
 C -->|Yes| E{Conflict relation and evaluator defined?}
 E -->|No| F[Emit attributed unresolved conflict]
 E -->|Yes| G[Apply declared merge without silent coercion]
 G --> H[Validate aggregate and record contributors/omissions]
```

**Conflict Resolution Decision Matrix**

| Data Type | Default Strategy | Fallback | Critical Systems |
|-----------|-----------------|----------|------------------|
| Timestamps | declared source/version order | preserve conflict | evaluator policy |
| Counters | declared identity and aggregation law | preserve conflict | evaluator policy |
| Strings | declared semantic merge | preserve conflict | evaluator policy |
| Objects | versioned schema merge | preserve conflict | evaluator policy |
| Arrays | declared item identity rule | preserve conflict | evaluator policy |

## FAILURE MODES

**1. Type Mismatch Chaos**
- **Symptoms**: Mixed data types for same field across branches (string vs number)
- **Detection**: Validate each branch against its declared schema and explicit missing/null/type rules; JavaScript `typeof` alone cannot distinguish arrays, null, or object schemas.
- **Fix**: retain both typed values and contract versions; coerce only under an explicit versioned normalization rule.

**2. Memory Explosion**
- **Symptoms**: Aggregation exceeds its declared memory/resource budget or becomes unresponsive.
- **Detection**: Compare attributed input size and buffering behavior with a workload-specific resource policy.
- **Fix**: choose streaming/pagination from a measured workload and declared resource policy.

**3. Infinite Conflict Loop**
- **Symptoms**: Aggregation never completes, CPU spinning on conflict resolution
- **Detection**: `if (conflictResolutionAttempts > maxRetries)`
- **Fix**: preserve the conflict and route to its declared evaluator; do not loop a merge without changed evidence.

**4. Silent Data Loss**
- **Symptoms**: Output smaller than expected, no error thrown
- **Detection**: Compare included, omitted, deduplicated, and unresolved identities against the declared merge policy.
- **Fix**: record every included, omitted, deduplicated, and unresolved item under the declared identity rule.

**5. Deadlock Detection Miss**
- **Symptoms**: Process hangs waiting for results that will never arrive
- **Detection**: `if (waitTime > timeout && pendingResults.length > 0)`
- **Fix**: Implement timeout with partial result handling, mark missing branches

## WORKED EXAMPLES

**Example: Code Analysis Aggregation**

```text
Scenario: 3 parallel code analyzers (security, performance, style)
Input: Mixed success/failure, incomparable severity scales

STEP 1: Assess incoming results
- security-analyzer: SUCCESS, 12 findings
- performance-analyzer: FAILED (timeout)  
- style-analyzer: SUCCESS, 8 findings with severity conflicts

STEP 2: Apply decision tree
- One branch is unavailable; the declared partial-result policy permits an attributed aggregate for this constructed case.
- Schema mismatch: security uses 1-10 scale, style uses LOW/MED/HIGH

STEP 3: Handle conflicts and schema
- Preserve both severity scales unless a versioned normalization rule and its meaning are supplied.
- Merge findings arrays using union strategy
- Add metadata marking performance-analyzer as unavailable

STEP 4: Validate and format output
```

```json
{
  "aggregationId": "code-analysis-001",
  "data": {
    "findings": [
      {"findingId":"security:sample-1","type":"security","severity":{"scale":"security-v1-1-to-10","value":8},"message":"SQL injection risk"},
      {"findingId":"style:sample-1","type":"style","severity":{"scale":"style-v1-low-med-high","value":"MED"},"message":"Long method detected"}
    ]
  },
  "stats": {
    "totalInputs": 3,
    "successfulInputs": 2,
    "failedInputs": 1,
    "illustrativeSample": true,
    "unresolvedConflicts": 1
  },
  "partialResults": ["performance-analyzer"],
  "conflicts": [{"field":"severity","findingIds":["security:sample-1","style:sample-1"],"disposition":"UNRESOLVED_INCOMPARABLE_SCALES"}]
}
```

This is a reduced illustrative sample of 12 and 8 attributed findings, not their union. **What expert catches**: a partial aggregate is permitted only by the named policy and preserves unavailable branches, identities, and incomparable scales.

## QUALITY GATES

- [ ] Every input identity is accounted for as included, omitted by policy, deduplicated, or unresolved.
- [ ] Schema validation passes on aggregated result
- [ ] Conflicts retain source values and either a justified disposition or an unresolved status.
- [ ] Deduplication applied where configured (no duplicate IDs)
- [ ] Output resource limits are declared for the measured workload; no portable memory default is assumed.
- [ ] Partial failure handling documented in metadata
- [ ] No coercion without a declared versioned normalization rule; incomparable scales remain separate.
- [ ] Provenance tracking shows which branch contributed what data
- [ ] Timeout boundaries respected (no infinite waits)
- [ ] Error propagation configured (fail-fast vs best-effort)

## NOT-FOR BOUNDARIES

**This skill should NOT be used for:**

- **DAG Execution**: Use `dag-parallel-executor` for running parallel branches
- **Task Scheduling**: Use `dag-task-scheduler` for timing and dependencies  
- **Real-time Streaming**: Use `stream-processor` for continuous data flows
- **Single Result Processing**: Use direct transformation for non-parallel results
- **Complex Analytics**: Use `data-analyzer` for statistical computations beyond simple aggregation
- **Persistent Storage**: Use `data-persister` for saving aggregated results

## Evidence and Book candidate

The reference cites W3C PROV-O vocabulary at vocabulary-only access depth. It supports attribution terms, not truth or merge correctness. **Book candidate, not Book prose:** an aggregate can retain conflict and missingness rather than disguising them as consensus. Compare with the Book-review files before claiming novelty or placement.

---

The aggregate preserves evidence about its inputs, including unresolved differences.

Files in this skill

  • SKILL.md7.3 KB
  • references/attributed-aggregation.md768 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…