Skip to content

Upgrade Qwen3-Coder model and refactor package-body prompt for child summaries - #117

Merged
bernardladenthin merged 6 commits into
mainfrom
claude/bold-ride-652984
Jun 25, 2026
Merged

Upgrade Qwen3-Coder model and refactor package-body prompt for child summaries#117
bernardladenthin merged 6 commits into
mainfrom
claude/bold-ride-652984

Conversation

@bernardladenthin

Copy link
Copy Markdown
Owner

Summary

  • Model upgrade: Replace Qwen3-Coder-30B-A3B-Instruct-Q4_K_M (32K context) with the newer UD-Q4_K_XL variant (64K context, 17.7 GB), which is locally present and serves as the active model for both file and package summarization phases. Reduce maxOutputTokens from 2048 to 1536 to keep summaries dense and on-topic.

  • Package-body prompt redesign: Rewrite the package-body prompt template to be a structured markdown indexer (matching the new file-body template style) that synthesizes summaries from already-generated child .ai.md bodies rather than raw source code. This reduces context usage and improves coherence.

  • PackageIndexer enhancement: Implement child-summary embedding in buildPackageSourceText(). The method now reads the AI body of each child .ai.md file (per-file and sub-package summaries) and embeds them under labelled headings in the package source text fed to the AI model. Falls back to a plain contents listing if no child bodies are available. Includes comprehensive Javadoc and new helper methods (appendChildSummaries, appendChildSummary, readChildBody, toChildDisplayName).

  • Test coverage: Add two new integration tests (aggregate_childFileBodies_areEmbeddedInPackageSourceText, aggregate_subPackageBody_isEmbeddedInParentSourceText) and a CapturingProvider test fixture to verify child summaries are correctly embedded and labelled in the package source text.

  • Documentation: Update PIT mutation-testing guidance in pom.xml to reference an external policy document. Add PIT section to CLAUDE.md with invocation instructions. Update README.md TODO to reflect the new model and prompt design.

Test plan

  • New unit tests pass locally (PackageIndexerTest.aggregate_childFileBodies_* and aggregate_subPackageBody_*)
  • Existing PackageIndexerTest tests pass (no regression in file/package aggregation)
  • CI is green on this branch
  • Docs updated (CLAUDE.md, README.md, pom.xml comments)

Related issues / PRs

None.

Checklist

  • I have read CONTRIBUTING.md and CODE_OF_CONDUCT.md
  • My commits follow Conventional Commits
  • No security-sensitive changes

https://claude.ai/code/session_017i6A5bMhgCSbiKibQhxwuz

claude added 6 commits June 25, 2026 05:45
Add a single aiDefinition (key Qwen3-Coder-30B-A3B-Instruct-UD-Q4_K_XL-C64k)
pointing at the locally-present 17.7 GB UD-Q4_K_XL GGUF, and reference it from
both the ai-generate (file-body) and ai-aggregate-packages (package-body)
executions.

- contextSize 65536: generous but CPU-feasible (native 262144; 256k prefill
  is unusable on CPU).
- maxOutputTokens 1536: short dense bullet summaries, not long code gen.
- Official Qwen3-Coder sampling: temp 0.7 / top_p 0.8 / top_k 20 / repeat 1.05.
- Non-thinking model: no enable_thinking flag set.
- Remove the two stale Qwen3-Coder Q4_K_M entries (C32k/C256k) that pointed at
  a file not present locally; update the model-selection legend accordingly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017i6A5bMhgCSbiKibQhxwuz
Swap the Java-centric prose file-summary prompt for a dense, section-based
multi-language indexer prompt (Java/C/C++/OpenCL/SQL) that emits a blockquote
lead plus fixed '####' sections (Purpose, Type, Input, Output, Core logic,
Public API, Dependencies, Exceptions/Errors). The File/Source %s placeholders
are unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017i6A5bMhgCSbiKibQhxwuz
Swap the Java-centric prose package-summary prompt for a dense, section-based
multi-language indexer prompt that synthesizes the per-file summaries into a
blockquote lead plus fixed '####' sections (Purpose, Responsibilities, Key
units, Data flow, Dependencies, Cross-cutting). Both %s placeholders are
preserved (now labeled Package / File summaries).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017i6A5bMhgCSbiKibQhxwuz
The package-body prompt expects the already-generated per-file summaries, but
buildPackageSourceText only emitted the package header plus a '#### Contents'
list of child file *names*. The model therefore had nothing to synthesise.

Embed each child .ai.md's actual AI body (per-file and sub-package summaries)
into the %s package source, each under a '### <name>' heading so the model can
attribute which summary belongs to which file. Only the child body is inlined;
the single-letter child header metadata is deliberately omitted to save context.

- Sub-package children reuse their aggregated package.ai.md body, labelled with
  a trailing '/'.
- Children with a blank/unreadable body get a '(no summary available)' note
  instead of a fabricated summary.
- When no child yields a usable body, fall back to the existing '#### Contents'
  name listing so the source is never empty.
- No bespoke truncation: the combined source flows through the existing
  AiPromptPreparationSupport.preparePrompt trim/warnOnTrim budget logic.
- The deterministic '#### Contents' fallback for the written package body is
  unchanged; package checksums (child name|c|d|x) are unaffected, so this does
  not trigger spurious regeneration.

The package-body prompt text is unchanged — the code now matches the prompt.

Add two PackageIndexerTest cases proving the %s source contains the real child
bodies (per-file and bubbled-up sub-package), via a capturing provider.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017i6A5bMhgCSbiKibQhxwuz
README's TODO claimed PIT targetClasses was 'narrowed to a single class
(AiCompletionParser)' — stale; the pom now gates an explicit 21-class list
(~146 mutations). Update it and add the test-compile invocation + policy link.
Add a 'PIT Mutation Testing' pointer to the workspace policy in CLAUDE.md.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017i6A5bMhgCSbiKibQhxwuz
…ifics

Slim the CLAUDE.md PIT pointer to the uniform cross-repo form. Trim the README
TODO to the repo-specific scope-expansion roadmap (toward the whole aiindex.*
tree) + a policy link, dropping drift-prone counts and generic mechanics. Trim
the pom PIT comment to a policy pointer plus the repo-specific rationale
(whole-tree targetTests, pure-Java MockAiGenerationProvider) and drop the stale
'pitest-maven 1.25.4'.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017i6A5bMhgCSbiKibQhxwuz
@bernardladenthin
bernardladenthin merged commit 299a642 into main Jun 25, 2026
9 of 12 checks passed
@bernardladenthin
bernardladenthin deleted the claude/bold-ride-652984 branch June 25, 2026 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants