Skip to content
Skills Library
AI & agents · Automation

scaffold-init

/scaffold-init

Initialize an AI-native development workspace with spec-driven workflow infrastructure. Use when starting a new project, setting up GitHub Copilot CLI on a codebase for the first time, or when the user says scaffold, initialize, set up AI workflow, onboard this repo, or similar. Do not use for adding an individual skill or config to an already- scaffolded project — that is handled by the relevant tier skill directly.

Repository
jig ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
6
Scripts
5
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What to check before installing
  • 5 scripts in this package. Review them before installing, as Claude may execute them.

Scripts: copilot_hook_adapter.py, copilot_permissions_floor.py, governance.py, scaffold.py, stocktake.py

What it does and when to use it

Initialize an AI-native development workspace with spec-driven workflow infrastructure. Use when starting a new project, setting up GitHub Copilot CLI on a codebase for the first time, or when the user says scaffold, initialize, set up AI workflow, onboard this repo, or similar. Do not use for adding an individual skill or config to an already- scaffolded project — that is handled by the relevant tier skill directly.

Original author description

Initialize an AI-native development workspace with spec-driven workflow infrastructure. Use when starting a new project, setting up GitHub Copilot CLI on a codebase for the first time, or when the user says scaffold, initialize, set up AI workflow, onboard this repo, or similar. Do not use for adding an individual skill or config to an already- scaffolded project — that is handled by the relevant tier skill directly.

How it works

  1. What this skill does
  2. How to use
  3. Codex custom-agent install
  4. Q&A flow (slice 001-05)
  5. Output
  6. Immediate next steps to surface to the user
  7. Constraints
  8. Gotchas
Original SKILL.md headings · 165 lines, 1,240 words
SKILL.md preview
---
name: scaffold-init
description: >
  Initialize an AI-native development workspace with spec-driven workflow infrastructure.
  Use when starting a new project, setting up GitHub Copilot CLI on a codebase for the first
  time, or when the user says scaffold, initialize, set up AI workflow, onboard this
  repo, or similar. Do not use for adding an individual skill or config to an already-
  scaffolded project — that is handled by the relevant tier skill directly.
user-invocable: true
---

> **`$JIG_ROOT`** — jig's runtime root (this plugin's own directory).
> Copilot exposes no plugin-root environment variable, so jig's `SessionStart`
> hook publishes the value into session context. In a fresh shell, resolve it
> with the locator:
> `JIG_ROOT="$(for f in "${COPILOT_HOME:-$HOME/.copilot}"/installed-plugins/*/*/.github/scripts/jig_root.py; do [ -f "$f" ] && python3 "$f" && break; done)"`

> Spec 001 is fully implemented: greenfield-scaffold, doc-content, signal-detection,
> deferred-decisions, and Q&A wizard.
> See [docs/specs/001-scaffold-init/spec.md](../../docs/specs/001-scaffold-init/spec.md).

## What this skill does

Generates an AI-native development workspace by copying templates from
`$JIG_ROOT/templates/` into a target directory. Detects project
signals from the filesystem (LLM/agent files, CI, tests, team), runs an optional
Q&A flow to let the user override those signals, and selects tiers accordingly.
Tier 0 always installs; Tier 1 installs when test signals are present; Tier 2
is offered (not auto-installed) when LLM/agent signals are present.

## How to use

1. Determine the target directory. Default: the current working directory.
   If you're unsure, **ask the user once** before scaffolding.
2. Check if the target already has a `scaffold.json` or `docs/specs/` — if so,
   the project is already scaffolded. **Stop and tell the user** rather than
   overwriting.
3. **Run the Q&A flow** (see next section). Collect answers as flag values.
4. Invoke the wizard with the collected flags:
   ```bash
   python3 "$JIG_ROOT/skills/scaffold-init/scaffold.py" \
     --host copilot \
     [--runtime <name>] [--team|--solo] [--has-ci|--no-ci] \
     [--has-tests|--no-tests] [--plans-ai|--no-ai] \
     [--in-repo] \
     <target-dir>
   ```
   With no machinery flag the wizard scaffolds **plugin mode** — the lean default
   (docs + primer only; jig runs from the installed plugin). Pass `--in-repo`
   only when the sixth question is answered "yes".
5. Read the wizard's stdout summary and report back to the user. List the files
   that were created and the immediate next steps.

