Skip to main content

Developing

Work in progress

This page is a work in progress. Content may change or be incomplete.

The scenario

Context

A new e-commerce feature spec is approved (using OpenSpec, BMAD or similar).

What happens

To cancel an order, the agent writes straight into orders-db, which belongs to another team.

How ASL helps?

With ASL written into the project, the agent uses it as an architecture harness while it codes and checks every change.

Today: Markdown as the harness
tasks.md — payments
Explorer
openspec
proposal.md
tasks.md
src
1# Tasks
2
3- [x] 1.1 Create cancellation-service
4- [x] 1.2 Write the cancellation to orders-db
5- [x] 1.3 Set owner: team-fulfillment
6<!-- orders-db belongs to orders-service: not in the spec -->
Problems0Terminal
No problems have been detected in the workspace.
Weeks later: orders-service changes its schema and cancellation-service breaks. Nobody knew they shared a database.
Architecture as Code with ASL
cancellation.asl.yaml — payments
Agent writes
…
6spec:
7 relations:
8 - from: {kind: Application, name: cancellation-service}
9 to: {kind: Database, name: orders-db}
10 type: writes
Application cannot write to a database owned by another application
architecture/cancellation.asl.yaml:1 · acme.write-only-own-database
Agent fixes
…
6spec:
7 relations:
8 - from: {kind: Application, name: cancellation-service}
9 to: {kind: Topic, name: cancellation-requests}
10 type: produces
11 - from: {kind: Application, name: orders-service}
12 to: {kind: Topic, name: cancellation-requests}
13 type: consumes
14 - from: {kind: Application, name: orders-service}
15 to: {kind: Database, name: orders-db}
16 type: readsAndWrites
$ asl ./architecture --policies-bundle-path ./policies
ok
ASL checks component relations based on your company policies.