docs: encode the newLineIfNotEmpty conversion rule in the xtend-to-java skill#1461
Merged
joaodinissf merged 1 commit intoJul 13, 2026
Conversation
…va skill Adds rules/04-templates.md section 4.8 documenting the source-verified StringConcatenation semantics that govern coalescing append-chains into text blocks: append(String) newline normalization (the formal basis for coalescing), the line-scoped whitespace-retracting behaviour of newLineIfNotEmpty(), and the two-arg append(value, indent) continuation re-indent. The conversion rule: newLineIfNotEmpty() may become newLine() only when the last append on the current line is a static non-whitespace literal; it must stay after dynamic line-tails and after indent + conditional values; two-arg appends of potentially multi-line values are never folded; appendImmediate loops stay untouched. Validation checklist gains row 35 enforcing the rule. Distilled from the dsldevkit#1429 round-3 review rework, where these distinctions were byte-verified against an executable harness and an adversarial per-hunk review. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ANGM7L3BaEGfGUmPVKRt4
joaodinissf
marked this pull request as ready for review
July 11, 2026 16:16
This was referenced Jul 11, 2026
rubenporras
approved these changes
Jul 13, 2026
joaodinissf
added a commit
to joaodinissf/dsl-devkit
that referenced
this pull request
Jul 15, 2026
Applies the adversarially-verified findings of the skill review (13-agent Opus panel over the stacked dsldevkit#1453+dsldevkit#1461 state; 25 confirmed findings): Cuts: duplicate string-decision list in 00-decisions; duplicated commit-message fence in multi-file-batch; four known-pitfalls rows that were verbatim checklist echoes; copyright restatements reduced to pointers (formatting-and-commit stays canonical). Staleness/contradictions: one-file-conversion step 8 and the checklist final invariant now teach the two-step rename+translate scheme; stale hard-coded rule counts dropped; overview slice branch now based on upstream/master; import order stated once (java.* -> org.* -> com.*, junit inside org, static block separate) and aligned in rule 11 and the pitfalls row; == equality rule gains the primitive-operand carve-out (enums stay object-form); rollback recipe corrected for two-step slices (reset --hard HEAD~N / revert both shas, never -m 1) and stated once; SKILL.md lambda cheat-sheet aligned with 07 (expression form); Pairs guidance defers to the no-xbase.lib pitfall; dead "ledger's Method 1" pointer removed. Small additions: trailing-\s trap noted at point of use in 4.3; stable-rule-ID legend in the checklist header; overview Step 0 leads with the bash listing; examples no longer claim their whitespace WAS verified (they illustrate; real migrations must verify) and use the PMD-safe explicit StringBuilder capacity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ANGM7L3BaEGfGUmPVKRt4
joaodinissf
added a commit
that referenced
this pull request
Jul 16, 2026
Applies the adversarially-verified findings of the skill review (13-agent Opus panel over the stacked #1453+#1461 state; 25 confirmed findings): Cuts: duplicate string-decision list in 00-decisions; duplicated commit-message fence in multi-file-batch; four known-pitfalls rows that were verbatim checklist echoes; copyright restatements reduced to pointers (formatting-and-commit stays canonical). Staleness/contradictions: one-file-conversion step 8 and the checklist final invariant now teach the two-step rename+translate scheme; stale hard-coded rule counts dropped; overview slice branch now based on upstream/master; import order stated once (java.* -> org.* -> com.*, junit inside org, static block separate) and aligned in rule 11 and the pitfalls row; == equality rule gains the primitive-operand carve-out (enums stay object-form); rollback recipe corrected for two-step slices (reset --hard HEAD~N / revert both shas, never -m 1) and stated once; SKILL.md lambda cheat-sheet aligned with 07 (expression form); Pairs guidance defers to the no-xbase.lib pitfall; dead "ledger's Method 1" pointer removed. Small additions: trailing-\s trap noted at point of use in 4.3; stable-rule-ID legend in the checklist header; overview Step 0 leads with the bash listing; examples no longer claim their whitespace WAS verified (they illustrate; real migrations must verify) and use the PMD-safe explicit StringBuilder capacity. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018ANGM7L3BaEGfGUmPVKRt4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents the source-verified
StringConcatenationsemantics that govern coalescing migrated append-chains into text blocks, and the conversion rule they imply.New section
rules/04-templates.md§4.8:append(String)replaces embedded newlines with the builder's own delimiter — one multi-line text block is byte-equivalent to the per-lineappend+newLine()sequence it replaces.newLineIfNotEmpty()is line-scoped and whitespace-retracting: non-whitespace on the current line → newline; empty/whitespace-only line → the trailing whitespace is deleted and no newline is added.append(value, indent)re-indents every continuation line of the value — unreproducible by text blocks for multi-line values.The rule:
newLineIfNotEmpty() → newLine()only when the line-tail is a static literal; keep it after dynamic values and after indent + conditional values; never fold two-arg appends of potentially multi-line values; leaveappendImmediateloops untouched. Checklist row 35 enforces it.Distilled from the #1429 round-3 rework, where each of these distinctions was byte-verified (executable old-vs-new harness + adversarial per-hunk review).
🤖 Generated with Claude Code