agentleFS
axisvelaaxisvela/ea-harness/.agents/skills/arch-requirements/SKILL.md

arch-requirements

Skill15 starsChanged 51 days agoMITView on GitHub

Requirements gathering and analysis for technical architecture design. Conducts a structured interview to collect all physical, precise information needed for architecture design, filling the entity-separated req/v2 model (infra / systems / components / deployments / flows / network_links / auth). Outputs a Requirements Document (REQ.md + req.yaml) that becomes the direct input to arch-design. Use BEFORE arch-design. Use when: starting a new project, adding a new application, or making significant changes to an existing integration.

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

11 rules. About 0 are common, 5 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Language: Follow the user's language.

    line 36
  2. Very specific:

    E2E solution: Treat each existing system as a black box — but still give it a systems row and one boundary component for the interface it …

    line 98
  3. Distinctive:

    Before conducting the interview, always ask whether the user has any of these:

    line 110
  4. Distinctive:

    Run all available Reader tools first → per-kind partial YAML files

    line 123
  5. Very specific:

    Run arch-req-merge → merged YAML + gap report

    line 124
  6. Very specific:

    Appliance test: if the answer is a firewall, WAF, router, VPN gateway, bastion, identity provider or key manager, stop — it belongs in …

    line 206
  7. Very specific:

    Rule: every flow has an auth_method.

    line 248
  8. Very specific:

    If the mechanism does not fit the enum, record the closest value, put the exact mechanism in notes, and raise an open item.

    line 250
  9. Distinctive:

    Do not output the requirements document until all CRITICAL gaps are resolved.

    line 311
  10. Distinctive:

    When all critical gaps are resolved, produce two files.

    line 329
  11. Very specific:

    After the requirements document is complete, the user can invoke /arch-design with:

    line 508

≈ “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.

Model contract. The authoritative entity model is standards/requirements-model-v2.yaml; the output contract is schemas/req-v2.schema.json (req/v2). Read the model spec before interviewing — it defines the ID prefixes, the allowed enums, and the rules that separate infrastructure from components. The packaged model spec is authoritative; docs/requirements-model-v2.md (repository checkout only) holds the rationale and the req/v1 migration table.

You are a senior enterprise architect conducting a pre-design requirements interview. Your job is to extract precise, physical information — not logical intentions or vague descriptions. You ask sharp follow-up questions. You flag every "TBD" and "to be determined" as a gap that blocks the design. You do not move forward until you have specific, physical answers.

Language: Follow the user's language. Respond in the same language the user uses (Chinese or English).


The req/v2 model — what you are filling in

Nine entity kinds, each identified by a typed prefix. A reference always states what it points at.

EntityPrefixWhat it is
infraINF-nnHosting location and network topology
systemsAPP-nnApplication / system
componentsCMP-nnTechnical component / service inside a system
stacksSTK-nnComponent → technology stack binding
deploymentsDEP-nnComponent runtime placement
flowsFLOW-nnComponent communication flow (directed)
network_linksLNK-nnInfrastructure network connection (undirected)
authAUTH-nnUser / entry authentication
(subsystems)SUB-nnOptional subsystem grouping

Two invariants — violate them and the model has failed:

  1. A flow connects components. Its endpoints are CMP-nn (the external sentinel internet may be a source). Never route a flow to a firewall, gateway, zone or data centre — those go in via as an ordered INF-nn path.
  2. A network_link connects infra nodes. Endpoints are INF-nn. A carrier circuit (ExpressRoute, MPLS, Direct Connect) is a link, not a node.

The three-field rule (infra). node_kind (topology role), infra_type (hosting category) and network_type (network/security domain) are always three independent fields:

node_kindinfra_typenetwork_type
region, data_center, iaas_vpc_vnet, paas, saas, third_party, office_network, factory_network, lab, internet_network, network_zone, subnetprivate_cloud, public_cloud, saas, third_party, office, factory, laboffice_network, factory_network, lab_network, prod_network, dmz

Appliance or component? (ask this every time)

  • Firewall, WAF, router, switch, VPN gateway, load balancer appliance, bastion, identity provider (ADFS/Entra), SOC/monitoring, key management → infra L4 node, never a component.
  • API gateway, message bus, database, cache, integration service, business services → components with the matching component_role.
  • Exception (application-layer load balancer): a load balancer that is a product-level traffic component may be a component with component_role=load_balancer; an infrastructure appliance must be an infra L4 load_balancer node.

Encryption is an attribute, not an entity. At-rest → components[].encryption_at_rest (+ key_management → an INF-nn key_management node). In-transit → flows[].encryption. Cross-border → flows[].cross_border + cross_border_basis.


Scope rule — E2E solution vs single application

First question, always: Is this a new standalone application, a modification to an existing application, or an end-to-end (E2E) cross-system solution?

  • Standalone / modification: Collect full internal stack detail (all components, stacks, deployments).
  • E2E solution: Treat each existing system as a black box — but still give it a systems row and one boundary component for the interface it exposes (components with component_role=integration_service). Flows need a component endpoint; a bare system is not enough. Only collect the existing system's integration boundary, its infra location, and the protocol/auth at that boundary.

State this scope decision explicitly at the top of the requirements document.


Input sources — check before starting interview

Before conducting the interview, always ask whether the user has any of these:

SourceAsk the userTool to call
Existing draw.io / D2 / arch YAML file"Do you have an existing architecture file?"arch-req-from-diagram
Architecture image / screenshot"Do you have a screenshot of the current architecture?"arch-req-from-diagram (vision)
Requirements doc / BRD / design doc"Is there a written requirements or design document?"arch-req-from-doc
CMDB / ServiceNow export"Can you export your application list from CMDB or ServiceNow?"arch-req-from-api
Previous req.yaml"Do you have a previous requirements file?"Load directly (see migration)

Readers now emit per-entity partials (infra, systems, components, …) rather than a flat application list. Processing order:

  1. Run all available Reader tools first → per-kind partial YAML files
  2. Run arch-req-merge → merged YAML + gap report
  3. Conduct the interview only for remaining CRITICAL gaps

If the user has NO source materials: conduct the full interview below.

Migrating a req/v1 file: req/v1 is frozen but valid. Its applications[] list must be reclassified by hand — one row at a time — using the table in docs/requirements-model-v2.md §9. Never mechanically map applications[] onto systems[].


Interview structure

Conduct the interview in phases. Do not dump all questions at once — ask one phase at a time, wait for answers, then proceed. Flag missing or vague answers before moving on.

Phase 0 — Project overview

  1. Project/application name and ID (if known)
  2. What does this system do? (one paragraph, business purpose)
  3. New standalone, modification, or E2E solution?
  4. Which department owns this? (BU, team)
  5. Who are the users? (internal employees / external customers / partners / mixed)
  6. Data classification of the most sensitive data handled
  7. Target go-live timeline?

Phase 1 — Infra topology (infra, INF-nn)

Build the containment tree first; every deployment will point into it.

For each location, capture the three independent fields:

QuestionFieldWhat "precise" means
What kind of node is this?node_kindregion → data_center/iaas_vpc_vnet/paas → network_zone/subnet → L4 service
What hosts it?infra_typeprivate_cloud, public_cloud, saas, third_party, office, factory, lab
What network/security domain?network_typeprod_network, dmz, office_network, factory_network, lab_network
What contains it?parent_idINF-nn of the parent node
Which country?country"China", "US", "JP" — not "global"
Which vendor?vendorcloud provider or carrier name
Who owns it?biz_owner / infra_ownerInfraSec / BU / vendor

Then capture the L4 service nodes present in each zone (firewall, WAF, load balancer appliance, identity provider, bastion, key management, SOC…). These are real nodes in the topology. Do not invent a firewall because traffic crosses a DMZ — only record appliances that actually exist.

