Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[internal-agent] Two fixed system prompts live outside the shared built-in prompt source and its 3000-code-point test

Open Beginner friendly
#525 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
ai, backend

Research direction

Read the spec at docs/specs/20260813-internal_agent_runtime.md and the decision in docs/decisions/20260924-centralized_bounded_builtin_prompts.md. Move POLICY_AGENT_GATE_PROMPT from apps/nanocore/src/policy/agent-gate.ts:16 and COMPACTION_INSTRUCTION from apps/nanocore/src/internal-agents/compacting-context.ts:25 into apps/nanocore/src/internal-agents/builtin-prompts.ts. Done when both texts live there and the existing test builtin-prompts.test.ts:23-30 enumerates them.

Written by the indexing model from the issue text.

Description

bug doc-audit

Found by the independent documentation audit (supplement on branch audit/independent-docs-20261025, Internal Agent Runtime specification).

  • Spec clause: docs/specs/20260813-internal_agent_runtime.md:251@547887980b6fd3ef730ecc669d39a3092f731408, section "Prompt Contract": "All NanoCore built-in agents keep their fixed System Prompt text in one source location, including callers outside the shared loop and internal model-based helpers." and "A test enumerates all built-in prompt assemblies and enforces this limit."
  • Decision: docs/decisions/20260924-centralized_bounded_builtin_prompts.md: "Manage the fixed System Prompt text of every NanoCore built-in agent in one source location."
  • Code at 547887980:
    • apps/nanocore/src/policy/agent-gate.ts:16 defines POLICY_AGENT_GATE_PROMPT and passes it as systemPrompt at line 64.
    • apps/nanocore/src/internal-agents/compacting-context.ts:25 defines COMPACTION_INSTRUCTION and passes it as systemPrompt at line 189.
    • Neither is in apps/nanocore/src/internal-agents/builtin-prompts.ts, and builtin-prompts.test.ts:23-30 checks only the assemblies in that file.

Observed versus required

Required: every fixed built-in prompt, including model-based helpers, lives in one source and is covered by the 3000-code-point test. Observed: the Policy agent gate and the compaction helper keep their own fixed prompts, and no test bounds them.

Adjudication

The code differs from the current accepted specification and decision. Classification: implementation defect.

Repair direction

Move both fixed texts into the shared built-in prompt source, and let the existing test enumerate them.

Severity hint

Low: maintainability and prompt-size control, no data or authorization effect.

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
3h 16m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from lingkaix/openkit

All issues in lingkaix/openkit

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.