@aimlsuperagent/agent 0.1.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 (44) hide show
  1. package/AGENTS.md +86 -0
  2. package/CONTRIBUTING.md +31 -0
  3. package/DEPLOYMENT_LOG.md +39 -0
  4. package/LICENSE +21 -0
  5. package/README.md +253 -0
  6. package/REPO_SOURCE_OF_TRUTH.json +77 -0
  7. package/SAFE_ENV_AUDIT.md +12 -0
  8. package/SECURITY.md +32 -0
  9. package/WORKING_NOTES.md +27 -0
  10. package/adapters/claude/CLAUDE.md +27 -0
  11. package/adapters/codex/AGENTS.md +24 -0
  12. package/adapters/cursor/rules.md +12 -0
  13. package/bin/aiml-superagent.js +477 -0
  14. package/docs/01-operating-model.md +95 -0
  15. package/docs/02-context-minimizer.md +113 -0
  16. package/docs/03-project-memory.md +83 -0
  17. package/docs/04-verification-loop.md +82 -0
  18. package/docs/05-secret-safe-operations.md +63 -0
  19. package/docs/06-deployment-discipline.md +50 -0
  20. package/docs/07-note-hygiene.md +51 -0
  21. package/docs/08-model-agnostic-use.md +53 -0
  22. package/docs/09-agent-evaluation.md +95 -0
  23. package/docs/10-adoption-playbook.md +62 -0
  24. package/docs/11-anti-patterns.md +85 -0
  25. package/docs/12-context-budget.md +52 -0
  26. package/docs/comparison-claude-md.md +56 -0
  27. package/docs/npm-private-publishing.md +89 -0
  28. package/docs/release-checklist.md +42 -0
  29. package/examples/nextjs-vercel-app/AGENTS.md +26 -0
  30. package/examples/nextjs-vercel-app/DEPLOYMENT_LOG.md +13 -0
  31. package/examples/nextjs-vercel-app/README.md +12 -0
  32. package/examples/nextjs-vercel-app/REPO_SOURCE_OF_TRUTH.json +65 -0
  33. package/examples/nextjs-vercel-app/SAFE_ENV_AUDIT.md +9 -0
  34. package/examples/nextjs-vercel-app/WORKING_NOTES.md +16 -0
  35. package/package.json +57 -0
  36. package/schemas/repo-source-of-truth.schema.json +122 -0
  37. package/templates/AGENTS.template.md +42 -0
  38. package/templates/DEPLOYMENT_LOG.template.md +11 -0
  39. package/templates/INCIDENT_REPORT.template.md +26 -0
  40. package/templates/PRODUCTION_CHECK.template.md +24 -0
  41. package/templates/REPO_SOURCE_OF_TRUTH.template.json +57 -0
  42. package/templates/SAFE_ENV_AUDIT.template.md +8 -0
  43. package/templates/TASK_BRIEF.template.md +22 -0
  44. package/templates/WORKING_NOTES.template.md +18 -0