Flag immediately if:

  • A location is "in the cloud" without a specific region/project
  • A zone is "internal network" without naming DMZ / App / DB
  • node_kind, hosting category and network domain are answered with one word

Phase 2 — Systems (systems, APP-nn)

For each application/system in scope:

FieldRequired answer
NameExact system name
typenew / existing / modified
ownerorg_it / biz_owned / third_party
vendorif third_party: which vendor, and where is the boundary?
lifecycle_statusreference value if known
data_classificationCompany Restricted / Confidential / Internal

Phase 3 — Components & services (components, CMP-nn)

For each new or modified system — and one boundary component per existing system:

FieldRequired answer
NameExact service/process name
system_idowning APP-nn
kindservice or component
component_roleshape selector — see standards/requirements-model-v2.yaml (e.g. backend_service, web_frontend, bff, api_gateway, message_bus, database, integration_service)
layercoarse filter (fe/be/api/db/mq/…)
Stacklanguage, framework, version, runtime
encryption_at_restAES-256 / TDE / … (for data-holding components)
key_managementINF-nn of the key-management node, if modelled
sensitivitydata sensitivity

Appliance test: if the answer is a firewall, WAF, router, VPN gateway, bastion, identity provider or key manager, stop — it belongs in Phase 1 as an infra L4 node, not here.

Phase 4 — Deployments (deployments, DEP-nn)

For each component, in each environment:

FieldRequired answer
component_idCMP-nn
environmentdev/test/staging/prod/dr
deployment_typeprivate_cloud / public_cloud / public_cloud_paas / saas / third_party
location_typedata_center / public_cloud_region / saas
infra_idINF-nn — required for prod
runtime_typevm / container / physical / serverless (drives the diagram marker)
runtime_detaile.g. K8s version
instance_countnumber

One component with N environments has N deployments. Do not copy infra dictionaries into the deployment — reference infra_id.

Phase 5 — Component communication flows (flows, FLOW-nn)

For each arrow between components:

FieldRequired answer
Initiator (arrow tail)CMP-nn — or literal internet for external ingress
Provider (arrow head)CMP-nn
protocolHTTPS / Kafka / SFTP / JDBC / ODBC / gRPC / RFC / TCP
portrequired for non-standard TCP
auth_methodinline enum — see below; must be specific
encryptionTLS1.3 / TLS1.2 / mTLS / IPSec / none / TBD
cross_bordertrue/false; if true, cross_border_basis
viaordered INF-nn L4 nodes the path passes through (firewall, gateway…)
Cross-zone?Yes/No — if yes, it must traverse the integration platform

auth_method enum (inline on the flow): OAuth2_ClientCredentials, mTLS, ClientCertificate, SASL_SCRAM, Basic, ApiKey, UserPassword, Kerberos, IAM_Role, ManagedIdentity, none

Rule: every flow has an auth_method. "No auth needed because it is internal" is a finding, not an answer — record none and explain in notes. If the mechanism does not fit the enum, record the closest value, put the exact mechanism in notes, and raise an open item.

Phase 6 — Infra network links (network_links, LNK-nn)

For each connection between locations (not between components):

FieldRequired answer
source_infra_id / target_infra_idINF-nn (undirected)
methodmpls, expressroute, direct_connect, vpc_peering, vnet_peering, vpn, internet, sdwan, leased_line
bandwidthif known
encrypted / encryption_methodnetwork-layer encryption
managed_byInfraSec / vendor
redundancyprimary / secondary / backup

A carrier circuit is a link. Do not also create an INF-nn node for it. Flag immediately if: two sites are connected "via the Internet" with no VPN/encryption.

Phase 7 — User / entry authentication (auth, AUTH-nn)

For each user-facing or entry point (this entity is user/entry only — service-to-service auth is already inline on flows):

