Architecture
Use when the Power Apps prototype has been approved and it is time for stage 6 of the pipeline: decide with the user the data track (Dataverse or SQL Server) and call the Architecture Agent, which writes the data model, permissions, integrations, the app↔flow contract, the data scripts and the GOAL.md build queue. Do not use before the prototype is approved, or for a single procedure or table (use `sql-procedures` or `dataverse`).
ByBrunoPower Platform developer- name:
- architecture
- description:
- Use when the Power Apps prototype has been approved and it is time for stage 6 of the pipeline: decide with the user the data track (Dataverse or SQL Server) and call the Architecture Agent, which writes the data model, permissions, integrations, the app↔flow contract, the data scripts and the GOAL.md build queue. Do not use before the prototype is approved, or for a single procedure or table (use `sql-procedures` or `dataverse`).
/pp-en:architecture — Architecture Agent
Stage 6 of the pipeline, block 3. Building on the Power Platform. You bring the user the one big
decision of the stage (where the data lives) and call the pp-en:architecture-agent agent, which turns
the PRD, inventory and prototype into a data model, permissions, integrations and the build queue.
KIT = ${CLAUDE_PLUGIN_ROOT}. Output format: KIT/skills/power-platform/references/output-format.md.
State script: python "${CLAUDE_PLUGIN_ROOT}/skills/power-platform/scripts/estado.py".
Models: python "${CLAUDE_PLUGIN_ROOT}/skills/power-platform/scripts/modelos.py".
Before you start
estado.py comecar architecture. Exit 1: show the output and stop.- Read
docs/planning/prd.md,screen-inventory.md, blocks 4, 7 and 8 ofbrainstorm.md, andKIT/skills/power-platform/references/technology-matrix.mdanddefault-decisions.md.
Steps
- Research, if a fact is missing for the track: the PRD mentions a source that already exists
(spreadsheet, database, system) with files in the project, or there is a doubt about licensing or
limits. Call
pp-en:research-agentwithONDE: both,PARA QUE: escolher a trilha de dados(model:modelos.py de research-agent). Judge it and use the sourced findings among the facts of step 1. - Data track (checkpoint
Decision). Apply the matrix to the brainstorm answers and recommend one track, with the 3 facts that weighed most (volume above 2,000, SQL database that already exists, compliance, DBA, transaction across several tables).AskUserQuestion, the recommended one first:- "SQL Server + procedures";
- "Dataverse";
- "I need to confirm with IT".
The third becomes a
D-xxwith owner and date inprd.md; the stage stays in progress. Say what to ask and whom, and stop: running/pp-en:architectureagain resumes from here.
- Environment facts the user already knows, in short questions with "I don't know": publisher prefix (Dataverse), server and database by role only ("DEV database"; never a real name in the file), who creates tables, whether there are DEV/HML/PRD environments.
- Agent. Show
◆ Calling the Architecture Agent...and callpp-en:architecture-agentwithRAIZ,KIT(the value of${CLAUDE_PLUGIN_ROOT}),TRILHAand the facts from step 2. Model:modelos.py de architecture-agent(empty line: do not passmodel). - Judge the deliverable (
KIT/skills/power-platform/references/subagents.md, "Judging the deliverable"):power-platform.config.jsonwithtrilha_dados(andprefixo_publisheron Dataverse);GOAL.mdwith wave 0 (environment, 🔴) and the build waves, each task with "done when";- SQL track: every write in the contract has a procedure specified in section 4.1, with a group;
- every P0
FR-xxappears in at least oneGOAL.mdtask (traceability); - mockup load written: run
python "${CLAUDE_PLUGIN_ROOT}/skills/power-platform/scripts/montar-carga-mockup.py" <spec>yourself (on Dataverse, with--flow) and check0 error(s), one sheet per model table, on SQL themockup-load.sqland on Dataverse thedataverse-plan.jsonand thedataverse-builder/folder. Missing or an error: revision. An open question only the user can answer: escalated. Record it withestado.py veredito architecture --agente architecture-agent --resultado <...> --motivo "...".
- Procedures in parallel (SQL track only). One
pp-en:sql-agentper group in section 4.1, all in the same message, each withRAIZ,KITandPROCEDURES(the group's names); model:modelos.py de sql-agent. Judge each deliverable:python "${CLAUDE_PLUGIN_ROOT}/skills/sql-procedures/scripts/lint-procedure.py"over the procedures folder at0 error(s), and each procedure with the parameters and codes from the spec. One verdict per agent (--agente sql-agent#<group>). - Prepare the environment (checkpoint
Action in the environment, 🔴). Show wave 0 ofGOAL.mdas a step by step:SQL: hand the package to the DBA or run the scripts in the DEV database, in the package's order;
Dataverse: ask with
AskUserQuestionhow the tables are created, the recommended one first:- "Dataverse builder (flow)": import
dataverse-builder/ConstrutorDataverse_1_0_0_0.zip, create the connection and run the flow with thedataverse-plan.jsonand the solution name (KIT/skills/power-platform/references/dataverse-builder.md). It creates tables, columns with the spec's type, Choices, relationships, mockup rows and keys. It requires the HTTP with Microsoft Entra ID connector to be allowed and a customization role (§2 of the reference). Say that running it in a real environment has not been confirmed in the kit yet and show §9; - "Spreadsheet only": import
mockup-load.xlsx, all sheets at once through Power Query (KIT/skills/power-platform/references/mockup-load.md§4), with the project publisher's preferred solution. Tell the user in so many words: Dataverse infers each column's type from the data and often gets it wrong. Choice and Lookup arrive as text. They check column by column (sheetType check).
On both paths,
montar-carga-mockup.py <spec> --conferir <export.json>must give0 error(s)before any real data;- "Dataverse builder (flow)": import
SQL: after the DDL, run
mockup-load.sqlonly in the DEV database;both: capture the real names in
AS-BUILT-ENVIRONMENT/AS-BUILT-NAMES.md. On Dataverse, theEntityDefinitionsexport +extrair-nomes-as-built.pyfrom thedataverseskill generates the file. Say this may take days (DBA, IT) and that the build only starts withAS-BUILT-NAMESfilled in:/pp-en:buildchecks it before writing any screen.
Exit gate
- Track ADR in
docs/decisions/ADR-001.md; config and00-READ-ME-FIRST.mdwith the same track. -
architecture.mdwith data model, permission matrix (flags), integrations and the contract of each flow (positional parameters and return{status, description, id, url}). - Data scripts ready (SQL with
lint-procedure.pyat0 error(s); Dataverse with the table model and security roles). - Mockup load for both tracks:
montar-carga-mockup.py <spec>at0 error(s),.xlsxwritten (and.sqlon SQL; on Dataverse, also the plan and the builder); on Dataverse, the user chose builder or spreadsheet and was warned that they must check the typing. -
GOAL.mdin waves, with traceability of every P0 FR.
Wrap up
estado.py concluir architecture --nota "<track> track; <N> waves in GOAL.md".- Commit if
git_commit_por_etapa:pp(architecture): model, contract and build queue. - Summary (track, waves, what the human needs to do in the environment and with whom) and the "Next step" block the script printed.
More in this playbook
Safe to turn on
Use this skill when an agent or person is about to create, change or enable an automation inside someone else's account or a shared environment: "create this workflow", "build it in the customer's account", "turn it on", "go live", "deploy this automation". Produces a proposal the human approves, an automation created in the off state, and a short list of what only the human can finish.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.

