spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / agents-md / hooks / files / is-kept-without-instructions.ts
13 lines · 478 BRaw
1import type { InstructionFile } from 'claude-code'
2
3import { DROPPED_KINDS } from './dropped-kinds.js'
4
5/**
6 * Whether `managed-only` keeps an instruction file: the organization's managed
7 * files and the engine's memory stay, the project's and the person's go.
8 *
9 * @param file the instruction file
10 * @returns true for a file `managed-only` leaves in place
11 */
12export const isKeptWithoutInstructions = (file: InstructionFile): boolean =>
13 !DROPPED_KINDS.includes(file.kind)