heraspec 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -12
- package/bin/heraspec.js +1296 -75
- package/bin/heraspec.js.map +4 -4
- package/dist/cli/index.d.ts +2 -0
- package/dist/commands/audit.d.ts +37 -0
- package/dist/commands/create.d.ts +11 -0
- package/dist/commands/explore.d.ts +17 -0
- package/dist/commands/helper.d.ts +13 -0
- package/dist/commands/hotfix.d.ts +9 -0
- package/dist/commands/make-code.d.ts +14 -0
- package/dist/commands/make-docs.d.ts +36 -0
- package/dist/commands/make-test.d.ts +60 -0
- package/dist/commands/memory.d.ts +101 -0
- package/dist/commands/pack.d.ts +17 -0
- package/dist/commands/show.d.ts +8 -0
- package/dist/commands/skill.d.ts +8 -0
- package/dist/commands/suggest.d.ts +32 -0
- package/dist/commands/validate.d.ts +8 -0
- package/dist/core/archive.d.ts +14 -0
- package/dist/core/config.d.ts +33 -0
- package/dist/core/init.d.ts +97 -0
- package/dist/core/list.d.ts +7 -0
- package/dist/core/memory/config-advisor.d.ts +30 -0
- package/dist/core/memory/context-config.d.ts +14 -0
- package/dist/core/memory/context-generator.d.ts +19 -0
- package/dist/core/memory/index.d.ts +12 -0
- package/dist/core/memory/memory-schema.d.ts +34 -0
- package/dist/core/memory/memory-search.d.ts +45 -0
- package/dist/core/memory/memory-store.d.ts +71 -0
- package/dist/core/memory/memory-types.d.ts +159 -0
- package/dist/core/memory/memory-vector.d.ts +23 -0
- package/dist/core/parsers/code-parser.d.ts +53 -0
- package/dist/core/parsers/markdown-parser.d.ts +18 -0
- package/dist/core/restore.d.ts +9 -0
- package/dist/core/schemas/base.schema.d.ts +55 -0
- package/dist/core/schemas/change.schema.d.ts +35 -0
- package/dist/core/schemas/index.d.ts +7 -0
- package/dist/core/schemas/spec.schema.d.ts +50 -0
- package/dist/core/skills/index.d.ts +6 -0
- package/dist/core/skills/skill-manager.d.ts +28 -0
- package/dist/core/skills/skill-parser.d.ts +24 -0
- package/dist/core/sync.d.ts +6 -0
- package/dist/core/templates/index.d.ts +10 -0
- package/dist/core/templates/skills/README.md +4 -1
- package/dist/core/templates/skills/perfex-module/code-quality-guidelines/skill.md +130 -0
- package/dist/core/templates/skills/perfex-module/envato-review-guidelines/skill.md +132 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/scripts/scaffold-module.js +151 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/skill.md +204 -110
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/Test_Module.php +79 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/controller-admin.php +71 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/controller-api.php +58 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/deploy.ps1 +97 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/helper.php +97 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/install.php +30 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/model-main.php +94 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/module-main.php +91 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/package.json +30 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/uninstall.php +11 -0
- package/dist/core/templates/skills/perfex-module/module-codebase/templates/webpack.config.js +163 -0
- package/dist/core/templates/skills/perfex-module/skill.md +50 -0
- package/dist/core/templates/skills-template-map.d.ts +29 -0
- package/dist/core/validation/validator.d.ts +26 -0
- package/dist/core/view.d.ts +4 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +155 -35
- package/dist/utils/file-system.d.ts +19 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/task-parser.d.ts +26 -0
- package/package.json +2 -2
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeraSpec Memory Search
|
|
3
|
+
* FTS5-based full-text search with progressive disclosure
|
|
4
|
+
*/
|
|
5
|
+
import type { MemorySearchResult, SummarySearchResult, SearchOptions, TimelineItem } from './memory-types.js';
|
|
6
|
+
import { MemoryStore } from './memory-store.js';
|
|
7
|
+
export declare class MemorySearch {
|
|
8
|
+
private store;
|
|
9
|
+
constructor(store: MemoryStore);
|
|
10
|
+
/**
|
|
11
|
+
* Search observations using FTS5 full-text search
|
|
12
|
+
* Returns compact index results (Layer 1 of progressive disclosure)
|
|
13
|
+
*/
|
|
14
|
+
searchObservations(options: SearchOptions): MemorySearchResult[];
|
|
15
|
+
/**
|
|
16
|
+
* Search session summaries using FTS5
|
|
17
|
+
*/
|
|
18
|
+
searchSummaries(options: SearchOptions): SummarySearchResult[];
|
|
19
|
+
/**
|
|
20
|
+
* Get timeline of observations around a specific point
|
|
21
|
+
*/
|
|
22
|
+
getTimeline(options: {
|
|
23
|
+
anchorId?: number;
|
|
24
|
+
anchorEpoch?: number;
|
|
25
|
+
depthBefore?: number;
|
|
26
|
+
depthAfter?: number;
|
|
27
|
+
project?: string;
|
|
28
|
+
}): TimelineItem[];
|
|
29
|
+
/**
|
|
30
|
+
* Format search results as markdown (compact index view)
|
|
31
|
+
*/
|
|
32
|
+
formatResultsAsIndex(results: MemorySearchResult[], query?: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Format timeline as markdown
|
|
35
|
+
*/
|
|
36
|
+
formatTimeline(items: TimelineItem[]): string;
|
|
37
|
+
/**
|
|
38
|
+
* Sanitize FTS5 query - escape special characters
|
|
39
|
+
*/
|
|
40
|
+
private sanitizeFtsQuery;
|
|
41
|
+
private parseJsonSafe;
|
|
42
|
+
private parseDate;
|
|
43
|
+
private formatTime;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=memory-search.d.ts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Observation, ObservationInput, SessionSummary, SessionSummaryInput, MemoryStatus, ProjectAnalytics, DbHistoryRecord } from './memory-types.js';
|
|
2
|
+
export declare class MemoryStore {
|
|
3
|
+
private db;
|
|
4
|
+
private dbPath;
|
|
5
|
+
private hasChanges;
|
|
6
|
+
constructor(projectPath?: string);
|
|
7
|
+
/**
|
|
8
|
+
* Open database connection, init schema if needed
|
|
9
|
+
*/
|
|
10
|
+
open(): void;
|
|
11
|
+
/**
|
|
12
|
+
* Close database connection
|
|
13
|
+
*/
|
|
14
|
+
close(): void;
|
|
15
|
+
private logDbSizeChange;
|
|
16
|
+
/**
|
|
17
|
+
* Get the raw database reference (for advanced queries)
|
|
18
|
+
*/
|
|
19
|
+
getDb(): any;
|
|
20
|
+
private ensureOpen;
|
|
21
|
+
/**
|
|
22
|
+
* Add a new observation
|
|
23
|
+
*/
|
|
24
|
+
addObservation(input: ObservationInput): Observation;
|
|
25
|
+
/**
|
|
26
|
+
* Get observation by ID
|
|
27
|
+
*/
|
|
28
|
+
getObservationById(id: number): Observation | null;
|
|
29
|
+
/**
|
|
30
|
+
* Get observations by IDs (batch)
|
|
31
|
+
*/
|
|
32
|
+
getObservationsByIds(ids: number[]): Observation[];
|
|
33
|
+
/**
|
|
34
|
+
* Get recent observations for a project
|
|
35
|
+
*/
|
|
36
|
+
getRecentObservations(project?: string, limit?: number): Observation[];
|
|
37
|
+
/**
|
|
38
|
+
* Delete observations older than N days
|
|
39
|
+
*/
|
|
40
|
+
pruneObservations(daysOld: number, project?: string): number;
|
|
41
|
+
/**
|
|
42
|
+
* Add a new session summary
|
|
43
|
+
*/
|
|
44
|
+
addSummary(input: SessionSummaryInput): SessionSummary;
|
|
45
|
+
/**
|
|
46
|
+
* Get summary by ID
|
|
47
|
+
*/
|
|
48
|
+
getSummaryById(id: number): SessionSummary | null;
|
|
49
|
+
/**
|
|
50
|
+
* Get recent summaries for a project
|
|
51
|
+
*/
|
|
52
|
+
getRecentSummaries(project?: string, limit?: number): SessionSummary[];
|
|
53
|
+
/**
|
|
54
|
+
* Get memory status statistics
|
|
55
|
+
*/
|
|
56
|
+
getStatus(project?: string): MemoryStatus;
|
|
57
|
+
/**
|
|
58
|
+
* Get token saving statistics for all known projects in memory
|
|
59
|
+
*/
|
|
60
|
+
getAnalytics(): ProjectAnalytics[];
|
|
61
|
+
/**
|
|
62
|
+
* Get database size history updates
|
|
63
|
+
*/
|
|
64
|
+
getDbHistory(project: string, limit?: number): DbHistoryRecord[];
|
|
65
|
+
private rowToObservation;
|
|
66
|
+
private rowToSummary;
|
|
67
|
+
private parseJsonArray;
|
|
68
|
+
private generateSessionId;
|
|
69
|
+
private detectProjectName;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=memory-store.d.ts.map
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeraSpec Memory Types
|
|
3
|
+
* Interfaces and types for the project memory system
|
|
4
|
+
*/
|
|
5
|
+
export declare const OBSERVATION_TYPES: readonly ["decision", "bugfix", "feature", "refactor", "discovery", "change"];
|
|
6
|
+
export type ObservationType = (typeof OBSERVATION_TYPES)[number];
|
|
7
|
+
export interface Observation {
|
|
8
|
+
id: number;
|
|
9
|
+
sessionId: string;
|
|
10
|
+
project: string;
|
|
11
|
+
type: ObservationType;
|
|
12
|
+
title: string;
|
|
13
|
+
narrative: string;
|
|
14
|
+
concepts: string[];
|
|
15
|
+
filesRead: string[];
|
|
16
|
+
filesModified: string[];
|
|
17
|
+
discoveryTokens: number;
|
|
18
|
+
embedding?: number[];
|
|
19
|
+
createdAt: string;
|
|
20
|
+
createdAtEpoch: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ObservationInput {
|
|
23
|
+
sessionId?: string;
|
|
24
|
+
project?: string;
|
|
25
|
+
type: ObservationType;
|
|
26
|
+
title: string;
|
|
27
|
+
narrative?: string;
|
|
28
|
+
concepts?: string[];
|
|
29
|
+
filesRead?: string[];
|
|
30
|
+
filesModified?: string[];
|
|
31
|
+
discoveryTokens?: number;
|
|
32
|
+
embedding?: number[];
|
|
33
|
+
}
|
|
34
|
+
export interface SessionSummary {
|
|
35
|
+
id: number;
|
|
36
|
+
sessionId: string;
|
|
37
|
+
project: string;
|
|
38
|
+
request: string;
|
|
39
|
+
investigated: string;
|
|
40
|
+
learned: string;
|
|
41
|
+
completed: string;
|
|
42
|
+
nextSteps: string;
|
|
43
|
+
filesRead: string[];
|
|
44
|
+
filesEdited: string[];
|
|
45
|
+
createdAt: string;
|
|
46
|
+
createdAtEpoch: number;
|
|
47
|
+
}
|
|
48
|
+
export interface SessionSummaryInput {
|
|
49
|
+
sessionId?: string;
|
|
50
|
+
project?: string;
|
|
51
|
+
request: string;
|
|
52
|
+
investigated?: string;
|
|
53
|
+
learned?: string;
|
|
54
|
+
completed?: string;
|
|
55
|
+
nextSteps?: string;
|
|
56
|
+
filesRead?: string[];
|
|
57
|
+
filesEdited?: string[];
|
|
58
|
+
}
|
|
59
|
+
export interface Session {
|
|
60
|
+
id: number;
|
|
61
|
+
sessionId: string;
|
|
62
|
+
project: string;
|
|
63
|
+
startedAt: string;
|
|
64
|
+
startedAtEpoch: number;
|
|
65
|
+
completedAt: string | null;
|
|
66
|
+
completedAtEpoch: number | null;
|
|
67
|
+
status: 'active' | 'completed';
|
|
68
|
+
}
|
|
69
|
+
export interface MemorySearchResult {
|
|
70
|
+
id: number;
|
|
71
|
+
type: ObservationType;
|
|
72
|
+
title: string;
|
|
73
|
+
narrative: string;
|
|
74
|
+
concepts: string[];
|
|
75
|
+
filesModified: string[];
|
|
76
|
+
createdAt: string;
|
|
77
|
+
createdAtEpoch: number;
|
|
78
|
+
rank?: number;
|
|
79
|
+
estimatedTokens: number;
|
|
80
|
+
}
|
|
81
|
+
export interface SummarySearchResult {
|
|
82
|
+
id: number;
|
|
83
|
+
sessionId: string;
|
|
84
|
+
request: string;
|
|
85
|
+
completed: string;
|
|
86
|
+
learned: string;
|
|
87
|
+
createdAt: string;
|
|
88
|
+
createdAtEpoch: number;
|
|
89
|
+
rank?: number;
|
|
90
|
+
estimatedTokens: number;
|
|
91
|
+
}
|
|
92
|
+
export interface SearchOptions {
|
|
93
|
+
query?: string;
|
|
94
|
+
type?: ObservationType | ObservationType[];
|
|
95
|
+
concepts?: string[];
|
|
96
|
+
files?: string[];
|
|
97
|
+
dateStart?: string;
|
|
98
|
+
dateEnd?: string;
|
|
99
|
+
project?: string;
|
|
100
|
+
limit?: number;
|
|
101
|
+
offset?: number;
|
|
102
|
+
orderBy?: 'relevance' | 'date_desc' | 'date_asc';
|
|
103
|
+
}
|
|
104
|
+
export interface TimelineItem {
|
|
105
|
+
type: 'observation' | 'summary';
|
|
106
|
+
id: number;
|
|
107
|
+
title: string;
|
|
108
|
+
timestamp: string;
|
|
109
|
+
epoch: number;
|
|
110
|
+
icon: string;
|
|
111
|
+
estimatedTokens: number;
|
|
112
|
+
}
|
|
113
|
+
export interface ContextConfig {
|
|
114
|
+
totalObservationCount: number;
|
|
115
|
+
fullObservationCount: number;
|
|
116
|
+
sessionCount: number;
|
|
117
|
+
observationTypes: Set<string>;
|
|
118
|
+
observationConcepts: Set<string>;
|
|
119
|
+
maxTokens: number;
|
|
120
|
+
showLastSummary: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface MemoryStatus {
|
|
123
|
+
observationCount: number;
|
|
124
|
+
summaryCount: number;
|
|
125
|
+
sessionCount: number;
|
|
126
|
+
oldestObservation: string | null;
|
|
127
|
+
newestObservation: string | null;
|
|
128
|
+
topConcepts: Array<{
|
|
129
|
+
concept: string;
|
|
130
|
+
count: number;
|
|
131
|
+
}>;
|
|
132
|
+
topFiles: Array<{
|
|
133
|
+
file: string;
|
|
134
|
+
count: number;
|
|
135
|
+
}>;
|
|
136
|
+
estimatedTotalTokens: number;
|
|
137
|
+
dbSizeBytes: number;
|
|
138
|
+
}
|
|
139
|
+
export interface DbHistoryRecord {
|
|
140
|
+
id: number;
|
|
141
|
+
project: string;
|
|
142
|
+
dbSizeBytes: number;
|
|
143
|
+
createdAt: string;
|
|
144
|
+
createdAtEpoch: number;
|
|
145
|
+
}
|
|
146
|
+
export interface ProjectAnalytics {
|
|
147
|
+
project: string;
|
|
148
|
+
totalOps: number;
|
|
149
|
+
tokensWithMemory: number;
|
|
150
|
+
tokensWithoutMemory: number;
|
|
151
|
+
savingsTokens: number;
|
|
152
|
+
savingsPercent: number;
|
|
153
|
+
dbSizeBytes: number;
|
|
154
|
+
history?: DbHistoryRecord[];
|
|
155
|
+
}
|
|
156
|
+
export declare const OBSERVATION_TYPE_ICONS: Record<ObservationType, string>;
|
|
157
|
+
export declare const CHARS_PER_TOKEN_ESTIMATE = 4;
|
|
158
|
+
export declare function estimateTokens(text: string | null | undefined): number;
|
|
159
|
+
//# sourceMappingURL=memory-types.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Observation, MemorySearchResult } from './memory-types.js';
|
|
2
|
+
export declare class MemoryVector {
|
|
3
|
+
private static extractor;
|
|
4
|
+
/**
|
|
5
|
+
* Initialize the embedding model.
|
|
6
|
+
* This downloads the model on first run (cached in node_modules or system cache).
|
|
7
|
+
*/
|
|
8
|
+
static initModel(): Promise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Generate an embedding vector for a given text.
|
|
11
|
+
*/
|
|
12
|
+
static generateEmbedding(text: string): Promise<number[]>;
|
|
13
|
+
/**
|
|
14
|
+
* Calculate Cosine Similarity between two vectors.
|
|
15
|
+
* Returns a value between -1 and 1. Higher is more similar.
|
|
16
|
+
*/
|
|
17
|
+
static cosineSimilarity(vecA: number[], vecB: number[]): number;
|
|
18
|
+
/**
|
|
19
|
+
* Search through observations using semantic vector search.
|
|
20
|
+
*/
|
|
21
|
+
static search(query: string, observations: Observation[], limit?: number): Promise<MemorySearchResult[]>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=memory-vector.d.ts.map
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export interface SymbolInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
type: 'function' | 'class' | 'method' | 'interface' | 'type' | 'export' | 'variable' | 'enum';
|
|
4
|
+
signature: string;
|
|
5
|
+
startLine: number;
|
|
6
|
+
endLine: number;
|
|
7
|
+
filePath: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FileOutline {
|
|
10
|
+
filePath: string;
|
|
11
|
+
language: string;
|
|
12
|
+
symbols: SymbolInfo[];
|
|
13
|
+
lineCount: number;
|
|
14
|
+
estimatedTokens: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class CodeParser {
|
|
17
|
+
/**
|
|
18
|
+
* Get structural outline of a file (symbols without full source)
|
|
19
|
+
*/
|
|
20
|
+
static outline(filePath: string): Promise<FileOutline>;
|
|
21
|
+
/**
|
|
22
|
+
* Extract all symbols from file content
|
|
23
|
+
*/
|
|
24
|
+
static extractSymbols(content: string, language: string, filePath: string): SymbolInfo[];
|
|
25
|
+
/**
|
|
26
|
+
* Unfold: extract the full source of a specific symbol
|
|
27
|
+
*/
|
|
28
|
+
static unfold(filePath: string, symbolName: string): Promise<{
|
|
29
|
+
symbol: SymbolInfo | null;
|
|
30
|
+
source: string;
|
|
31
|
+
estimatedTokens: number;
|
|
32
|
+
}>;
|
|
33
|
+
/**
|
|
34
|
+
* Search for symbols across a directory
|
|
35
|
+
*/
|
|
36
|
+
static search(query: string, searchPath: string, maxResults?: number): Promise<Array<{
|
|
37
|
+
symbol: SymbolInfo;
|
|
38
|
+
relevance: number;
|
|
39
|
+
}>>;
|
|
40
|
+
/**
|
|
41
|
+
* Format outline as markdown
|
|
42
|
+
*/
|
|
43
|
+
static formatOutline(outline: FileOutline): string;
|
|
44
|
+
/**
|
|
45
|
+
* Find the end line of a code block (brace/indent matching)
|
|
46
|
+
*/
|
|
47
|
+
private static findEndLine;
|
|
48
|
+
/**
|
|
49
|
+
* Walk directory recursively, calling callback for each file
|
|
50
|
+
*/
|
|
51
|
+
private static walkDir;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=code-parser.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Spec } from '../schemas/index.js';
|
|
2
|
+
export declare class MarkdownParser {
|
|
3
|
+
private lines;
|
|
4
|
+
constructor(content: string);
|
|
5
|
+
protected static normalizeContent(content: string): string;
|
|
6
|
+
parseSpec(name: string): Spec;
|
|
7
|
+
parseDeltaSpec(content: string): {
|
|
8
|
+
added: any[];
|
|
9
|
+
modified: any[];
|
|
10
|
+
removed: any[];
|
|
11
|
+
};
|
|
12
|
+
private parseMeta;
|
|
13
|
+
private parseSections;
|
|
14
|
+
private findSection;
|
|
15
|
+
private parseRequirements;
|
|
16
|
+
private parseDeltaRequirements;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=markdown-parser.d.ts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base schemas for HeraSpec
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export declare const ProjectTypeSchema: z.ZodEnum<{
|
|
6
|
+
"wordpress-plugin": "wordpress-plugin";
|
|
7
|
+
"wordpress-theme": "wordpress-theme";
|
|
8
|
+
"perfex-module": "perfex-module";
|
|
9
|
+
"laravel-package": "laravel-package";
|
|
10
|
+
"node-service": "node-service";
|
|
11
|
+
"generic-webapp": "generic-webapp";
|
|
12
|
+
"backend-api": "backend-api";
|
|
13
|
+
"frontend-app": "frontend-app";
|
|
14
|
+
"multi-stack": "multi-stack";
|
|
15
|
+
}>;
|
|
16
|
+
export declare const SpecMetaSchema: z.ZodOptional<z.ZodObject<{
|
|
17
|
+
projectType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
18
|
+
"wordpress-plugin": "wordpress-plugin";
|
|
19
|
+
"wordpress-theme": "wordpress-theme";
|
|
20
|
+
"perfex-module": "perfex-module";
|
|
21
|
+
"laravel-package": "laravel-package";
|
|
22
|
+
"node-service": "node-service";
|
|
23
|
+
"generic-webapp": "generic-webapp";
|
|
24
|
+
"backend-api": "backend-api";
|
|
25
|
+
"frontend-app": "frontend-app";
|
|
26
|
+
"multi-stack": "multi-stack";
|
|
27
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
28
|
+
"wordpress-plugin": "wordpress-plugin";
|
|
29
|
+
"wordpress-theme": "wordpress-theme";
|
|
30
|
+
"perfex-module": "perfex-module";
|
|
31
|
+
"laravel-package": "laravel-package";
|
|
32
|
+
"node-service": "node-service";
|
|
33
|
+
"generic-webapp": "generic-webapp";
|
|
34
|
+
"backend-api": "backend-api";
|
|
35
|
+
"frontend-app": "frontend-app";
|
|
36
|
+
"multi-stack": "multi-stack";
|
|
37
|
+
}>>]>>;
|
|
38
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
39
|
+
stack: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
export declare const ScenarioSchema: z.ZodObject<{
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
steps: z.ZodArray<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
export declare const RequirementSchema: z.ZodObject<{
|
|
46
|
+
id: z.ZodOptional<z.ZodString>;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
description: z.ZodString;
|
|
49
|
+
scenarios: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
steps: z.ZodArray<z.ZodString>;
|
|
52
|
+
}, z.core.$strip>>>;
|
|
53
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
54
|
+
}, z.core.$strip>;
|
|
55
|
+
//# sourceMappingURL=base.schema.d.ts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeraSpec Change Schema
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export declare const DeltaTypeSchema: z.ZodEnum<{
|
|
6
|
+
ADDED: "ADDED";
|
|
7
|
+
MODIFIED: "MODIFIED";
|
|
8
|
+
REMOVED: "REMOVED";
|
|
9
|
+
}>;
|
|
10
|
+
export declare const DeltaRequirementSchema: z.ZodObject<{
|
|
11
|
+
type: z.ZodEnum<{
|
|
12
|
+
ADDED: "ADDED";
|
|
13
|
+
MODIFIED: "MODIFIED";
|
|
14
|
+
REMOVED: "REMOVED";
|
|
15
|
+
}>;
|
|
16
|
+
requirement: z.ZodObject<{
|
|
17
|
+
id: z.ZodOptional<z.ZodString>;
|
|
18
|
+
name: z.ZodString;
|
|
19
|
+
description: z.ZodString;
|
|
20
|
+
scenarios: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
|
+
name: z.ZodString;
|
|
22
|
+
steps: z.ZodArray<z.ZodString>;
|
|
23
|
+
}, z.core.$strip>>>;
|
|
24
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const ChangeSchema: z.ZodObject<{
|
|
28
|
+
name: z.ZodString;
|
|
29
|
+
proposal: z.ZodString;
|
|
30
|
+
tasks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
+
design: z.ZodOptional<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type Change = z.infer<typeof ChangeSchema>;
|
|
34
|
+
export type DeltaRequirement = z.infer<typeof DeltaRequirementSchema>;
|
|
35
|
+
//# sourceMappingURL=change.schema.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeraSpec Specification Schema
|
|
3
|
+
*/
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
export declare const SpecSchema: z.ZodObject<{
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
meta: z.ZodOptional<z.ZodObject<{
|
|
8
|
+
projectType: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
9
|
+
"wordpress-plugin": "wordpress-plugin";
|
|
10
|
+
"wordpress-theme": "wordpress-theme";
|
|
11
|
+
"perfex-module": "perfex-module";
|
|
12
|
+
"laravel-package": "laravel-package";
|
|
13
|
+
"node-service": "node-service";
|
|
14
|
+
"generic-webapp": "generic-webapp";
|
|
15
|
+
"backend-api": "backend-api";
|
|
16
|
+
"frontend-app": "frontend-app";
|
|
17
|
+
"multi-stack": "multi-stack";
|
|
18
|
+
}>, z.ZodArray<z.ZodEnum<{
|
|
19
|
+
"wordpress-plugin": "wordpress-plugin";
|
|
20
|
+
"wordpress-theme": "wordpress-theme";
|
|
21
|
+
"perfex-module": "perfex-module";
|
|
22
|
+
"laravel-package": "laravel-package";
|
|
23
|
+
"node-service": "node-service";
|
|
24
|
+
"generic-webapp": "generic-webapp";
|
|
25
|
+
"backend-api": "backend-api";
|
|
26
|
+
"frontend-app": "frontend-app";
|
|
27
|
+
"multi-stack": "multi-stack";
|
|
28
|
+
}>>]>>;
|
|
29
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
30
|
+
stack: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
31
|
+
}, z.core.$strip>>;
|
|
32
|
+
overview: z.ZodString;
|
|
33
|
+
requirements: z.ZodArray<z.ZodObject<{
|
|
34
|
+
id: z.ZodOptional<z.ZodString>;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
description: z.ZodString;
|
|
37
|
+
scenarios: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
steps: z.ZodArray<z.ZodString>;
|
|
40
|
+
}, z.core.$strip>>>;
|
|
41
|
+
constraints: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
metadata: z.ZodOptional<z.ZodObject<{
|
|
44
|
+
version: z.ZodDefault<z.ZodString>;
|
|
45
|
+
format: z.ZodLiteral<"heraspec">;
|
|
46
|
+
sourcePath: z.ZodOptional<z.ZodString>;
|
|
47
|
+
}, z.core.$strip>>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type Spec = z.infer<typeof SpecSchema>;
|
|
50
|
+
//# sourceMappingURL=spec.schema.d.ts.map
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SkillInfo } from './skill-parser.js';
|
|
2
|
+
export declare class SkillManager {
|
|
3
|
+
/**
|
|
4
|
+
* Find skill path for a given project type and skill name
|
|
5
|
+
*/
|
|
6
|
+
static findSkillPath(projectType: string, skillName: string, projectPath?: string): Promise<string | null>;
|
|
7
|
+
/**
|
|
8
|
+
* Load skill information
|
|
9
|
+
*/
|
|
10
|
+
static loadSkill(projectType: string, skillName: string, projectPath?: string): Promise<SkillInfo | null>;
|
|
11
|
+
/**
|
|
12
|
+
* List all available skills
|
|
13
|
+
*/
|
|
14
|
+
static listSkills(projectPath?: string): Promise<Array<{
|
|
15
|
+
projectType?: string;
|
|
16
|
+
skillName: string;
|
|
17
|
+
path: string;
|
|
18
|
+
}>>;
|
|
19
|
+
/**
|
|
20
|
+
* Extract skill from task line
|
|
21
|
+
*/
|
|
22
|
+
static extractSkillFromTask(taskLine: string): {
|
|
23
|
+
projectType?: string;
|
|
24
|
+
skill?: string;
|
|
25
|
+
} | null;
|
|
26
|
+
private static listSkillsInDirectory;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=skill-manager.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface SkillInfo {
|
|
2
|
+
name: string;
|
|
3
|
+
purpose: string;
|
|
4
|
+
whenToUse: string[];
|
|
5
|
+
steps: string[];
|
|
6
|
+
inputs: string[];
|
|
7
|
+
outputs: string[];
|
|
8
|
+
toneAndRules: {
|
|
9
|
+
codeStyle?: string;
|
|
10
|
+
namingConventions?: string;
|
|
11
|
+
limitations?: string[];
|
|
12
|
+
};
|
|
13
|
+
templates: string[];
|
|
14
|
+
scripts: string[];
|
|
15
|
+
examples: string[];
|
|
16
|
+
relatedSkills: string[];
|
|
17
|
+
skillPath: string;
|
|
18
|
+
}
|
|
19
|
+
export declare class SkillParser {
|
|
20
|
+
static parseSkill(skillPath: string, skillName: string): SkillInfo;
|
|
21
|
+
private static parseSkillContent;
|
|
22
|
+
private static saveList;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=skill-parser.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HeraSpec Templates
|
|
3
|
+
*/
|
|
4
|
+
export declare class TemplateManager {
|
|
5
|
+
static getProjectTemplate(): string;
|
|
6
|
+
static getAgentsTemplate(): string;
|
|
7
|
+
static getSkillsSection(): string;
|
|
8
|
+
static getConfigTemplate(): string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -28,7 +28,10 @@ skills/
|
|
|
28
28
|
- **`deploy-documentation/`** - Automating deploy instructions.
|
|
29
29
|
- **`code-review/`**, **`debug/`**, **`system-design/`**, **`tech-debt/`**, **`spec-writer/`** - Standard coding lifecycle skills.
|
|
30
30
|
- **`seo-audit/`**, **`campaign-plan/`**, **`content-creation/`**, **`email-sequence/`**, **`sql-queries/`** - Marketing, SEO, and database planning skills.
|
|
31
|
-
- **`perfex-module
|
|
31
|
+
- **`perfex-module/`** - Perfex CRM enterprise module engineering & code quality suite:
|
|
32
|
+
- `perfex-module/module-codebase/` - Clean architecture, MVC, composite indexes, asset fallback, and scaffolding templates.
|
|
33
|
+
- `perfex-module/code-quality-guidelines/` - 10 Core software quality standards: zero inline code, scanner neutrality, concurrency, security.
|
|
34
|
+
- `perfex-module/envato-review-guidelines/` - Marketplace review & static analysis compliance.
|
|
32
35
|
- **`wordpress/ux-element/`** - flatsome UX Builder element development.
|
|
33
36
|
- **`wordpress/plugin-standard/`** - WordPress plugin coding standards.
|
|
34
37
|
- **`wordpress/plugin-check/`** - WordPress Plugin Check tool running and fix guidelines.
|