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-project-own.ts
11 lines · 408 BRaw
1import type { InstructionFile } from 'claude-code'
2
3/**
4 * Whether an instruction file is one of the project's own (checked in or
5 * private), as opposed to the organization's, the person's or memory.
6 *
7 * @param file the instruction file
8 * @returns true for a `project` or `local` file
9 */
10export const isProjectOwn = (file: InstructionFile): boolean =>
11 file.kind === 'project' || file.kind === 'local'