{"name": "react", "version": "0.1.0", "hash": "sha256:619a3248e30b9f8473b74450bd3d33db9c8887ddb9618e378fe3025b70c3e49f", "files": {"ABSORB_REPORT.md": "# Absorb report: react\n\n- **Source:** https://github.com/facebook/react at `edae846a9a17`\n- **Licence:** MIT\n- **Project names searched for:** facebook_react, react\n\n## What was absorbed\n\n| Piece | Kind | Class | Project names | Project paths |\n|---|---|---|---|---|\n| extract-errors | skill | mixed | react ×1 |  |\n| feature-flags | skill | mixed | react ×3 | packages/shared/ReactFeatureFlags.js, packages/shared/forks/ReactFeatureFlags.www.js, packages/shared/forks/ReactFeatureFlags.native-fb.js, packages/shared/forks/ReactFeatureFlags.test-renderer.js |\n| fix | skill | mechanics |  |  |\n| flags | skill | mixed | react ×1 |  |\n| flow | skill | mixed | react ×3 |  |\n| test | skill | mixed | react ×2 |  |\n| verify | skill | mixed | react ×1 |  |\n| SessionStart | hook | mechanics |  |  |\n| permission rules | permissions | mechanics |  |  |\n\n## Needs review before sharing\n\nThese pieces mention the project by name or lean on its files. Move those facts into configuration, or keep the piece out of a shared starter.\n\n- **extract-errors** (skill): names react\n- **feature-flags** (skill): names react; paths packages/shared/ReactFeatureFlags.js, packages/shared/forks/ReactFeatureFlags.www.js, packages/shared/forks/ReactFeatureFlags.native-fb.js, packages/shared/forks/ReactFeatureFlags.test-renderer.js\n- **flags** (skill): names react\n- **flow** (skill): names react\n- **test** (skill): names react\n- **verify** (skill): names react\n- **SessionStart**: uses `.claude/instructions.md`, which is not in the harness\n\n## Not absorbed\n\n- instruction files (CLAUDE.md): they describe the project, so they stay with it. Pass --with-instructions to absorb them for review\n- `.claude/instructions.md` (1 file(s)): this version of absorb does not read it, so it stays with the project\n\n## Self-test\n\n7 generated case(s) in `selftest/cases.yaml`.\n1 hook(s) were absorbed. A hook that guards something is only proven once a case shows it blocking: add `block` and `allow` cases for each, then run `baudrier selftest`.\n\n## Warnings\n\n- the SessionStart hook uses `.claude/instructions.md`, which is not in the harness: it will do nothing where that file is missing\n", "ATTRIBUTION.md": "# Attribution: react\n\nThis harness was absorbed from https://github.com/facebook/react at commit `edae846a9a17442c00429f2b15375afbfa0376c9` on 2026-11-26 with `baudrier absorb`.\n\n- **Licence:** MIT. Licence and notice files kept unchanged in this folder: `LICENSE`.\n- **Credit:** every file listed below is the work of the source repository's authors. Files were copied unchanged, except that hook commands name their folder as `${HARNESS_HOOKS}` and slash commands were wrapped as skills.\n\n## Absorbed files\n\n- `skills/extract-errors/SKILL.md` (skill)\n- `skills/feature-flags/SKILL.md` (skill)\n- `skills/fix/SKILL.md` (skill)\n- `skills/flags/SKILL.md` (skill)\n- `skills/flow/SKILL.md` (skill)\n- `skills/test/SKILL.md` (skill)\n- `skills/verify/SKILL.md` (skill)\n", "LICENSE": "MIT License\n\nCopyright (c) Meta Platforms, Inc. and affiliates.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", "harness.yaml": "$schema: https://harnessprotocol.io/schema/v1/harness.schema.json\nversion: '1'\nkind: profile\nmetadata:\n  name: react\n  description: 'How the React repository runs its agents: deny rules that keep them\n    on the right package manager, and skills for tests, Flow, feature flags and fixes.'\n  version: 0.1.0\n  license: MIT\nskills:\n- name: extract-errors\n  source: ./skills/extract-errors\n- name: feature-flags\n  source: ./skills/feature-flags\n- name: fix\n  source: ./skills/fix\n- name: flags\n  source: ./skills/flags\n- name: flow\n  source: ./skills/flow\n- name: test\n  source: ./skills/test\n- name: verify\n  source: ./skills/verify\nx-hooks:\n  runtime: claude-code\n  handlers:\n  - event: SessionStart\n    command: if [[ \"$PWD\" != */compiler* ]]; then cat .claude/instructions.md 2>/dev/null\n      || true; fi\npermissions:\n  tools:\n    allow:\n    - Skill(extract-errors)\n    - Skill(feature-flags)\n    - Skill(fix)\n    - Skill(flags)\n    - Skill(flow)\n    - Skill(test)\n    - Skill(verify)\n    - Bash(yarn test:*)\n    - Bash(yarn test-www:*)\n    - Bash(yarn test-classic:*)\n    - Bash(yarn test-stable:*)\n    - Bash(yarn linc:*)\n    - Bash(yarn lint:*)\n    - Bash(yarn flow:*)\n    - Bash(yarn prettier:*)\n    - Bash(yarn build:*)\n    - Bash(yarn extract-errors:*)\n    - Bash(yarn flags:*)\n    deny:\n    - Bash(yarn download-build:*)\n    - Bash(yarn download-build-for-head:*)\n    - Bash(npm:*)\n    - Bash(pnpm:*)\n    - Bash(bun:*)\n    - Bash(npx:*)\nx-origin:\n  repository: https://github.com/facebook/react\n  commit: edae846a9a17442c00429f2b15375afbfa0376c9\n  license: MIT\n  license_basis: detected\n  license_files:\n  - LICENSE\n  absorbed_at: '2026-11-26'\nx-selftest: file://./selftest/cases.yaml\n", "selftest/cases.yaml": "# Self-test cases: each must give the same decision in every runtime the harness\n# is converted to. Run them with `baudrier selftest`.\ncases:\n- name: deny rule Bash(yarn download-build:*) blocks `yarn download-build`\n  event: PreToolUse\n  tool: Bash\n  input:\n    command: yarn download-build\n  expect: block\n- name: deny rule Bash(yarn download-build-for-head:*) blocks `yarn download-build-for-head`\n  event: PreToolUse\n  tool: Bash\n  input:\n    command: yarn download-build-for-head\n  expect: block\n- name: deny rule Bash(npm:*) blocks `npm`\n  event: PreToolUse\n  tool: Bash\n  input:\n    command: npm\n  expect: block\n- name: deny rule Bash(pnpm:*) blocks `pnpm`\n  event: PreToolUse\n  tool: Bash\n  input:\n    command: pnpm\n  expect: block\n- name: deny rule Bash(bun:*) blocks `bun`\n  event: PreToolUse\n  tool: Bash\n  input:\n    command: bun\n  expect: block\n- name: deny rule Bash(npx:*) blocks `npx`\n  event: PreToolUse\n  tool: Bash\n  input:\n    command: npx\n  expect: block\n- name: a harmless command is allowed\n  event: PreToolUse\n  tool: Bash\n  input:\n    command: echo ok\n  expect: allow\n", "skills/extract-errors/SKILL.md": "---\nname: extract-errors\ndescription: Use when adding new error messages to React, or seeing \"unknown error code\" warnings.\n---\n\n# Extract Error Codes\n\n## Instructions\n\n1. Run `yarn extract-errors`\n2. Report if any new errors need codes assigned\n3. Check if error codes are up to date\n", "skills/feature-flags/SKILL.md": "---\nname: feature-flags\ndescription: Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.\n---\n\n# React Feature Flags\n\n## Flag Files\n\n| File | Purpose |\n|------|---------|\n| `packages/shared/ReactFeatureFlags.js` | Default flags (canary), `__EXPERIMENTAL__` overrides |\n| `packages/shared/forks/ReactFeatureFlags.www.js` | www channel, `__VARIANT__` overrides |\n| `packages/shared/forks/ReactFeatureFlags.native-fb.js` | React Native, `__VARIANT__` overrides |\n| `packages/shared/forks/ReactFeatureFlags.test-renderer.js` | Test renderer |\n\n## Gating Tests\n\n### `@gate` pragma (test-level)\n\nUse when the feature is completely unavailable without the flag:\n\n```javascript\n// @gate enableViewTransition\nit('supports view transitions', () => {\n  // This test only runs when enableViewTransition is true\n  // and is SKIPPED (not failed) when false\n});\n```\n\n### `gate()` inline (assertion-level)\n\nUse when the feature exists but behavior differs based on flag:\n\n```javascript\nit('renders component', async () => {\n  await act(() => root.render(<App />));\n\n  if (gate(flags => flags.enableNewBehavior)) {\n    expect(container.textContent).toBe('new output');\n  } else {\n    expect(container.textContent).toBe('legacy output');\n  }\n});\n```\n\n## Adding a New Flag\n\n1. Add to `ReactFeatureFlags.js` with default value\n2. Add to each fork file (`*.www.js`, `*.native-fb.js`, etc.)\n3. If it should vary in www/RN, set to `__VARIANT__` in the fork file\n4. Gate tests with `@gate flagName` or inline `gate()`\n\n## Checking Flag States\n\nUse `/flags` to view states across channels. See the `flags` skill for full command options.\n\n## `__VARIANT__` Flags (GKs)\n\nFlags set to `__VARIANT__` simulate gatekeepers - tested twice (true and false):\n\n```bash\n/test www <pattern>              # __VARIANT__ = true\n/test www variant false <pattern> # __VARIANT__ = false\n```\n\n## Debugging Channel-Specific Failures\n\n1. Run `/flags --diff <channel1> <channel2>` to compare values\n2. Check `@gate` conditions - test may be gated to specific channels\n3. Run `/test <channel> <pattern>` to isolate the failure\n4. Verify flag exists in all fork files if newly added\n\n## Common Mistakes\n\n- **Forgetting both variants** - Always test `www` AND `www variant false` for `__VARIANT__` flags\n- **Using @gate for behavior differences** - Use inline `gate()` if both paths should run\n- **Missing fork files** - New flags must be added to ALL fork files, not just the main one\n- **Wrong gate syntax** - It's `gate(flags => flags.name)`, not `gate('name')`\n", "skills/fix/SKILL.md": "---\nname: fix\ndescription: Use when you have lint errors, formatting issues, or before committing code to ensure it passes CI.\n---\n\n# Fix Lint and Formatting\n\n## Instructions\n\n1. Run `yarn prettier` to fix formatting\n2. Run `yarn linc` to check for remaining lint issues\n3. Report any remaining manual fixes needed\n\n## Common Mistakes\n\n- **Running prettier on wrong files** - `yarn prettier` only formats changed files\n- **Ignoring linc errors** - These will fail CI, fix them before committing\n", "skills/flags/SKILL.md": "---\nname: flags\ndescription: Use when you need to check feature flag states, compare channels, or debug why a feature behaves differently across release channels.\n---\n\n# Feature Flags\n\nArguments:\n- $ARGUMENTS: Optional flags\n\n## Options\n\n| Option | Purpose |\n|--------|---------|\n| (none) | Show all flags across all channels |\n| `--diff <ch1> <ch2>` | Compare flags between channels |\n| `--cleanup` | Show flags grouped by cleanup status |\n| `--csv` | Output in CSV format |\n\n## Channels\n\n- `www`, `www-modern` - Meta internal\n- `canary`, `next`, `experimental` - OSS channels\n- `rn`, `rn-fb`, `rn-next` - React Native\n\n## Legend\n\n✅ enabled, ❌ disabled, 🧪 `__VARIANT__`, 📊 profiling-only\n\n## Instructions\n\n1. Run `yarn flags $ARGUMENTS`\n2. Explain the output to the user\n3. For --diff, highlight meaningful differences\n\n## Common Mistakes\n\n- **Forgetting `__VARIANT__` flags** - These are tested both ways in www; check both variants\n- **Comparing wrong channels** - Use `--diff` to see exact differences\n", "skills/flow/SKILL.md": "---\nname: flow\ndescription: Use when you need to run Flow type checking, or when seeing Flow type errors in React code.\n---\n\n# Flow Type Checking\n\nArguments:\n- $ARGUMENTS: Renderer to check (default: dom-node)\n\n## Renderers\n\n| Renderer | When to Use |\n|----------|-------------|\n| `dom-node` | Default, recommended for most changes |\n| `dom-browser` | Browser-specific DOM code |\n| `native` | React Native |\n| `fabric` | React Native Fabric |\n\n## Instructions\n\n1. Run `yarn flow $ARGUMENTS` (use `dom-node` if no argument)\n2. Report type errors with file locations\n3. For comprehensive checking (slow), use `yarn flow-ci`\n\n## Common Mistakes\n\n- **Running without a renderer** - Always specify or use default `dom-node`\n- **Ignoring suppressions** - Check if `$FlowFixMe` comments are masking real issues\n- **Missing type imports** - Ensure types are imported from the correct package\n", "skills/test/SKILL.md": "---\nname: test\ndescription: Use when you need to run tests for React core. Supports source, www, stable, and experimental channels.\n---\n\nRun tests for the React codebase.\n\nArguments:\n- $ARGUMENTS: Channel, flags, and test pattern\n\nUsage Examples:\n- `/test ReactFiberHooks` - Run with source channel (default)\n- `/test experimental ReactFiberHooks` - Run with experimental channel\n- `/test www ReactFiberHooks` - Run with www-modern channel\n- `/test www variant false ReactFiberHooks` - Test __VARIANT__=false\n- `/test stable ReactFiberHooks` - Run with stable channel\n- `/test classic ReactFiberHooks` - Run with www-classic channel\n- `/test watch ReactFiberHooks` - Run in watch mode (TDD)\n\nRelease Channels:\n- `(default)` - Source/canary channel, uses ReactFeatureFlags.js defaults\n- `experimental` - Source/experimental channel with __EXPERIMENTAL__ flags = true\n- `www` - www-modern channel with __VARIANT__ flags = true\n- `www variant false` - www channel with __VARIANT__ flags = false\n- `stable` - What ships to npm\n- `classic` - Legacy www-classic (rarely needed)\n\nInstructions:\n1. Parse channel from arguments (default: source)\n2. Map to yarn command:\n   - (default) → `yarn test --silent --no-watchman <pattern>`\n   - experimental → `yarn test -r=experimental --silent --no-watchman <pattern>`\n   - stable → `yarn test-stable --silent --no-watchman <pattern>`\n   - classic → `yarn test-classic --silent --no-watchman <pattern>`\n   - www → `yarn test-www --silent --no-watchman <pattern>`\n   - www variant false → `yarn test-www --variant=false --silent --no-watchman <pattern>`\n3. Report test results and any failures\n\nHard Rules:\n1. **Use --silent to see failures** - This limits the test output to only failures.\n2. **Use --no-watchman** - This is a common failure in sandboxing.\n\nCommon Mistakes:\n- **Running without a pattern** - Runs ALL tests, very slow. Always specify a pattern.\n- **Forgetting both www variants** - Test `www` AND `www variant false` for `__VARIANT__` flags.\n- **Test skipped unexpectedly** - Check for `@gate` pragma; see `feature-flags` skill.\n", "skills/verify/SKILL.md": "---\nname: verify\ndescription: Use when you want to validate changes before committing, or when you need to check all React contribution requirements.\n---\n\n# Verification\n\nRun all verification steps.\n\nArguments:\n- $ARGUMENTS: Test pattern for the test step\n\n## Instructions\n\nRun these first in sequence:\n1. Run `yarn prettier` - format code (stop if fails)\n2. Run `yarn linc` - lint changed files (stop if fails)\n\nThen run these with subagents in parallel:\n1. Use `/flow` to type check (stop if fails)\n2. Use `/test` to test changes in source (stop if fails)\n3. Use `/test www` to test changes in www (stop if fails)\n\nIf all pass, show success summary. On failure, stop immediately and report the issue with suggested fixes.\n"}}
