Version 0
Agentic Development
Use an AI coding agent to build MortelOS portals without skipping governance.
MortelOS is designed for human-directed, agent-assisted portal builds.
The user owns product judgment, scope and acceptance. The agent wires routes, actions, policies, projections, tests and package boundaries.
There are two AI modes:
| Mode | Purpose | Boundary |
|---|---|---|
| Build mode | A coding agent assembles the host app and packages. | Files, Artisan commands, Composer, tests and review. |
| Operate mode | A runtime agent operates a live workspace. | OAuth-scoped MCP tools from mortelos/framework. |
Use build mode while creating the portal. Use operate mode after the workspace is running and policy-governed.
Recommended prompt
If your agent supports local skills, choose the skill by setup state:
| Situation | Skill |
|---|---|
Clean machine, missing tooling, Herd, PHP, Composer, Node, GitHub access, MortelOS CLI, DBngin, TablePlus or mortelos new setup |
mortelos-tooling-setup |
| New portal kickoff after a host app can boot and verify | setup-portal |
Use mortelos-tooling-setup first when the developer machine cannot yet create, boot or verify a MortelOS host app. Move to setup-portal only after the host baseline is ready.
Use the setup-portal skill.
I want to build a customer portal for: [describe the customer, user group or process].
If your agent does not support local skills, start with a capability-first interview:
You are working in a MortelOS Starter host app.
Read AGENTS.md, README.md and docs/building-portals.md first.
If the setup-portal skill is available, use it now.
Use a capability-first interview before writing code.
I want to build a customer portal for: [describe the customer, user group or process].
Ask focused questions until the capability map is clear:
1. Which roles use the portal?
2. What can each role view, upload, approve or trigger?
3. Which data is shown or changed?
4. Which external systems are involved?
5. Which actions need human approval?
6. Which parts should become reusable MortelOS packages?
After the interview, write a build plan before implementation.
Use MortelOS primitives: entities, entity links, events, projections,
connectors, policies, workflows, inbox items and surfaces.
Record package decisions before adding new surfaces.
Use deny-by-default policies for mutating actions and sensitive data.
Stop for review before building the first vertical slice.
Operating rule
The agent can move quickly after the capability map is accepted. Before that point, speed creates rework.
Agent checklist
- Read
AGENTS.md. - Read
README.md. - Read
docs/building-portals.md. - Check existing portal docs under
docs/portals/. - Interview before planning.
- Write or update the capability map.
- Record package decisions.
- Write the build plan.
- Build one vertical slice.
- Verify with doctor, tests and manual smoke.
- Stop for user review.
Do not invent a tenant model, put domain rules in Blade or Livewire components, add a surface without a package decision, bypass policies with local UI checks, or claim success without verification.
Shared Agent Rules
Host apps install mortelos/agent-standards and mortelos/dev-tools so reusable AI rules are generated instead of copied by hand.
Keep local instructions above or below the generated block in AGENTS.md. The generated block is refreshed by:
php artisan mortelos:agent-rules:publish --target=AGENTS.md --no-interaction
Use mortelos/agent-standards for rules that should apply across every MortelOS OS app. Use the host AGENTS.md only for local app facts, customer-specific constraints and temporary instructions.