## Codex custom-agent install

Codex scaffold mode (`--host codex`) writes project-local custom agents as
TOML under `.codex/agents/`. For Codex plugin users who want jig's role agents
globally available, run the explicit post-install helper:

```bash
python3 "$JIG_ROOT/skills/scaffold-init/scaffold.py" --install-codex-agents
```

The default destination is `~/.codex/agents`. Use
`--codex-agents-dir <dir>` to target a different Codex agents directory.
The helper refuses to overwrite user-owned `jig-*.toml` files unless
`--force` is passed.

## Q&A flow (slice 001-05)

Ask each question in order. **Each question is independently skippable** — if the
user says "skip", "I don't know", "unsure", or similar, do not pass the flag
(the wizard's filesystem inference handles it).

1. **Runtime/language** — "What runtime or language is this project?
   (e.g. Python, TypeScript, Go, Rust, mixed, unsure)"
   → `--runtime <name>` if answered; omit if skipped or unsure.
2. **Team context** — "Solo project or team setting?"
   → `--team` for team, `--solo` for solo; omit if skipped (uses git-author detection).
3. **Existing CI** — "Does the project already have CI configured?"
   → `--has-ci` for yes, `--no-ci` for no; omit if skipped.
4. **Existing tests** — "Does the project already have a test suite?"
   → `--has-tests` for yes, `--no-tests` for no; omit if skipped.
   This affects whether tier-1 (`tdd-loop` and friends) is auto-installed.
5. **LLM/agent work planned** — "Will this project involve LLM or agent development?"
   → `--plans-ai` for yes, `--no-ai` for no; omit if skipped.
   This affects whether tier-2 is offered.
6. **Machinery vs. plugin** — "Will this project ever run jig where the plugin may
   NOT be installed — CI, cloud agents, or teammates without jig? (yes → copy
   jig's machinery into the repo; no → use the installed plugin)"
   → `--in-repo` for yes; **omit for no** (plugin mode is the default). Skipping
   selects plugin mode.
   This is the one architectural question in the flow (it decides repo topology —
   what gets committed), so it won't appear in the project's own docs. Default to
   plugin mode (lean repo, jig updates flow from the plugin); choose `--in-repo`
   only for the self-contained cases above. See
   [ADR-0041](../../docs/decisions/adr-0041-scaffold-defaults-to-plugin-mode.md).

Skipping every question is the legitimate "pure inference" mode (slice 001-03
behavior) — the wizard infers from filesystem signals alone, and defaults to
plugin mode. Do not invent answers when the user is unsure.

## Output

After running, the target directory contains (plugin mode — the default):
- `AGENTS.md` (with Hot Cache section, project name substituted)
- `docs/` (architecture, workflow, conventions, refinement-todo, inbox, memory/, specs/, decisions/)
- `.claude/hooks/` (empty — project-specific gates can go here)
- a **project-scoped permissions file**, on hosts that provide one — seeded with
  the ADR-0013 destructive-command deny floor (`git push --force`,
  `git reset --hard`, `rm -rf`). Hosts with no project-scoped permission surface
  get no such file and no deny floor.
- `.gitignore` (secret-ignore floor)
- `scaffold.json` (install-state manifest; `scaffold_mode: "plugin-only"`)

> For what your project actually received: `scaffold.json` records the mode and
> host, and your host's own settings file (if it has one) carries the deny
> floor. (This section is deliberately host-neutral — it is machine-translated
> per host.)

In plugin mode jig's skills, agents, and hooks stay under the installed plugin
and run from the plugin root — no *machinery* is copied into the repo. The one
exception is the permissions file above: `permissions.deny` lives in the
project's own settings and no plugin mechanism can inject it, so the scaffold
writes it in both modes wherever the host supports it (ADR-0041 OQ1). It
carries **no** hook registrations.

The wizard's stdout summary states the mode and why.

With `--in-repo`, the target additionally gets a self-contained copy of jig's
skills, agents, hook scripts, and templates under the host's runtime directory,
plus the host's own hook-registration file (`scaffold_mode: "in-repo"`). Choose
it only for CI, cloud agents, or teammates without jig installed.

Every scaffolded doc carries `Status: Draft (wizard-generated)`.
`docs/memory/people.md` is NOT created (solo-project default — team detection is slice 001-03).

## Immediate next steps to surface to the user

After scaffolding succeeds, tell the user:
1. Open `AGENTS.md` and fill in the Hot Cache section with project-specific terms.
2. Open `docs/refinement-todo.md` to see what was deferred.
3. Your first spec will be `001` — reserve it with `/jig:spec-workflow new <slug>`
   (or write `docs/specs/001-<feature>/spec.md` by hand). The scaffold seeds only the
   genesis worked example `000-adopt-jig`; there is no placeholder spec to replace.
4. **Note:** `docs/conventions.md` is now gated. Edits require
   `JIG_CONVENTIONS_APPROVED=1` in the shell session.

## Constraints

- Do not invoke this skill in a directory that is already scaffolded (has `scaffold.json`).
- Do not overwrite an existing `AGENTS.md` without explicit user confirmation.
- The wizard is deterministic — do not edit the generated files yourself before
  reporting back. The user should see exactly what `scaffold.py` produced.

## Gotchas

- The spec-gate hook for `docs/conventions.md` activates AFTER scaffold-init completes.
  It cannot gate its own creation (bootstrap paradox — documented and intentional).
- `templates/AGENTS.md.template` is the source template; do NOT use the jig repo's own
  `AGENTS.md` as a template — the two diverge over time.
- Copilot exposes no plugin-root environment variable, so jig's runtime
  root travels in `$JIG_ROOT`, published into session context by
  jig's `SessionStart` hook. In a fresh shell, resolve it with the locator:
  `JIG_ROOT="$(for f in "${COPILOT_HOME:-$HOME/.copilot}"/installed-plugins/*/*/.github/scripts/jig_root.py; do [ -f "$f" ] && python3 "$f" && break; done)"`
- Signal detection (existing CI, LLM/agent files, team size) is deferred to slice 001-03.
  Until then, the wizard installs default tiers regardless of project context.
- **scaffold-init refuses if the target looks spec-driven but lacks `scaffold.json`.**
  Slice 008-05 introduced a second pre-flight check: if ≥3 of the four migrate
  triggers (`docs/specs/`/`docs/slices/`, `docs/decisions/`/`docs/adrs/`,
  `docs/workflow.md`, `docs/architecture.md`) are present without a
  `scaffold.json`, the helper raises `LooksAlreadySpecDrivenError` (exit 2)
  and points at `/jig:migrate`. Pass `--force` to scaffold over the existing
  tree anyway (NOT recommended — overwrites docs).
Files in this package (6)
  • SKILL.md 9 KB
  • copilot_hook_adapter.py 19 KB
  • copilot_permissions_floor.py 8 KB
  • governance.py 19 KB
  • scaffold.py 202 KB
  • stocktake.py 5 KB

Versions

RepositoryScoreLicence
This page · ramboz/jig100MIT
ramboz/jig100MIT
ramboz/jig100MIT

Database snapshot: 13.11.2026 · package version e90c4112fd39 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 3 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90Project Scaffolding
    This skill should be used when the user wants to set up Claude for a project, create a CLAUDE.md file, scaffold the .claude directory, initialize an AI workflow, configure a project for Claude, set up dev intelligence, initialize a new project, or do a new project setup.…
  • 100create-agent
    Create a new MCS2 Copilot Studio agent and PAC-connected local workspace with `pac copilot init`, then optionally add modern instructions, skills, tools, knowledge, and settings before synchronizing it. Use when the user asks to create, scaffold, initialize, or build a Copilot Studio agent.
  • 100ctx-init
    Initialize AGENTS.md + CLAUDE.md + rules/ in a code repo (fresh mode). Triggers on "/ctx-init", "init context", "scaffold AGENTS.md", or when user asks to set up project context in a new repo.
  • 100init
    This skill should be used when a user asks to initialize a repository for AI agents, create or update an AGENTS.md file, scaffold agent instructions for a codebase, or improve existing agent guidance. Triggers include phrases like 'create an AGENTS.md', 'set up agent…
  • 100init
    Initialize a new agentic-usability benchmark pipeline project. Use when setting up a new SDK benchmark, creating a config.json, or starting a new evaluation project.
  • 86adlc-init
    Initialize or refresh an ADLC repository for the GitHub Copilot CLI. Use for first-time ADLC setup, requests to bootstrap `.adlc/`, or repair missing Copilot repository configuration.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.