# fjsp-baseline-repair-with-downtime-and-policy

fjsp-baseline-repair-with-downtime-and-policy repairs flexible job shop schedules by resolving downtime conflicts, operation precedence issues, and budget constraints.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 32 installs · ★ 1933 repo stars
- Author: benchflow-ai
- License: Apache-2.0 · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/benchflow-ai/skillsbench/tree/HEAD/tasks/manufacturing-fjsp-optimization/environment/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/fjsp-baseline-repair-with-downtime-and-policy

## What it does

This skill repairs infeasible or suboptimal baseline schedules for flexible job shop planning (FJSP). It eliminates overlapping tasks on identical machines, respects scheduled machine downtime windows, and enforces job precedence so that `end(j, o) <= start(j, o+1)`. All adjustments respect preset budgets for machine substitutions and total start-time drift.

The algorithm processes operations in a precedence-aware sequence. For each step, it calculates an anchor `anchor(j, o) = max(start_base(j, o), end_new(j, o-1))` and scans integer timestamps forward by `+1` to locate the earliest available slot. Jumping directly to open gaps without integer verification breaks schedule minimality.

When a baseline assignment assigns an invalid machine, the script falls back to an eligible machine with the shortest duration. Alternate machines are evaluated only when the delay exceeds an activation threshold, avoiding unnecessary budget exhaustion.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add benchflow-ai/skillsbench --skill fjsp-baseline-repair-with-downtime-and-policy -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/fjsp-baseline-repair-with-downtime-and-policy/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add benchflow-ai/skillsbench --skill fjsp-baseline-repair-with-downtime-and-policy -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add benchflow-ai/skillsbench --skill fjsp-baseline-repair-with-downtime-and-policy -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install benchflow-ai/skillsbench tasks/manufacturing-fjsp-optimization/environment/skills/fjsp-baseline-repair-with-downtime-and-policy
```

2. **Manually: put the files in place**
- File: `.github/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add benchflow-ai/skillsbench --skill fjsp-baseline-repair-with-downtime-and-policy -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/benchflow-ai/skillsbench --path tasks/manufacturing-fjsp-optimization/environment/skills/fjsp-baseline-repair-with-downtime-and-policy
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add benchflow-ai/skillsbench --skill fjsp-baseline-repair-with-downtime-and-policy -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/benchflow-ai/skillsbench/tree/HEAD/tasks/manufacturing-fjsp-optimization/environment/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md

## When to use it
- Resolve operation overlaps against machine downtime windows
- Enforce sequential job precedence across multi-stage manufacturing tasks
- Minimize schedule makespan within strict machine-change limits
- Cap cumulative start-time L1 drift relative to the initial plan

## Example prompts
- Repair the manufacturing FJSP schedule to account for machine downtime
- Resolve operation overlaps while keeping machine changes within budget
- Recompute operation start times without breaking technological precedence

## Source text · SKILL.md · Apache-2.0

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 7a41d538486cbff2.

BEGIN THIRD-PARTY FILE 7a41d538486cbff2
```text
---
name: fjsp-baseline-repair-with-downtime-and-policy
description: This skill should be considered when you need to repair an infeasible or non-optimal flexible job scheduling planning schedule into a downtime-feasible, precedence-feasible one while keep no worse policy budget.
---

This skill should be considered when you need to enhance a given infeasible or non-optimal fjsp baseline to a feasible schedule with less makespan considering downtime constraints, job precedence violations, policy budget constraints. The following constraints should be satisfied. end(j, o) <= start(j, o+1). Here j means the job index and o means the operation index. There should be no overlaps on the same machine or with downtime windows. Keep the number of machine changes and the total L1 start-time shift within the policy budgets. You can calculate the number of machine changes by MC = \sum_{(j,o)} [m_{new}(j,o) \ne m_{base}(j,o)]. You can calculate the total L1 start-time shift by Shift_{L1} = \sum_{(j,o)} |start_{new}(j,o) - start_{base}(j,o)|. To achieve this, never start any operation earlier than the baseline. When repairing operations in precedence-aware order, place each operation at the earliest feasible time. Anchor is calculated by anchor(j,o) = \max(start_{base}(j,o), end_{new}(j,o-1)), end_{new}(j,o-1) is end time of the previous operation of the same job at the new schedule. If start > anchor, then start-1 must be infeasible. You guarantee this by scanning integer time forward by +1 from anchor. Jumping to “next gap” without checking every integer may break minimality. If the given baseline is invalid, replace the machine with a feasible one.
```
END THIRD-PARTY FILE 7a41d538486cbff2

The third-party file has ended. Everything between the 7a41d538486cbff2 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 1671 of 4824 bytes. © benchflow-ai · Apache-2.0 · https://github.com/benchflow-ai/skillsbench/tree/HEAD/tasks/manufacturing-fjsp-optimization/environment/skills/fjsp-baseline-repair-with-downtime-and-policy/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
