@aicgen/aicgen 1.0.0-beta.1 → 1.0.0-beta.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/.vs/ProjectSettings.json +2 -2
- package/.vs/VSWorkspaceState.json +15 -15
- package/.vs/aicgen.slnx/v18/DocumentLayout.json +53 -53
- package/assets/icon.svg +33 -33
- package/bun.lock +0 -43
- package/data/architecture/microservices/api-gateway.md +56 -56
- package/data/devops/observability.md +73 -73
- package/dist/index.js +9299 -9299
- package/package.json +2 -2
- package/.claude/agents/architecture-reviewer.md +0 -88
- package/.claude/agents/guideline-checker.md +0 -73
- package/.claude/agents/security-auditor.md +0 -108
- package/.claude/guidelines/api-design.md +0 -645
- package/.claude/guidelines/architecture.md +0 -2503
- package/.claude/guidelines/best-practices.md +0 -618
- package/.claude/guidelines/code-style.md +0 -304
- package/.claude/guidelines/design-patterns.md +0 -573
- package/.claude/guidelines/devops.md +0 -226
- package/.claude/guidelines/error-handling.md +0 -413
- package/.claude/guidelines/language.md +0 -782
- package/.claude/guidelines/performance.md +0 -706
- package/.claude/guidelines/security.md +0 -583
- package/.claude/guidelines/testing.md +0 -568
- package/.claude/settings.json +0 -98
- package/.claude/settings.local.json +0 -8
- package/.eslintrc.json +0 -28
- package/.github/workflows/release.yml +0 -180
- package/.github/workflows/test.yml +0 -81
- package/CONTRIBUTING.md +0 -821
- package/dist/commands/init.d.ts +0 -8
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js +0 -46
- package/dist/commands/init.js.map +0 -1
- package/dist/config/profiles.d.ts +0 -4
- package/dist/config/profiles.d.ts.map +0 -1
- package/dist/config/profiles.js +0 -30
- package/dist/config/profiles.js.map +0 -1
- package/dist/config/settings.d.ts +0 -7
- package/dist/config/settings.d.ts.map +0 -1
- package/dist/config/settings.js +0 -7
- package/dist/config/settings.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/models/guideline.d.ts +0 -15
- package/dist/models/guideline.d.ts.map +0 -1
- package/dist/models/guideline.js +0 -2
- package/dist/models/guideline.js.map +0 -1
- package/dist/models/preference.d.ts +0 -9
- package/dist/models/preference.d.ts.map +0 -1
- package/dist/models/preference.js +0 -2
- package/dist/models/preference.js.map +0 -1
- package/dist/models/profile.d.ts +0 -9
- package/dist/models/profile.d.ts.map +0 -1
- package/dist/models/profile.js +0 -2
- package/dist/models/profile.js.map +0 -1
- package/dist/models/project.d.ts +0 -13
- package/dist/models/project.d.ts.map +0 -1
- package/dist/models/project.js +0 -2
- package/dist/models/project.js.map +0 -1
- package/dist/services/ai/anthropic.d.ts +0 -7
- package/dist/services/ai/anthropic.d.ts.map +0 -1
- package/dist/services/ai/anthropic.js +0 -39
- package/dist/services/ai/anthropic.js.map +0 -1
- package/dist/services/generator.d.ts +0 -2
- package/dist/services/generator.d.ts.map +0 -1
- package/dist/services/generator.js +0 -4
- package/dist/services/generator.js.map +0 -1
- package/dist/services/learner.d.ts +0 -2
- package/dist/services/learner.d.ts.map +0 -1
- package/dist/services/learner.js +0 -4
- package/dist/services/learner.js.map +0 -1
- package/dist/services/scanner.d.ts +0 -3
- package/dist/services/scanner.d.ts.map +0 -1
- package/dist/services/scanner.js +0 -54
- package/dist/services/scanner.js.map +0 -1
- package/dist/utils/errors.d.ts +0 -15
- package/dist/utils/errors.d.ts.map +0 -1
- package/dist/utils/errors.js +0 -27
- package/dist/utils/errors.js.map +0 -1
- package/dist/utils/file.d.ts +0 -7
- package/dist/utils/file.d.ts.map +0 -1
- package/dist/utils/file.js +0 -32
- package/dist/utils/file.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -6
- package/dist/utils/logger.d.ts.map +0 -1
- package/dist/utils/logger.js +0 -17
- package/dist/utils/logger.js.map +0 -1
- package/dist/utils/path.d.ts +0 -6
- package/dist/utils/path.d.ts.map +0 -1
- package/dist/utils/path.js +0 -14
- package/dist/utils/path.js.map +0 -1
- package/docs/planning/memory-lane.md +0 -83
- package/packaging/linux/aicgen.spec +0 -23
- package/packaging/linux/control +0 -9
- package/packaging/macos/scripts/postinstall +0 -12
- package/packaging/windows/setup.nsi +0 -92
- package/scripts/add-categories.ts +0 -87
- package/scripts/build-binary.ts +0 -46
- package/scripts/embed-data.ts +0 -105
- package/scripts/generate-version.ts +0 -150
- package/scripts/test-decompress.ts +0 -27
- package/scripts/test-extract.ts +0 -31
- package/src/__tests__/services/assistant-file-writer.test.ts +0 -400
- package/src/__tests__/services/guideline-loader.test.ts +0 -281
- package/src/__tests__/services/tarball-extraction.test.ts +0 -125
- package/src/commands/add-guideline.ts +0 -296
- package/src/commands/clear.ts +0 -61
- package/src/commands/guideline-selector.ts +0 -123
- package/src/commands/init.ts +0 -645
- package/src/commands/quick-add.ts +0 -586
- package/src/commands/remove-guideline.ts +0 -152
- package/src/commands/stats.ts +0 -49
- package/src/commands/update.ts +0 -240
- package/src/config.ts +0 -82
- package/src/embedded-data.ts +0 -1492
- package/src/index.ts +0 -67
- package/src/models/profile.ts +0 -24
- package/src/models/project.ts +0 -43
- package/src/services/assistant-file-writer.ts +0 -612
- package/src/services/config-generator.ts +0 -150
- package/src/services/config-manager.ts +0 -70
- package/src/services/data-source.ts +0 -248
- package/src/services/first-run-init.ts +0 -148
- package/src/services/guideline-loader.ts +0 -311
- package/src/services/hook-generator.ts +0 -178
- package/src/services/subagent-generator.ts +0 -310
- package/src/utils/banner.ts +0 -66
- package/src/utils/errors.ts +0 -27
- package/src/utils/file.ts +0 -67
- package/src/utils/formatting.ts +0 -172
- package/src/utils/logger.ts +0 -89
- package/src/utils/path.ts +0 -17
- package/src/utils/wizard-state.ts +0 -132
- package/tsconfig.json +0 -25
- /package/{CLAUDE.md → claude.md} +0 -0
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
# Observability
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
Observability is the ability to understand the internal state of a system by examining its outputs. In modern distributed systems, it goes beyond simple monitoring to include logging, metrics, and tracing.
|
|
6
|
-
|
|
7
|
-
## Three Pillars
|
|
8
|
-
|
|
9
|
-
### 1. Structured Logging
|
|
10
|
-
|
|
11
|
-
Logs should be machine-readable (JSON) and contain context.
|
|
12
|
-
|
|
13
|
-
```json
|
|
14
|
-
// ✅ Good: Structured JSON logging
|
|
15
|
-
{
|
|
16
|
-
"level": "info",
|
|
17
|
-
"message": "Order processed",
|
|
18
|
-
"orderId": "ord_123",
|
|
19
|
-
"userId": "user_456",
|
|
20
|
-
"amount": 99.99,
|
|
21
|
-
"durationMs": 145,
|
|
22
|
-
"status": "success"
|
|
23
|
-
}
|
|
24
|
-
```
|
|
25
|
-
```text
|
|
26
|
-
// ❌ Bad: Unstructured text
|
|
27
|
-
"Order processed: ord_123 for user_456"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### 2. Metrics
|
|
31
|
-
|
|
32
|
-
Aggregatable data points for identifying trends and health.
|
|
33
|
-
|
|
34
|
-
- **Counters**: Total requests, error counts (`http_requests_total`)
|
|
35
|
-
- **Gauges**: Queue depth, memory usage (`memory_usage_bytes`)
|
|
36
|
-
- **Histograms**: Request latency distribution (`http_request_duration_seconds`)
|
|
37
|
-
|
|
38
|
-
### 3. Distributed Tracing
|
|
39
|
-
|
|
40
|
-
Tracking requests as they propagate through services.
|
|
41
|
-
|
|
42
|
-
- **Trace ID**: Unique ID for the entire request chain
|
|
43
|
-
- **Span ID**: Unique ID for a specific operation
|
|
44
|
-
- **Context Propagation**: Passing IDs between services (e.g., W3C Trace Context)
|
|
45
|
-
|
|
46
|
-
## Implementation Strategy
|
|
47
|
-
|
|
48
|
-
### OpenTelemetry (OTel)
|
|
49
|
-
|
|
50
|
-
Use OpenTelemetry as the vendor-neutral standard for collecting telemetry data.
|
|
51
|
-
|
|
52
|
-
```text
|
|
53
|
-
# Initialize OpenTelemetry SDK
|
|
54
|
-
SDK.Configure({
|
|
55
|
-
TraceExporter: Console/OTLP,
|
|
56
|
-
Instrumentations: [Http, Database, Grpc]
|
|
57
|
-
})
|
|
58
|
-
SDK.Start()
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
### Health Checks
|
|
62
|
-
|
|
63
|
-
Expose standard health endpoints:
|
|
64
|
-
|
|
65
|
-
- `/health/live`: Is the process running? (Liveness)
|
|
66
|
-
- `/health/ready`: Can it accept traffic? (Readiness)
|
|
67
|
-
- `/health/startup`: Has it finished initializing? (Startup)
|
|
68
|
-
|
|
69
|
-
## Alerting Best Practices
|
|
70
|
-
|
|
71
|
-
- **Alert on Symptoms, not Causes**: "High Error Rate" (Symptom) vs "CPU High" (Cause).
|
|
72
|
-
- **Golden Signals**: Latency, Traffic, Errors, Saturation.
|
|
73
|
-
- **Actionable**: Every alert should require a specific human action.
|
|
1
|
+
# Observability
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Observability is the ability to understand the internal state of a system by examining its outputs. In modern distributed systems, it goes beyond simple monitoring to include logging, metrics, and tracing.
|
|
6
|
+
|
|
7
|
+
## Three Pillars
|
|
8
|
+
|
|
9
|
+
### 1. Structured Logging
|
|
10
|
+
|
|
11
|
+
Logs should be machine-readable (JSON) and contain context.
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
// ✅ Good: Structured JSON logging
|
|
15
|
+
{
|
|
16
|
+
"level": "info",
|
|
17
|
+
"message": "Order processed",
|
|
18
|
+
"orderId": "ord_123",
|
|
19
|
+
"userId": "user_456",
|
|
20
|
+
"amount": 99.99,
|
|
21
|
+
"durationMs": 145,
|
|
22
|
+
"status": "success"
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
```text
|
|
26
|
+
// ❌ Bad: Unstructured text
|
|
27
|
+
"Order processed: ord_123 for user_456"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. Metrics
|
|
31
|
+
|
|
32
|
+
Aggregatable data points for identifying trends and health.
|
|
33
|
+
|
|
34
|
+
- **Counters**: Total requests, error counts (`http_requests_total`)
|
|
35
|
+
- **Gauges**: Queue depth, memory usage (`memory_usage_bytes`)
|
|
36
|
+
- **Histograms**: Request latency distribution (`http_request_duration_seconds`)
|
|
37
|
+
|
|
38
|
+
### 3. Distributed Tracing
|
|
39
|
+
|
|
40
|
+
Tracking requests as they propagate through services.
|
|
41
|
+
|
|
42
|
+
- **Trace ID**: Unique ID for the entire request chain
|
|
43
|
+
- **Span ID**: Unique ID for a specific operation
|
|
44
|
+
- **Context Propagation**: Passing IDs between services (e.g., W3C Trace Context)
|
|
45
|
+
|
|
46
|
+
## Implementation Strategy
|
|
47
|
+
|
|
48
|
+
### OpenTelemetry (OTel)
|
|
49
|
+
|
|
50
|
+
Use OpenTelemetry as the vendor-neutral standard for collecting telemetry data.
|
|
51
|
+
|
|
52
|
+
```text
|
|
53
|
+
# Initialize OpenTelemetry SDK
|
|
54
|
+
SDK.Configure({
|
|
55
|
+
TraceExporter: Console/OTLP,
|
|
56
|
+
Instrumentations: [Http, Database, Grpc]
|
|
57
|
+
})
|
|
58
|
+
SDK.Start()
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Health Checks
|
|
62
|
+
|
|
63
|
+
Expose standard health endpoints:
|
|
64
|
+
|
|
65
|
+
- `/health/live`: Is the process running? (Liveness)
|
|
66
|
+
- `/health/ready`: Can it accept traffic? (Readiness)
|
|
67
|
+
- `/health/startup`: Has it finished initializing? (Startup)
|
|
68
|
+
|
|
69
|
+
## Alerting Best Practices
|
|
70
|
+
|
|
71
|
+
- **Alert on Symptoms, not Causes**: "High Error Rate" (Symptom) vs "CPU High" (Cause).
|
|
72
|
+
- **Golden Signals**: Latency, Traffic, Errors, Saturation.
|
|
73
|
+
- **Actionable**: Every alert should require a specific human action.
|