agentleFS
axisroboaxisrobo/ea-harness/.agents/skills/arch-req-merge/SKILL.md

arch-req-merge

Skill15 starsChanged 51 days agoMITView on GitHub

Merge multiple partial requirements YAML files from different readers into one consolidated req.yaml. Detects field conflicts between sources, identifies critical gaps, and produces a gap report. Run after all readers, before the gap-filling interview in arch-requirements.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    When two sources conflict at the same confidence level, both values are preserved and flagged as ⚠CONFLICT.

    line 67
  2. Very specific:

    All other fields are non-critical (can be TBD).

    line 83
  3. Very specific:

    If the user provides partial req.yaml blocks in the conversation, you may perform the merge logic manually:

    line 95

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Locating shared resources. References in this file to standards/, tools/, config.yaml, and templates/ are relative to the ArchHarness resource root. Determine the root, in order: (1) the ARCHHARNESS_HOME environment variable, (2) the output of python -m archharness root (the pip-installed package bundles these resources under its data directory), (3) the current working directory when it already contains config.yaml and tools/ (the repository checkout). Prefix shared paths with that root whenever the working directory is not the resource root.

You are a requirements consolidation specialist. Your job is to merge partial requirements from multiple sources, detect conflicts, and produce a clear list of what still needs to be filled in.

How to invoke (single pipeline for any number of sources)

One command handles one source or many — the output is always the same req/v2 schema (schemas/req-v2.schema.json), always with a gap report:

archharness req --diagram arch.drawio --doc brief.md --csv cmdb.csv \
    -o req.yaml --report gap-report.md --manifest req.manifest.json

# Cross-field validation (rules V1-V7) of the merged req/v2 document:
archharness req-validate req.yaml            # add --json for machine output

--manifest writes an artifact/v1 provenance record (hash-bound to the output) for the workflow gate. There is no one-source shortcut anymore: a single source flows through the same normalize → merge → validate → serialize pipeline, so downstream stages see one stable contract.

What the merger does

  1. Per-entity merge — matches each entity kind across sources:
    • named entities (infra, systems, components) by normalized name
    • deployments by (component, environment)
    • flows by (source, target)
    • network_links by (undirected endpoint pair, method)
    • auth by (entry point, subject)
  2. Confidence-weighted merge — picks the highest-confidence value for each field
  3. Conflict detection — if two MEDIUM+ confidence sources give different values, flags CONFLICT
  4. Reference resolution — partials reference other entities by name; the merger resolves names to typed IDs (INF-nn, APP-nn, CMP-nn, DEP-nn, FLOW-nn, LNK-nn, AUTH-nn, STK-nn) and drops any row whose required reference cannot be resolved, recording a critical gap.
  5. Gap analysis + contract validation — checks every CRITICAL field, then validates the output against req/v2
  6. Output — req.yaml + gap-report.md

Confidence priority (high to low)

  1. manual — user explicitly confirmed in interview
  2. high — CMDB API, structured arch YAML file
  3. medium — draw.io/D2 diagram, document extraction
  4. low — vision OCR, inferred values
  5. unknown — no source

When two sources conflict at the same confidence level, both values are preserved and flagged as ⚠CONFLICT. The user must resolve conflicts manually.

Critical fields that block arch-design

CategoryCritical fields
Infraname, node_kind
Systemname, type (owner recommended)
Componentname, owning system resolved, kind
Deploymentcomponent + environment resolved; infra_id required for prod
Flowboth endpoints resolved to components, protocol, inline auth_method
Network linkboth infra endpoints resolved, method
Authentry point resolved, protocol
Projectproject_name

All other fields are non-critical (can be TBD). Some strong recommendations are reported as non-critical gaps: component component_role, sensitivity, flow port, infra country.

When to run arch-req-merge via CLI vs in chat

CLI (authoritative — automated pipeline, any number of files):

archharness req --diagram a.drawio --doc b.md -o req.yaml --report gap-report.md

In chat (user provides partial YAML blocks): If the user provides partial req.yaml blocks in the conversation, you may perform the merge logic manually:

  1. For each field, identify which source has it with the highest confidence
  2. Flag any conflicts
  3. List all critical gaps
  4. Output the merged YAML and gap list inline

Chat merges are drafts: a CLI run is still required before arch-design, because only the CLI validates the output against req/v2 and resolves name references into typed IDs.

After merge: what to tell the user

Always conclude with:

  • Count of critical gaps remaining
  • Whether arch-design can proceed (0 critical gaps) or interview is needed
  • Which specific gaps need filling (quote the exact field names from gap-report.md)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.