@defai.digital/automatosx 5.6.35 → 5.7.2
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/CHANGELOG.md +142 -0
- package/README.md +44 -2
- package/dist/index.js +1129 -345
- package/examples/agents/.automatosx/abilities/accessibility.md +115 -0
- package/examples/agents/.automatosx/abilities/api-design.md +159 -0
- package/examples/agents/.automatosx/abilities/best-practices.md +102 -0
- package/examples/agents/.automatosx/abilities/caching-strategy.md +165 -0
- package/examples/agents/.automatosx/abilities/ci-cd.md +61 -0
- package/examples/agents/.automatosx/abilities/clean-code.md +398 -0
- package/examples/agents/.automatosx/abilities/code-generation.md +95 -0
- package/examples/agents/.automatosx/abilities/code-review.md +42 -0
- package/examples/agents/.automatosx/abilities/component-architecture.md +112 -0
- package/examples/agents/.automatosx/abilities/content-creation.md +97 -0
- package/examples/agents/.automatosx/abilities/data-modeling.md +171 -0
- package/examples/agents/.automatosx/abilities/data-validation.md +50 -0
- package/examples/agents/.automatosx/abilities/db-modeling.md +158 -0
- package/examples/agents/.automatosx/abilities/debugging.md +43 -0
- package/examples/agents/.automatosx/abilities/dependency-audit.md +60 -0
- package/examples/agents/.automatosx/abilities/design-patterns.md +437 -0
- package/examples/agents/.automatosx/abilities/design-system-implementation.md +126 -0
- package/examples/agents/.automatosx/abilities/documentation.md +54 -0
- package/examples/agents/.automatosx/abilities/error-analysis.md +107 -0
- package/examples/agents/.automatosx/abilities/etl-pipelines.md +44 -0
- package/examples/agents/.automatosx/abilities/feasibility-study.md +20 -0
- package/examples/agents/.automatosx/abilities/general-assistance.md +26 -0
- package/examples/agents/.automatosx/abilities/idea-evaluation.md +21 -0
- package/examples/agents/.automatosx/abilities/infra-as-code.md +57 -0
- package/examples/agents/.automatosx/abilities/job-orchestration.md +44 -0
- package/examples/agents/.automatosx/abilities/literature-review.md +19 -0
- package/examples/agents/.automatosx/abilities/logical-analysis.md +21 -0
- package/examples/agents/.automatosx/abilities/longform-report.md +25 -0
- package/examples/agents/.automatosx/abilities/mathematical-reasoning.md +170 -0
- package/examples/agents/.automatosx/abilities/mission-analysis.md +49 -0
- package/examples/agents/.automatosx/abilities/observability.md +61 -0
- package/examples/agents/.automatosx/abilities/orbital-mechanics.md +50 -0
- package/examples/agents/.automatosx/abilities/our-architecture-decisions.md +180 -0
- package/examples/agents/.automatosx/abilities/our-code-review-checklist.md +149 -0
- package/examples/agents/.automatosx/abilities/our-coding-standards.md +270 -0
- package/examples/agents/.automatosx/abilities/our-project-structure.md +183 -0
- package/examples/agents/.automatosx/abilities/performance-analysis.md +56 -0
- package/examples/agents/.automatosx/abilities/performance.md +80 -0
- package/examples/agents/.automatosx/abilities/problem-solving.md +50 -0
- package/examples/agents/.automatosx/abilities/propulsion-systems.md +50 -0
- package/examples/agents/.automatosx/abilities/quantum-algorithm-design.md +54 -0
- package/examples/agents/.automatosx/abilities/quantum-error-correction.md +56 -0
- package/examples/agents/.automatosx/abilities/quantum-frameworks-transpilation.md +53 -0
- package/examples/agents/.automatosx/abilities/quantum-noise-modeling.md +58 -0
- package/examples/agents/.automatosx/abilities/refactoring.md +223 -0
- package/examples/agents/.automatosx/abilities/release-strategy.md +58 -0
- package/examples/agents/.automatosx/abilities/risk-assessment.md +19 -0
- package/examples/agents/.automatosx/abilities/secrets-policy.md +61 -0
- package/examples/agents/.automatosx/abilities/secure-coding-review.md +51 -0
- package/examples/agents/.automatosx/abilities/security-audit.md +65 -0
- package/examples/agents/.automatosx/abilities/software-architecture.md +394 -0
- package/examples/agents/.automatosx/abilities/solid-principles.md +341 -0
- package/examples/agents/.automatosx/abilities/sql-optimization.md +84 -0
- package/examples/agents/.automatosx/abilities/state-management.md +96 -0
- package/examples/agents/.automatosx/abilities/task-planning.md +65 -0
- package/examples/agents/.automatosx/abilities/technical-writing.md +77 -0
- package/examples/agents/.automatosx/abilities/telemetry-diagnostics.md +51 -0
- package/examples/agents/.automatosx/abilities/testing.md +47 -0
- package/examples/agents/.automatosx/abilities/threat-modeling.md +49 -0
- package/examples/agents/.automatosx/abilities/troubleshooting.md +80 -0
- package/examples/agents/.automatosx/agents/aerospace-scientist.yaml +75 -0
- package/examples/agents/.automatosx/agents/backend.yaml +152 -0
- package/examples/agents/.automatosx/agents/ceo.yaml +63 -0
- package/examples/agents/.automatosx/agents/creative-marketer.yaml +121 -0
- package/examples/agents/.automatosx/agents/cto.yaml +72 -0
- package/examples/agents/.automatosx/agents/data-scientist.yaml +124 -0
- package/examples/agents/.automatosx/agents/data.yaml +77 -0
- package/examples/agents/.automatosx/agents/design.yaml +74 -0
- package/examples/agents/.automatosx/agents/devops.yaml +89 -0
- package/examples/agents/.automatosx/agents/frontend.yaml +139 -0
- package/examples/agents/.automatosx/agents/fullstack.yaml +151 -0
- package/examples/agents/.automatosx/agents/mobile.yaml +161 -0
- package/examples/agents/.automatosx/agents/product.yaml +72 -0
- package/examples/agents/.automatosx/agents/quality.yaml +79 -0
- package/examples/agents/.automatosx/agents/quantum-engineer.yaml +75 -0
- package/examples/agents/.automatosx/agents/researcher.yaml +71 -0
- package/examples/agents/.automatosx/agents/security.yaml +86 -0
- package/examples/agents/.automatosx/agents/stan.yaml +189 -0
- package/examples/agents/.automatosx/agents/writer.yaml +78 -0
- package/examples/agents/.automatosx/teams/business.yaml +56 -0
- package/examples/agents/.automatosx/teams/core.yaml +60 -0
- package/examples/agents/.automatosx/teams/design.yaml +58 -0
- package/examples/agents/.automatosx/teams/engineering.yaml +69 -0
- package/examples/agents/.automatosx/teams/research.yaml +56 -0
- package/examples/agents/.automatosx/templates/analyst.yaml +60 -0
- package/examples/agents/.automatosx/templates/assistant.yaml +48 -0
- package/examples/agents/.automatosx/templates/basic-agent.yaml +28 -0
- package/examples/agents/.automatosx/templates/code-reviewer.yaml +52 -0
- package/examples/agents/.automatosx/templates/debugger.yaml +63 -0
- package/examples/agents/.automatosx/templates/designer.yaml +69 -0
- package/examples/agents/.automatosx/templates/developer.yaml +60 -0
- package/examples/agents/.automatosx/templates/fullstack-developer.yaml +395 -0
- package/examples/agents/.automatosx/templates/qa-specialist.yaml +71 -0
- package/examples/agents/.claude/commands/ax-agent.md +37 -0
- package/examples/agents/.claude/commands/ax-clear.md +22 -0
- package/examples/agents/.claude/commands/ax-init.md +25 -0
- package/examples/agents/.claude/commands/ax-list.md +19 -0
- package/examples/agents/.claude/commands/ax-memory.md +25 -0
- package/examples/agents/.claude/commands/ax-status.md +24 -0
- package/examples/agents/.claude/commands/ax-update.md +28 -0
- package/examples/agents/.claude/mcp/automatosx.json +244 -0
- package/examples/agents/CLAUDE.md +262 -0
- package/package.json +1 -1
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Our Project Structure - AutomatosX v5
|
|
2
|
+
|
|
3
|
+
> AutomatosX project organization and file structure conventions
|
|
4
|
+
|
|
5
|
+
## Directory Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
automatosx/
|
|
9
|
+
├── src/ # TypeScript source code
|
|
10
|
+
│ ├── core/ # Router, PathResolver, MemoryManager, SessionManager
|
|
11
|
+
│ ├── agents/ # ProfileLoader, AbilitiesManager, ContextManager, Executor
|
|
12
|
+
│ ├── providers/ # Claude, Gemini, OpenAI implementations
|
|
13
|
+
│ ├── cli/ # CLI entry point and commands/
|
|
14
|
+
│ ├── types/ # TypeScript type definitions
|
|
15
|
+
│ └── utils/ # Logger, errors, formatters
|
|
16
|
+
│
|
|
17
|
+
├── tests/ # 1,149 tests (100% pass)
|
|
18
|
+
│ ├── unit/ # Core modules, utilities
|
|
19
|
+
│ ├── integration/ # CLI command flows
|
|
20
|
+
│ ├── e2e/ # Complete workflows
|
|
21
|
+
│ └── fixtures/ # Test helpers, mock providers
|
|
22
|
+
│
|
|
23
|
+
├── examples/
|
|
24
|
+
│ ├── agents/ # Example agent profiles (YAML)
|
|
25
|
+
│ ├── abilities/ # Example abilities (Markdown)
|
|
26
|
+
│ └── templates/ # Agent templates (v5.0.0+)
|
|
27
|
+
│
|
|
28
|
+
├── dist/ # Build output (381KB, gitignored)
|
|
29
|
+
│ ├── index.js # Bundled CLI (ESM)
|
|
30
|
+
│ ├── index.js.map
|
|
31
|
+
│ └── index.d.ts
|
|
32
|
+
│
|
|
33
|
+
├── .automatosx/ # User project directory (created by init)
|
|
34
|
+
│ ├── config.json # User configuration
|
|
35
|
+
│ ├── agents/ # User's custom agents
|
|
36
|
+
│ ├── abilities/ # User's custom abilities
|
|
37
|
+
│ ├── memory/ # SQLite database (memory.db)
|
|
38
|
+
│ ├── sessions/ # Session persistence
|
|
39
|
+
│ └── logs/ # Application logs
|
|
40
|
+
│
|
|
41
|
+
├── automatosx/ # Workspace directory (v5.2+)
|
|
42
|
+
│ ├── PRD/ # Planning documents (permanent)
|
|
43
|
+
│ └── tmp/ # Temporary files (auto-cleanup)
|
|
44
|
+
│
|
|
45
|
+
└── tmp/ # Temporary files (gitignored)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Module Import Hierarchy
|
|
49
|
+
|
|
50
|
+
**Dependency flow (imports only from lower layers):**
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
Layer 1: types/ → No dependencies
|
|
54
|
+
Layer 2: utils/ → types/
|
|
55
|
+
Layer 3: core/ → types/, utils/
|
|
56
|
+
Layer 4: providers/ → types/, core/
|
|
57
|
+
Layer 5: agents/ → types/, utils/, core/
|
|
58
|
+
Layer 6: cli/ → All of the above
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Rule:** Higher layers can import from lower layers, never vice versa.
|
|
62
|
+
|
|
63
|
+
## File Naming Conventions
|
|
64
|
+
|
|
65
|
+
**TypeScript files:** `kebab-case.ts`
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
✅ path-resolver.ts, memory-manager.ts, claude-provider.ts
|
|
69
|
+
❌ PathResolver.ts, path_resolver.ts, pathResolver.ts
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Test files:** `{module-name}.test.ts`
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
✅ path-resolver.test.ts, memory-manager.test.ts
|
|
76
|
+
❌ path-resolver.spec.ts, test-path-resolver.ts
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Type files:** `{concept}.ts` (no -types suffix)
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
✅ types/agent.ts, types/provider.ts
|
|
83
|
+
❌ types/agent-types.ts, types/AgentTypes.ts
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
**Configuration files:**
|
|
87
|
+
|
|
88
|
+
- YAML for agents: `examples/agents/backend.yaml`
|
|
89
|
+
- Markdown for abilities: `examples/abilities/code-generation.md`
|
|
90
|
+
- JSON for config: `.automatosx/config.json`
|
|
91
|
+
|
|
92
|
+
## Import Patterns
|
|
93
|
+
|
|
94
|
+
**ESM imports (always use .js extension):**
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
// ✅ Good: Full path with .js
|
|
98
|
+
import { PathResolver } from '../core/path-resolver.js';
|
|
99
|
+
import type { AgentProfile } from '../types/agent.js';
|
|
100
|
+
|
|
101
|
+
// ❌ Bad: Missing .js extension
|
|
102
|
+
import { PathResolver } from '../core/path-resolver';
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Type-only imports:**
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
// ✅ Good: type-only imports (better tree-shaking)
|
|
109
|
+
import type { AgentProfile } from '../types/agent.js';
|
|
110
|
+
import type { Provider } from '../types/provider.js';
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Configuration Hierarchy
|
|
114
|
+
|
|
115
|
+
**Priority order:**
|
|
116
|
+
|
|
117
|
+
1. `.automatosx/config.json` (project-specific, created by `ax init`)
|
|
118
|
+
2. `automatosx.config.json` (project root, manually created)
|
|
119
|
+
3. `~/.automatosx/config.json` (user global)
|
|
120
|
+
4. `DEFAULT_CONFIG` (defaults in `src/types/config.ts`)
|
|
121
|
+
|
|
122
|
+
**Agent profiles search order:**
|
|
123
|
+
|
|
124
|
+
1. `.automatosx/agents/{name}.yaml` (user custom)
|
|
125
|
+
2. `examples/agents/{name}.yaml` (built-in)
|
|
126
|
+
|
|
127
|
+
**Abilities search order:**
|
|
128
|
+
|
|
129
|
+
1. `.automatosx/abilities/{name}.md` (user custom)
|
|
130
|
+
2. `examples/abilities/{name}.md` (built-in)
|
|
131
|
+
|
|
132
|
+
## Build Output
|
|
133
|
+
|
|
134
|
+
**Location:** `dist/`
|
|
135
|
+
|
|
136
|
+
- `index.js` - Bundled CLI (ESM, 381KB)
|
|
137
|
+
- `index.js.map` - Source map
|
|
138
|
+
- `index.d.ts` - Type definitions
|
|
139
|
+
|
|
140
|
+
**Bundle target:** ESM, Node 20+, <250KB target
|
|
141
|
+
|
|
142
|
+
## Workspace Structure (v5.2.0)
|
|
143
|
+
|
|
144
|
+
**Shared workspaces:**
|
|
145
|
+
|
|
146
|
+
- `automatosx/PRD/` - Planning documents, feature designs, proposals (permanent)
|
|
147
|
+
- `automatosx/tmp/` - Test scripts, analysis tools, temporary reports (auto-cleanup)
|
|
148
|
+
|
|
149
|
+
**All agents** have equal read/write access to both directories.
|
|
150
|
+
|
|
151
|
+
**Memory storage:** `.automatosx/memory/memory.db`
|
|
152
|
+
|
|
153
|
+
- SQLite database with FTS5 full-text search
|
|
154
|
+
- < 1ms search performance
|
|
155
|
+
|
|
156
|
+
**Session storage:** `.automatosx/sessions/sessions.json`
|
|
157
|
+
|
|
158
|
+
- JSON-based persistence
|
|
159
|
+
- 100ms debounced saves
|
|
160
|
+
- Automatic cleanup (7+ days old)
|
|
161
|
+
|
|
162
|
+
## Security Boundaries
|
|
163
|
+
|
|
164
|
+
**Allowed reads:**
|
|
165
|
+
|
|
166
|
+
- `{projectRoot}/**/*` (validated by PathResolver)
|
|
167
|
+
|
|
168
|
+
**Allowed writes:**
|
|
169
|
+
|
|
170
|
+
- `automatosx/PRD/**/*` - Planning documents
|
|
171
|
+
- `automatosx/tmp/**/*` - Temporary files
|
|
172
|
+
|
|
173
|
+
**Forbidden:**
|
|
174
|
+
|
|
175
|
+
- Empty paths or current directory (`''`, `'.'`)
|
|
176
|
+
- Path traversal (`../../../etc/passwd`)
|
|
177
|
+
- Symbolic links outside project
|
|
178
|
+
- Absolute paths
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
**Last Updated:** 2025-10-11
|
|
183
|
+
**For:** AutomatosX v5.2+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Performance Analysis Ability
|
|
2
|
+
|
|
3
|
+
Identify and fix performance bottlenecks.
|
|
4
|
+
|
|
5
|
+
## Performance Metrics
|
|
6
|
+
|
|
7
|
+
1. **Response Time**
|
|
8
|
+
- Target: <100ms for API calls
|
|
9
|
+
- Target: <1s for page loads
|
|
10
|
+
- Measure: p50, p95, p99 latencies
|
|
11
|
+
|
|
12
|
+
2. **Throughput**
|
|
13
|
+
- Requests per second
|
|
14
|
+
- Concurrent users supported
|
|
15
|
+
- Resource utilization
|
|
16
|
+
|
|
17
|
+
3. **Resource Usage**
|
|
18
|
+
- CPU: Target <70% average
|
|
19
|
+
- Memory: No leaks, stable usage
|
|
20
|
+
- Disk I/O: Minimize random access
|
|
21
|
+
- Network: Bandwidth optimization
|
|
22
|
+
|
|
23
|
+
## Analysis Process
|
|
24
|
+
|
|
25
|
+
1. **Measure** (establish baseline)
|
|
26
|
+
- Use profilers (Chrome DevTools, Python cProfile)
|
|
27
|
+
- Monitor production metrics
|
|
28
|
+
- Identify slow operations
|
|
29
|
+
|
|
30
|
+
2. **Analyze** (find bottlenecks)
|
|
31
|
+
- Check database queries (N+1 problem)
|
|
32
|
+
- Review algorithm complexity
|
|
33
|
+
- Identify network round trips
|
|
34
|
+
- Check memory allocations
|
|
35
|
+
|
|
36
|
+
3. **Optimize** (targeted improvements)
|
|
37
|
+
- Add caching (Redis, CDN)
|
|
38
|
+
- Optimize database queries (indexes, query optimization)
|
|
39
|
+
- Use async/parallel processing
|
|
40
|
+
- Reduce payload sizes
|
|
41
|
+
|
|
42
|
+
4. **Verify** (measure improvements)
|
|
43
|
+
- Re-run benchmarks
|
|
44
|
+
- Compare before/after
|
|
45
|
+
- Check for regressions
|
|
46
|
+
- Monitor in production
|
|
47
|
+
|
|
48
|
+
## Common Performance Issues
|
|
49
|
+
|
|
50
|
+
- N+1 query problem (ORM)
|
|
51
|
+
- Missing database indexes
|
|
52
|
+
- Synchronous I/O blocking
|
|
53
|
+
- Large payload sizes
|
|
54
|
+
- No caching strategy
|
|
55
|
+
- Memory leaks
|
|
56
|
+
- Inefficient algorithms (O(n²) when O(n) possible)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Frontend Performance Optimization
|
|
2
|
+
|
|
3
|
+
Optimize React applications for speed and efficiency.
|
|
4
|
+
|
|
5
|
+
## Core Web Vitals
|
|
6
|
+
|
|
7
|
+
Target metrics:
|
|
8
|
+
- **LCP** (Largest Contentful Paint): < 2.5s
|
|
9
|
+
- **FID** (First Input Delay): < 100ms
|
|
10
|
+
- **CLS** (Cumulative Layout Shift): < 0.1
|
|
11
|
+
- **FCP** (First Contentful Paint): < 1.8s
|
|
12
|
+
- **TTI** (Time to Interactive): < 3.8s
|
|
13
|
+
|
|
14
|
+
## Optimization Strategies
|
|
15
|
+
|
|
16
|
+
### 1. Code Splitting
|
|
17
|
+
- Use React.lazy() for route-based splitting
|
|
18
|
+
- Split heavy components (charts, editors, modals)
|
|
19
|
+
- Use Suspense with meaningful fallbacks
|
|
20
|
+
- Analyze bundle with webpack-bundle-analyzer
|
|
21
|
+
|
|
22
|
+
### 2. Memoization
|
|
23
|
+
- useMemo() for expensive calculations
|
|
24
|
+
- useCallback() for callbacks passed to child components
|
|
25
|
+
- React.memo() for components that re-render with same props
|
|
26
|
+
- Don't over-memoize (profile first)
|
|
27
|
+
|
|
28
|
+
### 3. Virtualization
|
|
29
|
+
- Use react-window or react-virtualized for long lists (>100 items)
|
|
30
|
+
- Implement infinite scroll for large datasets
|
|
31
|
+
- Lazy load images in viewport
|
|
32
|
+
|
|
33
|
+
### 4. Asset Optimization
|
|
34
|
+
- Compress images (WebP format, use srcset)
|
|
35
|
+
- Lazy load images (loading="lazy")
|
|
36
|
+
- Use CDN for static assets
|
|
37
|
+
- Enable gzip/brotli compression
|
|
38
|
+
- Optimize fonts (font-display: swap, preload critical fonts)
|
|
39
|
+
|
|
40
|
+
### 5. Render Optimization
|
|
41
|
+
- Avoid inline function/object creation in render
|
|
42
|
+
- Use key prop correctly for lists
|
|
43
|
+
- Lift state up sparingly (keep state local when possible)
|
|
44
|
+
- Debounce/throttle expensive operations (search, scroll handlers)
|
|
45
|
+
- Use production build for deployment
|
|
46
|
+
|
|
47
|
+
### 6. Network Optimization
|
|
48
|
+
- Implement caching strategies (Cache-Control headers)
|
|
49
|
+
- Use service workers for offline support
|
|
50
|
+
- Prefetch critical resources
|
|
51
|
+
- Minimize API calls (batch requests)
|
|
52
|
+
- Use GraphQL field selection to fetch only needed data
|
|
53
|
+
|
|
54
|
+
### 7. Bundle Optimization
|
|
55
|
+
- Tree-shake unused code
|
|
56
|
+
- Use dynamic imports for conditional features
|
|
57
|
+
- Remove unused dependencies
|
|
58
|
+
- Use lighter alternatives (date-fns instead of moment)
|
|
59
|
+
- Configure webpack to split vendor bundles
|
|
60
|
+
|
|
61
|
+
## Performance Profiling
|
|
62
|
+
|
|
63
|
+
Tools and techniques:
|
|
64
|
+
- Chrome DevTools Performance tab
|
|
65
|
+
- React DevTools Profiler
|
|
66
|
+
- Lighthouse CI
|
|
67
|
+
- Web Vitals library
|
|
68
|
+
- Bundle analyzer
|
|
69
|
+
|
|
70
|
+
## Quick Checklist
|
|
71
|
+
|
|
72
|
+
Before deploying:
|
|
73
|
+
- [ ] Bundle size analyzed and optimized
|
|
74
|
+
- [ ] Images compressed and lazy loaded
|
|
75
|
+
- [ ] Long lists virtualized
|
|
76
|
+
- [ ] Expensive computations memoized
|
|
77
|
+
- [ ] Route-based code splitting implemented
|
|
78
|
+
- [ ] Core Web Vitals measured and acceptable
|
|
79
|
+
- [ ] Production build tested
|
|
80
|
+
- [ ] Caching strategy configured
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Problem-Solving Ability
|
|
2
|
+
|
|
3
|
+
Systematically approach and solve complex problems.
|
|
4
|
+
|
|
5
|
+
## Problem-Solving Framework
|
|
6
|
+
|
|
7
|
+
1. **Define** the problem
|
|
8
|
+
- State the problem clearly
|
|
9
|
+
- Identify root cause (5 Whys)
|
|
10
|
+
- Separate symptoms from causes
|
|
11
|
+
- Define constraints
|
|
12
|
+
|
|
13
|
+
2. **Analyze** the situation
|
|
14
|
+
- Gather relevant information
|
|
15
|
+
- Identify patterns
|
|
16
|
+
- Consider multiple perspectives
|
|
17
|
+
- List assumptions
|
|
18
|
+
|
|
19
|
+
3. **Generate** solutions
|
|
20
|
+
- Brainstorm alternatives
|
|
21
|
+
- Don't judge initially (divergent thinking)
|
|
22
|
+
- Consider unconventional approaches
|
|
23
|
+
- Document all ideas
|
|
24
|
+
|
|
25
|
+
4. **Evaluate** options
|
|
26
|
+
- List pros and cons
|
|
27
|
+
- Consider trade-offs
|
|
28
|
+
- Assess feasibility
|
|
29
|
+
- Estimate impact
|
|
30
|
+
|
|
31
|
+
5. **Implement** solution
|
|
32
|
+
- Create action plan
|
|
33
|
+
- Start with small experiments
|
|
34
|
+
- Monitor progress
|
|
35
|
+
- Adjust as needed
|
|
36
|
+
|
|
37
|
+
6. **Review** and learn
|
|
38
|
+
- Did it solve the problem?
|
|
39
|
+
- What worked well?
|
|
40
|
+
- What could be improved?
|
|
41
|
+
- Document lessons learned
|
|
42
|
+
|
|
43
|
+
## Techniques
|
|
44
|
+
|
|
45
|
+
- **5 Whys**: Dig deeper by asking "why" repeatedly
|
|
46
|
+
- **First Principles**: Break down to fundamental truths
|
|
47
|
+
- **Rubber Duck Debugging**: Explain problem out loud
|
|
48
|
+
- **Divide and Conquer**: Break into smaller sub-problems
|
|
49
|
+
- **Work Backwards**: Start from desired outcome
|
|
50
|
+
- **Analogies**: Apply solutions from similar domains
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Propulsion Systems
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Engineer and evaluate spacecraft propulsion systems, encompassing chemical and
|
|
6
|
+
electric propulsion performance envelopes, reliability modeling, and
|
|
7
|
+
integration with vehicle architecture and mission requirements.
|
|
8
|
+
|
|
9
|
+
## Core Concepts & Best Practices
|
|
10
|
+
|
|
11
|
+
- **Propulsion Taxonomy**: Compare bipropellant, monopropellant, solid,
|
|
12
|
+
hybrid, electric (Hall, ion, MPD), and advanced concepts (nuclear thermal,
|
|
13
|
+
solar sail).
|
|
14
|
+
- **Performance Metrics**: Calculate specific impulse, thrust-to-weight, mass
|
|
15
|
+
flow, and efficiency; assess throttling capability and response time.
|
|
16
|
+
- **System Integration**: Design feed systems (pressurization, valves,
|
|
17
|
+
regulators), thermal management, and structural interfaces with redundancy.
|
|
18
|
+
- **Reliability Modeling**: Apply fault tree analysis, Weibull statistics, and
|
|
19
|
+
Bayesian updating to predict MTBF and mission success probabilities.
|
|
20
|
+
- **Contamination & Plume Effects**: Model plume impingement, erosion, and
|
|
21
|
+
electromagnetic interference on spacecraft subsystems.
|
|
22
|
+
|
|
23
|
+
## Tools & Methodologies
|
|
24
|
+
|
|
25
|
+
- **Analysis Suites**: Use NASA CEA, RPA, or in-house CFD tools for combustion
|
|
26
|
+
and nozzle performance prediction.
|
|
27
|
+
- **Electric Propulsion Modeling**: Employ Hall thruster simulators, ion optics
|
|
28
|
+
codes, and particle-in-cell (PIC) methods to analyze plasma behavior.
|
|
29
|
+
- **System Sizing**: Develop Excel, Modelica, or Amesim models for propellant
|
|
30
|
+
budget, tank sizing, and pressurization cycles.
|
|
31
|
+
- **Test Campaign Planning**: Define hot-fire, vibration, thermal vacuum, and
|
|
32
|
+
life tests; collect telemetry for model correlation.
|
|
33
|
+
- **Verification & Validation**: Execute acceptance test procedures (ATP) and
|
|
34
|
+
qualification plans while enforcing strict configuration control.
|
|
35
|
+
|
|
36
|
+
## Example Scenario
|
|
37
|
+
|
|
38
|
+
A GEO comsat program selects a hybrid propulsion architecture: chemical
|
|
39
|
+
thrusters for orbit raising and Hall-effect thrusters for station-keeping.
|
|
40
|
+
Engineers use NASA CEA to size bipropellant engines, run PIC simulations to
|
|
41
|
+
verify Hall thruster plume interactions, and apply reliability block diagrams
|
|
42
|
+
to ensure mission lifetime exceeds 15 years with 0.98 probability.
|
|
43
|
+
|
|
44
|
+
## Reference Resources
|
|
45
|
+
|
|
46
|
+
- Sutton & Biblarz, *Rocket Propulsion Elements*, Wiley
|
|
47
|
+
- Humble, Henry & Larson, *Space Propulsion Analysis and Design*, McGraw-Hill
|
|
48
|
+
- Goebel & Katz, *Fundamentals of Electric Propulsion*, JPL/NASA
|
|
49
|
+
- NASA Chemical Equilibrium with Applications (CEA): <https://cearun.grc.nasa.gov>
|
|
50
|
+
- AIAA Propulsion and Energy Forum Proceedings
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Quantum Algorithm Design
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Architect and tailor quantum algorithms such as QAOA, VQE, phase estimation,
|
|
6
|
+
Grover, and Shor to solve optimization, simulation, and search problems while
|
|
7
|
+
balancing gate depth, noise resilience, and classical-quantum workflow
|
|
8
|
+
integration.
|
|
9
|
+
|
|
10
|
+
## Core Concepts & Best Practices
|
|
11
|
+
|
|
12
|
+
- **Problem Mapping**: Encode cost Hamiltonians or oracle functions that capture
|
|
13
|
+
the classical objective while minimizing qubit requirements.
|
|
14
|
+
- **Ansatz Engineering**: Choose hardware-efficient or problem-inspired
|
|
15
|
+
ansätze; analyze expressibility versus trainability to avoid barren plateaus.
|
|
16
|
+
- **Hybrid Loops**: Couple classical optimizers (e.g., SPSA, COBYLA, Adam) with
|
|
17
|
+
quantum evaluations; reuse measurement data with parameter-shift gradients
|
|
18
|
+
where available.
|
|
19
|
+
- **Resource Estimation**: Quantify logical depth, T-count, and qubit footprint
|
|
20
|
+
prior to execution; evaluate circuit cut options for limited hardware.
|
|
21
|
+
- **Error Mitigation**: Integrate zero-noise extrapolation, symmetry
|
|
22
|
+
verification, and probabilistic error cancellation early in algorithm design.
|
|
23
|
+
|
|
24
|
+
## Tools & Methodologies
|
|
25
|
+
|
|
26
|
+
- **Algorithm Templates**: Start from QAOA/VQE scaffolds and customize mixers,
|
|
27
|
+
cost layers, and measurement strategies.
|
|
28
|
+
- **Classical Preprocessing**: Leverage problem reductions, graph
|
|
29
|
+
sparsification, or symmetry analysis to shrink the search space.
|
|
30
|
+
- **Parameter Initialization**: Apply warm-start heuristics (e.g., classical
|
|
31
|
+
solutions, layer-wise training) to accelerate convergence.
|
|
32
|
+
- **Performance Benchmarking**: Run simulators with realistic noise models and
|
|
33
|
+
track expected energy, fidelity, or success probability across layer depths.
|
|
34
|
+
- **Result Verification**: Validate solutions against classical solvers (exact
|
|
35
|
+
or approximate) and quantify quantum advantage via scaling studies.
|
|
36
|
+
|
|
37
|
+
## Example Scenario
|
|
38
|
+
|
|
39
|
+
A logistics team models vehicle routing as a constrained optimization problem.
|
|
40
|
+
By formulating the cost Hamiltonian for QAOA, selecting a tailored mixer that
|
|
41
|
+
respects route feasibility, and combining SPSA with layer-wise parameter
|
|
42
|
+
growth, they achieve improved approximation ratios on a noisy
|
|
43
|
+
intermediate-scale quantum (NISQ) device relative to classical heuristics.
|
|
44
|
+
|
|
45
|
+
## Reference Resources
|
|
46
|
+
|
|
47
|
+
- Farhi et al., “A Quantum Approximate Optimization Algorithm,” arXiv:1411.4028
|
|
48
|
+
- Peruzzo et al., “A Variational Eigenvalue Solver on a Photonic Quantum
|
|
49
|
+
Processor,” *Nature Communications* (2014)
|
|
50
|
+
- Schuld & Killoran, “Quantum Machine Learning in Feature Hilbert Spaces,”
|
|
51
|
+
*PRL* (2019)
|
|
52
|
+
- Nielsen & Chuang, *Quantum Computation and Quantum Information*, Cambridge
|
|
53
|
+
University Press
|
|
54
|
+
- Qiskit Textbook: <https://qiskit.org/textbook>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Quantum Error Correction
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Design and analyze quantum error-correcting codes, including surface codes and
|
|
6
|
+
fault-tolerant logical operations, while applying error mitigation techniques
|
|
7
|
+
to bridge current hardware limitations.
|
|
8
|
+
|
|
9
|
+
## Core Concepts & Best Practices
|
|
10
|
+
|
|
11
|
+
- **Code Families**: Evaluate stabilizer, surface, color, and LDPC codes; match
|
|
12
|
+
code distance and threshold to hardware constraints.
|
|
13
|
+
- **Fault Tolerance**: Implement transversal gates, lattice surgery, and magic
|
|
14
|
+
state distillation while tracking logical error budgets.
|
|
15
|
+
- **Syndrome Extraction**: Optimize measurement circuits to minimize hook
|
|
16
|
+
errors and leakage; schedule parallelism carefully.
|
|
17
|
+
- **Decoding Strategies**: Apply minimum-weight perfect matching, belief
|
|
18
|
+
propagation, or neural decoders; benchmark latency versus accuracy.
|
|
19
|
+
- **Error Mitigation**: Combine post-selection, probabilistic error
|
|
20
|
+
cancellation, and Clifford data regression with error correction for
|
|
21
|
+
near-term devices.
|
|
22
|
+
|
|
23
|
+
## Tools & Methodologies
|
|
24
|
+
|
|
25
|
+
- **Simulation Frameworks**: Use Qiskit Ignis, QEC frameworks, Stim, or LDPC
|
|
26
|
+
simulation libraries to evaluate logical error rates.
|
|
27
|
+
- **Decoder Implementations**: Integrate PyMatching, tensor network decoders,
|
|
28
|
+
or custom FPGA-based solutions for real-time performance.
|
|
29
|
+
- **Threshold Analysis**: Perform Monte Carlo sampling over noise channels
|
|
30
|
+
(Pauli, amplitude damping, biased dephasing) to estimate thresholds.
|
|
31
|
+
- **Logical Circuit Compilation**: Map high-level algorithms onto logical
|
|
32
|
+
qubits, schedule patch moves, and analyze lattice surgery costs.
|
|
33
|
+
- **Cross-Layer Co-Design**: Coordinate hardware calibration teams with QEC
|
|
34
|
+
architects to ensure stabilizer measurements align with physical gate
|
|
35
|
+
capabilities.
|
|
36
|
+
|
|
37
|
+
## Example Scenario
|
|
38
|
+
|
|
39
|
+
A quantum computing platform targets a 10⁻³ logical error rate. Engineers
|
|
40
|
+
select rotated surface codes with distance nine, implement syndrome extraction
|
|
41
|
+
sequences with tailored CNOT ordering, and deploy PyMatching for decoding.
|
|
42
|
+
Post-implementation Monte Carlo runs confirm the logical failure rate meets
|
|
43
|
+
the reliability target under measured device noise.
|
|
44
|
+
|
|
45
|
+
## Reference Resources
|
|
46
|
+
|
|
47
|
+
- Fowler et al., “Surface Codes: Towards Practical Large-Scale Quantum
|
|
48
|
+
Computation,” *PR A* (2012)
|
|
49
|
+
- Dennis et al., “Topological Quantum Memory,” *Journal of Mathematical
|
|
50
|
+
Physics* (2002)
|
|
51
|
+
- Gottesman, “An Introduction to Quantum Error Correction and Fault-Tolerant
|
|
52
|
+
Quantum Computation,” arXiv:0904.2557
|
|
53
|
+
- Stim: <https://github.com/quantumlib/Stim>
|
|
54
|
+
- PyMatching: <https://github.com/Quantum-Computing-UK/pymatching>
|
|
55
|
+
- Terhal, “Quantum Error Correction for Quantum Memories,” *Reviews of Modern
|
|
56
|
+
Physics* (2015)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Quantum Frameworks & Transpilation
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Leverage Qiskit, Cirq, and related toolchains to build quantum circuits,
|
|
6
|
+
perform transpilation and optimization passes, and tailor executions to
|
|
7
|
+
specific backend topologies and calibration data for maximal performance.
|
|
8
|
+
|
|
9
|
+
## Core Concepts & Best Practices
|
|
10
|
+
|
|
11
|
+
- **Circuit Abstraction**: Separate algorithm logic from backend configuration
|
|
12
|
+
using parameterized circuits and modular subroutines.
|
|
13
|
+
- **Compilation Stages**: Understand high-level synthesis, basis translation,
|
|
14
|
+
layout selection, and scheduling; tune each stage for depth and fidelity.
|
|
15
|
+
- **Hardware Awareness**: Align qubit allocation with device coupling maps and
|
|
16
|
+
apply gate direction corrections plus SWAP insertion strategies judiciously.
|
|
17
|
+
- **Optimization Heuristics**: Employ gate cancellation, commutation analysis,
|
|
18
|
+
and resynthesis passes; iterate on pass managers to hit depth or width
|
|
19
|
+
targets.
|
|
20
|
+
- **Calibration Integration**: Consume backend calibration data (gate errors,
|
|
21
|
+
T1/T2, readout errors) to inform transpiler cost models and pulse-level
|
|
22
|
+
adjustments.
|
|
23
|
+
|
|
24
|
+
## Tools & Methodologies
|
|
25
|
+
|
|
26
|
+
- **Qiskit Workflow**: Use `QuantumCircuit`, `transpile`, and `PassManager`
|
|
27
|
+
with custom passes; export to QASM or pulse schedules when required.
|
|
28
|
+
- **Cirq Workflow**: Build `Circuit` objects with PhasedFSim gates, optimize
|
|
29
|
+
via `cirq.optimize_for_target_gateset`, and serialize using `cirq.to_json`.
|
|
30
|
+
- **Cross-Framework Interop**: Convert circuits via `qasm3` or `tket` bridges
|
|
31
|
+
for comparative benchmarking.
|
|
32
|
+
- **Pulse-Level Control**: Employ Qiskit Pulse or Cirq’s `pulses` module for
|
|
33
|
+
custom calibrations and dynamical decoupling sequences.
|
|
34
|
+
- **Automation Pipelines**: Script transpilation sweeps across optimization
|
|
35
|
+
levels, collect performance metrics, and store build artifacts for
|
|
36
|
+
reproducibility.
|
|
37
|
+
|
|
38
|
+
## Example Scenario
|
|
39
|
+
|
|
40
|
+
An R&D team migrates a chemistry VQE circuit to new superconducting hardware.
|
|
41
|
+
They create a custom Qiskit `PassManager` that performs layout selection via
|
|
42
|
+
SABRE, enables commutation-aware gate cancellations, and inserts echoed
|
|
43
|
+
cross-resonance calibrations, cutting circuit depth by 27% while preserving
|
|
44
|
+
expected energy accuracy.
|
|
45
|
+
|
|
46
|
+
## Reference Resources
|
|
47
|
+
|
|
48
|
+
- Qiskit Documentation: <https://qiskit.org/documentation>
|
|
49
|
+
- Cirq Documentation: <https://quantumai.google/cirq>
|
|
50
|
+
- Murali et al., “Noise-Adaptive Compiler Mappings for Noisy
|
|
51
|
+
Intermediate-Scale Quantum Computers,” *ASPLOS* (2019)
|
|
52
|
+
- Cowtan et al., “On the Qubit Routing Problem,” *ACM TECS* (2020)
|
|
53
|
+
- TKET Compiler: <https://cqcl.github.io/tket/pytket/api>
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Quantum Noise Modeling
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Model and mitigate noise in quantum systems by characterizing decoherence
|
|
6
|
+
channels, gate error rates, and calibration drift to improve reliability of
|
|
7
|
+
algorithm execution on NISQ and emerging fault-tolerant hardware.
|
|
8
|
+
|
|
9
|
+
## Core Concepts & Best Practices
|
|
10
|
+
|
|
11
|
+
- **Noise Channels**: Represent errors via Kraus operators (depolarizing,
|
|
12
|
+
amplitude damping, phase damping) or Lindblad master equations for
|
|
13
|
+
continuous-time modeling.
|
|
14
|
+
- **Decoherence Metrics**: Track T1/T2 times, Ramsey fringes, and spin-echo
|
|
15
|
+
results; monitor temperature and flux bias stability.
|
|
16
|
+
- **Gate Characterization**: Use randomized benchmarking, interleaved RB, gate
|
|
17
|
+
set tomography, and cycle benchmarking to quantify fidelity.
|
|
18
|
+
- **Readout Analysis**: Build confusion matrices, apply measurement error
|
|
19
|
+
mitigation, and detect drift through auto-calibration routines.
|
|
20
|
+
- **Calibration Strategies**: Schedule frequent recalibrations, employ
|
|
21
|
+
closed-loop optimization, and maintain calibration history with anomaly
|
|
22
|
+
alerts.
|
|
23
|
+
|
|
24
|
+
## Tools & Methodologies
|
|
25
|
+
|
|
26
|
+
- **Simulation Platforms**: Employ Qiskit Aer noise models, Cirq’s
|
|
27
|
+
`NoiseModel`, or QuTiP for density-matrix simulations.
|
|
28
|
+
- **Characterization Pipelines**: Automate RB experiments, fit exponential
|
|
29
|
+
decay to extract error per Clifford, and store metadata in configuration
|
|
30
|
+
databases.
|
|
31
|
+
- **Drift Detection**: Apply statistical process control (SPC) on calibration
|
|
32
|
+
metrics; trigger recalibration when control charts exceed thresholds.
|
|
33
|
+
- **Noise-Aware Scheduling**: Route circuits through lower-error qubits, adjust
|
|
34
|
+
scheduling to avoid crosstalk hotspots, and insert dynamical decoupling
|
|
35
|
+
pulses.
|
|
36
|
+
- **Mitigation Techniques**: Combine zero-noise extrapolation, probabilistic
|
|
37
|
+
error cancellation, and measurement mitigation with robust statistical
|
|
38
|
+
post-processing.
|
|
39
|
+
|
|
40
|
+
## Example Scenario
|
|
41
|
+
|
|
42
|
+
An operations team observes declining algorithm fidelity on a trapped-ion
|
|
43
|
+
device. They run interleaved RB to isolate a two-qubit gate with rising error,
|
|
44
|
+
update the Qiskit Aer noise model with new Kraus parameters, and deploy
|
|
45
|
+
adaptive recalibration routines that restore average gate fidelity above
|
|
46
|
+
99.5%, improving VQE energy convergence.
|
|
47
|
+
|
|
48
|
+
## Reference Resources
|
|
49
|
+
|
|
50
|
+
- Wallman & Emerson, “Noise Tailoring for Scalable Quantum Computation via
|
|
51
|
+
Randomized Compiling,” *PRL* (2016)
|
|
52
|
+
- Kjaergaard et al., “Superconducting Qubits: Current State of Play,” *Annual
|
|
53
|
+
Review of Condensed Matter Physics* (2020)
|
|
54
|
+
- Magesan et al., “Scalable and Robust Randomized Benchmarking of Quantum
|
|
55
|
+
Processes,” *PRL* (2011)
|
|
56
|
+
- QuTiP Documentation: <https://qutip.org>
|
|
57
|
+
- Kandala et al., “Error Mitigation Extends the Computational Reach of a Noisy
|
|
58
|
+
Quantum Processor,” *Nature* (2019)
|