II.
LibraryProcess overview
Reference · livelib-process:shared--deterministic-quality-gate
Composable deterministic quality gate component that enforces hard shell-based overview
Composable deterministic quality gate component that enforces hard shell-based pass/fail verification. Unlike soft agent-prompt-based checks, this module runs shell commands with `expectedExitCode: 0`, producing binary deterministic outcomes that cannot be negotiated or reinterpreted by an agent.
Attributes
displayName
Composable deterministic quality gate component that enforces hard shell-based
description
Composable deterministic quality gate component that enforces hard shell-based
pass/fail verification. Unlike soft agent-prompt-based checks, this module runs shell commands
with `expectedExitCode: 0`, producing binary deterministic outcomes that cannot be negotiated
or reinterpreted by an agent.
libraryPath
library/processes/shared/deterministic-quality-gate.js
example
```js
import {
deterministicGateTask,
createDeterministicGate,
executeDeterministicGate,
createCompilationGate,
createTestSuiteGate,
} from './deterministic-quality-gate.js';
// Standalone task usage:
const result = await ctx.task(deterministicGateTask, {
commands: [
{ label: 'TypeScript', command: 'npx tsc --noEmit' },
{ label: 'ESLint', command: 'npx eslint src/' },
],
failFast: true,
});
// Factory usage:
const { gateTask, reportTask } = createDeterministicGate({
name: 'pre-merge',
description: 'Pre-merge quality checks',
commands: [
{ label: 'types', command: 'npx tsc --noEmit' },
{ label: 'lint', command: 'npx eslint src/' },
{ label: 'test', command: 'npx vitest run' },
],
});
const gateResult = await ctx.task(gateTask, {});
const report = await ctx.task(reportTask, { gateOutput: gateResult });
// Convenience usage:
const outcome = await executeDeterministicGate(ctx, {
name: 'ci-gate',
commands: [
{ label: 'compile', command: 'npx tsc --noEmit' },
{ label: 'test', command: 'npx vitest run --reporter=verbose' },
],
});
if (!outcome.passed) {
console.log(`${outcome.failedCount}/${outcome.totalCount} checks failed:`, outcome.summary);
}
// Preset factory usage:
const tsGate = createCompilationGate({ tool: 'tsc', projectDir: 'packages/sdk' });
const testGate = createTestSuiteGate({ runner: 'vitest', projectDir: 'packages/sdk' });
```
usesAgents
- pre-commit
- gate-failure-analyzer
Outgoing edges
lib_applies_to_domain1
- domain:software-engineering·DomainSoftware Engineering
lib_covers_topic2
- topic:test-driven-development·TopicTest-Driven Development
- topic:code-review-best-practices·TopicCode Review Best Practices
lib_implements_workflow3
- workflow:code-review·Workflow
- workflow:feature-development·Workflow
- workflow:release-management·Workflow
lib_involves_role3
- role:backend-engineer·RoleBackend Engineer
- role:tech-lead·RoleTech Lead
- role:qa-engineer·RoleQA Engineer
lib_requires_skill_area2
- skill-area:code-review-practice·SkillAreaCode Review Practice
- skill-area:e2e-testing·SkillAreaEnd-to-End Testing
Incoming edges
None.