MCPcopy
hub / github.com/Fission-AI/OpenSpec / writeCompletedChangeArtifacts

Function writeCompletedChangeArtifacts

test/cli-e2e/store-lifecycle.test.ts:105–172  ·  view source on GitHub ↗
(
  changeDir: string,
  capability: string
)

Source from the content-addressed store, hash-verified

103}
104
105async function writeCompletedChangeArtifacts(
106 changeDir: string,
107 capability: string
108): Promise<void> {
109 await fs.writeFile(
110 path.join(changeDir, 'proposal.md'),
111 [
112 '# Proposal',
113 '',
114 '## Why',
115 '',
116 'Prove the standalone store lifecycle end to end.',
117 '',
118 '## What Changes',
119 '',
120 `- Add the ${capability} capability.`,
121 '',
122 '## Capabilities',
123 '',
124 '### New Capabilities',
125 '',
126 `- \`${capability}\`: lifecycle proof capability.`,
127 '',
128 '### Modified Capabilities',
129 '',
130 '(none)',
131 '',
132 '## Impact',
133 '',
134 '- Test-only.',
135 '',
136 ].join('\n'),
137 'utf-8'
138 );
139
140 await fs.mkdir(path.join(changeDir, 'specs', capability), { recursive: true });
141 await fs.writeFile(
142 path.join(changeDir, 'specs', capability, 'spec.md'),
143 [
144 `# ${capability} Spec Delta`,
145 '',
146 '## ADDED Requirements',
147 '',
148 `### Requirement: ${capability} SHALL work`,
149 '',
150 `The system SHALL support ${capability}.`,
151 '',
152 '#### Scenario: It works',
153 '',
154 '- **WHEN** the lifecycle runs',
155 '- **THEN** the capability exists',
156 '',
157 ].join('\n'),
158 'utf-8'
159 );
160
161 await fs.writeFile(
162 path.join(changeDir, 'design.md'),

Callers 1

Calls 1

writeFileMethod · 0.80

Tested by

no test coverage detected