opencarly 1.0.0

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.
Files changed (59) hide show
  1. package/README.md +78 -0
  2. package/bin/install.js +304 -0
  3. package/commands/carly-manager.md +69 -0
  4. package/dist/config/discovery.d.ts +22 -0
  5. package/dist/config/discovery.d.ts.map +1 -0
  6. package/dist/config/discovery.js +43 -0
  7. package/dist/config/discovery.js.map +1 -0
  8. package/dist/config/index.d.ts +7 -0
  9. package/dist/config/index.d.ts.map +1 -0
  10. package/dist/config/index.js +7 -0
  11. package/dist/config/index.js.map +1 -0
  12. package/dist/config/manifest.d.ts +39 -0
  13. package/dist/config/manifest.d.ts.map +1 -0
  14. package/dist/config/manifest.js +139 -0
  15. package/dist/config/manifest.js.map +1 -0
  16. package/dist/config/schema.d.ts +663 -0
  17. package/dist/config/schema.d.ts.map +1 -0
  18. package/dist/config/schema.js +208 -0
  19. package/dist/config/schema.js.map +1 -0
  20. package/dist/engine/brackets.d.ts +26 -0
  21. package/dist/engine/brackets.d.ts.map +1 -0
  22. package/dist/engine/brackets.js +49 -0
  23. package/dist/engine/brackets.js.map +1 -0
  24. package/dist/engine/index.d.ts +8 -0
  25. package/dist/engine/index.d.ts.map +1 -0
  26. package/dist/engine/index.js +8 -0
  27. package/dist/engine/index.js.map +1 -0
  28. package/dist/engine/loader.d.ts +82 -0
  29. package/dist/engine/loader.d.ts.map +1 -0
  30. package/dist/engine/loader.js +147 -0
  31. package/dist/engine/loader.js.map +1 -0
  32. package/dist/engine/matcher.d.ts +43 -0
  33. package/dist/engine/matcher.d.ts.map +1 -0
  34. package/dist/engine/matcher.js +174 -0
  35. package/dist/engine/matcher.js.map +1 -0
  36. package/dist/engine/trimmer.d.ts +91 -0
  37. package/dist/engine/trimmer.d.ts.map +1 -0
  38. package/dist/engine/trimmer.js +236 -0
  39. package/dist/engine/trimmer.js.map +1 -0
  40. package/dist/formatter/formatter.d.ts +23 -0
  41. package/dist/formatter/formatter.d.ts.map +1 -0
  42. package/dist/formatter/formatter.js +129 -0
  43. package/dist/formatter/formatter.js.map +1 -0
  44. package/dist/index.d.ts +15 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +484 -0
  47. package/dist/index.js.map +1 -0
  48. package/dist/session/session.d.ts +60 -0
  49. package/dist/session/session.d.ts.map +1 -0
  50. package/dist/session/session.js +394 -0
  51. package/dist/session/session.js.map +1 -0
  52. package/package.json +59 -0
  53. package/templates/.opencarly/commands.json +96 -0
  54. package/templates/.opencarly/context.json +44 -0
  55. package/templates/.opencarly/domains/development.md +13 -0
  56. package/templates/.opencarly/domains/global.md +13 -0
  57. package/templates/.opencarly/domains/security.md +14 -0
  58. package/templates/.opencarly/domains/testing.md +12 -0
  59. package/templates/.opencarly/manifest.json +43 -0
