Luna Forge Luna Forge, a compact Codex Skill and custom worker for GPT-5.6 Luna, claims to deliver more independently accepted bounded engineering work per unit of cost by rejecting 95.71% of a 7,009-line source corpus, retaining only 301 portable or distilled lines (4.29%) and reducing context to ~2,964 tokens, a 96.89–96.90% reduction. The project, by RealAhmedOsama, labels its quality uplift of 5–15% relative score improvement as 'Projected' with 0.65 judgment confidence, pending a repository benchmark, and does not claim Luna is universally more capable than Sol or Claude Fable. Evidence-driven execution for GPT-5.6 Luna. A compact Codex Skill and custom worker that convert clear engineering requests into bounded tasks, minimal patches, deterministic proof, and auditable delivery. Results results-at-a-glance · · the-three-source-study Research · how-luna-forge-works Architecture · cost-model Economics · benchmark-protocol Benchmark · installation Install Publish Important Luna Forge does not claim that prompting can make Luna universally more capable than Sol, Claude Fable, or any frontier model. It targets a narrower, testable objective: more independently accepted bounded engineering work per unit of cost . Cost figures are derived from reviewed rate cards. The quality uplift is Projected, not measured until the included repository benchmark is completed. GPT-5.6 Luna is attractive for high-volume, cost-sensitive engineering work, but the right strategy is not to paste a frontier product's entire system prompt into a smaller model. That would front-load tens of thousands of tokens of foreign tools, schemas, UI protocols, runtime metadata, duplicated instructions, and product-specific policy before Luna reaches the repository evidence that actually matters. Luna Forge began with a harder question: What remains useful after every non-portable line is removed, every retained idea is traced to an implementation, and every performance claim is forced to show its evidence class? The answer was surprisingly small: ~95,248–95,459 estimated source tokens ↓ 7,009 physical source lines classified ↓ 301 portable or distillable lines 4.29% ↓ ~2,964-token activated Skill + agent core ↓ 8 references loaded only when the task needs them The project rejected 95.71% of the reviewed source corpus. That rejection is the core design achievement: the workflow keeps transferable execution mechanisms and discards host-specific mass. | Result | Value | Evidence class | Proof | |---|---|---|---| | Source snapshots reviewed | 3 | Measured | docs/audit-summary.json | 7,009 docs/line-by-line-audit.csv 100% 301 4.29% 301 / 7,009 6,708 95.71% 6,708 / 7,009 6,398 docs/source-line-fingerprints-first-two.csv Git blob SHA-1 d5434648e7d859969403cbb3d8e4209390ce001b 95,248–95,459 tokens docs/metrics.json ~2,964 tokens 96.89–96.90% ~9,141 tokens 90.40–90.42% 21 evals/cases.yaml 18 tests/ 14 96% 96% 5–15% relative docs/IMPACT MODEL.md 0.65 Not claimed pie showData title Disposition of 7,009 reviewed lines "Portable or distilled" : 301 "Excluded, deferred, or structural" : 6708 Every material claim is labeled as one of four classes. | Label | Meaning | Examples | |---|---|---| Measured | Counted, hashed, executed, or observed directly in this package | Audit rows, source anchors, tests, manifest, archive hash | Derived | Reproducible arithmetic from measured inputs or a cited rate card | 4.29% portability, 96.9% context reduction, 96% equal-token savings on both reviewed rate cards | External | Reported by another source under its own workload | OpenAI's directional lean-prompt study | Projected | A falsifiable hypothesis awaiting repository runs | 5–15% relative score uplift on eligible tasks | The machine-readable ledger is docs/claim-evidence.csv /RealAhmedOsama/Luna-Forge/blob/main/docs/claim-evidence.csv . The narrative rules are in . /RealAhmedOsama/Luna-Forge/blob/main/docs/EVIDENCE LEDGER.md docs/EVIDENCE LEDGER.md Note The 5–15% range is not a completed benchmark, statistical confidence interval, or promise. It is a pre-benchmark engineering hypothesis with 0.65 judgment confidence . The included protocol is designed to prove, narrow, or reject it. The reviewed repository presents these files as captured system prompts. Luna Forge treats them as unverified third-party snapshots , not authenticated vendor documentation. Integrity anchors prove which snapshot was reviewed; they do not prove the repository's provenance claim. | Snapshot | Lines | Portable / distilled | Portable share | Token-volume basis | Integrity anchor | |---|---|---|---|---|---| | Claude Fable 5 | 3,736 | 135 | 3.61% | ~57,832 | SHA-256 d9943f…3b375 | | GPT-5.6 Sol Extra High | 2,662 | 141 | 5.30% | ~28,616 | SHA-256 ac9bb8…90d98 | | Kimi K3 | 611 | 25 | 4.09% | ~8,800–9,011 | Git blob SHA-1 d54346…001b | Combined | 7,009 | 301 | 4.29% | ~95,248–95,459 | Three anchors | | Disposition | Lines | Meaning | |---|---|---| KEEP PRINCIPLE | 46 | Directly portable execution principle | DISTILL | 255 | Useful idea rewritten into a host-neutral rule | DROP SCHEMA | 3,627 | Tool or function schema supplied by another host | DROP PRODUCT | 1,118 | Product, UI, path, or vendor-specific behavior | DEFER HOST POLICY | 178 | Safety or policy that must remain host-owned | DROP EXAMPLE | 155 | Large example corpus that duplicates a principle | DROP RUNTIME | 37 | Identity, date, classifier, or runtime plumbing | DROP PERSONAL | 5 | Embedded personal metadata | IGNORE | 1,588 | Blank or structural lines retained for complete physical coverage | Total | 7,009 | 100% decision coverage | Luna Forge excludes: - foreign tool and connector schemas; - vendor identity, model marketing, product UI behavior, and runtime metadata; - host-specific safety and policy that Codex already owns; - personal context and unrelated user metadata; - artifact-rendering tags, sandbox paths, app-specific protocols, and hidden frontend contracts; - examples that consume context without adding a new execution rule; - any instruction that assumes a capability not proven in the current environment. This is why Luna Forge is an original workflow rather than a prompt compilation. Kimi added the most value where execution control intersects context efficiency. Only 25 of 611 lines 4.09% were retained or distilled. | Kimi-derived mechanism | Luna Forge implementation | Failure mode targeted | |---|---|---| | Milestone progress on long work | Short updates only at material findings, decisions, blockers, or completed phases | Agent appears to disappear or floods the user with commands | | Outcome over machinery | Final report leads with changed behavior, proof, risk, and commit state | Tool transcript hides whether acceptance was actually met | | Immediate correction | Contradicted hypotheses are replaced as soon as evidence disproves them | Patch is forced to match stale issue wording | | Time-stability gate | Version-sensitive assumptions are verified from current authoritative sources | Stale SDK, API, pricing, policy, or role claims | | Capability availability gate | A tool, path, API, file, or permission must be observed before use | Invented capabilities and invalid commands | | Progressive skill loading | Domain references load at the stage that needs them | Context pollution from irrelevant guidance | | Active-context authority | Task contract and repository evidence outrank passive background material | Irrelevant context steers implementation | Kimi-specific tool registries, plugin paths, rendering tags, sandbox conventions, website-delivery rules, and 476 schema lines were rejected. See docs/KIMI REVIEW.md /RealAhmedOsama/Luna-Forge/blob/main/docs/KIMI REVIEW.md for the focused analysis. The two earlier snapshots are anchored by SHA-256. Kimi is anchored by the exact Git blob SHA-1 returned by GitHub. The first two snapshots additionally have 6,398 exact per-line content sha12 fingerprints in . Kimi is not redistributed and is therefore verified at whole-blob level; each Kimi decision locator still binds the blob anchor, line number, rule, and action. /RealAhmedOsama/Luna-Forge/blob/main/docs/source-line-fingerprints-first-two.csv docs/source-line-fingerprints-first-two.csv Every source line from 1 through the source's final physical line receives one deterministic decision row. The validator rejects: - missing or duplicated lines; - unexpected source names or line ranges; - unknown actions or rules; - changed snapshot anchors; - changed decision locators; - totals that do not reproduce the published statistics. The audit CSV intentionally contains no prompt text . Its schema is: source line rule id action reason snapshot integrity type snapshot integrity decision locator sha12 A source idea survives only when it: - improves bounded repository execution; - remains valid in Codex without a foreign host feature; - does not duplicate Codex host policy or repository instructions; - can be represented compactly as a behavior, gate, or proof requirement; - maps to an observable implementation location; - can be evaluated through repository evidence or run behavior. docs/principle-traceability.csv /RealAhmedOsama/Luna-Forge/blob/main/docs/principle-traceability.csv maps all 301 retained or distilled lines into the Skill, agent, references, validator, or eval suite. Validation requires exact one-time coverage: no missing portable line and no double counting. Static validation can prove package consistency, audit coverage, cost arithmetic, and release integrity. It cannot prove a quality uplift. That requires paired repository executions under controlled conditions, so quality claims are gated by docs/BENCHMARK PROTOCOL.md /RealAhmedOsama/Luna-Forge/blob/main/docs/BENCHMARK PROTOCOL.md . Read the complete method in docs/METHODOLOGY.md /RealAhmedOsama/Luna-Forge/blob/main/docs/METHODOLOGY.md and the full report in . /RealAhmedOsama/Luna-Forge/blob/main/docs/REVIEW REPORT.md docs/REVIEW REPORT.md A Skill is the smallest correct authoring unit because Luna Forge is one reusable workflow with no required MCP server. Codex Skills also support progressive disclosure: the workflow is loaded when selected, while task-specific references can remain out of context until needed. The custom agent binds the workflow to GPT-5.6 Luna with a bounded worker profile: name = "luna worker" model = "gpt-5.6-luna" model reasoning effort = "high" sandbox mode = "workspace-write" A Plugin may become useful later for broad distribution or bundled connectors. It is unnecessary overhead for the current package. php flowchart TD U Engineering request -- S{Bounded, owned, observable?} S -- |No| E Recon, split, or escalate S -- |Yes| C Micro-contract C -- A Authority and approval boundaries A -- G Capability and freshness gates G -- R Targeted repository evidence R -- B Baseline or reproduction B -- H{Hypothesis supported?} H -- |No| X Correct assumption immediately X -- R H -- |Yes| P Smallest defensible patch P -- V Focused tests, compiler, analyzers V -- D Adversarial diff review D -- Q{Acceptance proven?} Q -- |Bounded correction| P Q -- |Scope or authority blocker| E Q -- |Yes| K Focused local commit K -- O Outcome-first evidence report O -- N Never push automatically Before editing, the worker establishes: Goal Authorized scope Acceptance evidence Non-goals Approval boundaries Risk flags Validation commands Delivery requirement That contract becomes the task's routing, scope, and completion boundary. Contract → Verify authority → Verify capability and freshness → Gather causal evidence → Establish baseline → Patch minimally → Prove with deterministic checks → Review the full diff adversarially → Commit locally when authorized → Report outcome and evidence Only the relevant domain file is loaded: | Reference | Loaded when | |---|---| task-routing.md | The task is broad, ambiguous, cross-cutting, or delegated | engineering-loop.md | A non-trivial implementation or bug fix begins | context-budget.md | The repository, files, logs, or tool output are large | research-verification.md | External facts are current, unfamiliar, or version-sensitive | dotnet-10.md | C or .NET work is in scope | risk-and-rollback.md | Database, auth, tenancy, billing, concurrency, production, secrets, or destructive work is involved | git-delivery.md | Staging, commit, or handoff is required | output-contracts.md | Final delivery or review findings are prepared | Luna Forge does not attempt to manufacture model capability. It reallocates a smaller model's attention away from avoidable failure modes and toward repository truth. | Mechanism | Failure targeted | Observable metric | |---|---|---| | Suitability gate | Luna starts work that requires unresolved frontier reasoning | Correct recon or escalation rate | | Micro-contract | Missing acceptance, scope, non-goals, or approvals | Contract compliance | | Capability gate | Invented tools, paths, APIs, or permissions | Invalid-capability attempt rate | | Freshness gate | Stale external assumptions | Authoritative-source evidence rate | | Evidence before editing | Symptom patch or wrong ownership theory | Reproduction and causal-proof score | | Immediate correction | Persistence after the premise is disproved | Disproven-premise persistence rate | | Smallest defensible patch | Unrelated cleanup and regression surface | Changed files, diff size, scope violations | | Validation ladder | Confident but unsupported completion | Independent acceptance rate | | Adversarial diff review | Missed edge cases or accidental changes | Post-run reviewer findings | | One-worker rule | Duplicate scans and coordination overhead | Repeated reads and total tokens | | Progressive references | Irrelevant prompt mass | Activated context and input tokens | | Outcome-first delivery | Process narration hides proof | Human-review minutes and evidence completeness | The worker gets one bounded correction pass. Repeated retries without new evidence trigger escalation instead of unbounded token spend. | Layer | Approximate tokens | Loading behavior | |---|---|---| Core SKILL.md | 2,288 | Loaded when invoked | luna worker instructions | 676 | Loaded for the custom agent | Activated core | 2,964 | Normal baseline | | Eight references | 6,177 total | Loaded only when relevant | All content worst case | 9,141 | Unrealistic upper bound | Source estimate: 95,248–95,459 tokens Activated core: ~2,964 tokens Core reduction = 1 - activated core / source estimate = 96.89–96.90% All references loaded: ~9,141 tokens Worst-case reduction: 90.40–90.42% These are context-volume results, not quality results. Their practical purpose is to let Luna reach code, tests, and task evidence before irrelevant instruction mass consumes its budget. OpenAI separately reports that leaner prompts improved a sample of internal coding-agent evaluation scores by roughly 10–15% , while reducing total tokens by 41–66% and cost by 33–67% . OpenAI describes those results as directional and workload-dependent. Luna Forge uses them as external support for the design direction, not as proof of its own uplift. API dollars and Codex credits are separate pricing surfaces and are never mixed into one percentage. Official per-million-token rates verified on 2026-08-05: | Model | Input | Cached input | Output | |---|---|---|---| | GPT-5.6 Sol | $5.00 | $0.50 | $30.00 | | GPT-5.6 Terra | $2.00 | $0.20 | $12.00 | | GPT-5.6 Luna | $0.20 | $0.02 | $1.20 | Every Luna category is 0.04 × Sol. Equal-token saving = 1 - 0.04 = 0.96 = 96% Verified below-threshold example: 100,000 input tokens + 10,000 output tokens Sol: $0.50 + $0.30 = $0.800 Luna: $0.02 + $0.012 = $0.032 Saving: $0.768 = 96% For API requests with more than 272K input tokens, OpenAI applies 2× input and 1.5× output pricing to the full request. Cache writes are billed at 1.25× the uncached input rate. The calculator models both rules; separately metered tools remain additional costs. Verified long-context example: 1,000,000 input tokens + 100,000 output tokens Sol: $5.00 × 2 + $3.00 × 1.5 = $14.50 Luna: $0.20 × 2 + $0.12 × 1.5 = $0.58 Saving: $13.92 = 96% Official per-million-token credit rates verified on 2026-08-05: | Model | Input | Cached input | Output | |---|---|---|---| | GPT-5.6 Sol | 125 | 12.5 | 750 | | GPT-5.6 Terra | 50 | 5 | 300 | | GPT-5.6 Luna | 5 | 0.5 | 30 | Every Luna category is also 0.04 × Sol. Equal-token saving = 1 - 0.04 = 0.96 = 96% Verified example: 100,000 input tokens + 10,000 output tokens Sol: 12.5 + 7.5 = 20.0 credits Luna: 0.5 + 0.3 = 0.8 credits Saving: 19.2 credits = 96% The current Codex rate card states that Codex does not charge for cache writes. Fast mode consumes credits at a higher rate where supported. At a 4% equal-token ratio, Luna may consume up to five times the weighted token usage of the Sol reference and still retain an 80% reduction: 0.04 × 5.00 = 0.20 The five-times figure is a maximum cost envelope, not a recommended token target. Parent-agent usage, retries, separately metered tools, fast-mode multipliers, and repair work consume part of that headroom. successful task cost = total cost of every attempt / independently accepted tasks A cheap failed run followed by an expensive repair is not a saving. The benchmark therefore records acceptance, retries, human-review time, and repair cost—not token price alone. Run the unit-tested calculator: python scripts/benchmark cost.py --basis api-usd --compare python scripts/benchmark cost.py --basis codex-credits --compare See docs/cost-model.md /RealAhmedOsama/Luna-Forge/blob/main/docs/cost-model.md for formulas and caveats. Warning Rate cards, plan limits, long-context multipliers, fast modes, and tool charges can change. Recheck official pricing before making a financial commitment. Projected relative score uplift: 5–15% Confidence: 0.65 judgment confidence Comparator: Unstructured GPT-5.6 Luna Eligible work: Clear, bounded, observable repository tasks Status: Projected, not measured - OpenAI's external directional result reports roughly 10–15% higher coding-agent eval scores after prompt simplification. - Luna Forge removes approximately 96.9% of the studied source context from the normal activated core. - It adds explicit routing, capability, freshness, evidence, scope, verification, and correction controls. - Those controls also add overhead, especially on trivial tasks. - Luna remains a cost-optimized model; the workflow cannot erase its limits on ambiguity and long-horizon synthesis. The lower bound discounts for overhead and transfer uncertainty. The upper bound is anchored to the external directional result rather than extrapolating beyond it. The range must be reduced or rejected when representative paired runs show: - no material composite-score improvement; - lower independent acceptance; - higher hard-failure or scope-violation rates; - more tokens without a reliability gain; - human-review overhead that erases the cost advantage; - repeated Sol repair after Luna execution; - task categories that consistently require unresolved architecture or product judgment. The target is not the highest raw score at any price. It is a higher rate of accepted work per cost unit while preserving correctness and scope. The package ships 21 controlled cases across routing, implementation, .NET, tenancy, concurrency, approvals, research, Git, verification, capability, freshness, epistemic correction, communication, and cost control. | Configuration | Model | Skill | Purpose | |---|---|---|---| luna-baseline | GPT-5.6 Luna | None | Unstructured Luna comparator | luna-forge | GPT-5.6 Luna | Explicit $luna-forge | Treatment | sol-reference | GPT-5.6 Sol | None | Frontier reference, not the primary uplift comparator | - independent acceptance rate; - hard-failure rate; - median composite score; - median successful-task API cost and Codex-credit cost; - scope violations and unauthorized writes; - retries and repair attempts; - input, cached-input, and output tokens; - human-review minutes; - latency and diff size. The benchmark protocol requires at least: 30 paired runs across at least 10 representative repository cases;- at least three runs per case and configuration for the initial gate; - identical repository snapshots and controlled permissions; - hidden independent acceptance checks; - no material increase in hard failures; - no material correctness regression; - lower successful-task cost; - publication of the raw scorecard before aggregate claims. For a durable public claim, docs/BENCHMARK PROTOCOL.md /RealAhmedOsama/Luna-Forge/blob/main/docs/BENCHMARK PROTOCOL.md recommends at least five paired runs per task and configuration. Run the analyzer: python scripts/analyze evals.py evals/scorecard.csv The analyzer reports configuration summaries and deterministic bootstrap intervals for median score. The packaged scorecard is intentionally empty; it returns benchmark complete: false rather than inventing a result. Full benchmark assets: docs/BENCHMARK PROTOCOL.md evals/cases.yaml evals/rubric.md evals/acceptance-gates.md evals/runbook.md evals/scorecard.csv | Claim | Confidence | Basis | Main uncertainty | |---|---|---|---| | Package structure and release integrity | 0.99 | Validator, unit tests, manifest, deterministic rebuild, extraction recheck | Undiscovered validator defect | | API equal-token saving is 96% at reviewed rates | 0.99 | Published rates + exact arithmetic + unit tests | Future rate, long-context, cache-write, or tool-charge changes | | Codex-credit equal-token saving is 96% at reviewed rates | 0.99 | Published rates + exact arithmetic + unit tests | Future rate, fast-mode, or plan-specific changes | | One decision exists for every 7,009 reviewed line | 0.99 | Audit CSV, range checks, action totals | Source provenance, not row coverage | | First-two per-line fingerprints cover 6,398 lines | 0.99 | Fingerprint CSV + exact validator coverage | Kimi has only whole-blob anchoring | | Semantic portability classification is reasonable | 0.90 | Rule map, rationales, traceability, review | Human judgment | | Source context is ~95,248–95,459 tokens | 0.92 | Transparent character and size heuristic | Not measured with the model tokenizer | | Activated core is ~2,964 tokens | 0.98 | Character heuristic over exact package files | Tokenizer variance | | Luna Forge improves eligible-task score by 5–15% | 0.65 | Mechanism analysis + external directional evidence | No completed repository benchmark | | Luna Forge beats Sol or Fable on every task | 0.00 | Unsupported and explicitly prohibited | Model capability differences | These confidence values are engineering judgments, not statistical intervals or Bayesian posteriors. - A current Codex release with Agent Skills and custom-agent support. - Python 3.11 or newer. - No third-party Python packages. python -m unittest discover -s tests -v python scripts/validate.py python scripts/install.py --scope user --dry-run python scripts/install.py --scope user Installed paths: ~/.agents/skills/luna-forge/ ~/.codex/agents/luna-worker.toml python scripts/install.py \ --scope project \ --project-root /absolute/path/to/repository \ --dry-run python scripts/install.py \ --scope project \ --project-root /absolute/path/to/repository The installer validates first, treats identical files as a no-op, refuses conflicting files by default, and creates timestamped backups before an explicitly authorized --force replacement. It does not edit ~/.codex/config.toml , delete unrelated files, commit, or push. See INSTALL.md /RealAhmedOsama/Luna-Forge/blob/main/INSTALL.md or use as a self-contained Codex task. /RealAhmedOsama/Luna-Forge/blob/main/CODEX INSTALL PROMPT.md CODEX INSTALL PROMPT.md $luna-forge Goal: Fix cancellation propagation in the campaign dispatch path. Authorized scope: - src/Campaigns - related unit and integration tests only Acceptance evidence: - Add a focused regression test. - Prove the test fails against the baseline when feasible. - The regression test and relevant build pass after the fix. - The final diff contains no unrelated changes. Non-goals: - No public API redesign. - No package changes. - No schema or production configuration changes. Delivery: Create one focused local Git commit after validation. Never push automatically. Resolve only the architecture or requirement ambiguity that Luna should not own. Then delegate one complete bounded task capsule to luna worker. Do not duplicate the worker's repository scan. After it returns, inspect the critical claims, final diff, and acceptance evidence. Never push automatically.