---
**status**: APPROVED
**plan_id**: PLAN_EXAMPLE_v1
**timestamp**: 2026-02-04T22:40:00Z
**scope**:
- src/feature.js
- tests/feature.test.js
**governance**: ATLAS-GATE-v1
---
# Plan Metadata
- Plan ID: PLAN_EXAMPLE_v1
- Version: 1.0
- Author: ANTIGRAVITY
- Created: 2026-02-04T22:40:00Z
- Status: APPROVED
- Governance: ATLAS-GATE-v1
# Scope & Constraints
Affected Files:
- [NEW] `src/feature.js`: Core implementation module
- [MODIFY] `tests/feature.test.js`: Feature test suite
Out of Scope:
- Database schema changes
- API contract changes
- Environment variable additions
Constraints:
- All changes MUST be tested before execution
- No breaking changes to existing APIs
- Changes MUST maintain full auditability
# Phase Definitions
## Phase: PHASE_CORE_IMPLEMENTATION
Phase ID: PHASE_CORE_IMPLEMENTATION
Objective: Implement the core feature handler with complete error validation and production-ready code
Allowed operations: Create new files in src/, Modify test files, Run npm test, Execute verification commands
Forbidden operations: Delete production files without rollback plan, Modify package.json dependencies, Execute arbitrary shell commands, Commit to main branch directly
Required intent artifacts: Unit test file with passing tests, Implementation code with inline documentation, Verification output confirming success
Verification commands: npm test tests/feature.test.js
Expected outcomes: feature.js exports featureHandler function, All tests pass, No linting errors, Code passes syntax validation
Failure stop conditions: Any test fails, Syntax errors detected, Feature handler throws on valid input, Code coverage below 80%
# Path Allowlist
- src/
- tests/
- package.json
- README.md
- docs/examples/
# Verification Gates
Verification Gate 1: Code Syntax Validation
- Trigger: After file creation
- Check: node -c src/feature.js
- Required: MUST pass without errors
- Failure action: REJECT and ROLLBACK
Verification Gate 2: Unit Test Execution
- Trigger: After implementation complete
- Check: npm test tests/feature.test.js
- Required: MUST pass without errors
- Failure action: REJECT and ROLLBACK
Verification Gate 3: Integrity Verification
- Trigger: Before approval
- Check: Workspace integrity verification
- Required: MUST report no conflicts
- Failure action: REJECT
# Forbidden Actions
Actions STRICTLY PROHIBITED during plan execution:
- MUST NOT execute arbitrary shell commands
- MUST NOT modify files outside Path Allowlist
- MUST NOT create symlinks or hard links
- MUST NOT access environment variables without explicit allowlist
- MUST NOT make network requests
- MUST NOT fork or spawn child processes
- MUST NOT write to files with absolute paths
- MUST NOT use sudo or privilege escalation
# Rollback / Failure Policy
Automatic Rollback Triggers:
1. Any verification gate fails
2. Syntax error detected in code
3. Test failure occurs
4. Workspace integrity violation
Rollback Procedure:
1. Delete `src/feature.js`
2. Revert `tests/feature.test.js` using `git checkout tests/feature.test.js`
3. Verify workspace matches pre-execution state
4. Generate rollback audit log entry
Recovery Steps:
1. Review failure logs
2. Identify root cause
3. Modify implementation
4. Re-submit plan for approval
## Example Implementation Reference
```javascript
// src/feature.js
export function featureHandler(input) {
if (!input) {
throw new Error("Missing required input");
}
return { success: true, data: input };
}
```
```javascript
// tests/feature.test.js
import { featureHandler } from '../src/feature.js';
import assert from 'assert';
describe('Feature Handler', () => {
it('returns success on valid input', () => {
const result = featureHandler('test');
assert.strictEqual(result.success, true);
});
});
```
[BLAKE3_HASH: 169ec4c03f6a20adfe8b846a38298b38706585e8111a2c4e8306baae75657d88]