/**
 * @internal
 * G1 constitution-read — AGENTS.md exists at the project root.
 *
 * Severity: warn (C2 scope). Fires for execute/verify/ship. A heavier
 * "constitution was actually referenced in recent context" check is deferred
 * to C14.
 */
import { existsSync } from 'node:fs';
import { join } from 'node:path';
import { registerGate } from '../registry.mjs';
const gate = {
    id: 'constitution-read',
    description: 'AGENTS.md exists at the project root (lightweight C14 precursor)',
    severity: 'warn',
    skills: ['execute', 'verify', 'ship'],
    async check(ctx) {
        const path = join(ctx.sharedRoot, 'AGENTS.md');
        if (existsSync(path)) {
            return {
                status: 'pass',
                reason: 'AGENTS.md present',
                inputs: [path],
            };
        }
        return {
            status: 'warn',
            reason: 'AGENTS.md missing at project root',
            inputs: [path],
        };
    },
};
registerGate(gate);
export default gate;
//# sourceMappingURL=constitution-read.mjs.map