Skip to content

chore: reduce token usage in agent-context markdown files#13

Merged
junwoojeong100 merged 1 commit into
mainfrom
chore/optimize-prompt-tokens
Jun 11, 2026
Merged

chore: reduce token usage in agent-context markdown files#13
junwoojeong100 merged 1 commit into
mainfrom
chore/optimize-prompt-tokens

Conversation

@junwoojeong100

@junwoojeong100 junwoojeong100 commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

Reduces per-turn token usage by trimming redundancy from the markdown files that Copilot loads into context, without removing any behavioral rule or API fact.

Scope note: Only context-loaded files yield runtime token savings — AGENTS.md and .github/ instructions/skills/agents/prompts. README.md and docs/ are human-facing docs that are not auto-loaded, so they were inspected but deliberately left intact (already concise; trimming would risk the guide for no token benefit).

Changes

.github/ config (commit 1)

  • Agents: removed duplicate mermaid diagrams from the 4 pattern coordinators (numbered routing list already states the flow); consolidated the orchestrator's thrice-stated delegation policy and compressed selection heuristics into one table; condensed the repeated AGENTS.md footer in all 7 agents to a single line.
  • Instructions: deduplicated builder/skeleton patterns in copilot-instructions.md (deferred detail to the skill); tightened python.instructions.md.
  • Prompt: add-agent.prompt.md references the agent-framework-codegen skill for the common skeleton instead of inlining it.
  • Skill: dropped 3 SKILL.md troubleshooting rows that duplicate inline notes; all code blocks and unique error rows retained.

AGENTS.md harness (commit 2)

  • Folded per-rule status mini-tables into headings, collapsed the 4-item rationale to one line, removed the redundant forbidden-command examples in the standard-workflow block (already under "금지 명령어"), and turned the violation-handling table into a sentence.
  • All prohibitions and required workflows unchanged.

Impact

  • 12 files changed; .github/ net -138 lines (~10%), AGENTS.md -27 lines (~18%).
  • Validation: frontmatter intact, code fences balanced, no leftover mermaid, every prohibition (force/--all/--mirror/--tags/main/master/develop, English commits, --draft --base main) retained.

Inspected but unchanged

README.md (already tight, human-facing), docs/github-multi-account-setup.md (auxiliary how-to), and the already-minimal korean/azure/git-commit instructions + review-code prompt.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Trim redundancy across instruction, prompt, agent, and skill markdown
without removing any behavioral rules or API facts.

- Remove duplicate mermaid diagrams from the 4 pattern coordinator
  agents; the numbered routing list already states the same flow
- Consolidate orchestrator's thrice-stated delegation policy and
  compress selection heuristics into a single table
- Condense the repeated AGENTS.md footer in all 7 agents to one line
- Deduplicate builder/skeleton patterns in copilot-instructions and the
  add-agent prompt by deferring detail to the agent-framework-codegen skill
- Tighten python.instructions and drop 3 SKILL.md troubleshooting rows
  that duplicate inline section notes

Net -138 lines (~10% smaller) with all rules preserved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@junwoojeong100
junwoojeong100 marked this pull request as ready for review June 11, 2026 23:50
@junwoojeong100
junwoojeong100 merged commit 8339bec into main Jun 11, 2026
2 checks passed
@junwoojeong100
junwoojeong100 deleted the chore/optimize-prompt-tokens branch June 11, 2026 23:50
@junwoojeong100 junwoojeong100 changed the title chore: reduce token usage in .github config files chore: reduce token usage in agent-context markdown files Jun 12, 2026
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.

1 participant