Local module application setup

From IntentArchitect/Intent.Modules.NET · View interactive version

Local module application setup is an AI agent skill from the GitHub repository IntentArchitect/Intent.Modules.NET. Set up a brand-new Intent Architect module application in this repo's Modules folder so it generates into the right folder, is named the way every sibling is, and is ready to install modules and run the Software Factory. USE ONLY WHEN creating a new module application (a new module, or a new module

How to use this skill

Skill file

Skill: local-module-application-setup

A freshly created Module Builder application is not ready to use. Three things are wrong out of the box: the code goes to the wrong folder, the application carries the wrong name, and the package has the wrong module id. The agent creates the application, fixes the output location and verifies the result. Steps 3 and 4 (the application name and the package id) must be done by the user in the Intent Architect UI, because the agent tools do them destructively (see "Why Steps 3 And 4 Are UI-Only").

The Naming Convention

Four names exist for one module. Keep them distinct:

| What | Value for module Intent.Application.Mediator | Where it is set |

| ------------------------------------------------ | ---------------------------------------------- | ---------------------------------------------- |

| Module id (the package) | Intent.Application.Mediator | Module Builder designer, package name (step 4) |

| Application name (the label in the solution) | Application.Mediator | Application settings (step 3) |

| Application folder and files | Intent.Modules.Application.Mediator | Chosen at creation (steps 1-2); never renamed |

| Codebase output folder | Intent.Modules.Application.Mediator | Relative output location (step 5) |

The folder is always Intent.Modules. + the module id minus its leading Intent.. The application name is the module id minus its leading Intent..

What Creation Does On Its Own

create_application does not stop at scaffolding: it starts a Software Factory run immediately, before any of the steps below. Because the location is wrong at that point, that run writes to the repo root. It is reproducible: after step 1, expect all of these:

Treat these as the expected by-product of the wrong location, list them for the user, and do not delete them yourself (unless the user asks you to clean up; see "Cleaning Up An Attempt"). Do not run the Software Factory again until step 5 is done.

Steps

Confirm the module id and the target solution with the user first; never invent either.

1. Create the application under `Modules` (AGENT)

Use create_application (load creating-applications first) with:

2. Name it `Intent.Modules.<id without leading Intent.>` (AGENT)

For module id Intent.Application.Mediator that is Intent.Modules.Application.Mediator. This sets the folder and file names (Modules/Intent.Modules.Application.Mediator/...). Check git status against the by-product list above.

3. Rename the application name only (USER, in the UI)

Ask the user to rename the application to Application.Mediator in the Intent Architect UI, declining any offer to rename the underlying files.

4. Rename the package in the Module Builder designer (USER, in the UI)

Ask the user to rename the package to Intent.Application.Mediator in the Module Builder designer, accept the rename prompt, and save. The package name becomes the module's <id> in the .imodspec. Check the package's name before the user starts: renaming the application may already have renamed it.

5. Fix the output location, in two places (AGENT), stereotype first

Both must be set; either alone leaves the output in the wrong folder. Do them in this order.

  1. Codebase Structure designer: add Root Folder Options to the root folder first. The stereotype is not applied by default, so it has to be added before anything can be set on it. The root folder is a Root Folder element, reachable by id (not through getPackages(), whose package handle has no stereotype members). Using run_designer_script against the Codebase Structure designer:

```js

const rootId = findElements({})[0].getPath()[0].id; // path[0] is the Root Folder

const root = lookupById(rootId);

if (!root || root.getSpecialization() !== "Root Folder") throw new Error("root folder not found");

const st = root.ensureStereotype("Root Folder Options"); // only property: "Relative Location"

st.setProperty("Relative Location", "..");

return st.getProperty("Relative Location").getValue();

```

Use saveOnSuccess: true. It saves in place; confirm root.pkg.config under the application's own Intent.Metadata/Codebase Structure/root/ now contains Relative Location" value=".." and that no home/ folder appeared at the repo root.

  1. Application settings, relative output location = ..\Intent.Modules.Application.Mediator. Use update_application_settings with relativeLocation and nothing else. It changes the application's output location only (verified: ../../<folder> became ..\<folder>); metadataLocation and every file and folder name are untouched.

Why: left at the defaults, create_application produced location="../../<folder>", which resolves to the repo root instead of Modules/. Existing sibling modules use ..\<folder>.

6. Verify (AGENT), then it is ready

Verify by reading back, never by trusting the UI:

Only then install the other modules and run the Software Factory. After the first run confirm Modules/Intent.Modules.Application.Mediator holds the .csproj and .imodspec and that the .imodspec <id> is Intent.Application.Mediator.

Why Steps 3 And 4 Are UI-Only

Tested 2026-10-13 on Intent.Modules.Application.Mediator:

Neither is recoverable by the agent: the files live inside Intent.Metadata, which agents must not modify.

The two tools in step 5 do not have this problem: setting a stereotype property saves in place, and relativeLocation changes only the output location. Neither renames anything.

What Building A Whole Family Showed (2026-10-13)

Learned building the five Mediator module applications. None of it changes the steps above; it changes what to expect afterwards.

Cleaning Up An Attempt

When the user asks you to undo a failed or abandoned attempt and only then:

  1. git checkout -- <each tracked file the attempt modified>: .gitignore, the .isln, and anything else git status lists as modified that is the attempt's doing.
  2. git clean -fd -- <explicit paths> on the untracked paths git status listed (never git clean -x, never a bare git clean): -x also deletes gitignored files that existed before the attempt, such as the generated .opencode/skills/* copies.
  3. rmdir each empty folder left at the repo root.
  4. Remove opencode.json at the repo root; it is ignored while the attempt's .gitignore line is in place, so it only shows up after step 1. Check its timestamp is from the attempt first.
  5. Re-run git status; it must be clean.

Then tell the user Intent Architect may still hold the removed application in memory: after cleanup it recreated an empty Modules/<old app name>/.intent/ folder (lock and cache files only). That folder is Intent's own and off-limits; leave it and tell the user.

Then

Must

Must Not

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.