agentleFS
a16za16z/jolt/.claude/skills/new-objective/SKILL.md

new-objective

Skill1.1k starsChanged 13 days agoApache-2.0View on GitHub

Implement a new objective for jolt-eval

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 7 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use the request, spec, and repository context to identify the measurement and objective kind.

    line 15
  2. Very specific:

    Follow existing patterns exactly — study lloc.rs (static analysis) and binding.rs (performance) as models.

    line 16
  3. Distinctive:

    Always run clippy and tests before reporting success.

    line 17
  4. Very specific:

    Read jolt-eval/src/objective/mod.rs to understand the current enums and dispatch methods.

    line 35
  5. Very specific:

    Read jolt-eval/src/objective/objective_fn/mod.rs to understand objective function registration.

    line 36
  6. Distinctive:

    Read an existing objective for reference:

    line 37
  7. Distinctive:

    Create the objective file following the full template for the objective kind (both in this skill's directory):

    line 44
  8. Very specific:

    Add a pub use line in jolt-eval/src/objective/mod.rs:

    line 74
  9. Distinctive:

    Import the const key:

    line 83
  10. Very specific:

    Add a const ObjectiveFunction:

    line 88
  11. Very specific:

    Add it to ObjectiveFunction::all().

    line 97
  12. Distinctive:

    Run these commands (all must pass):

    line 112
  13. Distinctive:

    If any step fails, fix the issue and re-run.

    line 131

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md
<Purpose> Implement a new objective for the jolt-eval optimization framework. An objective is a measurable quantity that the AI optimizer tries to minimize — either a static analysis metric or a performance benchmark.

This skill handles all the boilerplate: creating the objective struct, implementing the Objective trait, registering it in the appropriate enum, creating a const key, adding an ObjectiveFunction, creating a Criterion benchmark, and running sync_targets.sh. </Purpose>

<Execution_Policy>

  • The user must provide an objective name (lowercase with underscores, e.g. cyclomatic_complexity).
  • Use the request, spec, and repository context to identify the measurement and objective kind; ask only for missing requirements.
  • Follow existing patterns exactly — study lloc.rs (static analysis) and binding.rs (performance) as models.
  • Always run clippy and tests before reporting success. </Execution_Policy>
<Steps>

Phase 1: Gather Requirements

  1. Validate the argument {{ARGUMENTS}}: must be a valid Rust identifier (lowercase alphanumeric + underscores). Reject otherwise.
  2. Gather these requirements from existing context; ask the user only for missing information:
    • What is being measured? (becomes the description())
    • Is this a static analysis objective or a performance objective?
      • Static analysis: computes a metric by analyzing source code (e.g. lines of code, complexity). Overrides collect_measurement(), uses Setup = ().
      • Performance: computes a metric by running/profiling some computation (e.g. wall-clock time, max RSS). Overrides setup() and run().
    • What are the units? (e.g. "lines", "s", "bugs")
    • What files/directories does this objective measure? (used for diff_paths() scoping)

Phase 2: Explore Context

  1. Read jolt-eval/src/objective/mod.rs to understand the current enums and dispatch methods.
  2. Read jolt-eval/src/objective/objective_fn/mod.rs to understand objective function registration.
  3. Read an existing objective for reference:
    • Static analysis: jolt-eval/src/objective/code_quality/lloc.rs
    • Performance: jolt-eval/src/objective/performance/binding.rs
  4. Explore the modular crates that own the measured functionality.

Phase 3: Implement

Create the objective file following the full template for the objective kind (both in this skill's directory):

  • Static analysis: jolt-eval/src/objective/code_quality/<objective_name>.rs — follow references/static-analysis.md
  • Performance: jolt-eval/src/objective/performance/<objective_name>.rs — follow references/performance.md (includes Criterion setup/run guidelines)

Phase 4: Register in Enums

4a. Add module declaration

Edit the appropriate mod.rs:

  • Static analysis: jolt-eval/src/objective/code_quality/mod.rs — add pub mod <objective_name>;
  • Performance: jolt-eval/src/objective/performance/mod.rs — add pub mod <objective_name>;

4b. Add enum variant and dispatch

Edit jolt-eval/src/objective/mod.rs:

For static analysis, add to StaticAnalysisObjective:

  1. New variant in the enum
  2. Entry in all() with the target_dir field
  3. Match arm in every dispatch method: name(), description(), collect_measurement(), collect_measurement_in(), units()

For performance, add to PerformanceObjective:

  1. New variant in the enum
  2. Entry in all()
  3. Match arm in every dispatch method: name(), units(), description()
  4. Match arm in diff_paths() — return the appropriate path slice

4c. Add const re-export

Add a pub use line in jolt-eval/src/objective/mod.rs:

pub use <submodule>::<objective_name>::<UPPER_NAME>;

Phase 5: Add Objective Function

Edit jolt-eval/src/objective/objective_fn/mod.rs:

  1. Import the const key:
    use super::{..., <UPPER_NAME>};
  2. Add a const ObjectiveFunction:
    pub const MINIMIZE_<UPPER_NAME>: ObjectiveFunction = ObjectiveFunction {
        name: "minimize_<objective_name>",
        inputs: &[<UPPER_NAME>],
        evaluate: |m, _| m.get(&<UPPER_NAME>).copied().unwrap_or(f64::INFINITY),
    };
  3. Add it to ObjectiveFunction::all().

Phase 6: Create Criterion Benchmark (performance objectives only)

Performance objectives are measured via Criterion — without the bench file, the optimization harness can't measure them. Create jolt-eval/benches/<objective_name>.rs:

use jolt_eval::objective::performance::<objective_name>::<Name>Objective;
jolt_eval::bench_objective!(<Name>Objective);

Then run ./jolt-eval/sync_targets.sh to update Cargo.toml with the new [[bench]] entry.

Phase 7: Validate

Run these commands (all must pass):

# Format
cargo fmt -q

# Lint
cargo clippy -p jolt-eval -q --all-targets -- -D warnings

# Run tests
cargo nextest run -p jolt-eval --cargo-quiet

# For static analysis objectives, verify the measurement works
cargo run -p jolt-eval --bin measure-objectives -- --objective <objective_name>

# For performance objectives, verify the benchmark compiles
cargo bench -p jolt-eval --bench <objective_name> -- --test

If any step fails, fix the issue and re-run.

</Steps>

Task: Implement a new objective for jolt-eval. {{ARGUMENTS}}

Download now (ZIP)

Trending

More talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 0 mentionsApr 2026: 1 mentionMay 2026: 5 mentionsJun 2026: 0 mentionsJul 2026: 3 mentionsAug 2026: 1 mentionSep 2026: 3 mentionsOct 2026: 3 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the a16z/jolt repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about a16z/jolt

The biggest 5 of 33 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 33

Talked about on GitHub (33 times).

On GitHub · 33

28 more on GitHub
  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. luk-s12/legion★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.