# StageResultStore

**Kind:** Class

**Source:** [`atloria-monorepo/packages/doc-automation/src/v2/utils/stage-result-store.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/packages/doc-automation/src/v2/utils/stage-result-store.ts#L31)

## Methods

| Method | Signature | Returns |
|---|---|---|
| `setParseResult` | `setParseResult(result: ParseResult)` | `void` |
| `setChunkResult` | `setChunkResult(result: ChunkResult)` | `void` |
| `setFeatureResult` | `setFeatureResult(result: FeatureResult)` | `void` |
| `setAnalysisResult` | `setAnalysisResult(result: AnalysisResult)` | `void` |
| `setSynthesisResult` | `setSynthesisResult(result: SynthesisResult)` | `void` |
| `setStructureResult` | `setStructureResult(result: StructureResult)` | `void` |
| `setPhaseResult` | `setPhaseResult(result: PhaseResult)` | `void` |
| `setSessionResult` | `setSessionResult(result: SessionResult)` | `void` |
| `setPlanResult` | `setPlanResult(result: PlanResult)` | `void` |
| `setGenerationResult` | `setGenerationResult(result: GenerationResult)` | `void` |
| `setVerificationResult` | `setVerificationResult(result: VerificationResult)` | `void` |
| `setMetaDocResult` | `setMetaDocResult(result: MetaDocumentationResult)` | `void` |
| `setKnowledgeReferenceStore` | `setKnowledgeReferenceStore(store: KnowledgeReferenceStore)` | `void` |
| `getParseResult` | `getParseResult()` | `ParseResult | undefined` |
| `getChunkResult` | `getChunkResult()` | `ChunkResult | undefined` |
| `getFeatureResult` | `getFeatureResult()` | `FeatureResult | undefined` |
| `getAnalysisResult` | `getAnalysisResult()` | `AnalysisResult | undefined` |
| `getSynthesisResult` | `getSynthesisResult()` | `SynthesisResult | undefined` |
| `getStructureResult` | `getStructureResult()` | `StructureResult | undefined` |
| `getPhaseResult` | `getPhaseResult()` | `PhaseResult | undefined` |
| `getSessionResult` | `getSessionResult()` | `SessionResult | undefined` |
| `getPlanResult` | `getPlanResult()` | `PlanResult | undefined` |
| `getGenerationResult` | `getGenerationResult()` | `GenerationResult | undefined` |
| `getVerificationResult` | `getVerificationResult()` | `VerificationResult | undefined` |
| `getMetaDocResult` | `getMetaDocResult()` | `MetaDocumentationResult | undefined` |
| `getKnowledgeReferenceStore` | `getKnowledgeReferenceStore()` | `KnowledgeReferenceStore | undefined` |
| `getKnowledgeReference` | `getKnowledgeReference(category: MetaKnowledgeCategory)` | `MetaCategoryReference | undefined` |
| `getChunkAnalysis` | `getChunkAnalysis(chunkId: string)` | `ChunkAnalysis | undefined` |
| `getChunkAnalyses` | `getChunkAnalyses()` | `ChunkAnalysis[]` |
| `getChunksForFeature` | `getChunksForFeature(featureId: string)` | `string[]` |
| `getFeaturesForChunk` | `getFeaturesForChunk(chunkId: string)` | `string[]` |
| `getChunkById` | `getChunkById(chunkId: string)` | `Chunk | undefined` |
| `getFeatureById` | `getFeatureById(featureId: string)` | `UserFeature | undefined` |
| `getEntitiesForChunk` | `getEntitiesForChunk(chunkId: string)` | `Entity[]` |
| `clear` | `clear()` | `void` |
| `getMemoryEstimate` | `getMemoryEstimate()` | `number` |

## Where it refuses work

- `StageResultStore` stops the work with an early return when `obj === undefined || obj === null`.

## When something fails

- `StageResultStore` handles failure in 1 place: it turns it into a return value in all 1.
