fallow 3.30.0 → 3.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -13
- package/capabilities.json +402 -177
- package/issue-registry.json +241 -166
- package/package.json +14 -13
- package/schema.json +89 -6
- package/skills/fallow/SKILL.md +30 -9
- package/skills/fallow/references/cli-reference.md +103 -44
- package/skills/fallow/references/gotchas.md +45 -13
- package/skills/fallow/references/issue-types.md +4 -2
- package/skills/fallow/references/mcp.md +48 -6
- package/skills/fallow/references/node-bindings.md +9 -3
- package/skills/fallow/references/patterns.md +37 -12
- package/skills/fallow-setup/SKILL.md +50 -0
- package/skills/fallow-setup/agents/openai.yaml +4 -0
- package/skills/fallow-setup/references/ci-gate.md +61 -0
- package/skills/fallow-setup/references/configure-and-install.md +56 -0
- package/skills/fallow-setup/references/tooling-detection.md +44 -0
- package/types/output-contract.d.ts +1044 -35
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Configure and install
|
|
2
|
+
|
|
3
|
+
## Recommendation
|
|
4
|
+
|
|
5
|
+
`fallow recommend --format json --quiet` inspects the project and changes nothing. It always exits 0. The envelope has `kind: "recommendation"` and these fields:
|
|
6
|
+
|
|
7
|
+
| Field | Content |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `detected` | The project facts: monorepo layout, TypeScript, test framework, UI framework, Storybook, package manager |
|
|
10
|
+
| `proposed_config` | A safe starting config |
|
|
11
|
+
| `decisions[]` | One entry per setting: `setting`, `value`, `rationale`, `kind`, `question` |
|
|
12
|
+
| `config_schema_command` | The command that prints the config JSON Schema |
|
|
13
|
+
|
|
14
|
+
Use `kind` to decide what to do with each decision:
|
|
15
|
+
|
|
16
|
+
| `kind` | Meaning | Action |
|
|
17
|
+
|---|---|---|
|
|
18
|
+
| `auto` | Fallow decided the value from the detection | Apply it. |
|
|
19
|
+
| `default` | A disclosed default that the user can change | Apply it and tell the user the `rationale` in one line. |
|
|
20
|
+
| `taste` | A subjective choice | Keep the current value, or ask the user. `question` has a `header`, a `question`, and `options[]` with a `label` and a `description`. Show these options as they are. |
|
|
21
|
+
|
|
22
|
+
When the project has no Fallow config, write `proposed_config` plus the answers to `.fallowrc.json`. When the project has a config, change only the settings that the user approved. Validate the keys with `fallow config-schema`. Check the loaded config with `fallow config --format json --quiet`.
|
|
23
|
+
|
|
24
|
+
When the project has a Knip, jscpd, or stylelint config, preview the migration with `fallow migrate --dry-run`. Merge the result with the recommendation. Do not delete the old config in this step. The [parity check](tooling-detection.md#parity-check) decides when it can go.
|
|
25
|
+
|
|
26
|
+
## Dev dependency
|
|
27
|
+
|
|
28
|
+
Install Fallow as a dev dependency with the detected package manager:
|
|
29
|
+
|
|
30
|
+
| Package manager | Command |
|
|
31
|
+
|---|---|
|
|
32
|
+
| npm | `npm install --save-dev fallow` |
|
|
33
|
+
| pnpm | `pnpm add -D fallow` |
|
|
34
|
+
| Yarn | `yarn add -D fallow` |
|
|
35
|
+
| Bun | `bun add -d fallow` |
|
|
36
|
+
|
|
37
|
+
A dev dependency pins one Fallow version for every developer, every agent, and CI. Add scripts to `package.json` when the project uses scripts for its other checks, for example `"fallow": "fallow"` and `"fallow:audit": "fallow audit"`.
|
|
38
|
+
|
|
39
|
+
## Agent wiring
|
|
40
|
+
|
|
41
|
+
`fallow agent install` wires Fallow into Claude Code, Codex, and Cursor in one pass. It detects the harnesses from the project, the home directory, and the session environment. `--harness` selects them explicitly.
|
|
42
|
+
|
|
43
|
+
1. Run `fallow agent install --dry-run --format json --quiet`. Each entry in `steps[]` has a `step`, a `status`, and a `path`. Show the plan to the user.
|
|
44
|
+
2. Run `fallow agent install`. Add `--without <step>` to skip a step. The steps are `guide`, `skill`, `mcp`, and `hooks`.
|
|
45
|
+
3. Run `fallow agent status --format json --quiet`. Check only the entries of the harnesses that step 1 selected. Status also lists the other harnesses (for example `.cursor/mcp.json` in a Claude-only project) as `absent`, which is correct. Act on `next_actions[]` for a `stale` entry of a selected harness.
|
|
46
|
+
|
|
47
|
+
The steps write these items:
|
|
48
|
+
|
|
49
|
+
| Step | Result |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `guide` | The task map in `AGENTS.md`, and an `@AGENTS.md` import in `CLAUDE.md` for Claude Code |
|
|
52
|
+
| `skill` | The Fallow skills under `.claude/skills/` and `.agents/skills/` |
|
|
53
|
+
| `mcp` | The MCP server registration for each harness |
|
|
54
|
+
| `hooks` | The commit and push gate: a PreToolUse hook for Claude Code (`.claude/settings.json`) and for Codex (`.codex/hooks.json`), plus a routing block in `AGENTS.md` |
|
|
55
|
+
|
|
56
|
+
Exit code 2 means that a step is `refused` or `failed`. Read the `reason` of that step. `skill_name_taken` means that a skill with the same name exists and Fallow did not write it. Do not pass `--force` without the approval of the user.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Tooling detection
|
|
2
|
+
|
|
3
|
+
Inspect the repository before you change it. Record what you find, because the later steps use it.
|
|
4
|
+
|
|
5
|
+
## Files to inspect
|
|
6
|
+
|
|
7
|
+
| Tool area | Signals |
|
|
8
|
+
|---|---|
|
|
9
|
+
| Package manager | `packageManager` in `package.json`; the lockfile: `pnpm-lock.yaml`, `yarn.lock`, `bun.lock` or `bun.lockb`, `package-lock.json` |
|
|
10
|
+
| Formatter | `.oxfmtrc.json`, `.prettierrc*`, `prettier.config.*`, `biome.json`, `biome.jsonc`, a `format` script in `package.json` |
|
|
11
|
+
| Linter | `.oxlintrc.json`, `eslint.config.*`, `.eslintrc*`, `biome.json`, a `lint` script in `package.json` |
|
|
12
|
+
| TypeScript | `tsconfig.json`, `tsconfig.*.json`, a `typecheck` script, `typescript` in `devDependencies` |
|
|
13
|
+
| CI | `.github/workflows/*.yml`, `.gitlab-ci.yml`, other CI config files |
|
|
14
|
+
| Existing analysis | `knip.json`, `knip.jsonc`, `.knip.json`, `.knip.jsonc`, a `knip` field in `package.json`; `.jscpd.json`; `.dependency-cruiser.*` |
|
|
15
|
+
| Existing Fallow | `fallow config --path` prints the config path, or exits 3 when there is no config |
|
|
16
|
+
| Agent harnesses | `CLAUDE.md`, `.claude/`, `.codex/`, `.cursor/` (`AGENTS.md` alone does not name a harness) |
|
|
17
|
+
|
|
18
|
+
`fallow doctor --format json --quiet` checks the project root, the config, the workspaces, and the installed dependencies. It changes nothing. Run it when the project layout is not clear.
|
|
19
|
+
|
|
20
|
+
## Responsibility split
|
|
21
|
+
|
|
22
|
+
Give each tool one job. Do not configure two tools for the same job.
|
|
23
|
+
|
|
24
|
+
| Job | Tool | Command |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| Formatting | Oxfmt | `oxfmt` |
|
|
27
|
+
| Local lint rules | Oxlint | `oxlint` |
|
|
28
|
+
| Type correctness | TypeScript | `tsc --noEmit` |
|
|
29
|
+
| Repository and system analysis | Fallow | `fallow`, `fallow audit` |
|
|
30
|
+
|
|
31
|
+
Repository and system analysis covers unused files, exports, types, and dependencies, duplication, complexity, circular dependencies, architecture boundaries, and changed-code risk.
|
|
32
|
+
|
|
33
|
+
For a new project, use the tools in this table. For an existing project, keep the current formatter, linter, and type check. Add Fallow for the system analysis.
|
|
34
|
+
|
|
35
|
+
## Parity check
|
|
36
|
+
|
|
37
|
+
Do this check before you remove a tool whose job overlaps with Fallow, for example Knip, jscpd, or dependency-cruiser. When a step fails, keep the tool and tell the user why.
|
|
38
|
+
|
|
39
|
+
1. Ask the user for approval to replace the tool.
|
|
40
|
+
2. Migrate the config when Fallow can read it: `fallow migrate --dry-run` for Knip, jscpd, and stylelint. When the project has no Fallow config, review the preview, then run `fallow migrate`. When a Fallow config exists, `fallow migrate` refuses to write. Merge the settings from the preview into that config by hand. Fallow cannot migrate a dependency-cruiser config. Write the rules again as `boundaries` in the Fallow config (`fallow config-schema` gives the format).
|
|
41
|
+
3. Run the old tool and Fallow on the same commit. Compare the findings by category.
|
|
42
|
+
4. Explain each finding that only one tool reports. A finding that Fallow does not report must have a reason, for example a framework entry point that Fallow detects.
|
|
43
|
+
5. Move each CI step and each `package.json` script of the old tool to Fallow.
|
|
44
|
+
6. Remove the old tool and its config in a separate commit, so that the user can revert it.
|