You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,7 @@ This repo builds the Grill CLI and project setup tooling. The generated map-proj
15
15
- Local helpers in `config/ProjectConfigModels.kt` should stay thin: typealiases plus immutable copy helpers for shared records.
16
16
-`YamlHelper.dumpProjectConfig` intentionally serializes a pruned YAML map instead of the shared records directly. This preserves the old user-facing `wurst.build` behavior by omitting null/default nested fields.
17
17
-`wbschema.json` should stay lenient and aligned with the shared config parser, especially for `scriptMode`, `wc3Patch`, and nullable legacy fields.
18
+
- Compiler-owned agent references belong in `~/.wurst/wurst-compiler/agent-docs/`. Generated project notes should prefer those version-matched local files when present and retain an online fallback until compiler releases ship them.
if (CoreJassProvider.isReforgedPatch(wc3Patch)) MapFormat.FOLDERelseMapFormat.ARCHIVE
621
+
622
+
privatefunselectMapFormat(
623
+
prompt: (String, String?) ->String?,
624
+
current:MapFormat,
625
+
useInteractiveMenus:Boolean,
626
+
): MapFormat {
627
+
val choices =listOf(
628
+
TerminalMenu.Choice(MapFormat.FOLDER, "${MapFormat.FOLDER.label} (recommended for Reforged)"),
629
+
TerminalMenu.Choice(MapFormat.ARCHIVE, "${MapFormat.ARCHIVE.label} (recommended for classic/legacy)"),
630
+
)
631
+
if (useInteractiveMenus) {
632
+
TerminalMenu.choose("Map storage format:", choices, choices.indexOfFirst { it.value == current })?.let { return it }
633
+
}
634
+
val answer = prompt("Map storage (archive/folder)", current.cliName)?.lowercase()
635
+
returnMapFormat.parse(answer.orEmpty()) ?: current
636
+
}
611
637
612
638
privatefunselectCuratedDependencies(
613
639
prompt: (String, String?) ->String?,
@@ -936,6 +962,17 @@ object SetupApp {
936
962
if (markerLine ==AGENTS_TEMPLATE_MARKER) {
937
963
returnnull
938
964
}
965
+
if (markerLine !=null) {
966
+
val markerVersion = markerLine
967
+
.removePrefix(AGENTS_TEMPLATE_MARKER_PREFIX)
968
+
.removeSuffix("-->")
969
+
.trim()
970
+
// Template versions are ISO dates, so lexical ordering is chronological. A newer
971
+
// downloaded template is valid even when this older Grill binary cannot recognize it.
972
+
if (markerVersion >AGENTS_TEMPLATE_VERSION) {
973
+
returnnull
974
+
}
975
+
}
939
976
if (markerLine !=null) {
940
977
return"AGENTS.md was generated from an older WurstSetup template ($markerLine). Consider refreshing it from templates/AGENTS.md and re-applying project-local notes."
0 commit comments