This guide is written for agents.
Do not run all skills by default. Select only the module needed for the current step.
Every authored problem must satisfy the Problem type in lib/problems.ts.
Required fields:
idtitlecategorycategoryIcondifficultydescriptionexamplesconstraintsstarterCodetestCasesfunctionName
Hard requirements:
idmust be unique and URL-safe.functionNamemust match the function declared instarterCode.testCases[].inputmust follow the exact function argument order.examplesmust be consistent withtestCases.expectedvalues must be JSON-serializable and deterministic.
Use when:
- A new problem idea needs to become a formal function contract.
Inputs:
- Natural language prompt
- Intended pattern/topic
Outputs:
- Final function signature
- Unambiguous acceptance criteria
- Draft
descriptionandconstraints
Done when:
- Ambiguous words are removed ("maybe", "usually", "if needed").
- Edge behavior is explicit (empty input, duplicates, order, overflow rules).
Use when:
testCasesdo not exist yet or are weak.
Inputs:
- Function contract
- Constraints
Outputs:
testCaseslist with at least:- 1 happy path case
- 1 boundary case
- 1 trap case (common wrong approach breaker)
Done when:
- Each test has a clear purpose.
- Cases collectively block common incorrect implementations.
Use when:
- Difficulty (
Easy/Medium/Hard) is uncertain.
Inputs:
- Constraints
- Expected optimal time/space complexity
- Test trap severity
Outputs:
- Final
difficulty
Done when:
- Difficulty and constraints are aligned.
Use when:
- Problem explanation is hard to understand quickly.
Inputs:
- Final function contract
- Key test cases
Outputs:
- 2-3 examples with
input,output, optional shortexplanation
Done when:
- A first-time reader can infer the core rule from examples alone.
- Example values are not contradictory to constraints.
Use when:
- Korean support is required.
Inputs:
- Final English problem text
Outputs:
problemTranslationsentry forko
Done when:
- EN and KO semantics are identical.
- Technical terms are consistent and non-contradictory.
- In the editor test panel, users see each test card values directly.
- Test data should help learning, but should not directly reveal full implementation logic.
- Keep test data JSON-friendly for custom test UX compatibility.
- Start with Module 1 only.
- If tests are missing/weak, call Module 2.
- If difficulty is unclear, call Module 3.
- If readability is weak, call Module 4.
- If KO is required, call Module 5.
Stop after the smallest sufficient set of modules is complete.
- Type contract matches
Problemschema -
functionNamematchesstarterCode -
examplesandtestCasesare consistent - Boundary behavior is explicit
- Difficulty is coherent
- EN/KO are semantically aligned (if KO exists)