Skip to content

feat(prompt): GLM-native system prompt + CLI tier/reasoning UX (#44) - #56

Merged
graphanov merged 1 commit into
mainfrom
forge/issue-44-glm-native-prompt-ux
Jun 28, 2026
Merged

feat(prompt): GLM-native system prompt + CLI tier/reasoning UX (#44)#56
graphanov merged 1 commit into
mainfrom
forge/issue-44-glm-native-prompt-ux

Conversation

@graphanov

Copy link
Copy Markdown
Owner

Summary

  • Adds a GLM-native operating contract to both the one-shot runtime and interactive REPL prompts, and surfaces model tier + reasoning guidance in banner/status/REPL.

Scope

  • src/prompt.js (new): side-effect-free prompt composition with GLM-native block, tier guidance, environment block; buildRuntimePrompt/buildReplPrompt. src/agent/runtime.js, src/repl.js: consume new prompts, thread catalog tier/context/description, refresh system prompt on /model and adaptive routing, de-dupe catalog loads. src/banner.js, src/status.js: optional tier + tierReason rows (additive, byte-identical when omitted). test/prompt.test.mjs (new), test/banner.test.mjs, test/status.test.mjs: coverage for tier rendering and degradation. docs/GLM_NATIVE_PROMPT.md: design rationale citing z.ai GLM-5.2, Thinking Mode, Coding Plan, Tool Integration docs.

Out of scope

Verification

  • node --test test/*.test.mjs -> 429 pass / 0 fail; tsc --noEmit clean; tsc build clean

Risk

  • low

Linked issue

Closes #44

Authority boundary

john-lomein did not merge, publish, release, dispatch workflows, change settings, force-push, rewrite history, or touch secrets.

Adds src/prompt.js composing a GLM-native operating contract (tier,
context window, reasoning_content, z.ai Coding Plan tool-loop) ahead of
the runtime working rules and REPL persona. Threads catalog tier and
derived guidance through banner, status, and REPL; refreshes the system
prompt on /model switches and adaptive routing. De-dupes catalog loading
in repl.js. Adds docs/GLM_NATIVE_PROMPT.md citing z.ai references.

Verification: node --test test/*.test.mjs -> 429 pass / 0 fail;
tsc --noEmit clean; tsc build clean.
@graphanov
graphanov marked this pull request as ready for review June 28, 2026 21:31
@graphanov

Copy link
Copy Markdown
Owner Author

Status: draft PR opened for issue #44 (GLM-native prompt + tier/reasoning CLI UX); verification green, ready for independent review.

Evidence:

  • node --test test/*.test.mjs -> 429 pass / 0 fail; tsc --noEmit clean; tsc build clean; CI pass (20s); zero unresolved review threads; no forbidden-path changes

Next: marking ready for review and requesting one @codex review for head 2c4b655.

@graphanov

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

Reviewed commit: 2c4b655910

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@graphanov
graphanov merged commit ee53621 into main Jun 28, 2026
1 check passed
@graphanov
graphanov deleted the forge/issue-44-glm-native-prompt-ux branch June 28, 2026 22: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.

GLM-native experience: system prompt + CLI UX designed around GLM's documented strengths

1 participant