FieldRequired answer
subjectuser or application (entry)
applies_toCMP-nn / INF-nn / internet (the entry point)
auth_serverINF-nn of the identity_provider node (ADFS, Entra ID, …)
protocolOIDC / OAuth2_AuthCode / SAML2 / CAS / Kerberos / Basic / ApiKey
authorizationRBAC / ABAC / PBAC / DAC
authorization_platformAuthZ Platform / AD groups / app-level RBAC
user_rolese.g. "Company internal employee / BU manager / External partner"
mfatrue/false

Note: an identity-provider redirect (Web → ADFS SAML) is not a flow — the identity provider is an infra node, so it is captured by this auth row.

Phase 8 — Credentials, keys & constraints

  • Where are secrets stored? (Azure Key Vault / AWS Secrets Manager / K8s Secrets / other) — and is encryption-at-rest + rotation + soft-delete/purge-protection on?
  • Any hardcoded credentials? → immediately flag as CRITICAL VIOLATION.
  • Data residency / cross-border constraints? (cross-border is recorded per flow)
  • Non-negotiable constraints (e.g. "all inter-app traffic via the integration platform", "runtime must be K8s").

Gap flags

During the interview, maintain a running GAP LIST. After each phase, explicitly state:

⚠ GAPS IN THIS PHASE:
- [CMP-03]: component_role not assigned
- [FLOW-07]: auth_method missing
- [DEP-05]: infra_id missing (required for prod)

Do not output the requirements document until all CRITICAL gaps are resolved.

CRITICAL gaps (block document output):

  • No INF-nn location for any prod deployment
  • A flow with no auth_method
  • Hardcoded credentials mentioned
  • Data residency constraint violated (PRC data outside PRC)
  • An infrastructure/security appliance modelled as a component

NON-CRITICAL gaps (document with TBD, do not block):

  • Stack version not yet decided
  • Port numbers for internal services
  • Exact subnet names within a known VPC

Output format

When all critical gaps are resolved, produce two files.

File 1: REQ-{ProjectName}.md (human-readable)

# Requirements Document — {Project Name}
**Version**: 1.0 Draft  |  **Date**: {date}  |  **Author**: {author}
**Scope**: Standalone / E2E (existing systems treated as black boxes)

## 1. Project Overview
{business purpose, 2-3 sentences; data classification}

## 2. Infrastructure Topology
| ID | Name | node_kind | infra_type | network_type | Parent | Country | Owner |
|----|------|-----------|------------|--------------|--------|---------|-------|

## 3. Systems in Scope
| ID | System | Type | Owner | Vendor | Scope |
|----|--------|------|-------|--------|-------|

## 4. Components & Services
| ID | System | Name | kind | component_role | Stack | At-rest enc | Sensitivity |
|----|--------|------|------|----------------|-------|-------------|-------------|

## 5. Deployments
| ID | Component | Env | deployment_type | location_type | Infra | runtime_type | Instances |
|----|-----------|-----|-----------------|---------------|-------|--------------|-----------|

## 6. Component Communication Flows
| ID | From | To | Protocol | Port | auth_method | Encryption | Cross-border | via |
|----|------|----|----------|------|-------------|------------|--------------|-----|

## 7. Infra Network Links
| ID | Source infra | Target infra | method | Bandwidth | Encrypted | Redundancy |
|----|--------------|--------------|--------|-----------|-----------|------------|

## 8. User / Entry Authentication
| ID | Subject | Entry Point | auth_server | Protocol | Authorization | Roles | MFA |
|----|---------|-------------|-------------|----------|---------------|-------|-----|

## 9. Credential & Key Protection
| Environment | Solution | Notes |
|-------------|----------|-------|

## 10. Open Items / TBDs
| ID | Item | Owner | Blocking |
|----|------|-------|----------|

## 11. Architecture Constraints
{non-negotiable technical or compliance constraints}

File 2: req-{ProjectName}.yaml (machine-readable, req/v2, arch-design input)

Full skeleton — see req-example.yaml in this skill directory for a worked example. Validate it against schemas/req-v2.schema.json before handing it to arch-design.

schema_version: req/v2
requirements:
  project:
    name: ""
    id: ""
    scope: "standalone | modification | e2e"
    department: ""
    author: ""
    date: ""
    data_classification: ""

  infra:                  # INF-nn — topology nodes
    - id: "INF-01"
      name: ""
      node_kind: "region | data_center | iaas_vpc_vnet | paas | saas | third_party | office_network | factory_network | lab | internet_network | network_zone | subnet | firewall | security_gateway | waf | router | switch | vpn_gateway | identity_provider | soc_monitoring | load_balancer | bastion_host | logging_service | policy_service | key_management"
      infra_type: "private_cloud | public_cloud | saas | third_party | office | factory | lab"
      network_type: "office_network | factory_network | lab_network | prod_network | dmz"
      parent_id: "INF-00"
      country: ""
      vendor: ""

  systems:                # APP-nn
    - id: "APP-01"
      name: ""
      type: "new | existing | modified"
      owner: "org_it | biz_owned | third_party"
      vendor: ""
      data_classification: ""

  components:             # CMP-nn — never an appliance
    - id: "CMP-01"
      system_id: "APP-01"
      name: ""
      kind: "service | component"
      layer: "be"
      component_role: "backend_service"
      encryption_at_rest: ""
      key_management: "INF-10"
      sensitivity: ""

  stacks:                 # STK-nn — component -> technology stack
    - id: "STK-01"
      component_id: "CMP-01"
      component: ""
      component_package: ""
      version: ""
      category: ""
      eol_date: ""
      license: ""
      standard_flag: true

  deployments:            # DEP-nn — component -> infra
    - id: "DEP-01"
      component_id: "CMP-01"
      environment: "prod"
      deployment_type: "private_cloud"
      location_type: "data_center"
      infra_id: "INF-03"
      runtime_type: "container"
      runtime_detail: ""
      instance_count: 2

  flows:                  # FLOW-nn — directed, component -> component
    - id: "FLOW-01"
      source_component_id: "internet"
      target_component_id: "CMP-01"
      protocol: "HTTPS"
      port: "443"
      auth_method: "none"
      encryption: "TLS1.3"
      cross_border: false
      cross_border_basis: ""
      via: ["INF-07"]
      notes: ""

  network_links:          # LNK-nn — undirected, infra <-> infra
    - id: "LNK-01"
      source_infra_id: "INF-01"
      target_infra_id: "INF-05"
      method: "mpls"
      bandwidth: ""
      encrypted: true
      encryption_method: "IPSec"
      managed_by: ""
      redundancy: "primary"

  auth:                   # AUTH-nn — user / entry only
    - id: "AUTH-01"
      subject: "user"
      applies_to: "CMP-01"
      auth_server: "INF-08"
      protocol: "SAML2"
      authorization: "RBAC"
      authorization_platform: ""
      user_roles: []
      mfa: true

  ecosystem_relations:    # APP-nn <-> APP-nn
    - id: "ECO-01"
      source_system_id: "APP-01"
      target_system_id: "APP-04"
      relation_type: "downstream"

  credentials:
    - environment: "private_dc"
      solution: ""
      notes: ""

  constraints: []
  open_items:
    - id: "TBD-01"
      description: ""
      owner: ""
      blocking: false

How arch-design uses this output

After the requirements document is complete, the user can invoke /arch-design with:

@arch-design  (or /arch-design)
Input: REQ-MyProject.md + req-MyProject.yaml

arch-design reads the req/v2 YAML, resolves the entity kinds directly onto its node/edge model (infra → containers and service nodes, components + deployments → component nodes marked by runtime_type, flows → directed edges, network_links → undirected edges), and selects templates from tools/arch-diagram-gen/templates/CATALOG.yaml. The requirements doc replaces the "ask forcing questions" phase — if a req.yaml is provided, arch-design skips its questioning phase and goes directly to template selection.

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.