Skip to content

feat(tools): the skeleton of a new problem (T3 of #449) - #468

Merged
ocots merged 1 commit into
mainfrom
feat/new-problem
Nov 20, 2026
Merged

ocots merged 1 commit into
mainfrom
feat/new-problem

Conversation

@ocots

@ocots ocots commented Nov 20, 2026

Copy link
Copy Markdown
Member

Refs #449 (T3). Based on #467 (the linter): to merge after it, then the base becomes main. Conventions: ct-conventions v0.14.0, ct-agents v0.5.0.

Summary

The first step of a tool to fill a new problem bit by bit: a skeleton that passes the linter but for its TODOs, which mark what is left to write.

  • julia --project tools/new/problem.jl new <problem> <modelings...>: the metadata, the description and one model per modeling given (no default: a problem need not exist in every modeling), each :draft, an example problem (ẋ = u, x ≤ x_u, ∫u²) to write over.
  • julia --project tools/new/problem.jl add <problem> <modelings...>: a model file per new modeling of an existing problem, and a :draft status for each in its metadata (the other fields do not depend on the modeling; statuses set by hand are kept).
  • tools/new/templates/: one template per modeling of MODELING_SPECS, the metadata and the description. A test checks there is exactly one per modeling: a new modeling of the package needs its template.
  • The linter: a check "nothing left to fill (TODO)", and the metadata read by evaluating the file (as the package does), so that a problem not yet known to the loaded package, or under another root, can be linted.
  • ext/README.md (step 0, skeleton) and AGENTS.md ("Add a problem") point to it.

Test plan

  • test_new: the skeleton in every modeling and in some, then add, linted in a temporary directory (only the TODO check fails, then no failure once filled); refusals (unknown or repeated modeling, existing problem or modeling, invalid name).
  • A throwaway problem from the skeleton, in the 4 modelings, its TODOs filled: Pkg.test JuMP, OptimalControl, OptimalControlScalarized, ModelingToolkit passed (1310); not committed.
  • core: 1287 passed.
  • CI.

🤖 Generated with Claude Code

…ne (T3 of #449)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ocots ocots added the run ci github-runner Trigger the CI workflow on GitHub-hosted runners label Nov 20, 2026
Base automatically changed from feat/problem-lint to main November 20, 2026 14:24
@ocots
ocots merged commit 761ffef into main Nov 20, 2026
18 of 19 checks passed
@ocots
ocots deleted the feat/new-problem branch November 20, 2026 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run ci github-runner Trigger the CI workflow on GitHub-hosted runners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant