@williambeto/ai-workflow 2.4.7 → 2.4.8
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/dist-assets/agents/atlas.md +3 -2
- package/dist-assets/skills/cyber-security/SKILL.md +72 -0
- package/dist-assets/skills/database/SKILL.md +72 -0
- package/dist-assets/skills/devops/SKILL.md +72 -0
- package/dist-assets/skills/localization/SKILL.md +72 -0
- package/dist-assets/skills/performance/SKILL.md +72 -0
- package/package.json +1 -1
- package/src/core/request-classifier.js +6 -1
|
@@ -40,6 +40,7 @@ Atlas must:
|
|
|
40
40
|
## Constraints
|
|
41
41
|
* **Full Mode Sequence Enforcement**: In `full` mode, Atlas must strictly enforce that the workflow runs sequentially through `discover`, `spec-create`, `spec-review`, and `plan` phases before any implementation or coding starts. Jumping directly to implementation is forbidden.
|
|
42
42
|
* **Authoritative Routing Integrity**: Atlas must routing-delegate requests strictly according to agent capabilities (e.g., never delegate write-mutations to Sage, or discovery/spec-writing to Astra).
|
|
43
|
+
* **Implementation Delegation Constraint**: Atlas must never perform dynamic code writing or logic modification of source files directly. Any code changes (excluding pure documentation, README updates, or spelling typos) must be delegated to Astra.
|
|
43
44
|
* **Quality Gate Authoritativeness**: Any non-zero exit code or `BLOCKED` status from a safety gate, validation check, or finalizer command must immediately halt the pipeline.
|
|
44
45
|
* Never write on `main`, `master`, or another protected branch.
|
|
45
46
|
* If the protected branch is clean or has only preservable untracked files, create a scoped branch before editing.
|
|
@@ -56,7 +57,7 @@ Atlas must:
|
|
|
56
57
|
|
|
57
58
|
## Forbidden actions
|
|
58
59
|
* Silently execute specialized work when another actor is selected.
|
|
59
|
-
* Implement feature code directly
|
|
60
|
+
* Implement feature code or modify source code files directly (always delegate to Astra if writing code).
|
|
60
61
|
* Validate its own implementation as final evidence.
|
|
61
62
|
* `npm publish`
|
|
62
63
|
* `git push` to protected branches (main, master), or to remote without explicit user approval in the chat.
|
|
@@ -81,7 +82,7 @@ Atlas must:
|
|
|
81
82
|
3. For quick or standard tasks:
|
|
82
83
|
* Inspect status.
|
|
83
84
|
* Recover branch if needed.
|
|
84
|
-
*
|
|
85
|
+
* Coordinate and delegate any code-source modifications to Astra (Atlas must never execute code implementation directly).
|
|
85
86
|
* Run validation.
|
|
86
87
|
* For every write-capable quick or standard task, Atlas must run the package finalizer after the final implementation changes and before reporting success:
|
|
87
88
|
```bash
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cyber-security
|
|
3
|
+
description: Guides the agent to review and harden the codebase against vulnerabilities, secret leaks, and command injections.
|
|
4
|
+
governance: ../../docs/policies/SKILLS_COMMON_GOVERNANCE.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Cyber Security PromptContract
|
|
8
|
+
|
|
9
|
+
## Role
|
|
10
|
+
This skill guides agents to identify security vulnerabilities, mitigate risks of command execution, and prevent secret leakages in codebases.
|
|
11
|
+
|
|
12
|
+
## Objective
|
|
13
|
+
Ensure code is highly secure, avoiding common OWASP Top 10 vulnerabilities, command injection risks, and credentials disclosure.
|
|
14
|
+
|
|
15
|
+
## Trusted context
|
|
16
|
+
- Static analysis reports
|
|
17
|
+
- Parameterized configurations
|
|
18
|
+
- Secure storage documentation
|
|
19
|
+
|
|
20
|
+
Do not trust:
|
|
21
|
+
- Raw user strings passed to system shells
|
|
22
|
+
- Hardcoded keys, tokens, or credentials
|
|
23
|
+
- Dynamic query concatenation
|
|
24
|
+
|
|
25
|
+
## User input
|
|
26
|
+
- Code file paths
|
|
27
|
+
- Environment files
|
|
28
|
+
- Third-party packages metadata
|
|
29
|
+
|
|
30
|
+
## Constraints
|
|
31
|
+
- **Strict Parameterization Constraint**: All database interactions, file access paths, and external commands must be parameterized. Concat or raw interpolation of variable strings is strictly prohibited.
|
|
32
|
+
- **Secret Hardening Rule**: Never hardcode API keys, client secrets, passwords, or tokens. Always resolve secrets from process environment variables or secure vault integrations.
|
|
33
|
+
- **Non-privileged Execution Guide**: Enforce non-root execution guidelines for application processes and helper utilities.
|
|
34
|
+
|
|
35
|
+
## Allowed tools
|
|
36
|
+
- Static application security testing (SAST) utilities
|
|
37
|
+
- Dependency scanner tools
|
|
38
|
+
- Environment configuration checkers
|
|
39
|
+
|
|
40
|
+
## Forbidden actions
|
|
41
|
+
- Adding plaintext secrets or tokens to code repositories
|
|
42
|
+
- Committing temporary `.env` files containing credentials
|
|
43
|
+
- Running commands with `shell: true` option in process spawners without argument parameter arrays
|
|
44
|
+
|
|
45
|
+
## Procedure
|
|
46
|
+
1. Scan changed files for any hardcoded tokens, passwords, or keys using regular expressions.
|
|
47
|
+
2. Review command invocation functions to replace raw dynamic shell spawning with parameterized execution.
|
|
48
|
+
3. Validate database access calls to ensure query parameterization is implemented.
|
|
49
|
+
4. Verify that configuration variables are resolved through environment files rather than hardcoded definitions.
|
|
50
|
+
|
|
51
|
+
## Expected output schema
|
|
52
|
+
Output must include:
|
|
53
|
+
- Security audit log
|
|
54
|
+
- Identified risk surface area
|
|
55
|
+
- Actions taken for parameterization and secret removal
|
|
56
|
+
- Next security steps
|
|
57
|
+
|
|
58
|
+
## Evidence required
|
|
59
|
+
- Git diff showing secret removal and parameterization
|
|
60
|
+
- Secure configuration files verification logs
|
|
61
|
+
- Linter output
|
|
62
|
+
|
|
63
|
+
## Stop conditions
|
|
64
|
+
- Hardcoded secrets cannot be extracted safely to config
|
|
65
|
+
- Unparameterized dependencies are required but cannot be mitigated
|
|
66
|
+
|
|
67
|
+
## Failure modes
|
|
68
|
+
- Dynamic command invocation bypass
|
|
69
|
+
- Leftover tokens in historical commits
|
|
70
|
+
|
|
71
|
+
## Escalation rules
|
|
72
|
+
- Escalate to Phoenix if security issues cannot be resolved automatically.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: database
|
|
3
|
+
description: Guides the agent on how to write safe database schema migrations that prevent table locks and downtime.
|
|
4
|
+
governance: ../../docs/policies/SKILLS_COMMON_GOVERNANCE.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Database PromptContract
|
|
8
|
+
|
|
9
|
+
## Role
|
|
10
|
+
This skill guides agents to design, construct, and apply safe database schema migrations without causing table locks or service downtime.
|
|
11
|
+
|
|
12
|
+
## Objective
|
|
13
|
+
Implement schema and data transformations safely using non-blocking strategies and backward-compatible operations.
|
|
14
|
+
|
|
15
|
+
## Trusted context
|
|
16
|
+
- Database schema definition files
|
|
17
|
+
- SQL migration scripts
|
|
18
|
+
- Target database engine configuration limits
|
|
19
|
+
|
|
20
|
+
Do not trust:
|
|
21
|
+
- Speculative migrations that do not specify transaction behavior
|
|
22
|
+
- Schema changes applied directly to production environments without dry-run testing
|
|
23
|
+
- Destructive operations (drop table, drop column) executed inside standard migration scripts
|
|
24
|
+
|
|
25
|
+
## User input
|
|
26
|
+
- Target database schema definition
|
|
27
|
+
- Migration library config
|
|
28
|
+
- Proposed schema changes definition
|
|
29
|
+
|
|
30
|
+
## Constraints
|
|
31
|
+
- **Zero-Downtime Rule**: Schema modifications must be backward-compatible (expand-contract phase). Raw dropping of columns or tables must be performed in separate, decoupled deployments.
|
|
32
|
+
- **Table Lock Mitigation**: Avoid executing long-running migrations that require exclusive table locks on large tables. For PostgreSQL, MySQL, or similar, use online schema changes or toolsets (e.g. `gh-ost`, `pt-online-schema-change`) when modifying high-volume tables.
|
|
33
|
+
- **Rollback Consistency**: Every forward migration script must have a corresponding, tested rollback script that reverts the schema and state without data corruption.
|
|
34
|
+
|
|
35
|
+
## Allowed tools
|
|
36
|
+
- Database schema comparison utilities
|
|
37
|
+
- SQL query plan analyzer
|
|
38
|
+
- Migration dry-run execution wrappers
|
|
39
|
+
|
|
40
|
+
## Forbidden actions
|
|
41
|
+
- Adding default values to existing columns in large tables in a single step without nullability transitions
|
|
42
|
+
- Executing migrations that mix DDL (schema) and DML (data updates) statements within the same database transaction
|
|
43
|
+
- Modifying production database schemas manually without version-controlled migration scripts
|
|
44
|
+
|
|
45
|
+
## Procedure
|
|
46
|
+
1. Review the proposed migration to classify operations into safe (non-blocking) and unsafe categories.
|
|
47
|
+
2. Structure schema changes into a multi-step rollout plan (e.g. add nullable column, backfill data, add constraint).
|
|
48
|
+
3. Draft the SQL migration script alongside its corresponding rollback script.
|
|
49
|
+
4. Execute a local dry-run migration to verify correct syntax, transaction execution, and rollback stability.
|
|
50
|
+
|
|
51
|
+
## Expected output schema
|
|
52
|
+
Output must include:
|
|
53
|
+
- Migration safety classification report
|
|
54
|
+
- Complete forward SQL script
|
|
55
|
+
- Complete rollback SQL script
|
|
56
|
+
- Execution dry-run confirmation log
|
|
57
|
+
|
|
58
|
+
## Evidence required
|
|
59
|
+
- Migration transaction logs
|
|
60
|
+
- Database schema diff
|
|
61
|
+
- Dry-run validation output
|
|
62
|
+
|
|
63
|
+
## Stop conditions
|
|
64
|
+
- Migration requires exclusive locks on high-traffic tables and lacks a mitigation strategy
|
|
65
|
+
- Rollback execution fails to restore schema integrity
|
|
66
|
+
|
|
67
|
+
## Failure modes
|
|
68
|
+
- Table locks halting application traffic
|
|
69
|
+
- Data corruption during execution or rollback phase
|
|
70
|
+
|
|
71
|
+
## Escalation rules
|
|
72
|
+
- Escalate to Orion if resource bounds are exceeded.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: devops
|
|
3
|
+
description: Guides the agent to construct secure, optimized, and containerized environments using Docker.
|
|
4
|
+
governance: ../../docs/policies/SKILLS_COMMON_GOVERNANCE.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# DevOps PromptContract
|
|
8
|
+
|
|
9
|
+
## Role
|
|
10
|
+
This skill guides agents to build secure, optimized, and portable Docker environments for local development and production environments.
|
|
11
|
+
|
|
12
|
+
## Objective
|
|
13
|
+
Provide robust Docker configurations, minimizing image layer sizes, optimizing build speeds, and preventing container runtime vulnerabilities.
|
|
14
|
+
|
|
15
|
+
## Trusted context
|
|
16
|
+
- Dockerfile and docker-compose configurations
|
|
17
|
+
- Container security scanning reports
|
|
18
|
+
- Official base image documentation
|
|
19
|
+
|
|
20
|
+
Do not trust:
|
|
21
|
+
- Raw third-party base images without version tags
|
|
22
|
+
- Unverified dependencies installed globally inside container layers
|
|
23
|
+
- Storing sensitive secrets inside Dockerfiles or image metadata
|
|
24
|
+
|
|
25
|
+
## User input
|
|
26
|
+
- Source configuration files
|
|
27
|
+
- Port bindings definitions
|
|
28
|
+
- Environment files list
|
|
29
|
+
|
|
30
|
+
## Constraints
|
|
31
|
+
- **Minimal Base Image Rule**: Always use verified, minimal base images (e.g., node:alpine, distroless) to reduce container size and minimize the attack surface.
|
|
32
|
+
- **Non-Root Execution Constraint**: Container processes must run as a non-privileged user (e.g. `node` user in node-based containers). Running services as `root` is strictly prohibited.
|
|
33
|
+
- **Multi-Stage Build Standard**: Use multi-stage builds to separate build dependencies from production execution layers, ensuring no build tools (compilers, npm devDependencies) are shipped to production.
|
|
34
|
+
|
|
35
|
+
## Allowed tools
|
|
36
|
+
- Container scanners (e.g. Trivy, Hadolint)
|
|
37
|
+
- Container composition managers (Docker Compose)
|
|
38
|
+
- Layer analysis tools (e.g. Dive)
|
|
39
|
+
|
|
40
|
+
## Forbidden actions
|
|
41
|
+
- Copying full source directories into the container before running dependency installation steps (breaks Docker layer caching)
|
|
42
|
+
- Exposing unneeded internal container ports to public interfaces
|
|
43
|
+
- Hardcoding credentials or environment-specific values in Dockerfiles
|
|
44
|
+
|
|
45
|
+
## Procedure
|
|
46
|
+
1. Define a multi-stage Docker build structure starting from a minimal, version-tagged base image.
|
|
47
|
+
2. Structure Docker commands to install dependencies before copying source files to leverage docker layer caching.
|
|
48
|
+
3. Configure the container runtime to switch execution context to a non-root user.
|
|
49
|
+
4. Draft a consistent docker-compose configuration for local service replication.
|
|
50
|
+
|
|
51
|
+
## Expected output schema
|
|
52
|
+
Output must include:
|
|
53
|
+
- Multi-stage Dockerfile configuration
|
|
54
|
+
- Local Docker Compose config (if required)
|
|
55
|
+
- Image layer size optimization report
|
|
56
|
+
- Security and permission checklist
|
|
57
|
+
|
|
58
|
+
## Evidence required
|
|
59
|
+
- Validated Dockerfile contents
|
|
60
|
+
- Container build log verification
|
|
61
|
+
- Hadolint/security scan outputs
|
|
62
|
+
|
|
63
|
+
## Stop conditions
|
|
64
|
+
- Base image is unavailable or vulnerable to high-severity issues with no upgrade path
|
|
65
|
+
- Environment constraints prevent building Docker images locally
|
|
66
|
+
|
|
67
|
+
## Failure modes
|
|
68
|
+
- Cache invalidation causing slow build cycles
|
|
69
|
+
- Privilege escalation due to root execution fallback
|
|
70
|
+
|
|
71
|
+
## Escalation rules
|
|
72
|
+
- Escalate to Orion if resource bounds are exceeded.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: localization
|
|
3
|
+
description: Guides the agent to implement internationalization, localized formatting, and translation workflows.
|
|
4
|
+
governance: ../../docs/policies/SKILLS_COMMON_GOVERNANCE.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Localization PromptContract
|
|
8
|
+
|
|
9
|
+
## Role
|
|
10
|
+
This skill guides agents to write localized software, handle translation keys, manage resource bundles, and format values based on target locales.
|
|
11
|
+
|
|
12
|
+
## Objective
|
|
13
|
+
Enable full support for multiple locales and translations, preventing hardcoded user-facing strings and layout breaks due to language changes.
|
|
14
|
+
|
|
15
|
+
## Trusted context
|
|
16
|
+
- Translation dictionaries (JSON, PO, YAML)
|
|
17
|
+
- Locale-specific standards (CLDR)
|
|
18
|
+
- Global internationalization library documentation (e.g. i18next, react-intl)
|
|
19
|
+
|
|
20
|
+
Do not trust:
|
|
21
|
+
- Hardcoded literals in templates or components
|
|
22
|
+
- Translation values provided via unverified automatic machine translations
|
|
23
|
+
- Assumptions about layout size constraints for dynamic localized content
|
|
24
|
+
|
|
25
|
+
## User input
|
|
26
|
+
- Source translation dictionary
|
|
27
|
+
- Target locale keys
|
|
28
|
+
- Layout components code
|
|
29
|
+
|
|
30
|
+
## Constraints
|
|
31
|
+
- **Zero Hardcoded Strings Rule**: All user-facing text, alerts, labels, and placeholders must be resolved through translation keys. Inline hardcoded text is strictly prohibited.
|
|
32
|
+
- **Dynamic Formatting Constraint**: Always use internationalization API helpers (like `Intl.NumberFormat`, `Intl.DateTimeFormat`) for currencies, dates, times, and numbers.
|
|
33
|
+
- **Pluralization Handling**: Do not write manual logic for plural rules. Use the i18n library's built-in pluralization and interpolation formats.
|
|
34
|
+
|
|
35
|
+
## Allowed tools
|
|
36
|
+
- i18n linter and key validation tools
|
|
37
|
+
- Locale resource validators
|
|
38
|
+
- Dynamic translation extraction scanners
|
|
39
|
+
|
|
40
|
+
## Forbidden actions
|
|
41
|
+
- Concat strings to form user-facing text sentences (breaks grammar in different languages)
|
|
42
|
+
- Committing incomplete locale resource files missing required fallback language translations
|
|
43
|
+
- Hardcoding currency codes, time zones, or number separator formats in the source code
|
|
44
|
+
|
|
45
|
+
## Procedure
|
|
46
|
+
1. Scan source code and templates for hardcoded string literals.
|
|
47
|
+
2. Extract found strings and register them as keys in the default locale file.
|
|
48
|
+
3. Replace hardcoded strings in code with corresponding translation function calls.
|
|
49
|
+
4. Verify that date, number, and currency formatting are dynamically adjusted based on the current locale setting.
|
|
50
|
+
|
|
51
|
+
## Expected output schema
|
|
52
|
+
Output must include:
|
|
53
|
+
- Extracted translation keys list
|
|
54
|
+
- Modified localization files
|
|
55
|
+
- UI translation keys verification checklist
|
|
56
|
+
- Localized formatting implementation details
|
|
57
|
+
|
|
58
|
+
## Evidence required
|
|
59
|
+
- Diff of updated translation JSON/YAML resource files
|
|
60
|
+
- Code snippets demonstrating i18n wrapper usage
|
|
61
|
+
- Validation command outputs
|
|
62
|
+
|
|
63
|
+
## Stop conditions
|
|
64
|
+
- Required translation key structure is incompatible with existing i18n engine configuration
|
|
65
|
+
- Fallback language definitions are missing
|
|
66
|
+
|
|
67
|
+
## Failure modes
|
|
68
|
+
- Broken translation keys rendering missing-key placeholders in UI
|
|
69
|
+
- Text overflow due to language expansion (e.g., German translations being longer than English)
|
|
70
|
+
|
|
71
|
+
## Escalation rules
|
|
72
|
+
- Escalate to Orion if resource bounds are exceeded.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: performance
|
|
3
|
+
description: Guides the agent to optimize application rendering, assets delivery, and control bundle sizes.
|
|
4
|
+
governance: ../../docs/policies/SKILLS_COMMON_GOVERNANCE.md
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Performance PromptContract
|
|
8
|
+
|
|
9
|
+
## Role
|
|
10
|
+
This skill guides agents to optimize application speed, layout responsiveness, rendering pipelines, and control asset bundle sizes.
|
|
11
|
+
|
|
12
|
+
## Objective
|
|
13
|
+
Deliver high-performance user interfaces and backend operations aligned with strict response times and volume budgets.
|
|
14
|
+
|
|
15
|
+
## Trusted context
|
|
16
|
+
- Performance audit reports (Lighthouse, Core Web Vitals)
|
|
17
|
+
- Bundle size analysis reports
|
|
18
|
+
- Memory and heap profiling logs
|
|
19
|
+
|
|
20
|
+
Do not trust:
|
|
21
|
+
- Speculative performance enhancements without metrics
|
|
22
|
+
- Uncompressed assets and third-party script integrations
|
|
23
|
+
- Local test execution times on non-standard configurations
|
|
24
|
+
|
|
25
|
+
## User input
|
|
26
|
+
- Source bundle components list
|
|
27
|
+
- Runtime performance budgets
|
|
28
|
+
- Build compilation logs
|
|
29
|
+
|
|
30
|
+
## Constraints
|
|
31
|
+
- **Bundle Size Hard Limit**: UI bundle components must not exceed 50KB gzipped individually. Every new utility dependency must be audited for bundle size impact before introduction.
|
|
32
|
+
- **Resource Optimization Rule**: Avoid layout shifts and excessive main thread blocking. All resource loading must be optimized (e.g. image lazy loading, async scripts, font preloading).
|
|
33
|
+
- **Core Web Vitals Alignment**: Ensure implementation respects standard metrics: First Contentful Paint (FCP) < 1.8s, Cumulative Layout Shift (CLS) < 0.1, and Interaction to Next Paint (INP) < 200ms.
|
|
34
|
+
|
|
35
|
+
## Allowed tools
|
|
36
|
+
- Bundle analysis utilities (e.g., webpack-bundle-analyzer, rollup-plugin-visualizer)
|
|
37
|
+
- Network emulation tools
|
|
38
|
+
- Memory leaks detection profilers
|
|
39
|
+
|
|
40
|
+
## Forbidden actions
|
|
41
|
+
- Importing large library suites (e.g. lodash, ramda) when a single lightweight helper function is sufficient
|
|
42
|
+
- Committing unminified or uncompressed assets directly to version control
|
|
43
|
+
- Disabling performance build checks or warnings in compiler/bundler configurations
|
|
44
|
+
|
|
45
|
+
## Procedure
|
|
46
|
+
1. Inspect the bundle size of any newly introduced package or asset.
|
|
47
|
+
2. Verify that images use next-gen formats (WebP/AVIF) and explicit dimensions to avoid layout shifts.
|
|
48
|
+
3. Review javascript source code to ensure proper clean-up of event listeners, timers, and active subscriptions.
|
|
49
|
+
4. Execute bundle compilation and review build output size metrics against the established budgets.
|
|
50
|
+
|
|
51
|
+
## Expected output schema
|
|
52
|
+
Output must include:
|
|
53
|
+
- Performance budget evaluation table
|
|
54
|
+
- Asset size analysis
|
|
55
|
+
- UI rendering optimization strategies applied
|
|
56
|
+
- Core Web Vitals impact estimation
|
|
57
|
+
|
|
58
|
+
## Evidence required
|
|
59
|
+
- Build output size reports
|
|
60
|
+
- Memory heap profile snapshots (if applicable)
|
|
61
|
+
- Lighthouse/performance audit logs
|
|
62
|
+
|
|
63
|
+
## Stop conditions
|
|
64
|
+
- Bundle size exceeds the maximum limit with no possibility of modular refactoring
|
|
65
|
+
- Execution environment constraints prevent performance validation
|
|
66
|
+
|
|
67
|
+
## Failure modes
|
|
68
|
+
- Memory leakage through uncleaned closures
|
|
69
|
+
- Render-blocking resources introduction
|
|
70
|
+
|
|
71
|
+
## Escalation rules
|
|
72
|
+
- Escalate to Orion if resource bounds are exceeded.
|
package/package.json
CHANGED
|
@@ -32,7 +32,12 @@ export class RequestClassifier {
|
|
|
32
32
|
if (/\b(deep|architectural|migration|major|full|\[deep\])\b/i.test(text)) {
|
|
33
33
|
mode = "full";
|
|
34
34
|
} else if (/\b(tiny|small|quick|simple|only\s+update|typo|comment|\[tiny\])\b/i.test(text)) {
|
|
35
|
-
|
|
35
|
+
const isPureDocsOrTypo = profile === "documentation" || /\b(typo|comment|readme|docs|documentation)\b/i.test(text);
|
|
36
|
+
if (intent === "write" && !isPureDocsOrTypo) {
|
|
37
|
+
mode = "standard";
|
|
38
|
+
} else {
|
|
39
|
+
mode = "quick";
|
|
40
|
+
}
|
|
36
41
|
}
|
|
37
42
|
|
|
38
43
|
// 4. Classify Risk
|