modwright 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +35 -0
- package/README.md +212 -0
- package/assets/claude/agents/mw-explore.md +46 -0
- package/assets/claude/agents/mw-fixture.md +33 -0
- package/assets/claude/agents/mw-rule-author.md +51 -0
- package/assets/claude/agents/mw-scaffold-author.md +48 -0
- package/assets/claude/skills/mw-author.md +59 -0
- package/assets/claude/skills/mw-new-item.md +51 -0
- package/assets/claude/skills/mw-new-spell.md +50 -0
- package/assets/claude/skills/mw-scaffold.md +59 -0
- package/assets/claude/skills/mw-ship.md +57 -0
- package/assets/claude/skills/mw-validate.md +51 -0
- package/assets/claude/skills/mw-verify.md +59 -0
- package/assets/nivalisnights/extract_resources.py +177 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Config.json +5 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Lua/BootstrapClient.lua +55 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Lua/BootstrapServer.lua +81 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Lua/ModWrightBridge/Log.lua +96 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Lua/ModWrightBridge/Probes.lua +1038 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Lua/ModWrightBridge/ProbesClient.lua +74 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Lua/ModWrightBridge/Protocol.lua +985 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/ScriptExtender/Lua/ModWrightBridge/Watch.lua +175 -0
- package/bridges/bg3-se/Mods/ModWrightBridge/meta.lsx +45 -0
- package/bridges/bg3-se/README.md +99 -0
- package/bridges/bg3-se/bridge.json +68 -0
- package/bridges/cp2077-cet/ModWrightBridge/init.lua +375 -0
- package/bridges/cp2077-cet/ModWrightBridge/probes.lua +1104 -0
- package/bridges/cp2077-cet/ModWrightBridge/protocol.lua +1306 -0
- package/bridges/cp2077-cet/README.md +165 -0
- package/bridges/cp2077-cet/bridge.json +53 -0
- package/dist/core/bridge/arm.js +175 -0
- package/dist/core/bridge/cet-console.js +26 -0
- package/dist/core/bridge/cet-log.js +362 -0
- package/dist/core/bridge/index.js +11 -0
- package/dist/core/bridge/locate.js +35 -0
- package/dist/core/bridge/paths.js +34 -0
- package/dist/core/bridge/pending.js +89 -0
- package/dist/core/bridge/poll.js +155 -0
- package/dist/core/bridge/stage.js +100 -0
- package/dist/core/bridge/status.js +97 -0
- package/dist/core/bridge/types.js +145 -0
- package/dist/core/bridge/validate.js +107 -0
- package/dist/core/build/index.js +6 -0
- package/dist/core/build/manifest.js +47 -0
- package/dist/core/build/paths.js +32 -0
- package/dist/core/build/run.js +342 -0
- package/dist/core/build/stage.js +265 -0
- package/dist/core/build/steps/bg3.js +129 -0
- package/dist/core/build/steps/core.js +195 -0
- package/dist/core/build/steps/cyberpunk.js +95 -0
- package/dist/core/build/steps/listing.js +35 -0
- package/dist/core/build/types.js +13 -0
- package/dist/core/build/zip.js +148 -0
- package/dist/core/compat/check.js +113 -0
- package/dist/core/compat/pe.js +220 -0
- package/dist/core/compat/types.js +1 -0
- package/dist/core/compat/version.js +70 -0
- package/dist/core/deploy/guards.js +292 -0
- package/dist/core/deploy/index.js +5 -0
- package/dist/core/deploy/plan.js +696 -0
- package/dist/core/deploy/reload-apply.js +361 -0
- package/dist/core/deploy/reload.js +358 -0
- package/dist/core/deploy/sources.js +169 -0
- package/dist/core/deploy/types.js +1 -0
- package/dist/core/epic.js +54 -0
- package/dist/core/fsutil.js +191 -0
- package/dist/core/home.js +70 -0
- package/dist/core/knowledge/facts.js +229 -0
- package/dist/core/knowledge/index.js +4 -0
- package/dist/core/knowledge/search.js +112 -0
- package/dist/core/knowledge/store.js +123 -0
- package/dist/core/knowledge/types.js +1 -0
- package/dist/core/ledger/check.js +42 -0
- package/dist/core/ledger/hooks.js +80 -0
- package/dist/core/ledger/index.js +7 -0
- package/dist/core/ledger/query.js +17 -0
- package/dist/core/ledger/record.js +84 -0
- package/dist/core/ledger/status.js +53 -0
- package/dist/core/ledger/store.js +98 -0
- package/dist/core/ledger/types.js +108 -0
- package/dist/core/logs/index.js +4 -0
- package/dist/core/logs/registry.js +50 -0
- package/dist/core/logs/scan.js +195 -0
- package/dist/core/logs/triage.js +160 -0
- package/dist/core/logs/types.js +1 -0
- package/dist/core/lsx.js +10 -0
- package/dist/core/lz4.js +66 -0
- package/dist/core/mods.js +229 -0
- package/dist/core/process.js +49 -0
- package/dist/core/project/build-steps.js +83 -0
- package/dist/core/project/describe.js +74 -0
- package/dist/core/project/index.js +5 -0
- package/dist/core/project/load.js +146 -0
- package/dist/core/project/schema.js +264 -0
- package/dist/core/project/types.js +3 -0
- package/dist/core/prompts.js +72 -0
- package/dist/core/registry.js +35 -0
- package/dist/core/safety/backup.js +206 -0
- package/dist/core/safety/execute.js +188 -0
- package/dist/core/safety/index.js +5 -0
- package/dist/core/safety/plan.js +122 -0
- package/dist/core/safety/restore.js +172 -0
- package/dist/core/safety/types.js +1 -0
- package/dist/core/scaffold/bootstrap.js +7 -0
- package/dist/core/scaffold/catalog.js +28 -0
- package/dist/core/scaffold/claude-assets.js +271 -0
- package/dist/core/scaffold/collisions.js +64 -0
- package/dist/core/scaffold/emit.js +356 -0
- package/dist/core/scaffold/engine.js +680 -0
- package/dist/core/scaffold/ids.js +78 -0
- package/dist/core/scaffold/index.js +10 -0
- package/dist/core/scaffold/jsonpath.js +121 -0
- package/dist/core/scaffold/load.js +81 -0
- package/dist/core/scaffold/render.js +85 -0
- package/dist/core/scaffold/sequence.js +396 -0
- package/dist/core/scaffold/types.js +309 -0
- package/dist/core/steam.js +63 -0
- package/dist/core/surfaceutil.js +36 -0
- package/dist/core/testplan/check.js +67 -0
- package/dist/core/testplan/index.js +5 -0
- package/dist/core/testplan/load.js +100 -0
- package/dist/core/testplan/registry.js +317 -0
- package/dist/core/testplan/run.js +389 -0
- package/dist/core/testplan/types.js +82 -0
- package/dist/core/text/converters/bg3.js +50 -0
- package/dist/core/text/converters/cyberpunk.js +36 -0
- package/dist/core/text/converters/index.js +261 -0
- package/dist/core/text/diff/cr2w.js +180 -0
- package/dist/core/text/diff/index.js +16 -0
- package/dist/core/text/diff/loca.js +43 -0
- package/dist/core/text/diff/lsx.js +126 -0
- package/dist/core/text/handles.js +86 -0
- package/dist/core/text/index.js +6 -0
- package/dist/core/text/json.js +46 -0
- package/dist/core/text/templates/cache.js +71 -0
- package/dist/core/text/templates/index.js +3 -0
- package/dist/core/text/templates/library.js +245 -0
- package/dist/core/text/templates/types.js +51 -0
- package/dist/core/text/toolchain.js +16 -0
- package/dist/core/text/types.js +1 -0
- package/dist/core/text/validate.js +149 -0
- package/dist/core/text/xml.js +58 -0
- package/dist/core/toolchain/datafetch.js +151 -0
- package/dist/core/toolchain/env.js +63 -0
- package/dist/core/toolchain/features.js +170 -0
- package/dist/core/toolchain/index.js +8 -0
- package/dist/core/toolchain/install.js +191 -0
- package/dist/core/toolchain/locate.js +275 -0
- package/dist/core/toolchain/remember.js +84 -0
- package/dist/core/toolchain/run.js +318 -0
- package/dist/core/toolchain/specs.js +351 -0
- package/dist/core/toolchain/types.js +1 -0
- package/dist/core/types.js +1 -0
- package/dist/core/userconfig.js +66 -0
- package/dist/core/validate/context.js +139 -0
- package/dist/core/validate/index.js +5 -0
- package/dist/core/validate/registry.js +58 -0
- package/dist/core/validate/run.js +131 -0
- package/dist/core/validate/suppressions.js +91 -0
- package/dist/core/validate/types.js +2 -0
- package/dist/core/yamledit.js +51 -0
- package/dist/index.js +389 -0
- package/dist/server.js +1914 -0
- package/dist/surfaces/baldursgate3/compat.js +164 -0
- package/dist/surfaces/baldursgate3/identity.js +110 -0
- package/dist/surfaces/baldursgate3/index/build.js +331 -0
- package/dist/surfaces/baldursgate3/index/index.js +17 -0
- package/dist/surfaces/baldursgate3/index/info.js +40 -0
- package/dist/surfaces/baldursgate3/index/parsers/loca.js +41 -0
- package/dist/surfaces/baldursgate3/index/parsers/lsx.js +137 -0
- package/dist/surfaces/baldursgate3/index/parsers/stats.js +45 -0
- package/dist/surfaces/baldursgate3/index/parsers/treasuretable.js +57 -0
- package/dist/surfaces/baldursgate3/index/parsers/xmlutil.js +142 -0
- package/dist/surfaces/baldursgate3/index/queries.js +327 -0
- package/dist/surfaces/baldursgate3/index/schema.js +62 -0
- package/dist/surfaces/baldursgate3/index.js +3 -0
- package/dist/surfaces/baldursgate3/logs.js +278 -0
- package/dist/surfaces/baldursgate3/modsettings.js +115 -0
- package/dist/surfaces/baldursgate3/pak.js +153 -0
- package/dist/surfaces/baldursgate3/settings.js +49 -0
- package/dist/surfaces/baldursgate3/surface.js +232 -0
- package/dist/surfaces/baldursgate3/validators/bridge.js +7 -0
- package/dist/surfaces/baldursgate3/validators/files.js +476 -0
- package/dist/surfaces/baldursgate3/validators/items.js +1001 -0
- package/dist/surfaces/baldursgate3/validators/progression.js +734 -0
- package/dist/surfaces/baldursgate3/validators/stats.js +1076 -0
- package/dist/surfaces/baldursgate3/validators/story.js +790 -0
- package/dist/surfaces/baldursgate3/validators/templates.js +7 -0
- package/dist/surfaces/cyberpunk2077/compat.js +223 -0
- package/dist/surfaces/cyberpunk2077/index/build.js +231 -0
- package/dist/surfaces/cyberpunk2077/index/index.js +17 -0
- package/dist/surfaces/cyberpunk2077/index/info.js +51 -0
- package/dist/surfaces/cyberpunk2077/index/model.js +52 -0
- package/dist/surfaces/cyberpunk2077/index/parsers/tweak.js +483 -0
- package/dist/surfaces/cyberpunk2077/index/parsers/tweakxl-yaml.js +183 -0
- package/dist/surfaces/cyberpunk2077/index/queries.js +504 -0
- package/dist/surfaces/cyberpunk2077/index/resource.js +135 -0
- package/dist/surfaces/cyberpunk2077/index/schema.js +90 -0
- package/dist/surfaces/cyberpunk2077/index.js +3 -0
- package/dist/surfaces/cyberpunk2077/logs.js +742 -0
- package/dist/surfaces/cyberpunk2077/paths.js +12 -0
- package/dist/surfaces/cyberpunk2077/surface.js +218 -0
- package/dist/surfaces/cyberpunk2077/validators/bridge.js +7 -0
- package/dist/surfaces/cyberpunk2077/validators/cr2w.js +349 -0
- package/dist/surfaces/cyberpunk2077/validators/garments.js +1181 -0
- package/dist/surfaces/cyberpunk2077/validators/mesh.js +338 -0
- package/dist/surfaces/cyberpunk2077/validators/modsettings.js +120 -0
- package/dist/surfaces/cyberpunk2077/validators/packaging.js +463 -0
- package/dist/surfaces/cyberpunk2077/validators/red4ext.js +318 -0
- package/dist/surfaces/cyberpunk2077/validators/redscript.js +193 -0
- package/dist/surfaces/cyberpunk2077/validators/templates.js +7 -0
- package/dist/surfaces/cyberpunk2077/validators/tweaks.js +768 -0
- package/dist/surfaces/cyberpunk2077/validators/vehicles.js +531 -0
- package/dist/surfaces/cyberpunk2077/validators/xl.js +308 -0
- package/dist/surfaces/eldenring/binders.js +111 -0
- package/dist/surfaces/eldenring/compat.js +166 -0
- package/dist/surfaces/eldenring/dcx.js +49 -0
- package/dist/surfaces/eldenring/index.js +13 -0
- package/dist/surfaces/eldenring/loaders.js +132 -0
- package/dist/surfaces/eldenring/logs.js +67 -0
- package/dist/surfaces/eldenring/paramdef.js +256 -0
- package/dist/surfaces/eldenring/params.js +129 -0
- package/dist/surfaces/eldenring/surface.js +121 -0
- package/dist/surfaces/eldenring/tools.js +52 -0
- package/dist/surfaces/eldenring/validators/binders.js +193 -0
- package/dist/surfaces/eldenring/validators/packages.js +159 -0
- package/dist/surfaces/eldenring/validators/params.js +334 -0
- package/dist/surfaces/eldenring/validators/profiles.js +287 -0
- package/dist/surfaces/index.js +34 -0
- package/dist/surfaces/nivalisnights/compat.js +229 -0
- package/dist/surfaces/nivalisnights/index/build.js +310 -0
- package/dist/surfaces/nivalisnights/index/index.js +5 -0
- package/dist/surfaces/nivalisnights/index/queries.js +231 -0
- package/dist/surfaces/nivalisnights/index.js +4 -0
- package/dist/surfaces/nivalisnights/logs.js +473 -0
- package/dist/surfaces/nivalisnights/surface.js +195 -0
- package/dist/surfaces/skyrimse/archives.js +229 -0
- package/dist/surfaces/skyrimse/compat.js +163 -0
- package/dist/surfaces/skyrimse/index.js +12 -0
- package/dist/surfaces/skyrimse/loadorder.js +174 -0
- package/dist/surfaces/skyrimse/logs.js +241 -0
- package/dist/surfaces/skyrimse/plugins.js +149 -0
- package/dist/surfaces/skyrimse/records.js +94 -0
- package/dist/surfaces/skyrimse/surface.js +240 -0
- package/dist/surfaces/skyrimse/validators/archive-records.js +165 -0
- package/dist/surfaces/skyrimse/validators/archives.js +110 -0
- package/dist/surfaces/skyrimse/validators/plugins.js +374 -0
- package/dist/surfaces/skyrimse/validators/records.js +117 -0
- package/dist/surfaces/stardewvalley/compat.js +190 -0
- package/dist/surfaces/stardewvalley/config.js +42 -0
- package/dist/surfaces/stardewvalley/contentpatcher.js +203 -0
- package/dist/surfaces/stardewvalley/index/index.js +229 -0
- package/dist/surfaces/stardewvalley/index/wiki.js +190 -0
- package/dist/surfaces/stardewvalley/index.js +12 -0
- package/dist/surfaces/stardewvalley/logs.js +307 -0
- package/dist/surfaces/stardewvalley/mods.js +182 -0
- package/dist/surfaces/stardewvalley/surface.js +244 -0
- package/dist/surfaces/stardewvalley/validators/content.js +321 -0
- package/dist/surfaces/stardewvalley/validators/fields.js +147 -0
- package/dist/surfaces/stardewvalley/validators/loadorder.js +69 -0
- package/dist/surfaces/stardewvalley/validators/manifest.js +221 -0
- package/dist/surfaces/subnautica2/compat.js +138 -0
- package/dist/surfaces/subnautica2/index.js +5 -0
- package/dist/surfaces/subnautica2/logs.js +129 -0
- package/dist/surfaces/subnautica2/paks.js +173 -0
- package/dist/surfaces/subnautica2/surface.js +151 -0
- package/dist/surfaces/subnautica2/validators/packaging.js +298 -0
- package/dist/surfaces/valheim/compat.js +171 -0
- package/dist/surfaces/valheim/index/index.js +301 -0
- package/dist/surfaces/valheim/index/tables.js +103 -0
- package/dist/surfaces/valheim/index.js +11 -0
- package/dist/surfaces/valheim/logs.js +197 -0
- package/dist/surfaces/valheim/packaging.js +131 -0
- package/dist/surfaces/valheim/plugins.js +270 -0
- package/dist/surfaces/valheim/references.js +121 -0
- package/dist/surfaces/valheim/surface.js +223 -0
- package/dist/surfaces/valheim/validators/packaging.js +218 -0
- package/dist/surfaces/valheim/validators/plugins.js +287 -0
- package/dist/surfaces/valheim/validators/references.js +169 -0
- package/knowledge/baldursgate3/animations.gr2.yaml +166 -0
- package/knowledge/baldursgate3/audio.voice.yaml +182 -0
- package/knowledge/baldursgate3/audio.wwise.yaml +104 -0
- package/knowledge/baldursgate3/charactercreation.heads-hair.yaml +193 -0
- package/knowledge/baldursgate3/communitylibrary.shared-content.yaml +129 -0
- package/knowledge/baldursgate3/compatibilityframework.api.yaml +176 -0
- package/knowledge/baldursgate3/crash.causes.yaml +90 -0
- package/knowledge/baldursgate3/dialogue.dialogbank.yaml +120 -0
- package/knowledge/baldursgate3/dialogue.files.yaml +236 -0
- package/knowledge/baldursgate3/dialogue.osiris-goals.yaml +386 -0
- package/knowledge/baldursgate3/dialogue.yaml +122 -0
- package/knowledge/baldursgate3/feats.classes.yaml +164 -0
- package/knowledge/baldursgate3/items.cloth-physics.yaml +167 -0
- package/knowledge/baldursgate3/items.roottemplates.yaml +320 -0
- package/knowledge/baldursgate3/items.visualbank.yaml +628 -0
- package/knowledge/baldursgate3/journal.quests.yaml +214 -0
- package/knowledge/baldursgate3/loadorder.modsettings.yaml +128 -0
- package/knowledge/baldursgate3/localization.handles.yaml +92 -0
- package/knowledge/baldursgate3/misc.encoding-and-practice.yaml +111 -0
- package/knowledge/baldursgate3/origins.companions.yaml +144 -0
- package/knowledge/baldursgate3/osiris.signatures.yaml +211 -0
- package/knowledge/baldursgate3/packaging.meta.yaml +155 -0
- package/knowledge/baldursgate3/packaging.paks.yaml +79 -0
- package/knowledge/baldursgate3/process.launch.yaml +34 -0
- package/knowledge/baldursgate3/progressions.yaml +92 -0
- package/knowledge/baldursgate3/publishing.modio-nexus.yaml +170 -0
- package/knowledge/baldursgate3/publishing.toolkit-modio.yaml +135 -0
- package/knowledge/baldursgate3/races.progression.yaml +228 -0
- package/knowledge/baldursgate3/scriptextender.console.yaml +257 -0
- package/knowledge/baldursgate3/scriptextender.yaml +252 -0
- package/knowledge/baldursgate3/stats.boosts.yaml +293 -0
- package/knowledge/baldursgate3/stats.equipment-kits.yaml +69 -0
- package/knowledge/baldursgate3/stats.interrupts.yaml +45 -0
- package/knowledge/baldursgate3/stats.itemcombos.yaml +65 -0
- package/knowledge/baldursgate3/stats.spells.yaml +293 -0
- package/knowledge/baldursgate3/stats.weapons.yaml +210 -0
- package/knowledge/baldursgate3/toolchain.divine.yaml +179 -0
- package/knowledge/baldursgate3/toolchain.lslib-formats.yaml +242 -0
- package/knowledge/baldursgate3/toolkit.levels.yaml +177 -0
- package/knowledge/baldursgate3/ui.icons-atlas.yaml +78 -0
- package/knowledge/baldursgate3/ui.icons.yaml +412 -0
- package/knowledge/baldursgate3/ui.mcm.yaml +161 -0
- package/knowledge/baldursgate3/vfx.materials.yaml +174 -0
- package/knowledge/baldursgate3/visuals.characterfix.yaml +73 -0
- package/knowledge/cyberpunk2077/animations.anims.yaml +118 -0
- package/knowledge/cyberpunk2077/anims.archivexl.yaml +163 -0
- package/knowledge/cyberpunk2077/anims.authoring.yaml +579 -0
- package/knowledge/cyberpunk2077/anims.encoder.yaml +156 -0
- package/knowledge/cyberpunk2077/anims.graph.yaml +629 -0
- package/knowledge/cyberpunk2077/anims.method.yaml +360 -0
- package/knowledge/cyberpunk2077/anims.pipeline.yaml +352 -0
- package/knowledge/cyberpunk2077/anims.roundtrip.yaml +222 -0
- package/knowledge/cyberpunk2077/anims.sets.yaml +176 -0
- package/knowledge/cyberpunk2077/archivexl.bodytypes.yaml +149 -0
- package/knowledge/cyberpunk2077/archivexl.dynamic-appearances.yaml +218 -0
- package/knowledge/cyberpunk2077/archivexl.manifest.yaml +214 -0
- package/knowledge/cyberpunk2077/audio.events.yaml +168 -0
- package/knowledge/cyberpunk2077/audio.sounds.yaml +164 -0
- package/knowledge/cyberpunk2077/audio.voicesets.yaml +146 -0
- package/knowledge/cyberpunk2077/cet.sandbox.yaml +219 -0
- package/knowledge/cyberpunk2077/clothing.garments.yaml +283 -0
- package/knowledge/cyberpunk2077/clothing.refits.yaml +215 -0
- package/knowledge/cyberpunk2077/codeware.overview.yaml +111 -0
- package/knowledge/cyberpunk2077/codeware.systems.yaml +192 -0
- package/knowledge/cyberpunk2077/drones.combat.yaml +416 -0
- package/knowledge/cyberpunk2077/drones.control.yaml +552 -0
- package/knowledge/cyberpunk2077/entities.appearance.yaml +166 -0
- package/knowledge/cyberpunk2077/equipmentex.slots.yaml +151 -0
- package/knowledge/cyberpunk2077/fx.effects.yaml +246 -0
- package/knowledge/cyberpunk2077/fx.lights.yaml +171 -0
- package/knowledge/cyberpunk2077/hair.modding.yaml +145 -0
- package/knowledge/cyberpunk2077/items.wiring.yaml +246 -0
- package/knowledge/cyberpunk2077/loadorder.archives.yaml +71 -0
- package/knowledge/cyberpunk2077/mesh.blender.yaml +209 -0
- package/knowledge/cyberpunk2077/nativedb.dump.yaml +98 -0
- package/knowledge/cyberpunk2077/npc.appearance.yaml +275 -0
- package/knowledge/cyberpunk2077/npc.behaviour.yaml +128 -0
- package/knowledge/cyberpunk2077/npc.locomotion.yaml +490 -0
- package/knowledge/cyberpunk2077/packaging.deploy.yaml +175 -0
- package/knowledge/cyberpunk2077/packaging.variants.yaml +176 -0
- package/knowledge/cyberpunk2077/player.control.yaml +918 -0
- package/knowledge/cyberpunk2077/process.assetbuild.yaml +154 -0
- package/knowledge/cyberpunk2077/process.lessons.yaml +276 -0
- package/knowledge/cyberpunk2077/quests.minor.yaml +46 -0
- package/knowledge/cyberpunk2077/quests.scenes.yaml +282 -0
- package/knowledge/cyberpunk2077/quickhacks.tiers.yaml +41 -0
- package/knowledge/cyberpunk2077/red4ext.api.yaml +645 -0
- package/knowledge/cyberpunk2077/red4ext.plugins.yaml +124 -0
- package/knowledge/cyberpunk2077/redhottools.hotreload.yaml +245 -0
- package/knowledge/cyberpunk2077/redscript.compile-log.yaml +76 -0
- package/knowledge/cyberpunk2077/redscript.modules.yaml +118 -0
- package/knowledge/cyberpunk2077/toolchain.wolvenkit.yaml +163 -0
- package/knowledge/cyberpunk2077/tweakdb.loot-recipes.yaml +184 -0
- package/knowledge/cyberpunk2077/tweakdb.melee.yaml +352 -0
- package/knowledge/cyberpunk2077/tweakdb.weapons.yaml +325 -0
- package/knowledge/cyberpunk2077/tweakxl.hotreload.yaml +151 -0
- package/knowledge/cyberpunk2077/tweakxl.yaml-syntax.yaml +208 -0
- package/knowledge/cyberpunk2077/ui.icons.yaml +259 -0
- package/knowledge/cyberpunk2077/ui.inkatlas.yaml +81 -0
- package/knowledge/cyberpunk2077/ui.modsettings.yaml +204 -0
- package/knowledge/cyberpunk2077/vehicles.control.yaml +475 -0
- package/knowledge/cyberpunk2077/vehicles.dashboard-ui.yaml +203 -0
- package/knowledge/cyberpunk2077/vehicles.entities.yaml +195 -0
- package/knowledge/cyberpunk2077/vehicles.wiring.yaml +137 -0
- package/knowledge/cyberpunk2077/wolvenkit.cli.yaml +167 -0
- package/knowledge/cyberpunk2077/workspot.system.yaml +55 -0
- package/knowledge/cyberpunk2077/world.interactions.yaml +41 -0
- package/knowledge/cyberpunk2077/world.loot-container.yaml +167 -0
- package/knowledge/cyberpunk2077/world.sectors.yaml +233 -0
- package/knowledge/eldenring/formats.binders.yaml +237 -0
- package/knowledge/eldenring/launcher.me3.yaml +230 -0
- package/knowledge/eldenring/launcher.modengine2.yaml +119 -0
- package/knowledge/eldenring/params.paramdef.yaml +149 -0
- package/knowledge/eldenring/params.regulation.yaml +142 -0
- package/knowledge/eldenring/saves.online.yaml +118 -0
- package/knowledge/eldenring/toolchain.cli.yaml +256 -0
- package/knowledge/nivalisnights/modding.runtime.yaml +157 -0
- package/knowledge/skyrimse/archives.bsa.yaml +212 -0
- package/knowledge/skyrimse/install.detection.yaml +41 -0
- package/knowledge/skyrimse/loadorder.files.yaml +242 -0
- package/knowledge/skyrimse/plugins.esl.yaml +189 -0
- package/knowledge/skyrimse/plugins.format.yaml +224 -0
- package/knowledge/skyrimse/skse.runtime.yaml +283 -0
- package/knowledge/skyrimse/toolchain.xedit-spriggit.yaml +336 -0
- package/knowledge/stardewvalley/contentpatcher.format.yaml +338 -0
- package/knowledge/stardewvalley/distribution.channels.yaml +236 -0
- package/knowledge/stardewvalley/game.versions.yaml +202 -0
- package/knowledge/stardewvalley/install.layout.yaml +277 -0
- package/knowledge/stardewvalley/smapi.loader.yaml +284 -0
- package/knowledge/stardewvalley/smapi.logs.yaml +329 -0
- package/knowledge/stardewvalley/smapi.manifest.yaml +293 -0
- package/knowledge/stardewvalley/toolchain.build.yaml +261 -0
- package/knowledge/stardewvalley/wiki.dataformat.yaml +130 -0
- package/knowledge/subnautica2/game.build.yaml +331 -0
- package/knowledge/subnautica2/modding.state.yaml +210 -0
- package/knowledge/subnautica2/ue5.containers.yaml +72 -0
- package/knowledge/subnautica2/ue5.paks.yaml +203 -0
- package/knowledge/subnautica2/ue5.tooling.yaml +175 -0
- package/knowledge/subnautica2/ue5.ue4ss.yaml +203 -0
- package/knowledge/valheim/bepinex.loader.yaml +247 -0
- package/knowledge/valheim/bepinex.plugins.yaml +251 -0
- package/knowledge/valheim/game.versions.yaml +321 -0
- package/knowledge/valheim/install.layout.yaml +216 -0
- package/knowledge/valheim/jotunn.library.yaml +334 -0
- package/knowledge/valheim/thunderstore.packaging.yaml +217 -0
- package/knowledge/valheim/toolchain.build.yaml +111 -0
- package/package.json +29 -0
- package/scaffolds/baldursgate3/new-class-injection.yaml +148 -0
- package/scaffolds/baldursgate3/new-item.yaml +264 -0
- package/scaffolds/baldursgate3/new-mod.yaml +174 -0
- package/scaffolds/baldursgate3/new-passive.yaml +100 -0
- package/scaffolds/baldursgate3/new-project.yaml +118 -0
- package/scaffolds/baldursgate3/new-quest-stub.yaml +159 -0
- package/scaffolds/baldursgate3/new-spell.yaml +102 -0
- package/scaffolds/baldursgate3/new-status.yaml +119 -0
- package/scaffolds/baldursgate3/sequences/subclass-kit.yaml +50 -0
- package/scaffolds/cyberpunk2077/edit-tweak.yaml +70 -0
- package/scaffolds/cyberpunk2077/mesh-export-preset.yaml +170 -0
- package/scaffolds/cyberpunk2077/new-entity-patch.yaml +255 -0
- package/scaffolds/cyberpunk2077/new-garment-refit.yaml +279 -0
- package/scaffolds/cyberpunk2077/new-item-chain.yaml +548 -0
- package/scaffolds/cyberpunk2077/new-localization.yaml +130 -0
- package/scaffolds/cyberpunk2077/new-mod-settings.yaml +133 -0
- package/scaffolds/cyberpunk2077/new-player-replacer.yaml +1003 -0
- package/scaffolds/cyberpunk2077/new-project.yaml +157 -0
- package/scaffolds/cyberpunk2077/new-sector-node.yaml +156 -0
- package/scaffolds/cyberpunk2077/new-tweak.yaml +121 -0
- package/scaffolds/cyberpunk2077/new-vehicle-livery.yaml +148 -0
- package/scaffolds/cyberpunk2077/new-workspot-entity.yaml +177 -0
- package/scaffolds/cyberpunk2077/sequences/iconic-weapon.yaml +72 -0
- package/scaffolds/cyberpunk2077/sequences/quickhack-takeover.yaml +213 -0
- package/scaffolds/stardewvalley/new-cp-patch.yaml +106 -0
- package/scaffolds/stardewvalley/new-csharp-mod.yaml +195 -0
- package/scaffolds/stardewvalley/new-project.yaml +184 -0
- package/scaffolds/stardewvalley/sequences/content-pack.yaml +31 -0
- package/scripts/mw-tool.mjs +184 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jonathan Trachtenberg
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Output you generate is yours.
|
|
26
|
+
|
|
27
|
+
Files that the Software writes into your own projects, such as scaffold output,
|
|
28
|
+
generated manifests and configuration, build artifacts and deploy plans,
|
|
29
|
+
belong to you. The license above does not apply to them, and no attribution to
|
|
30
|
+
ModWright is required, whether you publish, sell or relicense your mods. This
|
|
31
|
+
paragraph grants rights and adds no conditions to the license above.
|
|
32
|
+
|
|
33
|
+
Templates and other data the Software extracts from a game installed on your
|
|
34
|
+
machine are the game publisher's material, read from your own copy. ModWright
|
|
35
|
+
claims no rights in them, and they are not part of the Software.
|
package/README.md
ADDED
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# ModWright
|
|
2
|
+
|
|
3
|
+
A game-agnostic [MCP](https://modelcontextprotocol.io) server for game modding.
|
|
4
|
+
|
|
5
|
+
ModWright gives an AI assistant the tools a modder uses:
|
|
6
|
+
- finding game installs and mod folders, and reading load orders;
|
|
7
|
+
- triaging logs, and checking loader and framework versions against the game
|
|
8
|
+
build;
|
|
9
|
+
- looking up the game's own data and a knowledge base of sourced facts;
|
|
10
|
+
- scaffolding, validating, building and deploying your mod;
|
|
11
|
+
- talking to the running game through an in-game bridge, where the game
|
|
12
|
+
supports one.
|
|
13
|
+
|
|
14
|
+
The core is generic. Each game is a **surface**: one module that declares
|
|
15
|
+
where things live and what the rules are, so every tool works for every
|
|
16
|
+
supported game.
|
|
17
|
+
|
|
18
|
+
**Status:** 0.x. The tools are exercised against real installs and real mod
|
|
19
|
+
projects, but the API is not stable yet.
|
|
20
|
+
|
|
21
|
+
## Why
|
|
22
|
+
|
|
23
|
+
Every game's modding stack is idiosyncratic, and the idiosyncrasies are exactly
|
|
24
|
+
what an assistant needs to know:
|
|
25
|
+
|
|
26
|
+
- **Cyberpunk 2077** has *six* independent mod systems in one install
|
|
27
|
+
directory. A RED4ext version mismatch after a patch silently disables a
|
|
28
|
+
whole category of mods, and the evidence is in a log four folders deep.
|
|
29
|
+
- **Baldur's Gate 3** keeps mods in the user profile, not the install. A
|
|
30
|
+
`.pak` is inert until it appears in `modsettings.lsx`, which the game
|
|
31
|
+
rewrites on launch, dropping the entries it cannot resolve.
|
|
32
|
+
- **Skyrim**'s load order is a text file, and its real conflicts are
|
|
33
|
+
record-level inside plugins, not files on disk.
|
|
34
|
+
|
|
35
|
+
Without that context an assistant guesses. ModWright supplies it as structured
|
|
36
|
+
data, and returns the game's own caveats alongside every result.
|
|
37
|
+
|
|
38
|
+
## Install
|
|
39
|
+
|
|
40
|
+
Node.js 20 or newer is required. Register ModWright with your MCP client. For
|
|
41
|
+
Claude Code:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
claude mcp add modwright -- npx -y modwright
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Or add it to any MCP client's configuration:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"mcpServers": {
|
|
52
|
+
"modwright": { "command": "npx", "args": ["-y", "modwright"] }
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## First steps
|
|
58
|
+
|
|
59
|
+
Ask your assistant to run `list_games`, then `check_toolchain` for your game.
|
|
60
|
+
`check_toolchain` says what works now and what each feature still needs, for
|
|
61
|
+
example: "Ready now: logs, compat. index needs a Jotunn checkout; build works
|
|
62
|
+
without tcli." Most features need nothing. ModWright can install some
|
|
63
|
+
external tools itself, and any other tool or data folder only has to be
|
|
64
|
+
pointed at once.
|
|
65
|
+
|
|
66
|
+
## Supported games
|
|
67
|
+
|
|
68
|
+
| Surface | Game | Mod systems modeled |
|
|
69
|
+
|---|---|---|
|
|
70
|
+
| `cyberpunk2077` | Cyberpunk 2077 | legacy archives, REDmod, redscript, TweakXL, ArchiveXL, RED4ext, CET; the TweakDB vanilla index; garment, vehicle, tweak and packaging validators; the CET bridge |
|
|
71
|
+
| `baldursgate3` | Baldur's Gate 3 | `.pak` mods, loose overrides, Script Extender, the native mod loader; the stats, GUID and handle vanilla index; stats, story, progression and visual-bank validators; the Script Extender bridge |
|
|
72
|
+
| `skyrimse` | Skyrim Special Edition | plugins, BSA archives, SKSE plugins, loose files |
|
|
73
|
+
| `eldenring` | Elden Ring | me3 profiles, Mod Engine 2 overlay and DLLs, UXM loose files; paramdef-typed param exports, the `.me3` profile, package-layout and DCX rules |
|
|
74
|
+
| `valheim` | Valheim | BepInEx plugins, patchers, config, MonoMod, the Doorstop loader; Thunderstore packaging, plugin-source and config rules; the vanilla index from Jötunn's dumps |
|
|
75
|
+
| `stardewvalley` | Stardew Valley | SMAPI mods and Content Patcher packs, the load-order override lists, SMAPI's log; the manifest and `content.json` rules; the wiki schema index, built from the wiki's data pages, which `check_toolchain` fetches for you |
|
|
76
|
+
| `subnautica2` | Subnautica 2 | `~mods` paks, LogicMods, UE4SS mods, DLC-style plugins; triplet, mount-point, TOC and UE4SS-shape rules |
|
|
77
|
+
| `nivalisnights` | Nivalis Nights | BepInEx 6 IL2CPP plugins, patchers, config, generated interop, MelonLoader mods; the vanilla index (items, recipes, vendors, venues, NPCs, by GUID) built from your install with Cpp2IL and UnityPy |
|
|
78
|
+
|
|
79
|
+
Installs are auto-detected from Steam (every library folder), plus GOG and
|
|
80
|
+
Epic paths where they apply. Override with `installPath` on any tool, or set
|
|
81
|
+
`MODWRIGHT_<SURFACE_ID>_ROOT`.
|
|
82
|
+
|
|
83
|
+
## Tools
|
|
84
|
+
|
|
85
|
+
| Tool | What it does |
|
|
86
|
+
|---|---|
|
|
87
|
+
| `list_games` | Every supported game, its modding model, and whether an install was found. Start here. |
|
|
88
|
+
| `detect_install` | Locate one game, and report every mod root and log source, marking which exist. |
|
|
89
|
+
| `list_mods` | Enumerate installed mods across all roots, with sizes, timestamps and parsed manifests. |
|
|
90
|
+
| `inspect_mod` | Full detail on one mod: files owned, manifest, warnings. |
|
|
91
|
+
| `find_conflicts` | Paths claimed by more than one mod, restricted to roots where that is actually possible. |
|
|
92
|
+
| `load_order` | Read the game's explicit load order and cross-check it against what is installed. |
|
|
93
|
+
| `load_order_diff` | Snapshot the load order before a launch, then report what the game dropped, added or reordered (BG3 `modsettings.lsx`). |
|
|
94
|
+
| `read_log` | Tail a mod-related log (redscript, RED4ext, CET, SKSE, BG3SE, BepInEx, SMAPI and more). |
|
|
95
|
+
| `triage_logs` | Read every mod log for the current run and classify lines against known failure signatures. It returns one verdict: which systems loaded, what failed first, and the usual fix. |
|
|
96
|
+
| `check_compat` | Detect the game build, loaders, frameworks and tools, and check them against cited compatibility floors. |
|
|
97
|
+
| `check_toolchain` | Locate the external tools (LSLib divine, WolvenKit CLI, Blender, Cpp2IL and others), report each one's path and version (never guessed), and say what each feature needs. It also remembers a tool or data folder you point it at, and installs the tools ModWright can install. |
|
|
98
|
+
| `project_info` | Load a `modwright.json` mod project: sources, build, deploy targets, dependencies and publish targets, with paths resolved and structural warnings. |
|
|
99
|
+
| `lookup` | Search the knowledge base of game and toolchain facts (each with a status and a source), the validator catalogue, or the game's vanilla index you built locally. |
|
|
100
|
+
| `build_index` | Extract and index the game's own data into a local SQLite file in ModWright's cache. Never redistributed. |
|
|
101
|
+
| `validate` | Run the static validators over a mod project: syntax, reference integrity against the vanilla index, known crash causes and silent failures, packaging hygiene. Each finding names the file, the fix and the facts behind the rule. `rule` re-runs one rule by id; explained findings can be suppressed with a reason. |
|
|
102
|
+
| `build` | Run a project's build steps: stage sources into a clean tree, run the typed pack/convert/verify steps, and write a manifest of every input and output with content hashes. The cheap validators gate the build. |
|
|
103
|
+
| `deploy` | Copy a built mod into the game's mod roots as one write plan. It refuses an artifact the build did not produce or one older than its sources, prunes what a previous build left behind, and defers a file the running game holds locked. Every overwrite and delete is backed up first. |
|
|
104
|
+
| `rollback` | List the deploy backups under a project's `.modwright/backups/`, or restore one, re-checking every file's hash first. |
|
|
105
|
+
| `reload_plan` | Classify deployed changes into hot / hot-degraded / save-reload / restart / unknown, with the caveat for each and the single most conservative recommendation. |
|
|
106
|
+
| `bridge` | The in-game bridge (BG3 Script Extender, Cyberpunk 2077 CET): `stage` the bridge into a project, check its heartbeat with `status`, `arm` a probe request and `poll` for its result. |
|
|
107
|
+
| `run_tests` | Run a mod's in-game test plan (`<mod>/tests/*.yaml`) through the bridge. Probe rows are armed and polled; manual rows become a checklist. Results are written back into the plan. |
|
|
108
|
+
| `ledger` | Track claims and decisions across a fix (`<mod>/ledger/`). A claim moves `authored → checker-clean → built → verified \| contradicted`, and nothing is verified without evidence. |
|
|
109
|
+
| `convert` | Run one registered conversion: BG3 lsx↔lsf and xml↔loca through divine, Cyberpunk cr2w↔json through WolvenKit CLI. Each one checks its own round trip. |
|
|
110
|
+
| `diff` | Field-diff two parsed documents (cr2w-json, lsx, loca-xml) with type-aware equality, or diff a file against a cached template. |
|
|
111
|
+
| `template` | Extract one file from your own install into an untracked per-game-version cache, to start a mod file from the game's own. A template is never committed, and `validate` blocks a build that ships one verbatim. |
|
|
112
|
+
| `scaffold` | Declarative scaffolds (`new-project`, BG3 spells, passives, statuses, items, quests and class injections; Cyberpunk tweaks, item chains, sector nodes, garments, liveries, player replacers and more; Stardew Content Patcher and SMAPI C# projects), with ids allocated and collision-checked against your project, the vanilla index and the load order. `plan` walks an authoring sequence for a whole mod type and asks for each asset at the step that needs it. `claude-assets` writes optional Claude Code skills and agents into your mod repo. |
|
|
113
|
+
|
|
114
|
+
Every tool that writes is **dry-run by default**: it describes the plan and
|
|
115
|
+
writes nothing until you apply it.
|
|
116
|
+
|
|
117
|
+
## Workflow prompts
|
|
118
|
+
|
|
119
|
+
Seven workflow prompts walk the authoring loop in any MCP client
|
|
120
|
+
(`prompts/list`, `prompts/get`):
|
|
121
|
+
- `mw-validate`, `mw-scaffold`, `mw-verify` and `mw-ship`;
|
|
122
|
+
- `mw-author`, which walks a whole mod type's scaffold sequence;
|
|
123
|
+
- the per-game `mw-new-spell` (BG3) and `mw-new-item` (Cyberpunk).
|
|
124
|
+
|
|
125
|
+
Each takes an optional `path` to your mod project. Claude Code lists them as
|
|
126
|
+
`/modwright:mw-ship` and so on.
|
|
127
|
+
|
|
128
|
+
## From a shell
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npx modwright tool list # every tool and its parameters
|
|
132
|
+
npx modwright tool call list_games
|
|
133
|
+
npx modwright tool call check_toolchain game=valheim
|
|
134
|
+
npx modwright tool call scaffold --args-file args.json
|
|
135
|
+
npx modwright tool prompt mw-ship path=<your mod>
|
|
136
|
+
npx modwright --help
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
- **Arguments:** a `key=value` value is parsed as JSON when it parses, and
|
|
140
|
+
taken as a string otherwise. `--json '<object>'` and `--args-file <file>`
|
|
141
|
+
supply a whole argument object. Use the file form for nested inputs on
|
|
142
|
+
Windows, where shell quoting of JSON is unreliable.
|
|
143
|
+
- **Output:** `--out` writes the result to a file.
|
|
144
|
+
- **Exit code:** 1 when the tool reports an error.
|
|
145
|
+
|
|
146
|
+
## Where ModWright keeps its state
|
|
147
|
+
|
|
148
|
+
Vanilla indexes go in a per-user cache, the same for every session and every
|
|
149
|
+
project:
|
|
150
|
+
|
|
151
|
+
| | Indexes | Managed tools and snapshots |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| Windows | `%LOCALAPPDATA%\ModWright\cache` | `%LOCALAPPDATA%\ModWright` |
|
|
154
|
+
| macOS | `~/Library/Caches/ModWright` | `~/Library/Application Support/ModWright` |
|
|
155
|
+
| Linux | `$XDG_CACHE_HOME/modwright` (`~/.cache/modwright`) | `$XDG_DATA_HOME/modwright` |
|
|
156
|
+
|
|
157
|
+
- **Tools you point ModWright at** are remembered in a per-user
|
|
158
|
+
`config.json` (`%APPDATA%\ModWright`, `~/.config/modwright`, or
|
|
159
|
+
`~/Library/Application Support/ModWright`). Record one with
|
|
160
|
+
`check_toolchain action=remember tool=<id> toolPath=<path> mode=apply`.
|
|
161
|
+
Lookup order: a `MODWRIGHT_TOOL_*` variable, then a project's `toolchain`
|
|
162
|
+
override, then that config, then ModWright's managed tools folder, then
|
|
163
|
+
PATH, then common install locations.
|
|
164
|
+
- **Data folders** that a feature reads are remembered the same way
|
|
165
|
+
(`check_toolchain action=remember data=valheim.jotunn dataPath=<folder>
|
|
166
|
+
mode=apply`). Stardew Valley's wiki pages ModWright fetches itself:
|
|
167
|
+
`check_toolchain action=install data=stardewvalley.wiki` lists every page
|
|
168
|
+
first, and `mode=apply` fetches them (about a minute, one request a second,
|
|
169
|
+
honouring the wiki's robots.txt), saves them on your machine and remembers
|
|
170
|
+
the folder. The wiki's text is CC BY-NC-SA, and ModWright never
|
|
171
|
+
redistributes it.
|
|
172
|
+
- **Some tools ModWright can install for you.**
|
|
173
|
+
`check_toolchain action=install tool=cpp2il` shows exactly what it would
|
|
174
|
+
fetch (URL, size, sha256, destination); `mode=apply` installs it. Downloads
|
|
175
|
+
are pinned and checked before anything is written.
|
|
176
|
+
- **Overrides:** `MODWRIGHT_CACHE_DIR` moves the cache; `MODWRIGHT_HOME`
|
|
177
|
+
moves everything.
|
|
178
|
+
- **Project state** stays in the project's own `.modwright/`.
|
|
179
|
+
|
|
180
|
+
## What it deliberately does not do
|
|
181
|
+
|
|
182
|
+
These are honest limits, not bugs. Each one is a place where guessing would
|
|
183
|
+
produce confident nonsense:
|
|
184
|
+
|
|
185
|
+
- **Conflicts inside packed archives.** `.archive`, `.pak` and `.bsa` mods
|
|
186
|
+
conflict on resources *inside* them. ModWright marks those roots `opaque` and
|
|
187
|
+
reports them as skipped rather than comparing filenames.
|
|
188
|
+
- **Conflicts in isolated roots.** Where each mod owns its own subtree (CET,
|
|
189
|
+
redscript, REDmod), two mods both containing `init.lua` is not a conflict, and
|
|
190
|
+
ModWright will not report it as one.
|
|
191
|
+
- **BG3 load order to pak mapping.** A pak's filename is arbitrary and rarely
|
|
192
|
+
matches its module name; the only sound link is the UUID in `meta.lsx` inside
|
|
193
|
+
the pak. ModWright reports the order and says plainly that the cross-check is
|
|
194
|
+
unavailable rather than emitting false positives.
|
|
195
|
+
- **Skyrim record-level conflicts.** Those need xEdit. Directory comparison
|
|
196
|
+
under `Data/` is not a substitute.
|
|
197
|
+
- **Writing where you did not ask.** Writers are dry-run by default, write
|
|
198
|
+
only where the project file says, and back up whatever they replace.
|
|
199
|
+
`deploy` reports the `modsettings.lsx` entry a loose BG3 deploy needs, but
|
|
200
|
+
never edits that file, because a mod manager may own it.
|
|
201
|
+
- **Acting on a running game unasked.** `reload_plan` classifies what a
|
|
202
|
+
change needs. A hot reload (Cyberpunk, through Red Hot Tools) or an
|
|
203
|
+
in-game probe that changes state runs only when the caller grants it, and
|
|
204
|
+
what it did is confirmed by a read-back, not assumed.
|
|
205
|
+
- **Redistributing game data.** Indexes and templates are built from your
|
|
206
|
+
own install, on your machine, and never shipped.
|
|
207
|
+
|
|
208
|
+
## License
|
|
209
|
+
|
|
210
|
+
MIT; see LICENSE. Files ModWright generates into your own projects are
|
|
211
|
+
yours, with no attribution required. Data extracted from a game remains its
|
|
212
|
+
publisher's.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-explore
|
|
3
|
+
description: Read-only search across this repo and the reference mod repos; returns conclusions only.
|
|
4
|
+
model: haiku
|
|
5
|
+
effort: low
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- modwright:asset modwright-explore@${version} -->
|
|
9
|
+
|
|
10
|
+
You answer questions about `${project}` (game `${game}`) and any reference mod repo
|
|
11
|
+
checked out beside it. You read; you never change anything.
|
|
12
|
+
|
|
13
|
+
## Allowed
|
|
14
|
+
|
|
15
|
+
File reading and searching, plus ModWright's read-only tools:
|
|
16
|
+
|
|
17
|
+
- `project_info` — what this project declares, with paths resolved and checked.
|
|
18
|
+
- `lookup` — `kind: "kinds"` first to see what this game's index answers, then
|
|
19
|
+
`kind: "facts"` for ModWright's knowledge base or an index kind for vanilla data.
|
|
20
|
+
- `list_mods`, `inspect_mod`, `find_conflicts`, `load_order`, `load_order_diff` — what is
|
|
21
|
+
installed and in what order.
|
|
22
|
+
- `read_log`, `triage_logs`, `check_compat`, `check_toolchain`, `list_games`.
|
|
23
|
+
- `scaffold` with `action: "list"` or `"describe"`; `ledger` with `action: "list"` or
|
|
24
|
+
`"show"`; `template` with `list`/`get`; `diff`.
|
|
25
|
+
|
|
26
|
+
## Forbidden
|
|
27
|
+
|
|
28
|
+
`build`, `deploy`, `rollback`, `bridge`, `run_tests`, `build_index`, `convert`,
|
|
29
|
+
`template extract`/`invalidate`, `ledger record`, `scaffold run`, and any file write —
|
|
30
|
+
including in `mode: "dry-run"`. If the answer needs one of those, say which and stop.
|
|
31
|
+
|
|
32
|
+
## Return
|
|
33
|
+
|
|
34
|
+
Conclusions, not dumps. A few sentences, each carrying the file path, entry name or fact
|
|
35
|
+
id that supports it, so the caller can check you. Cap quotes at a few lines. When the
|
|
36
|
+
index is not built, or a fact you found is `unverified` or `contradicted`, say that
|
|
37
|
+
plainly instead of answering around it.
|
|
38
|
+
|
|
39
|
+
Never restate a game fact from memory: it comes back from `lookup`, with its id and
|
|
40
|
+
status, or it does not go in the answer.
|
|
41
|
+
|
|
42
|
+
## Stop and ask
|
|
43
|
+
|
|
44
|
+
Stop and report back rather than guessing when the question needs a forbidden tool, an
|
|
45
|
+
index that has not been built, a game install that is not detected, or a repo that is not
|
|
46
|
+
checked out here. Name what is missing — that answer is more useful than a guess.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-fixture
|
|
3
|
+
description: Bulk fixture and changelog work with an easy check; sample-reviewed by a stronger model.
|
|
4
|
+
model: haiku
|
|
5
|
+
effort: low
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- modwright:asset modwright-fixture@${version} -->
|
|
9
|
+
|
|
10
|
+
You do the mechanical, high-volume half of work in `${project}`: fixture files, path and
|
|
11
|
+
name migrations across many files, reformatting, and changelog entries. Everything you do
|
|
12
|
+
must have a check the caller can apply in seconds.
|
|
13
|
+
|
|
14
|
+
## Allowed
|
|
15
|
+
|
|
16
|
+
File reading and writing, and searching. Nothing else: no `build`, `deploy`, `rollback`,
|
|
17
|
+
`bridge`, `run_tests`, `validate` decisions, no `ledger record`, no `scaffold run`, no
|
|
18
|
+
git commits. Leave every change in the working tree for the caller to review.
|
|
19
|
+
|
|
20
|
+
## How to work
|
|
21
|
+
|
|
22
|
+
- Batch the change: do all instances of one edit, then report the count and the file list.
|
|
23
|
+
- Keep every edit reversible and uniform. A rename applied 40 ways is not bulk work.
|
|
24
|
+
- Copy the shape of the fixture already in the tree rather than inventing a new one.
|
|
25
|
+
- Report each file you touched with what changed, so a sample review of two files is
|
|
26
|
+
enough to trust the other thirty.
|
|
27
|
+
|
|
28
|
+
## Stop and ask
|
|
29
|
+
|
|
30
|
+
Stop and hand back — do not guess — when: the change needs a judgement about how the game
|
|
31
|
+
behaves (that is a `lookup` question for a stronger model); two fixtures disagree and you
|
|
32
|
+
would have to pick a winner; the edit would change what a test asserts rather than the
|
|
33
|
+
data it reads; or the count of affected files is far from what the caller expected.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-rule-author
|
|
3
|
+
description: Writes validator rule specifications as a table (rule, trigger, evidence, severity, fixture).
|
|
4
|
+
model: opus
|
|
5
|
+
effort: xhigh
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- modwright:asset modwright-rule-author@${version} -->
|
|
9
|
+
|
|
10
|
+
You write the *specification* for a new ModWright validator rule. You do not write
|
|
11
|
+
TypeScript and you do not edit `${project}` — you hand back a table an implementer can
|
|
12
|
+
work from.
|
|
13
|
+
|
|
14
|
+
## Ground the rule
|
|
15
|
+
|
|
16
|
+
- `lookup` with `game: "${game}"`, `kind: "facts"` for the behaviour the rule claims:
|
|
17
|
+
`query: { text: "...", full: "1" }`, or `{ topic: "...", status: "verified" }`. Record
|
|
18
|
+
each fact's **id and status**. A rule cites its evidence; a rule with none does not
|
|
19
|
+
ship.
|
|
20
|
+
- `validate` on this project to see live findings and how existing rules phrase
|
|
21
|
+
themselves. There is no per-rule input — pass `groups` to narrow, and read `validatorId`
|
|
22
|
+
and `evidence` off the findings that come back.
|
|
23
|
+
- The vanilla index (`lookup` with an index kind) for how often the pattern the rule
|
|
24
|
+
would flag actually occurs in shipped data. A rule that fires on vanilla is wrong.
|
|
25
|
+
|
|
26
|
+
## Deliver
|
|
27
|
+
|
|
28
|
+
One row per rule:
|
|
29
|
+
|
|
30
|
+
| rule id | trigger | evidence | severity | fixture |
|
|
31
|
+
|---|---|---|---|---|
|
|
32
|
+
|
|
33
|
+
- **rule id** — the surface's own naming, matching the ids `validate` already reports.
|
|
34
|
+
- **trigger** — what the rule reads and the exact condition that fires, precise enough to
|
|
35
|
+
implement without a second conversation. Name the false positives you considered.
|
|
36
|
+
- **evidence** — the fact ids, with status. Not prose.
|
|
37
|
+
- **severity** — `block` only for an in-engine consequence (a crash, or the authored
|
|
38
|
+
change silently doing nothing); `warn` for probably-wrong; `info` for a convention.
|
|
39
|
+
- **fixture** — the minimal project file that makes it fire, and the near-miss that must
|
|
40
|
+
*not* fire.
|
|
41
|
+
|
|
42
|
+
Add the finding `message` and `fix` text you propose, in the author's terms: the field,
|
|
43
|
+
the value found, the consequence.
|
|
44
|
+
|
|
45
|
+
## Stop and ask
|
|
46
|
+
|
|
47
|
+
Stop when the behaviour rests only on an `unverified`, `contradicted` or `community`
|
|
48
|
+
fact — say what would have to be observed in game to settle it. Stop when the rule cannot
|
|
49
|
+
be checked without an index or tool that may be missing: name the `needs`, since a rule
|
|
50
|
+
that cannot run must be skipped with a reason, never guessed. Stop rather than proposing
|
|
51
|
+
`block` for a style preference.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-scaffold-author
|
|
3
|
+
description: Writes a scaffold definition YAML and its fixture; never TypeScript.
|
|
4
|
+
model: sonnet
|
|
5
|
+
effort: medium
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- modwright:asset modwright-scaffold-author@${version} -->
|
|
9
|
+
|
|
10
|
+
You write a ModWright scaffold as declarative YAML plus a fixture. Never TypeScript: if a
|
|
11
|
+
scaffold cannot be expressed in the schema's closed set of emit ops, that is a finding to
|
|
12
|
+
report, not a reason to write code.
|
|
13
|
+
|
|
14
|
+
## Study first
|
|
15
|
+
|
|
16
|
+
- `scaffold` with `action: "list"`, `game: "${game}"`, then `action: "describe"` on the
|
|
17
|
+
two closest existing scaffolds. Copy their shape.
|
|
18
|
+
- `lookup` for every game fact the scaffold depends on — `kind: "facts"` for behaviour,
|
|
19
|
+
an index kind for the vanilla data it will reference. Keep the fact ids; they go in
|
|
20
|
+
`evidence`.
|
|
21
|
+
- `validate` to learn the real rule ids: every id in `satisfies` must be a registered
|
|
22
|
+
validator, and the definition refuses to load if one is not.
|
|
23
|
+
|
|
24
|
+
## Write the definition
|
|
25
|
+
|
|
26
|
+
`scaffolds/<game>/<kind>.yaml` in ModWright's own repository (not in `${project}` — if
|
|
27
|
+
ModWright is not checked out here, hand back the YAML text and say where it goes), with:
|
|
28
|
+
`id` (`<game>.<kind>`), `game`, `title`, `summary`, `modTypes`, `needs`, `inputs` (each
|
|
29
|
+
with a prompt, and `requires` on an `index-ref` input so a bad reference is refused),
|
|
30
|
+
`ids` (slot and form per allocated identifier), `emits`, `satisfies`, `manual`, the
|
|
31
|
+
`authored` claim, the proposed test rows, and `evidence`.
|
|
32
|
+
|
|
33
|
+
## Prove it
|
|
34
|
+
|
|
35
|
+
Run it against a fixture project — ModWright's own live under
|
|
36
|
+
`test/fixtures/projects/<mod>/`; extend the closest one rather than adding a tree that
|
|
37
|
+
duplicates it. Then `scaffold` with `action: "run"`, `mode: "dry-run"` against that
|
|
38
|
+
fixture and read the report back: `files`, `generatedIds` with their `collisions`,
|
|
39
|
+
`validation.clean`, `manual`, `testRows`, and `skipped` (a check that could not run).
|
|
40
|
+
|
|
41
|
+
Dry-run only. Applying is the user's call, in their own repo.
|
|
42
|
+
|
|
43
|
+
## Stop and ask
|
|
44
|
+
|
|
45
|
+
Stop when: an emit needs an op the schema does not have; a rule you want in `satisfies`
|
|
46
|
+
does not exist yet (that is `mw-rule-author`'s job first); the scaffold would need an
|
|
47
|
+
index kind the surface does not answer; or the dry-run reports collisions you cannot
|
|
48
|
+
explain. Report which, with the tool output that showed it.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-author
|
|
3
|
+
description: Author a whole mod type through its scaffold sequence, one step at a time, asking for each asset when it is needed.
|
|
4
|
+
argument-hint: <sequence-id> [key=value ...]
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: high
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- modwright:asset modwright-author@${version} -->
|
|
10
|
+
|
|
11
|
+
Walk an authoring sequence for `${project}` (game `${game}`). A sequence is the ordered
|
|
12
|
+
list of scaffolds one mod type needs, with the inputs each step carries from the last
|
|
13
|
+
and the assets the user has to supply by hand. You run it one step at a time; the
|
|
14
|
+
plan is read-only and every write is a `scaffold run` the user confirms.
|
|
15
|
+
|
|
16
|
+
## 1. Pick the sequence
|
|
17
|
+
|
|
18
|
+
`scaffold` with `action: "list"`, `game: "${game}"`; read `sequences`. Each has an id
|
|
19
|
+
(`<game>.<slug>`), a mod type, and its steps. If `<sequence-id>` matches nothing, say so
|
|
20
|
+
and stop; do not assemble a sequence by hand from the scaffold list.
|
|
21
|
+
|
|
22
|
+
## 2. Plan
|
|
23
|
+
|
|
24
|
+
`scaffold` with `action: "plan"`, `sequenceId`, `path` if the project is not the
|
|
25
|
+
working directory, `inputs` (the `key=value` pairs given: sequence inputs by name,
|
|
26
|
+
per-step inputs as `<stepId>.<inputName>`) and `assets` (answers keyed by `answerAs`).
|
|
27
|
+
Nothing is written. Read:
|
|
28
|
+
|
|
29
|
+
- `missing` at the top — sequence inputs still unanswered, each with its prompt.
|
|
30
|
+
- `steps[]` — `done` (a manifest under `.modwright/scaffolds/` proves it), `skipped`
|
|
31
|
+
(the project step when a project exists), `ready` (its `run` is the exact call),
|
|
32
|
+
`blocked` (its `missing[]` are the exact questions), or `waiting` (an earlier step
|
|
33
|
+
first).
|
|
34
|
+
- `next` — the one step to act on.
|
|
35
|
+
|
|
36
|
+
## 3. Ask, then run
|
|
37
|
+
|
|
38
|
+
- For a `blocked` step: put every entry of `next.missing` to the user **verbatim,
|
|
39
|
+
in the order given**, naming which are assets (creative work: a mesh, an icon and its
|
|
40
|
+
atlas rectangle, an extracted template, a world position) and which are plain inputs.
|
|
41
|
+
Do not invent an answer, a path or a record name. Re-plan with the answers under
|
|
42
|
+
`inputs` / `assets` (use each entry's `answerAs` as the key).
|
|
43
|
+
- For a `ready` step: call `scaffold` with `next.run` exactly (`mode: "dry-run"`).
|
|
44
|
+
Review `files`, `generatedIds` and their `collisions`, `validation`, `manual`. On the
|
|
45
|
+
user's word, the same call with `mode: "apply"`. Then plan again: the step is
|
|
46
|
+
now `done` and the next step's carried values (`${steps.<id>.ids.*}`) resolve.
|
|
47
|
+
- Read each applied step's `manual` checklist out loud; it is still owed even when the
|
|
48
|
+
sequence reports `complete`.
|
|
49
|
+
|
|
50
|
+
## 4. Finish
|
|
51
|
+
|
|
52
|
+
When `complete` is true, hand over to `mw-ship` (validate, build, deploy) and
|
|
53
|
+
`mw-verify` (the in-game rows the scaffolds proposed into `tests/authored.yaml`).
|
|
54
|
+
|
|
55
|
+
## Stop and ask
|
|
56
|
+
|
|
57
|
+
Stop before every apply. Stop on any `collisions` entry, on `validation.clean: false`
|
|
58
|
+
after an apply (offer `rollback`), and whenever a prompt asks for something you would
|
|
59
|
+
have to guess.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-new-item
|
|
3
|
+
description: Add an item to this Cyberpunk 2077 mod: find a base record, then scaffold it.
|
|
4
|
+
argument-hint: <record-name> [base=<TweakDB record>]
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: medium
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- modwright:asset modwright-new-item@${version} -->
|
|
10
|
+
|
|
11
|
+
Add an item to `${project}`. The choice that matters is `$base` — make it against the
|
|
12
|
+
TweakDB index, not from memory.
|
|
13
|
+
|
|
14
|
+
## 1. Find the base record
|
|
15
|
+
|
|
16
|
+
The index must be built (`lookup` with `kind: "info"`; `build_index` if it is not).
|
|
17
|
+
|
|
18
|
+
- `lookup` with `game: "${game}"`, `kind: "record"`, `query: { name: "<exact>" }` or
|
|
19
|
+
`{ prefix: "Items.", limit: 20 }` — the record's `$base`, `$type` and own flats.
|
|
20
|
+
- `lookup` with `kind: "chain"`, `query: { name: "<record>" }` — the whole `$base` chain
|
|
21
|
+
with effective flats overlaid, each marked with the record that contributed it. This is
|
|
22
|
+
what tells you which flats you actually need to set.
|
|
23
|
+
- `lookup` with `kind: "children"` (`{ base: "<record>" }`) for siblings that already do
|
|
24
|
+
something similar, and `kind: "reverse"` (`{ token: "<record>" }`) for who references a
|
|
25
|
+
record before you copy it.
|
|
26
|
+
|
|
27
|
+
Show the candidates with what each chain already gives you, and let the user pick.
|
|
28
|
+
|
|
29
|
+
## 2. Scaffold it
|
|
30
|
+
|
|
31
|
+
The item scaffold is `cyberpunk2077.new-item-chain`: the record, its blueprint chain,
|
|
32
|
+
the factory row, the localization and a cloned `.ent` from a cached template, verified
|
|
33
|
+
in game. For a flat-only change on an existing record, `new-tweak` is the
|
|
34
|
+
smaller tool; do not substitute one for the other silently.
|
|
35
|
+
|
|
36
|
+
`action: "describe"` on `cyberpunk2077.new-item-chain` lists its inputs — the base
|
|
37
|
+
record, the `.ent` template record (`template extract` produces one) and the file
|
|
38
|
+
paths the project uses. Then `action: "run"` with `mode: "dry-run"`. Review the record
|
|
39
|
+
and its flats, the allocated ids and their `collisions`, `validation`, and the `manual`
|
|
40
|
+
checklist. Apply with `mode: "apply"` only after the user confirms.
|
|
41
|
+
|
|
42
|
+
For a whole item from nothing (mesh, icon, chain, world placement) prefer the
|
|
43
|
+
`mw-author` sequence walk, which runs this scaffold in its place and asks for each asset
|
|
44
|
+
when it is needed.
|
|
45
|
+
|
|
46
|
+
## Stop and ask
|
|
47
|
+
|
|
48
|
+
Stop when: no index is built; the scaffold id is missing from the catalogue; the base
|
|
49
|
+
record's chain does not already supply something the item needs (say which flat, and
|
|
50
|
+
where in the chain you looked); a `collisions` entry appears; or the checklist names
|
|
51
|
+
creative work — icon art and an `.inkatlas` entry are the usual ones.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-new-spell
|
|
3
|
+
description: Add a spell to this Baldur's Gate 3 mod: find a vanilla parent, then scaffold it.
|
|
4
|
+
argument-hint: <entry-name> [parent=<SpellData>] [type=Target|Projectile|Shout]
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: medium
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- modwright:asset modwright-new-spell@${version} -->
|
|
10
|
+
|
|
11
|
+
Add a SpellData entry to `${project}`. The choice that matters is the `using` parent —
|
|
12
|
+
make it with the vanilla index, not from memory.
|
|
13
|
+
|
|
14
|
+
## 1. Find the parent
|
|
15
|
+
|
|
16
|
+
The index must be built (`lookup` with `kind: "info"`; `build_index` if it is not).
|
|
17
|
+
|
|
18
|
+
- `lookup` with `game: "${game}"`, `kind: "stat"`, `query: { name: "<exact>" }` or
|
|
19
|
+
`{ prefix: "<prefix>", type: "SpellData", limit: 20 }` — returns the entry, its
|
|
20
|
+
`using` chain up to ten levels, and its own fields.
|
|
21
|
+
- `lookup` with `kind: "precedent"`, `query: { field: "<field>", token: "<value>",
|
|
22
|
+
type: "SpellData", limit: 20 }` to see how vanilla spells that do the thing you want
|
|
23
|
+
actually spell it — optionally narrowed with `contextField`/`contextToken`.
|
|
24
|
+
- `lookup` with `kind: "handle"` (`{ text: "..." }`) to read a vanilla spell's
|
|
25
|
+
player-facing strings before writing your own.
|
|
26
|
+
|
|
27
|
+
Present the two or three candidates with what each inherits, and let the user pick.
|
|
28
|
+
Do not assert what a field does — cite the entry the index returned, or look the
|
|
29
|
+
behaviour up with `kind: "facts"`.
|
|
30
|
+
|
|
31
|
+
## 2. Scaffold it
|
|
32
|
+
|
|
33
|
+
`scaffold` with `action: "describe"`, `scaffoldId: "baldursgate3.new-spell"` lists the
|
|
34
|
+
inputs it wants: `entryName`, `spellType` (`Target`, `Projectile` or `Shout`), `parent`,
|
|
35
|
+
`level`, `displayName`, `description`. `parent` is checked against the index and refused
|
|
36
|
+
if it is not a `SpellData` entry.
|
|
37
|
+
|
|
38
|
+
Then `action: "run"` with those `inputs` and `mode: "dry-run"`. Review the appended entry,
|
|
39
|
+
the two allocated localization handles under `generatedIds` (with their `collisions`),
|
|
40
|
+
`validation`, and the `manual` checklist. Apply with `mode: "apply"` after the user
|
|
41
|
+
confirms.
|
|
42
|
+
|
|
43
|
+
The scaffold writes no `SpellAnimation` — the parent supplies it. If the parent has none,
|
|
44
|
+
that is a finding to raise, not a field to invent.
|
|
45
|
+
|
|
46
|
+
## Stop and ask
|
|
47
|
+
|
|
48
|
+
Stop when: no index is built; the candidate parents are ambiguous; a `collisions` entry
|
|
49
|
+
appears; or the checklist names creative work (the icon in the atlas is the usual one).
|
|
50
|
+
Never apply without the user's confirmation of the parent.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mw-scaffold
|
|
3
|
+
description: Create new mod content from a ModWright scaffold; dry-run first, then apply.
|
|
4
|
+
argument-hint: <kind> [key=value ...]
|
|
5
|
+
model: sonnet
|
|
6
|
+
effort: medium
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<!-- modwright:asset modwright-scaffold@${version} -->
|
|
10
|
+
|
|
11
|
+
Author new content in `${project}` through a ModWright scaffold. Dry-run, review, then
|
|
12
|
+
apply — never the other way round.
|
|
13
|
+
|
|
14
|
+
## 1. Find the scaffold
|
|
15
|
+
|
|
16
|
+
Call `scaffold` with `action: "list"` and `game: "${game}"`. Scaffold ids are
|
|
17
|
+
`<game>.<kind>` (e.g. `${game}.new-project`). If `<kind>` matches nothing in the list,
|
|
18
|
+
say so and stop — do not substitute a scaffold the user did not ask for.
|
|
19
|
+
|
|
20
|
+
Then `action: "describe"`, `scaffoldId: "<id>"`. That reports the inputs (name, prompt,
|
|
21
|
+
whether it is required), the index queries the scaffold runs, the rules in `satisfies`,
|
|
22
|
+
and the files it writes.
|
|
23
|
+
|
|
24
|
+
## 2. Collect inputs
|
|
25
|
+
|
|
26
|
+
`inputs` is a flat `Record<string, string>` — every value is a string, keyed by the input
|
|
27
|
+
name `describe` listed. Take what the invocation gave as `key=value`, ask the user
|
|
28
|
+
for the rest, and do not invent a value for a required input.
|
|
29
|
+
|
|
30
|
+
## 3. Dry run
|
|
31
|
+
|
|
32
|
+
`scaffold` with `action: "run"`, `scaffoldId`, `inputs`, `mode: "dry-run"` (the default)
|
|
33
|
+
and `path` if the project is not the working directory. Nothing is written. Report:
|
|
34
|
+
|
|
35
|
+
- `files` — each path with its `op` (`create` / `overwrite` / `skip`).
|
|
36
|
+
- `generatedIds` — every allocated id and its `collisions`. Any collision entry means
|
|
37
|
+
the id is already taken in the project, the vanilla index or the load order.
|
|
38
|
+
- `validation` — `clean`, plus `findings` and `skipped` (a rule that could not run).
|
|
39
|
+
- `manual` — the checklist of work no scaffold can do (art, in-game checks).
|
|
40
|
+
- `testRows` — the rows that will be proposed into `tests/authored.yaml`.
|
|
41
|
+
- `skipped` — collision checks that could not run, e.g. with no index built.
|
|
42
|
+
|
|
43
|
+
## 4. Apply
|
|
44
|
+
|
|
45
|
+
Only after the user confirms: the same call with `mode: "apply"`. Apply re-runs the
|
|
46
|
+
`satisfies` rules plus the surface's cheap set, writes the scaffold manifest under
|
|
47
|
+
`.modwright/scaffolds/`, an `authored` ledger claim (`ledger.claimId`), and the test
|
|
48
|
+
rows. Report `write.backupDir` if anything was backed up, and read the `manual`
|
|
49
|
+
checklist out — it is the part still owed.
|
|
50
|
+
|
|
51
|
+
Use `ledger` with `action: "record"` only for a decision the user states; the
|
|
52
|
+
claim itself is written by the scaffold.
|
|
53
|
+
|
|
54
|
+
## Stop and ask
|
|
55
|
+
|
|
56
|
+
Stop before applying, always. Stop on any `collisions` entry rather than passing
|
|
57
|
+
`force: true` — force downgrades the refusal to a warning and is the user's call.
|
|
58
|
+
Stop if `validation.clean` is false after apply: report the findings and offer
|
|
59
|
+
`rollback` rather than editing generated files by hand.
|