diff --git a/mateclaw-server/src/main/java/vip/mate/wiki/dto/GeneratedPage.java b/mateclaw-server/src/main/java/vip/mate/wiki/dto/GeneratedPage.java new file mode 100644 index 00000000..87c6693f --- /dev/null +++ b/mateclaw-server/src/main/java/vip/mate/wiki/dto/GeneratedPage.java @@ -0,0 +1,28 @@ +package vip.mate.wiki.dto; + +import java.util.List; + +/** + * RFC-051 PR-6 (skeleton): structured create/merge output. + *
+ * Replaces the legacy {@code ---FILE---} block protocol used by + * {@code WikiBatchCreateParser}. {@code evidenceChunkIds} is optional and + * intended for the on-demand compile path so per-page citations bind to + * the chunks the prompt actually consumed. + *
+ * Fields are ordered to mirror the existing prompt template so the
+ * follow-up Spring-AI {@code BeanOutputConverter} swap is a one-shot
+ * replace of the parser, not a prompt rewrite.
+ */
+public record GeneratedPage(
+ String slug,
+ String title,
+ String summary,
+ String pageType,
+ String content,
+ List
+ * Today {@code processChunkTwoPhase} parses the route LLM's free-form JSON
+ * with a hand-rolled extractor, which fails on weak models that emit
+ * trailing commentary or mismatched braces. The follow-up wiring will use
+ * Spring AI {@code BeanOutputConverter
+ * Defining the type up-front (PR-6 partial) lets the prompt rewrite, parser
+ * swap, and call-site change land in one cohesive PR without renames.
+ *
+ * @param create new pages the router proposes (slug + title + summary)
+ * @param update slugs of existing pages that should absorb this chunk
+ */
+public record RouteResult(List
+ * {@code purposeHint} is optional; when populated by the router it feeds
+ * the create-page prompt's framing.
+ */
+public record RoutedPageMeta(String slug, String title, String summary, String purposeHint) {
+
+ public RoutedPageMeta(String slug, String title, String summary) {
+ this(slug, title, summary, null);
+ }
+}