@@ -0,0 +1,56 @@
1
+ # AiML SuperAgent And CLAUDE.md
2
+
3
+ A `CLAUDE.md` file can teach an assistant how to behave.
4
+
5
+ AiML SuperAgent teaches an assistant how to operate a real project over time.
6
+
7
+ ## The Behavior Layer
8
+
9
+ The viral `CLAUDE.md` pattern is strong because it captures obvious engineering discipline:
10
+
11
+ - think before coding
12
+ - keep changes simple
13
+ - make surgical edits
14
+ - define success criteria
15
+ - verify the result
16
+
17
+ That should remain the baseline.
18
+
19
+ ## The Missing Operating Layer
20
+
21
+ Behavior rules do not answer:
22
+
23
+ - Which repository owns production?
24
+ - Which deployment is live?
25
+ - Which env var is stale?
26
+ - Which logs are resolved history?
27
+ - Which notes are safe to trust?
28
+ - Which files should not be loaded by default?
29
+ - Which proof is meaningful for this task?
30
+ - Which credential names are safe to document?
31
+
32
+ AiML SuperAgent adds that layer.
33
+
34
+ ## Practical Difference
35
+
36
+ Behavior rule:
37
+
38
+ ```text
39
+ Do not make unnecessary changes.
40
+ ```
41
+
42
+ Operating rule:
43
+
44
+ ```text
45
+ Before changing this route, confirm which backend is live, check the deployment log, inspect only the route and config files, avoid stale notes, patch the smallest diff, run the route probe, then update durable memory only if the production fact changed.
46
+ ```
47
+
48
+ ## Positioning
49
+
50
+ AiML SuperAgent is not a replacement for `CLAUDE.md`.
51
+
52
+ It is the next layer after it:
53
+
54
+ - use `CLAUDE.md` for session behavior
55
+ - use AiML SuperAgent for project memory, verification, deployment discipline, secret safety, and context minimization
56
+
@@ -0,0 +1,89 @@
1
+ # Private npm Publishing
2
+
3
+ This repository is prepared for a private npm package named:
4
+
5
+ ```text
6
+ @aimlsuperagent/agent
7
+ ```
8
+
9
+ Do not publish until npm confirms that the `@aimlsuperagent` scope is owned by the correct account or organization and private packages are enabled.
10
+
11
+ ## Current Safety State
12
+
13
+ `package.json` intentionally keeps:
14
+
15
+ ```json
16
+ "private": true
17
+ ```
18
+
19
+ That blocks accidental publishing.
20
+
21
+ The package also includes:
22
+
23
+ ```json
24
+ "publishConfig": {
25
+ "access": "restricted",
26
+ "registry": "https://registry.npmjs.org/"
27
+ }
28
+ ```
29
+
30
+ Restricted access is the npm setting required for a private scoped package.
31
+
32
+ ## Confirm Scope Ownership
33
+
34
+ Log in:
35
+
36
+ ```bash
37
+ npm login
38
+ npm whoami
39
+ ```
40
+
41
+ Check organization or scope access:
42
+
43
+ ```bash
44
+ npm org ls aimlsuperagent
45
+ npm access ls-packages @aimlsuperagent
46
+ ```
47
+
48
+ If those commands fail because the scope or organization does not exist, create or claim the npm organization/scope before publishing.
49
+
50
+ ## Dry Run
51
+
52
+ Run:
53
+
54
+ ```bash
55
+ npm run check:release
56
+ npm run pack:dry-run
57
+ ```
58
+
59
+ Review the file list. It should include docs, templates, examples, schemas, the CLI, and root operating files. It should not include secrets, local logs, or build output.
60
+
61
+ ## Publishing Procedure
62
+
63
+ Only after private package access is confirmed:
64
+
65
+ 1. Remove `"private": true` from `package.json` in a dedicated publish commit.
66
+ 2. Run:
67
+
68
+ ```bash
69
+ npm run check:release
70
+ npm run pack:dry-run
71
+ npm publish --access restricted
72
+ ```
73
+
74
+ Do not run `npm publish --access public`.
75
+
76
+ ## Install
77
+
78
+ Authorized users can install globally:
79
+
80
+ ```bash
81
+ npm login
82
+ npm i -g @aimlsuperagent/agent
83
+ aiml-superagent --help
84
+ ```
85
+
86
+ ## Failure Rule
87
+
88
+ If npm cannot confirm restricted/private access, do not publish. Keep using the private GitHub repo or a private tarball.
89
+
@@ -0,0 +1,42 @@
1
+ # Release Checklist
2
+
3
+ Use this before making the repository public.
4
+
5
+ ## Repository State
6
+
7
+ - Repository visibility intentionally selected.
8
+ - README quick start tested.
9
+ - `npm run check` passes.
10
+ - No actual secrets in docs, examples, notes, commit history, or issue templates.
11
+ - License decision made intentionally.
12
+ - Package publishing state is intentional.
13
+
14
+ ## Content
15
+
16
+ - README explains the project in one minute.
17
+ - Comparison to behavior-only agent rules is respectful and accurate.
18
+ - Context Minimizer is prominent.
19
+ - Templates are copy-safe.
20
+ - Examples are fictional or sanitized.
21
+ - Docs do not depend on private company infrastructure.
22
+
23
+ ## Verification
24
+
25
+ ```bash
26
+ npm run check
27
+ node bin/aiml-superagent.js check . --release --strict
28
+ git status --short
29
+ ```
30
+
31
+ Optional:
32
+
33
+ ```bash
34
+ node bin/aiml-superagent.js init /tmp/superagent-smoke
35
+ node bin/aiml-superagent.js check /tmp/superagent-smoke
36
+ ```
37
+
38
+ ## Publication
39
+
40
+ - Confirm MIT License is still the intended public license.
41
+ - Remove private release candidate wording if appropriate.
42
+ - Tag first public release.
@@ -0,0 +1,26 @@
1
+ # Agent Operating Contract
2
+
3
+ ## Project Mission
4
+
5
+ Example Next.js app deployed on Vercel.
6
+
7
+ ## First Files To Read
8
+
9
+ 1. `REPO_SOURCE_OF_TRUTH.json`
10
+ 2. `WORKING_NOTES.md`
11
+ 3. current task prompt
12
+
13
+ ## Working Rules
14
+
15
+ - Verify the live route before assuming production behavior.
16
+ - Use `rg --files` and `rg -n` before opening broad folders.
17
+ - Do not store Vercel tokens or env values in notes.
18
+ - Use small diffs and run `npm run build` before deploy.
19
+
20
+ ## Verification
21
+
22
+ ```bash
23
+ npm run build
24
+ curl -sSI https://example.com
25
+ ```
26
+
@@ -0,0 +1,13 @@
1
+ # Deployment Log
2
+
3
+ This is a fictional example. Do not treat it as a real deployment record.
4
+
5
+ ## 2026-05-31 - Example Production
6
+
7
+ Platform: Vercel
8
+ Commit or build: example-only
9
+ Change: Demonstrates how to record a deployment.
10
+ Verification: `curl -sSI https://example.com` returns a response from the placeholder domain.
11
+ Rollback: redeploy previous known-good production deployment.
12
+ Risks: none because this is not a real deployment.
13
+
@@ -0,0 +1,12 @@
1
+ # Example: Next.js Vercel App
2
+
3
+ This example shows how a web app can adopt AiML SuperAgent without exposing secrets.
4
+
5
+ It includes:
6
+
7
+ - `AGENTS.md`
8
+ - `REPO_SOURCE_OF_TRUTH.json`
9
+ - `WORKING_NOTES.md`
10
+
11
+ Use it as a starting point, not as a real deployment config.
12
+
@@ -0,0 +1,65 @@
1
+ {
2
+ "$schema": "../../schemas/repo-source-of-truth.schema.json",
3
+ "project": {
4
+ "name": "Example Next.js Vercel App",
5
+ "purpose": "Demonstrate AiML SuperAgent memory for a deployed web app.",
6
+ "status": "example",
7
+ "primaryAudience": [
8
+ "web app teams"
9
+ ]
10
+ },
11
+ "sourceOfTruth": {
12
+ "behaviorContract": "AGENTS.md",
13
+ "durableNotes": "WORKING_NOTES.md",
14
+ "deploymentLog": "DEPLOYMENT_LOG.md",
15
+ "envAudit": "SAFE_ENV_AUDIT.md"
16
+ },
17
+ "contextMinimizer": {
18
+ "readFirst": [
19
+ "AGENTS.md",
20
+ "REPO_SOURCE_OF_TRUTH.json",
21
+ "WORKING_NOTES.md"
22
+ ],
23
+ "doNotLoadByDefault": [
24
+ ".git",
25
+ "node_modules",
26
+ ".next",
27
+ "dist",
28
+ "coverage",
29
+ "large logs",
30
+ "old screenshots"
31
+ ],
32
+ "searchFirst": [
33
+ "rg --files",
34
+ "rg -n \"route|env|api|middleware\""
35
+ ],
36
+ "contextRules": [
37
+ "Open route files only after search identifies them.",
38
+ "Verify production route headers with curl before claiming deploy success.",
39
+ "Store env var names and roles only."
40
+ ]
41
+ },
42
+ "verification": {
43
+ "defaultCommands": [
44
+ "npm run build"
45
+ ],
46
+ "releaseChecks": [
47
+ "curl -sSI https://example.com returns 200",
48
+ "no secret values in repo"
49
+ ]
50
+ },
51
+ "secrets": {
52
+ "policy": "Store names and roles only. Never store values.",
53
+ "allowedExamples": [
54
+ "DATABASE_URL",
55
+ "VERCEL_PROJECT_ID",
56
+ "OPENAI_API_KEY"
57
+ ],
58
+ "forbiddenExamples": [
59
+ "actual tokens",
60
+ "database URLs with passwords",
61
+ "private keys"
62
+ ]
63
+ }
64
+ }
65
+
@@ -0,0 +1,9 @@
1
+ # Safe Environment Audit
2
+
3
+ This is a fictional example. No real secrets are required.
4
+
5
+ | Name | Role | Environments | Source Of Truth | Status | Last Verified |
6
+ | --- | --- | --- | --- | --- | --- |
7
+ | DATABASE_URL | Server database connection | production, preview | hosting provider env | placeholder | 2026-05-31 |
8
+ | OPENAI_API_KEY | Server-side model calls | production | hosting provider env | placeholder | 2026-05-31 |
9
+
@@ -0,0 +1,16 @@
1
+ # Working Notes
2
+
3
+ ## Current Durable Facts
4
+
5
+ - This is a fictional example.
6
+ - Production URL uses `https://example.com` as a placeholder.
7
+ - Env var names may be documented; values must never be stored.
8
+
9
+ ## Active Risks
10
+
11
+ - None. This example does not connect to a real deployment.
12
+
13
+ ## Recent Verification
14
+
15
+ - Not applicable.
16
+
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "@aimlsuperagent/agent",
3
+ "version": "0.1.0",
4
+ "description": "A token-efficient operating framework for AI coding assistants.",
5
+ "type": "module",
6
+ "bin": {
7
+ "aiml-superagent": "bin/aiml-superagent.js"
8
+ },
9
+ "files": [
10
+ "bin/",
11
+ "adapters/",
12
+ "docs/",
13
+ "examples/",
14
+ "schemas/",
15
+ "templates/",
16
+ "AGENTS.md",
17
+ "CONTRIBUTING.md",
18
+ "DEPLOYMENT_LOG.md",
19
+ "LICENSE",
20
+ "README.md",
21
+ "REPO_SOURCE_OF_TRUTH.json",
22
+ "SAFE_ENV_AUDIT.md",
23
+ "SECURITY.md",
24
+ "WORKING_NOTES.md"
25
+ ],
26
+ "scripts": {
27
+ "check": "node bin/aiml-superagent.js check .",
28
+ "check:json": "node bin/aiml-superagent.js check . --json",
29
+ "check:release": "node bin/aiml-superagent.js check . --release --strict",
30
+ "pack:dry-run": "npm pack --dry-run --cache ./.npm-cache",
31
+ "prepublishOnly": "node scripts/assert-private-publish-ready.js && node bin/aiml-superagent.js check . --release --strict"
32
+ },
33
+ "keywords": [
34
+ "ai",
35
+ "coding-agent",
36
+ "agents",
37
+ "context-minimizer",
38
+ "developer-tools",
39
+ "llm"
40
+ ],
41
+ "homepage": "https://aimlsuperagent.com",
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/whisperaiml/superagent-repo.git"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/whisperaiml/superagent-repo/issues"
48
+ },
49
+ "engines": {
50
+ "node": ">=18"
51
+ },
52
+ "publishConfig": {
53
+ "access": "restricted",
54
+ "registry": "https://registry.npmjs.org/"
55
+ },
56
+ "license": "MIT"
57
+ }
@@ -0,0 +1,122 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://aimlsuperagent.com/schemas/repo-source-of-truth.schema.json",
4
+ "title": "AiML SuperAgent Repo Source Of Truth",
5
+ "type": "object",
6
+ "required": [
7
+ "project",
8
+ "sourceOfTruth",
9
+ "contextMinimizer",
10
+ "verification",
11
+ "secrets"
12
+ ],
13
+ "properties": {
14
+ "project": {
15
+ "type": "object",
16
+ "required": [
17
+ "name",
18
+ "purpose",
19
+ "status"
20
+ ],
21
+ "properties": {
22
+ "name": {
23
+ "type": "string"
24
+ },
25
+ "purpose": {
26
+ "type": "string"
27
+ },
28
+ "status": {
29
+ "type": "string"
30
+ },
31
+ "primaryAudience": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "string"
35
+ }
36
+ }
37
+ }
38
+ },
39
+ "sourceOfTruth": {
40
+ "type": "object",
41
+ "additionalProperties": {
42
+ "type": "string"
43
+ }
44
+ },
45
+ "contextMinimizer": {
46
+ "type": "object",
47
+ "required": [
48
+ "readFirst",
49
+ "doNotLoadByDefault",
50
+ "searchFirst",
51
+ "contextRules"
52
+ ],
53
+ "properties": {
54
+ "readFirst": {
55
+ "type": "array",
56
+ "items": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "doNotLoadByDefault": {
61
+ "type": "array",
62
+ "items": {
63
+ "type": "string"
64
+ }
65
+ },
66
+ "searchFirst": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "contextRules": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string"
76
+ }
77
+ }
78
+ }
79
+ },
80
+ "verification": {
81
+ "type": "object",
82
+ "properties": {
83
+ "defaultCommands": {
84
+ "type": "array",
85
+ "items": {
86
+ "type": "string"
87
+ }
88
+ },
89
+ "releaseChecks": {
90
+ "type": "array",
91
+ "items": {
92
+ "type": "string"
93
+ }
94
+ }
95
+ }
96
+ },
97
+ "secrets": {
98
+ "type": "object",
99
+ "required": [
100
+ "policy"
101
+ ],
102
+ "properties": {
103
+ "policy": {
104
+ "type": "string"
105
+ },
106
+ "allowedExamples": {
107
+ "type": "array",
108
+ "items": {
109
+ "type": "string"
110
+ }
111
+ },
112
+ "forbiddenExamples": {
113
+ "type": "array",
114
+ "items": {
115
+ "type": "string"
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ }
122
+
@@ -0,0 +1,42 @@
1
+ # Agent Operating Contract
2
+
3
+ ## Project Mission
4
+
5
+ Describe the project in one paragraph.
6
+
7
+ ## First Files To Read
8
+
9
+ 1. `REPO_SOURCE_OF_TRUTH.json`
10
+ 2. `WORKING_NOTES.md`
11
+ 3. the current task prompt
12
+
13
+ ## Working Rules
14
+
15
+ - Use targeted search before loading broad folders.
16
+ - Make small, task-traceable diffs.
17
+ - Verify production reality before changing code when the task depends on live state.
18
+ - Do not store secrets in notes, examples, commits, or logs.
19
+ - Update durable notes only when reality changed.
20
+
21
+ ## Do Not Load By Default
22
+
23
+ - `.git`
24
+ - `node_modules`
25
+ - `.next`
26
+ - `dist`
27
+ - `build`
28
+ - `coverage`
29
+ - large logs
30
+ - generated files
31
+ - archived incidents
32
+
33
+ ## Verification
34
+
35
+ Default proof command:
36
+
37
+ ```bash
38
+ REPLACE_WITH_COMMAND
39
+ ```
40
+
41
+ If the command cannot run, state why.
42
+
@@ -0,0 +1,11 @@
1
+ # Deployment Log
2
+
3
+ ## YYYY-MM-DD - ENVIRONMENT
4
+
5
+ Platform:
6
+ Commit or build:
7
+ Change:
8
+ Verification:
9
+ Rollback:
10
+ Risks:
11
+
@@ -0,0 +1,26 @@
1
+ # Incident Report
2
+
3
+ ## Summary
4
+
5
+ What happened?
6
+
7
+ ## Impact
8
+
9
+ Who or what was affected?
10
+
11
+ ## Cause
12
+
13
+ What was the verified cause?
14
+
15
+ ## Fix
16
+
17
+ What changed?
18
+
19
+ ## Verification
20
+
21
+ How was the fix proved?
22
+
23
+ ## Future Memory
24
+
25
+ What should future agents remember?
26
+
@@ -0,0 +1,24 @@
1
+ # Production Check
2
+
3
+ ## Target
4
+
5
+ URL, service, account, device, or deployment being checked.
6
+
7
+ ## Reason
8
+
9
+ Why production reality matters for this task.
10
+
11
+ ## Read-Only Checks
12
+
13
+ ```bash
14
+ COMMANDS_HERE
15
+ ```
16
+
17
+ ## Result
18
+
19
+ Observed behavior.
20
+
21
+ ## Decision
22
+
23
+ What this proves or changes.
24
+
@@ -0,0 +1,57 @@
1
+ {
2
+ "$schema": "./schemas/repo-source-of-truth.schema.json",
3
+ "project": {
4
+ "name": "PROJECT_NAME",
5
+ "purpose": "One sentence describing what this project does.",
6
+ "status": "active",
7
+ "primaryAudience": []
8
+ },
9
+ "sourceOfTruth": {
10
+ "behaviorContract": "AGENTS.md",
11
+ "durableNotes": "WORKING_NOTES.md",
12
+ "deploymentLog": "DEPLOYMENT_LOG.md",
13
+ "envAudit": "SAFE_ENV_AUDIT.md"
14
+ },
15
+ "contextMinimizer": {
16
+ "readFirst": [
17
+ "AGENTS.md",
18
+ "REPO_SOURCE_OF_TRUTH.json",
19
+ "WORKING_NOTES.md"
20
+ ],
21
+ "doNotLoadByDefault": [
22
+ ".git",
23
+ "node_modules",
24
+ "dist",
25
+ "build",
26
+ ".next",
27
+ "coverage",
28
+ "large logs",
29
+ "generated artifacts"
30
+ ],
31
+ "searchFirst": [
32
+ "rg --files",
33
+ "rg -n \"keyword\""
34
+ ],
35
+ "contextRules": [
36
+ "Load only files directly related to the task.",
37
+ "Summarize long logs before saving them.",
38
+ "Move resolved incidents into archive.",
39
+ "Store credential names and roles only."
40
+ ]
41
+ },
42
+ "verification": {
43
+ "defaultCommands": [],
44
+ "releaseChecks": []
45
+ },
46
+ "secrets": {
47
+ "policy": "Store names and roles only. Never store values.",
48
+ "allowedExamples": [],
49
+ "forbiddenExamples": [
50
+ "actual tokens",
51
+ "private keys",
52
+ "passwords",
53
+ "customer PII"
54
+ ]
55
+ }
56
+ }
57
+
@@ -0,0 +1,8 @@
1
+ # Safe Environment Audit
2
+
3
+ Do not store values. Store names, roles, scope, and verification status only.
4
+
5
+ | Name | Role | Environments | Source Of Truth | Status | Last Verified |
6
+ | --- | --- | --- | --- | --- | --- |
7
+ | EXAMPLE_API_KEY | Example external API access | production, preview | hosting provider env | placeholder | YYYY-MM-DD |
8
+