@@ -0,0 +1,44 @@
1
+ {
2
+ "thresholds": {
3
+ "moderate": 15,
4
+ "depleted": 35,
5
+ "critical": 50
6
+ },
7
+ "brackets": {
8
+ "fresh": {
9
+ "enabled": true,
10
+ "rules": [
11
+ "Context mode: LEAN - minimal injection overhead",
12
+ "Trust recent context for implementation details",
13
+ "Focus on the current task without re-stating prior decisions"
14
+ ]
15
+ },
16
+ "moderate": {
17
+ "enabled": true,
18
+ "rules": [
19
+ "Context mode: STANDARD - reinforcing key context",
20
+ "Re-state the current goal or task before continuing",
21
+ "Reference specific file paths when discussing code",
22
+ "Summarize what has been done so far if changing direction"
23
+ ]
24
+ },
25
+ "depleted": {
26
+ "enabled": true,
27
+ "rules": [
28
+ "Context mode: REINFORCEMENT - heavy injection active",
29
+ "Summarize progress before continuing with new work",
30
+ "Be explicit about file paths, function names, and line numbers",
31
+ "Break remaining work into small, concrete steps",
32
+ "Consider whether the session should be compacted"
33
+ ]
34
+ }
35
+ },
36
+ "trimming": {
37
+ "enabled": true,
38
+ "mode": "moderate",
39
+ "preserveLastN": 3
40
+ },
41
+ "stats": {
42
+ "trackDuration": "all"
43
+ }
44
+ }
@@ -0,0 +1,13 @@
1
+ # Development Rules
2
+
3
+ Activated when writing, modifying, or discussing code.
4
+
5
+ - Code over explanation - show, don't tell
6
+ - Prefer editing existing files over creating new ones
7
+ - Use targeted edits and diffs rather than rewriting entire files
8
+ - Follow the language's idiomatic patterns and conventions
9
+ - Handle errors explicitly - don't silently swallow exceptions
10
+ - Add types/interfaces for function parameters and return values
11
+ - Keep functions focused - one responsibility per function
12
+ - Name variables and functions descriptively
13
+ - Consider edge cases: null, undefined, empty arrays, concurrent access
@@ -0,0 +1,13 @@
1
+ # Global Rules
2
+
3
+ These rules apply to every prompt, regardless of context.
4
+
5
+ - Use absolute paths when referencing files in the project
6
+ - Prefer editing existing files over creating new ones
7
+ - When making changes, show the minimal diff needed
8
+ - Read files before editing to understand current state
9
+ - Follow existing code patterns and conventions in the project
10
+ - If a task is ambiguous, ask for clarification before proceeding
11
+ - When multiple approaches exist, briefly mention alternatives
12
+ - Commit messages should be concise and describe the WHY, not the WHAT
13
+ - Do not add comments that merely restate what the code does
@@ -0,0 +1,14 @@
1
+ # Security Rules
2
+
3
+ Activated when working with authentication, secrets, or security-sensitive code.
4
+
5
+ - Never hardcode secrets, API keys, or passwords in source code
6
+ - Use environment variables or secret management for credentials
7
+ - Validate and sanitize all user input before processing
8
+ - Use parameterized queries - never concatenate SQL strings
9
+ - Apply the principle of least privilege for permissions and access
10
+ - Log security-relevant events but never log sensitive data
11
+ - Use HTTPS for all external API calls
12
+ - Set appropriate CORS headers - avoid wildcard origins in production
13
+ - Hash passwords with bcrypt or argon2 - never store plaintext
14
+ - Verify JWT signatures and check expiration on every request
@@ -0,0 +1,12 @@
1
+ # Testing Rules
2
+
3
+ Activated when writing or discussing tests.
4
+
5
+ - Write tests alongside the code they test
6
+ - Test behavior, not implementation details
7
+ - Use descriptive test names that explain the expected behavior
8
+ - Include edge cases: empty input, null values, boundary conditions
9
+ - Keep tests independent - no shared mutable state between tests
10
+ - Use arrange-act-assert (AAA) pattern for test structure
11
+ - Mock external dependencies, not internal modules
12
+ - Aim for meaningful coverage, not 100% line coverage
@@ -0,0 +1,43 @@
1
+ {
2
+ "version": 1,
3
+ "devmode": false,
4
+ "globalExclude": [],
5
+ "domains": {
6
+ "global": {
7
+ "state": "active",
8
+ "alwaysOn": true,
9
+ "recall": [],
10
+ "exclude": [],
11
+ "file": "domains/global.md"
12
+ },
13
+ "development": {
14
+ "state": "active",
15
+ "alwaysOn": false,
16
+ "recall": ["fix", "bug", "implement", "refactor", "write code", "function", "class", "component", "feature", "build", "create", "add", "update", "change", "modify", "code"],
17
+ "exclude": [],
18
+ "paths": ["*.ts", "*.js", "*.tsx", "*.jsx", "src/**/*"],
19
+ "file": "domains/development.md"
20
+ },
21
+ "testing": {
22
+ "state": "active",
23
+ "alwaysOn": false,
24
+ "recall": ["test", "testing", "TDD", "coverage", "spec", "jest", "vitest", "unit test", "integration test", "e2e"],
25
+ "exclude": [],
26
+ "paths": ["*.test.*", "*.spec.*", "tests/**/*", "__tests__/**/*"],
27
+ "file": "domains/testing.md"
28
+ },
29
+ "security": {
30
+ "state": "active",
31
+ "alwaysOn": false,
32
+ "recall": ["auth", "password", "token", "secret", "encrypt", "security", "permission", "credential", "API key", "OAuth", "JWT", "CORS", "XSS", "SQL injection"],
33
+ "exclude": [],
34
+ "file": "domains/security.md"
35
+ }
36
+ },
37
+ "commands": {
38
+ "state": "active"
39
+ },
40
+ "context": {
41
+ "state": "active"
42
+ }
43
+ }