-
Notifications
You must be signed in to change notification settings - Fork 154
Expand file tree
/
Copy pathAutoBeAnalyze.ts
More file actions
127 lines (99 loc) · 3.68 KB
/
AutoBeAnalyze.ts
File metadata and controls
127 lines (99 loc) · 3.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
import { tags } from "typia";
import { CamelCasePattern } from "../typings/CamelCasePattern";
/**
* AST types for the requirements analysis (Analyze) phase.
*
* Document hierarchy: IFile → IModule (#) → IUnit (##) → ISection (###). IActor
* defines authenticated user types used for auth and access control.
*/
export namespace AutoBeAnalyze {
/** An authenticated user type used for authorization throughout the app. */
export interface IActor {
/** MUST use camelCase. Referenced in schema models and auth decorators. */
name: string & CamelCasePattern & tags.MinLength<1>;
/**
* Permission level:
*
* - "guest": Unauthenticated, limited to public resources.
* - "member": Authenticated with standard access.
* - "admin": Elevated permissions, can manage users and system settings.
*/
kind: "guest" | "member" | "admin";
/** Description of this actor's permissions and capabilities. */
description: string;
}
/** Planning context for a document to be generated. {@link IFile} extends this. */
export interface IFileScenario {
/** Why this document is being created and what comes next. */
reason: string;
/** Filename to generate or overwrite (e.g., "01-service-overview.md"). */
filename: `${string}.md`;
/** Document type (e.g., "requirement", "user-story", "business-model"). */
documentType?: string;
/** Table of contents guiding the document structure. */
outline?: string[];
/**
* Target audience (e.g., "development team", "business stakeholders").
* Defaults to general audience.
*/
audience?: string;
/** Key questions this document should answer. */
keyQuestions?: string[];
/** Level of detail (e.g., "high-level overview", "detailed specification"). */
detailLevel?: string;
/** Related documents this one references or builds upon. */
relatedDocuments?: string[];
/** Must-have constraints the document must satisfy. */
constraints?: string[];
}
/** Planning document structure for the Analyze phase. */
export interface IFile extends IFileScenario {
/** Document title. */
title: string;
/** Executive summary of the document. */
summary: string;
/**
* Markdown file content. Must be a standalone deliverable.
*
* PROHIBITED: questions to the reader, feedback requests, interactive
* elements, or meta-commentary about the writing process.
*/
content: string;
/**
* Hierarchical content structure (Module -> Unit -> Section). Preserves the
* three-level hierarchy that flat markdown loses.
*/
module: IModule;
}
/** Module (# level) in the document hierarchy. */
export interface IModule {
/** Title of the module (# level heading). */
title: string;
/** Purpose of this module within the document. */
purpose: string;
/** Introductory content before any units. */
content: string;
/** Units (## level) within this module. */
units: IUnit[];
}
/** Unit (## level) within a module. */
export interface IUnit {
/** Title of the unit (## level heading). */
title: string;
/** Purpose of this unit within its module. */
purpose: string;
/** Body content before any sections. */
content: string;
/** Semantic keywords for search and categorization. */
keywords: string[];
/** Sections (### level) within this unit. */
sections: ISection[];
}
/** Section (### level) within a unit. */
export interface ISection {
/** Title of the section (### level heading). */
title: string;
/** Detailed content. Use EARS format for requirements, Mermaid for diagrams. */
content: string;
}
}
