Human and AI collaboration
StructOp provides a common representation of software that developers, automated tools and AI development systems can all read. The objective is not merely to generate software faster. It is to improve the ability of humans and AI to understand, review, verify and maintain software together.
On this page
Who does what#
StructOp contains no AI model and does not write declarations. An AI development agent is a separate program, chosen and supervised by the people who use it. StructOp gives both the agent and the people the same declarations to read, the same checks and the same plan to review.
What StructOp provides#
| Capability | For a person | For a tool or agent |
|---|---|---|
| Human-readable declarations | .st files in a small, regular syntax | The same files; structop fmt keeps their layout standard |
| Named application components | Addresses such as ability.print.Greet | The same addresses in every JSON document |
| Explicit dependencies | depends_on, data blocks and module outputs | Edges in graph -json |
| Execution relationships | structop graph, drawn in the terminal | graph -json, -format=mermaid and -format=archify |
| Provider schemas | structop schema | schema -json |
| Structured diagnostics | File, line, column and a suggestion | validate -json with a range and a hint |
| Machine-readable output | Text by default | -json on init, validate, plan, show, state, graph, test, schema and version |
| Application change plans | structop plan | plan -json; plan -out=FILE and apply FILE |
| Graph generation | graph -changed and -impact | The same views as JSON |
| Validation before compilation | structop validate | Its exit code and JSON document |
| Build state tracking | structop state list, state show | state -json, show -json |
The JSON formats are described in Machine-readable output.
One diagnostic, two readers#
The same mistake, a misspelt reference, as a person and as a tool see it:
$ structop validate Error: unknown ability "ability.call.Greeet" on main.st line 11, column 19 Did you mean "ability.call.Greet"?
$ structop validate -json
{"format_version":"1.0","command":"validate","valid":false,"diagnostics":[{"severity":"error","message":"unknown ability \"ability.call.Greeet\"","hint":"ability.call.Greet","range":{"file":"main.st","line":11,"column":19}}]}A collaboration workflow#
The steps below show one way a team can work with an AI development agent. StructOp performs the steps marked StructOp; people and the agent perform the others.
| Step | Who acts | How |
|---|---|---|
| 1. Define a requirement | Developer | In the team’s usual way |
| 2. Inspect the existing application definitions | AI agent | Reads the .st files, graph -json and schema -json |
| 3. Modify the relevant declarations | AI agent | Edits .st files |
| 4. Validate the modifications | StructOp | structop validate |
| 5. Generate a change plan | StructOp | structop plan -out=FILE |
| 6. Review the proposed changes | Developer | Reads the plan and the edited declarations |
| 7. Inspect execution relationships where relevant | Developer, with StructOp | structop graph -changed or -impact |
| 8. Apply the approved changes | StructOp, started by the developer | structop apply FILE, which refuses a plan that no longer matches |
| 9. Test application behaviour | StructOp, with tests the team wrote | structop test |
What StructOp does not guarantee#
- Validation finds errors in declarations: unknown names, wrong types, missing attributes, dependency cycles. It does not detect security vulnerabilities.
- A plan shows what will change. It does not show that the change is what the requirement meant.
- A graph shows declared order and dependencies, not every behaviour of the running program.
- Tests check what they are written to check.
StructOp does not make AI-generated software secure, correct or of high quality. It gives the people responsible for it more to inspect before they accept a change.