@flancer32/skill-adsm-ctx 0.2.1 → 0.3.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.
- package/CHANGELOG.md +14 -0
- package/README.md +37 -14
- package/bin/adsm-ctx.mjs +44 -0
- package/package.json +65 -11
- package/skill/SKILL.md +2 -2
- package/skill/references/context-lifecycle.md +3 -3
- package/skill/references/document-projections.md +7 -65
- package/skill/references/documentation-quality-audit.md +22 -14
- package/skill/references/semantic-skins.md +65 -0
- package/skill/templates/work/context/semantic-skin.md +11 -22
- package/src/Cli/Command/Design.mjs +17 -0
- package/src/Cli/Command/Init.mjs +22 -0
- package/src/Cli/Command/InstallSkill.mjs +18 -0
- package/src/Cli/Command/Upgrade.mjs +19 -0
- package/src/Cli/Command/Validate.mjs +19 -0
- package/src/Shared/Constants.mjs +0 -4
- package/src/Validate/Service.mjs +14 -178
- package/types.d.ts +5 -2
- package/.github/workflows/flows-app.yaml +0 -95
- package/AGENTS.md +0 -112
- package/bin/cli.mjs +0 -55
- package/ctx/AGENTS.md +0 -44
- package/ctx/README.md +0 -24
- package/ctx/adsm.json +0 -5
- package/ctx/agent/AGENTS.md +0 -41
- package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
- package/ctx/agent/flows/AGENTS.md +0 -37
- package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
- package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
- package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
- package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
- package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
- package/ctx/agent/flows/cfg/profile.json +0 -40
- package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
- package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
- package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
- package/ctx/agent/flows/deployment.md +0 -116
- package/ctx/agent/flows/labels.md +0 -108
- package/ctx/agent/flows/overview.md +0 -82
- package/ctx/agent/prompt/cli/ai-intro.md +0 -141
- package/ctx/assets/.gitkeep +0 -1
- package/ctx/docs/AGENTS.md +0 -121
- package/ctx/docs/ai-intro.md +0 -37
- package/ctx/docs/architecture/AGENTS.md +0 -98
- package/ctx/docs/architecture/behavior.md +0 -68
- package/ctx/docs/architecture/checklists.md +0 -48
- package/ctx/docs/architecture/constraints.md +0 -53
- package/ctx/docs/architecture/constraints.skin.en.md +0 -38
- package/ctx/docs/architecture/decisions.md +0 -118
- package/ctx/docs/architecture/integration.md +0 -31
- package/ctx/docs/architecture/overview.md +0 -76
- package/ctx/docs/architecture/state.md +0 -50
- package/ctx/docs/architecture/structure.md +0 -38
- package/ctx/docs/architecture/supervision.md +0 -71
- package/ctx/docs/code/AGENTS.md +0 -51
- package/ctx/docs/code/overview.md +0 -53
- package/ctx/docs/code/testing.md +0 -26
- package/ctx/docs/environment/AGENTS.md +0 -50
- package/ctx/docs/environment/overview.md +0 -33
- package/ctx/docs/filesystem.md +0 -44
- package/ctx/docs/product/AGENTS.md +0 -51
- package/ctx/docs/product/domain.md +0 -63
- package/ctx/docs/product/domain.skin.en.md +0 -40
- package/ctx/docs/product/glossary.md +0 -31
- package/ctx/docs/product/overview.md +0 -112
- package/ctx/docs/product/overview.skin.en.md +0 -38
- package/ctx/docs/product/roles.md +0 -17
- package/ctx/docs/product/use-cases.md +0 -15
- package/src/Bootstrap/Cli.mjs +0 -62
- package/src/Bootstrap.mjs +0 -108
- package/test/integration/.gitkeep +0 -1
- package/test/integration/cli-help.test.mjs +0 -15
- package/test/integration/cli-init-validate.test.mjs +0 -223
- package/test/integration/cli-install-skill.test.mjs +0 -41
- package/test/unit/Bootstrap/Cli.test.mjs +0 -23
- package/test/unit/Bootstrap.test.mjs +0 -53
- package/test/unit/Design/Service.test.mjs +0 -11
- package/test/unit/Init/Service.test.mjs +0 -51
- package/test/unit/Shared/Constants.test.mjs +0 -21
- package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
- package/test/unit/Shared/Metadata.test.mjs +0 -9
- package/test/unit/Shared/Path.test.mjs +0 -11
- package/test/unit/Skill/Installer.test.mjs +0 -20
- package/test/unit/Upgrade/Service.test.mjs +0 -13
- package/test/unit/Validate/Service.test.mjs +0 -760
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"trigger": {
|
|
3
|
-
"event": "pull_request",
|
|
4
|
-
"action": "labeled",
|
|
5
|
-
"pullRequestLabelAdded": "adsm:verified"
|
|
6
|
-
},
|
|
7
|
-
"execution": {
|
|
8
|
-
"handler": {
|
|
9
|
-
"promptRef": "prompt.md",
|
|
10
|
-
"promptVariables": {
|
|
11
|
-
"PR_NUMBER": "event.pull_request.number"
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
You are a Codex agent working inside the repository workspace.
|
|
2
|
-
|
|
3
|
-
Agent role: `merge-agent`.
|
|
4
|
-
|
|
5
|
-
The repository context is mounted at `ctx/`.
|
|
6
|
-
|
|
7
|
-
Your task is to merge a Pull Request only when validation evidence is complete and current.
|
|
8
|
-
|
|
9
|
-
## Technical event facts
|
|
10
|
-
|
|
11
|
-
Repository: {{REPOSITORY}}
|
|
12
|
-
Pull Request: #{{PR_NUMBER}}
|
|
13
|
-
|
|
14
|
-
## Required Pull Request read
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
gh pr view "{{PR_NUMBER}}" \
|
|
18
|
-
--repo "{{REPOSITORY}}" \
|
|
19
|
-
--comments \
|
|
20
|
-
--json number,title,body,labels,comments,commits,headRefName,headRefOid,baseRefName,mergeStateStatus,statusCheckRollup,url
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Merge preconditions
|
|
24
|
-
|
|
25
|
-
Confirm all of the following:
|
|
26
|
-
|
|
27
|
-
1. the Pull Request currently has `adsm:verified`;
|
|
28
|
-
2. use the latest Pull Request comment whose body starts with `### Validation result`;
|
|
29
|
-
3. that latest validation result exists and contains:
|
|
30
|
-
|
|
31
|
-
```text
|
|
32
|
-
### Validation result
|
|
33
|
-
State: adsm:verified
|
|
34
|
-
Head: <sha>
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
4. the `Head:` value from that latest validation comment equals the current Pull Request head SHA from `headRefOid`;
|
|
38
|
-
5. the Pull Request targets `main`;
|
|
39
|
-
6. required checks passed, if checks are configured;
|
|
40
|
-
7. no contradictory evidence is present;
|
|
41
|
-
8. the latest relevant validation result still applies to the current PR head commit.
|
|
42
|
-
|
|
43
|
-
## Required outcome
|
|
44
|
-
|
|
45
|
-
- merge the Pull Request only if every precondition is satisfied;
|
|
46
|
-
- if merge is unsafe, post a comment explaining why, remove stale `adsm:*` Pull Request labels from the current Pull Request, then add `adsm:needs-fix`.
|
|
47
|
-
|
|
48
|
-
Do not rewrite validation evidence. Do not merge when the latest validation result is missing, stale, contradictory, malformed, or bound to a different head SHA than the current Pull Request head.
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
# Deployment And Operation
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/agent/flows/deployment.md`
|
|
4
|
-
- Changed: `20260610`
|
|
5
|
-
|
|
6
|
-
## Runtime User
|
|
7
|
-
|
|
8
|
-
The workflow is intended to run under the server user `agentess`.
|
|
9
|
-
|
|
10
|
-
This documentation describes the concrete deployment binding for that `agentess` server environment. It is not a generic deployment template.
|
|
11
|
-
|
|
12
|
-
## Workspace Layout
|
|
13
|
-
|
|
14
|
-
Recommended host paths:
|
|
15
|
-
|
|
16
|
-
- repository checkout: `/home/agentess/work/flancer32/skill-adsm-ctx`
|
|
17
|
-
- `github-flows` workspace root: `/home/agentess/var/github-flows`
|
|
18
|
-
- effective configuration directory: `/home/agentess/var/github-flows/cfg`
|
|
19
|
-
|
|
20
|
-
`github-flows` resolves profile fragments from `workspaceRoot/cfg/`.
|
|
21
|
-
|
|
22
|
-
## Configuration Placement
|
|
23
|
-
|
|
24
|
-
Source configuration tree:
|
|
25
|
-
|
|
26
|
-
- `/home/agentess/work/flancer32/skill-adsm-ctx/ctx/agent/flows/cfg`
|
|
27
|
-
|
|
28
|
-
Deployment must copy, bind-mount, or otherwise expose that tree at:
|
|
29
|
-
|
|
30
|
-
- `/home/agentess/var/github-flows/cfg`
|
|
31
|
-
|
|
32
|
-
The profile tree is self-contained. Each stage profile resolves `promptRef` relative to its own directory.
|
|
33
|
-
|
|
34
|
-
## Context Source
|
|
35
|
-
|
|
36
|
-
The workflow uses the repository checkout as-is.
|
|
37
|
-
|
|
38
|
-
- `ctx/` must already exist inside the checked-out repository;
|
|
39
|
-
- runtime setup must validate the presence of `ctx/AGENTS.md` and `ctx/docs/`;
|
|
40
|
-
- runtime setup must not delete repository `ctx/` and must not replace it from another repository or archive.
|
|
41
|
-
|
|
42
|
-
This project uses one repository for both the product and its cognitive context. There is no separate `ctx` repository in this deployment model.
|
|
43
|
-
|
|
44
|
-
## Environment Pattern
|
|
45
|
-
|
|
46
|
-
Keep operational secrets outside the repository in a service environment file, for example:
|
|
47
|
-
|
|
48
|
-
- `/home/agentess/.config/github-flows/app.env`
|
|
49
|
-
|
|
50
|
-
Typical variables:
|
|
51
|
-
|
|
52
|
-
- `GITHUB_TOKEN` for `gh`
|
|
53
|
-
- `OPENAI_API_KEY` for Codex
|
|
54
|
-
- `GITHUB_FLOWS_WEBHOOK_SECRET` for webhook admission
|
|
55
|
-
- `LOG_LEVEL`
|
|
56
|
-
|
|
57
|
-
Do not commit secrets or tokens into this repository.
|
|
58
|
-
|
|
59
|
-
## Authentication Expectations
|
|
60
|
-
|
|
61
|
-
`gh` authentication:
|
|
62
|
-
|
|
63
|
-
- the `agentess` user must have a valid GitHub CLI login in `/home/agentess/.config/gh`;
|
|
64
|
-
- the token must allow repository read/write operations required by this workflow.
|
|
65
|
-
|
|
66
|
-
Codex authentication:
|
|
67
|
-
|
|
68
|
-
- the `agentess` user must have a valid Codex configuration in `/home/agentess/.codex`;
|
|
69
|
-
- the root profile mounts both `~/.codex` and `~/.config/gh` into the agent container.
|
|
70
|
-
- the current root profile expects direct host access to `/home/agentess/.codex` and `/home/agentess/.config/gh`.
|
|
71
|
-
|
|
72
|
-
## Event Attribute Contract
|
|
73
|
-
|
|
74
|
-
Package-owned routing fields:
|
|
75
|
-
|
|
76
|
-
- `event`
|
|
77
|
-
- `repository`
|
|
78
|
-
- `action`
|
|
79
|
-
- `actorLogin`
|
|
80
|
-
|
|
81
|
-
Host-provided routing fields required by this workflow:
|
|
82
|
-
|
|
83
|
-
- `issueLabelAdded`
|
|
84
|
-
- `pullRequestLabelAdded`
|
|
85
|
-
- `pullRequestMerged`
|
|
86
|
-
|
|
87
|
-
The host application must expose those three additional attributes for the current admitted event.
|
|
88
|
-
|
|
89
|
-
## Required Webhook Events
|
|
90
|
-
|
|
91
|
-
- `issues.opened`
|
|
92
|
-
- `issues.labeled`
|
|
93
|
-
- `pull_request.labeled`
|
|
94
|
-
- `pull_request.closed`
|
|
95
|
-
|
|
96
|
-
## Required GitHub Permissions
|
|
97
|
-
|
|
98
|
-
- read issues
|
|
99
|
-
- write issue comments
|
|
100
|
-
- manage labels
|
|
101
|
-
- create branches
|
|
102
|
-
- push commits
|
|
103
|
-
- create Pull Requests
|
|
104
|
-
- read Pull Requests
|
|
105
|
-
- read checks
|
|
106
|
-
- merge Pull Requests
|
|
107
|
-
- close issues
|
|
108
|
-
|
|
109
|
-
## Execution Assumptions
|
|
110
|
-
|
|
111
|
-
- the agent runs in Docker through `github-flows`;
|
|
112
|
-
- the repository is available inside the container at `/workspace/repo`;
|
|
113
|
-
- `ctx/` is already present in the repository checkout and is used directly;
|
|
114
|
-
- the shared root profile uses `codex exec` with `gpt-5.4` and `model_reasoning_effort=medium`;
|
|
115
|
-
- the implementation and fix stage profiles override the handler args to use `gpt-5.4-mini` with `model_reasoning_effort=low`;
|
|
116
|
-
- direct pushes to `main` are prohibited.
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
# Workflow Labels
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/agent/flows/labels.md`
|
|
4
|
-
- Changed: `20260610`
|
|
5
|
-
|
|
6
|
-
## Label Rules
|
|
7
|
-
|
|
8
|
-
- Current workflow labels mark active processing state.
|
|
9
|
-
- Terminal outcome labels classify the final result of a closed issue.
|
|
10
|
-
- One open issue or Pull Request should have at most one current workflow `adsm:*` label.
|
|
11
|
-
- A closed issue should keep exactly one terminal outcome `adsm:*` label.
|
|
12
|
-
- Comments explain decisions; labels trigger the next event-driven stage.
|
|
13
|
-
- Issue labels and Pull Request labels do not imply that transitions stay on the same object.
|
|
14
|
-
- When a stage applies the next workflow label, it must first remove stale current workflow `adsm:*` labels from that same current object and keep unrelated labels unchanged.
|
|
15
|
-
- When a terminal outcome label is applied, stale current workflow labels must be removed from that issue.
|
|
16
|
-
- `adsm:needs-clarification` blocks issue-side progress until trusted human input is provided.
|
|
17
|
-
- `adsm:needs-fix` blocks Pull Request-side progress until another fix iteration is delivered.
|
|
18
|
-
|
|
19
|
-
## Current Workflow Labels
|
|
20
|
-
|
|
21
|
-
| Label | Applies To | Stage Trigger | Valid Previous States | Valid Next States | Class |
|
|
22
|
-
| ----------------------------- | ------------ | --------------------------------------------------------------------------- | --------------------------------------------------------------- | -------------------------------------------------------------------------- | ---------------- |
|
|
23
|
-
| `adsm:accepted` | Issue | `issues.labeled` via `issueLabelAdded=adsm:accepted` | `issues.opened`, `adsm:clarification-provided` | Pull Request `adsm:ready-for-validation`, issue `adsm:needs-clarification` | Transitional |
|
|
24
|
-
| `adsm:needs-clarification` | Issue | none; manual blocking state only | `issues.opened`, `adsm:clarification-provided`, `adsm:accepted` | `adsm:clarification-provided`, `adsm:answered`, `adsm:rejected` | Blocking, manual |
|
|
25
|
-
| `adsm:clarification-provided` | Issue | `issues.labeled` via `issueLabelAdded=adsm:clarification-provided` | `adsm:needs-clarification` | `adsm:accepted`, `adsm:answered`, `adsm:needs-clarification`, `adsm:rejected` | Transitional |
|
|
26
|
-
| `adsm:ready-for-validation` | Pull Request | `pull_request.labeled` via `pullRequestLabelAdded=adsm:ready-for-validation` | none, `adsm:needs-fix` | `adsm:verified`, `adsm:needs-fix` | Transitional |
|
|
27
|
-
| `adsm:verified` | Pull Request | `pull_request.labeled` via `pullRequestLabelAdded=adsm:verified` | `adsm:ready-for-validation` | merged | Transitional |
|
|
28
|
-
| `adsm:needs-fix` | Pull Request | `pull_request.labeled` via `pullRequestLabelAdded=adsm:needs-fix` | `adsm:ready-for-validation` | `adsm:ready-for-validation` | Blocking |
|
|
29
|
-
|
|
30
|
-
## Terminal Outcome Labels
|
|
31
|
-
|
|
32
|
-
| Label | Applies To | Stage Trigger | Valid Previous States | Valid Next States | Class |
|
|
33
|
-
| ---------------- | ---------- | --------------------------- | --------------------------------------------------------- | ----------------- | ---------------- |
|
|
34
|
-
| `adsm:answered` | Issue | none; terminal outcome only | `issues.opened`, `adsm:needs-clarification`, `adsm:clarification-provided` | none | Terminal outcome |
|
|
35
|
-
| `adsm:rejected` | Issue | none; terminal outcome only | `issues.opened`, `adsm:needs-clarification`, `adsm:clarification-provided` | none | Terminal outcome |
|
|
36
|
-
| `adsm:completed` | Issue | none; terminal outcome only | merged Pull Request finalization | none | Terminal outcome |
|
|
37
|
-
|
|
38
|
-
## State Notes
|
|
39
|
-
|
|
40
|
-
- `adsm:accepted` is used only when the issue requires repository changes that must be delivered through a Pull Request.
|
|
41
|
-
- `adsm:answered` is used when the issue is fully completed by an issue comment and repository changes are not required.
|
|
42
|
-
- `adsm:rejected` is used when the issue is outside this repository boundary or must not be executed.
|
|
43
|
-
- `adsm:needs-clarification` is used when the workflow cannot safely continue without trusted human input.
|
|
44
|
-
- `adsm:clarification-provided` is a resume marker and must replace, not accompany, `adsm:needs-clarification`.
|
|
45
|
-
- Validation comments for `adsm:ready-for-validation` must record the chosen state and the current Pull Request head SHA.
|
|
46
|
-
- `adsm:verified` is merge permission, not proof of merge completion.
|
|
47
|
-
- Merge completion is detected by `pull_request.closed` with `pullRequestMerged=true`.
|
|
48
|
-
- `adsm:completed` is used after a linked Pull Request is merged, finalization posts the closing summary, and the source issue is closed.
|
|
49
|
-
|
|
50
|
-
## Repository Label Setup
|
|
51
|
-
|
|
52
|
-
Create the current workflow labels and terminal outcome labels in the repository with:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
gh label create "adsm:accepted" \
|
|
56
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
57
|
-
--color "0E8A16" \
|
|
58
|
-
--description "Issue accepted for repository changes through a Pull Request." \
|
|
59
|
-
--force
|
|
60
|
-
|
|
61
|
-
gh label create "adsm:answered" \
|
|
62
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
63
|
-
--color "0E8A16" \
|
|
64
|
-
--description "Issue answered without repository changes." \
|
|
65
|
-
--force
|
|
66
|
-
|
|
67
|
-
gh label create "adsm:rejected" \
|
|
68
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
69
|
-
--color "B60205" \
|
|
70
|
-
--description "Issue rejected as out of scope or unsuitable." \
|
|
71
|
-
--force
|
|
72
|
-
|
|
73
|
-
gh label create "adsm:completed" \
|
|
74
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
75
|
-
--color "0E8A16" \
|
|
76
|
-
--description "Issue completed after a linked Pull Request was merged." \
|
|
77
|
-
--force
|
|
78
|
-
|
|
79
|
-
gh label create "adsm:needs-clarification" \
|
|
80
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
81
|
-
--color "C2E0C6" \
|
|
82
|
-
--description "Issue waits for trusted user clarification." \
|
|
83
|
-
--force
|
|
84
|
-
|
|
85
|
-
gh label create "adsm:clarification-provided" \
|
|
86
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
87
|
-
--color "1D76DB" \
|
|
88
|
-
--description "Clarification added and ready for issue re-evaluation." \
|
|
89
|
-
--force
|
|
90
|
-
|
|
91
|
-
gh label create "adsm:ready-for-validation" \
|
|
92
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
93
|
-
--color "5319E7" \
|
|
94
|
-
--description "Pull Request ready for validation." \
|
|
95
|
-
--force
|
|
96
|
-
|
|
97
|
-
gh label create "adsm:verified" \
|
|
98
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
99
|
-
--color "0E8A16" \
|
|
100
|
-
--description "Pull Request validated and safe to merge." \
|
|
101
|
-
--force
|
|
102
|
-
|
|
103
|
-
gh label create "adsm:needs-fix" \
|
|
104
|
-
--repo "flancer32/skill-adsm-ctx" \
|
|
105
|
-
--color "E99695" \
|
|
106
|
-
--description "Pull Request requires another fix iteration." \
|
|
107
|
-
--force
|
|
108
|
-
```
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# GitHub Flows Workflow
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/agent/flows/overview.md`
|
|
4
|
-
- Changed: `20260610`
|
|
5
|
-
|
|
6
|
-
## Purpose
|
|
7
|
-
|
|
8
|
-
This workflow turns trusted GitHub issues in `flancer32/skill-adsm-ctx` into either terminal issue answers or reviewed repository changes through Pull Requests.
|
|
9
|
-
|
|
10
|
-
The workflow is private, label-driven, and agent-executed through `github-flows`.
|
|
11
|
-
|
|
12
|
-
## Private Project Assumptions
|
|
13
|
-
|
|
14
|
-
- The repository is private and operated by three trusted users only.
|
|
15
|
-
- Workflow routing accepts events only from `flancer64`, `viktor-gusev`, and `adsm-agentess`.
|
|
16
|
-
- Repository changes are implemented directly in this repository, including `ctx/` when the issue requires context updates.
|
|
17
|
-
- The checked-out repository is the only workflow context source. The workflow uses the repository-local `ctx/` directory and does not fetch or mount context from another repository during runtime.
|
|
18
|
-
- The workflow uses native GitHub events as stage boundaries and does not model cross-event state inside `github-flows`.
|
|
19
|
-
|
|
20
|
-
## Trigger Model
|
|
21
|
-
|
|
22
|
-
`github-flows` provides package-owned trigger attributes:
|
|
23
|
-
|
|
24
|
-
- `event`
|
|
25
|
-
- `repository`
|
|
26
|
-
- `action`
|
|
27
|
-
- `actorLogin`
|
|
28
|
-
|
|
29
|
-
This workflow also depends on host-provided event attributes:
|
|
30
|
-
|
|
31
|
-
- `sizeLess10K`
|
|
32
|
-
- `sizeLess100K`
|
|
33
|
-
- `sizeLess1M`
|
|
34
|
-
- `sizeLess2M`
|
|
35
|
-
- `issueLabelAdded`
|
|
36
|
-
- `issueLabelRemoved`
|
|
37
|
-
- `issueAuthorRequestedNoAgent`
|
|
38
|
-
- `pullRequestLabelAdded`
|
|
39
|
-
- `pullRequestLabelRemoved`
|
|
40
|
-
- `pullRequestMerged`
|
|
41
|
-
|
|
42
|
-
These extra attributes are part of the host application contract, not the package-owned base schema.
|
|
43
|
-
|
|
44
|
-
## Processing Model
|
|
45
|
-
|
|
46
|
-

|
|
47
|
-
|
|
48
|
-
The workflow starts from a source issue. Admission may result in repository-change processing, answer-only completion, rejection, or clarification. Current workflow labels drive active processing. Terminal outcome labels classify closed issues. `adsm:accepted` means repository changes are required; it starts implementation that creates a Pull Request. `adsm:answered` means the issue is completed by a comment and no repository changes are required. `adsm:rejected` means the issue is closed as out of scope or unsuitable. `adsm:completed` means the issue is closed after the linked Pull Request is merged and finalization finishes. Clarification stays on the issue, while fix iterations stay on the Pull Request.
|
|
49
|
-
|
|
50
|
-
Cross-object transitions:
|
|
51
|
-
|
|
52
|
-
- `adsm:accepted` is an issue label. Its successful implementation outcome is not another issue label. It is a new Pull Request labeled `adsm:ready-for-validation`.
|
|
53
|
-
- `adsm:answered` and `adsm:rejected` are issue outcome labels only. They are terminal and do not create a branch or Pull Request.
|
|
54
|
-
- `adsm:ready-for-validation`, `adsm:needs-fix`, and `adsm:verified` are Pull Request labels only.
|
|
55
|
-
- After a merged Pull Request is detected, finalization returns to the linked source issue, posts the closing summary there, applies `adsm:completed`, and closes that issue.
|
|
56
|
-
|
|
57
|
-
## Workflow Rules
|
|
58
|
-
|
|
59
|
-
- An issue is an input request, not a specification.
|
|
60
|
-
- Admission for `issues.opened` is intentionally minimal in this private workflow.
|
|
61
|
-
- Admission should first decide whether the issue belongs to this repository.
|
|
62
|
-
- If the issue belongs to this repository, admission should choose `adsm:answered` when a comment fully resolves it without repository changes, and `adsm:accepted` only when repository changes are required.
|
|
63
|
-
- `adsm:rejected` is used when the issue does not belong to this repository or must not be executed.
|
|
64
|
-
- `adsm:needs-clarification` is used when the workflow cannot safely continue without trusted human input.
|
|
65
|
-
- Comments provide evidence; labels drive transitions.
|
|
66
|
-
- Validation evidence on Pull Requests must record both the validation state and the current Pull Request head SHA.
|
|
67
|
-
- Agents must not push directly to `main`.
|
|
68
|
-
- Repository implementation must happen on a dedicated branch and must be delivered through a Pull Request.
|
|
69
|
-
|
|
70
|
-
## Agent Policy
|
|
71
|
-
|
|
72
|
-
- `issues.opened`, `issues.labeled: adsm:clarification-provided`, `pull_request.labeled: adsm:ready-for-validation`, `pull_request.labeled: adsm:verified`, and `pull_request.closed` run with `gpt-5.4` and `model_reasoning_effort=medium`.
|
|
73
|
-
- `issues.labeled: adsm:accepted` and `pull_request.labeled: adsm:needs-fix` run with `gpt-5.4-mini` and `model_reasoning_effort=low`.
|
|
74
|
-
- The policy is encoded in `execution.handler.args` inside the profile fragments. The shared root defines the medium-reasoning command; implementation and fix fragments override it with the low-reasoning command.
|
|
75
|
-
|
|
76
|
-
## End States
|
|
77
|
-
|
|
78
|
-
A successful run ends in one of two ways:
|
|
79
|
-
|
|
80
|
-
- the issue is answered by comment only, labeled `adsm:answered`, and closed without a branch or Pull Request;
|
|
81
|
-
- the issue is rejected, labeled `adsm:rejected`, and closed without a branch or Pull Request;
|
|
82
|
-
- a reviewed Pull Request is merged into `main`, a final source-issue comment links that Pull Request and summarizes the outcome, the source issue is labeled `adsm:completed`, and the linked source issue is closed.
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
# Generate AI Intro
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/agent/prompt/cli/ai-intro.md`
|
|
4
|
-
- Changed: `20260422`
|
|
5
|
-
|
|
6
|
-
## Purpose
|
|
7
|
-
|
|
8
|
-
Defines the prompt for generating `ctx/docs/ai-intro.md` in ADSM projects when the agent works in CLI mode with direct access to the project files.
|
|
9
|
-
|
|
10
|
-
The prompt is intended for agents such as Codex or Claude that can inspect repository content before writing the target document.
|
|
11
|
-
|
|
12
|
-
## Prompt Role
|
|
13
|
-
|
|
14
|
-
This prompt defines the expected purpose, scope, structure, and size of `ctx/docs/ai-intro.md`.
|
|
15
|
-
|
|
16
|
-
It is not a template for the final document text. It is a declarative task definition that tells the agent what kind of document must be produced.
|
|
17
|
-
|
|
18
|
-
## Prompt
|
|
19
|
-
|
|
20
|
-
Generate the document `ctx/docs/ai-intro.md`.
|
|
21
|
-
|
|
22
|
-
Assume that the project follows the common ADSM structure. General ADSM and TeqFW conventions are already defined elsewhere and do not need to be restated in detail unless they are necessary to position this specific project.
|
|
23
|
-
|
|
24
|
-
Before writing, inspect the project files that define public and private project identity. Use the repository content as the source of truth. Prefer project-specific documents and published product materials over assumptions.
|
|
25
|
-
|
|
26
|
-
The generated `ctx/docs/ai-intro.md` must be the first project-specific reading for AI agents entering the repository. Its role is to position the project in the broader software landscape rather than to explain the internal architecture in detail.
|
|
27
|
-
|
|
28
|
-
The document must answer the following questions:
|
|
29
|
-
|
|
30
|
-
- what kind of software product this project is;
|
|
31
|
-
- which problem space it addresses;
|
|
32
|
-
- what role it plays relative to adjacent classes of systems;
|
|
33
|
-
- who the primary audience or users of the project are;
|
|
34
|
-
- which technologies, platforms, and runtime assumptions define its technical family;
|
|
35
|
-
- which methodological base shapes the project;
|
|
36
|
-
- which distinctions make this project different from superficially similar tools;
|
|
37
|
-
- what the project must not be confused with.
|
|
38
|
-
|
|
39
|
-
The generated document must not duplicate `ctx/docs/AGENTS.md`. It must not restate level structure, hierarchy rules, mandatory-constraint language, or other context-governance mechanics except where a brief reference is necessary to position the project. The generated document must complement `ctx/docs/AGENTS.md`, not compete with it.
|
|
40
|
-
|
|
41
|
-
The generated document must also avoid detailed explanation of internal architecture, component decomposition, directory maps, execution pipelines, configuration schema, or implementation contracts. Those concerns belong to the specialized documents under `ctx/docs/`.
|
|
42
|
-
|
|
43
|
-
The generated document must remain declarative. It must describe identity, role, boundaries, and classification. Procedural instructions, workflows, and step-by-step reading guides must be absent or minimal.
|
|
44
|
-
|
|
45
|
-
## Source Basis
|
|
46
|
-
|
|
47
|
-
The generated document should be derived from the project's own artifacts, including where relevant:
|
|
48
|
-
|
|
49
|
-
- `ctx/docs/` for normative project meaning;
|
|
50
|
-
- `README.md`;
|
|
51
|
-
- published documentation under `docs/`;
|
|
52
|
-
- agent-facing published documentation under `ai/`;
|
|
53
|
-
- package metadata such as `package.json`;
|
|
54
|
-
- other repository-level materials that define the public role of the project.
|
|
55
|
-
|
|
56
|
-
Project-specific facts must be taken from the repository rather than inferred from generic ADSM expectations.
|
|
57
|
-
|
|
58
|
-
## Output Purpose
|
|
59
|
-
|
|
60
|
-
The generated `ctx/docs/ai-intro.md` must give an AI agent fast orientation before deeper reading.
|
|
61
|
-
|
|
62
|
-
After reading it, the agent should understand:
|
|
63
|
-
|
|
64
|
-
- what kind of thing this repository defines in the world of software;
|
|
65
|
-
- where the project sits relative to libraries, applications, frameworks, platforms, and automation systems;
|
|
66
|
-
- what technical and methodological family the project belongs to;
|
|
67
|
-
- which architectural misclassifications would lead to incorrect implementation decisions.
|
|
68
|
-
|
|
69
|
-
The document is an orientation layer, not a detailed specification.
|
|
70
|
-
|
|
71
|
-
## Output Constraints
|
|
72
|
-
|
|
73
|
-
The generated document must:
|
|
74
|
-
|
|
75
|
-
- use the standard document attribute block directly under the title;
|
|
76
|
-
- use the canonical path `ctx/docs/ai-intro.md`;
|
|
77
|
-
- follow the declarative style used by the cognitive context;
|
|
78
|
-
- use only relative links to other documents;
|
|
79
|
-
- remain readable as a compact introduction rather than a full survey.
|
|
80
|
-
|
|
81
|
-
The generated document must not:
|
|
82
|
-
|
|
83
|
-
- duplicate `ctx/docs/AGENTS.md`;
|
|
84
|
-
- redefine product, architecture, environment, or code contracts already defined in specialized documents;
|
|
85
|
-
- become a repository map;
|
|
86
|
-
- become an implementation walkthrough;
|
|
87
|
-
- become an onboarding checklist;
|
|
88
|
-
- become a marketing text;
|
|
89
|
-
- become a generic explanation of ADSM or TeqFW detached from the current project.
|
|
90
|
-
|
|
91
|
-
## Volume Constraints
|
|
92
|
-
|
|
93
|
-
The generated document should usually be between `700` and `1100` words.
|
|
94
|
-
|
|
95
|
-
Recommended target size is `800` to `1000` words.
|
|
96
|
-
|
|
97
|
-
The document should be shortened if it starts repeating statements better defined elsewhere. It should be expanded only when the project has unusual positioning that cannot be understood within a smaller text.
|
|
98
|
-
|
|
99
|
-
## Recommended Structure
|
|
100
|
-
|
|
101
|
-
The generated document should normally include sections equivalent to the following:
|
|
102
|
-
|
|
103
|
-
1. `Purpose`
|
|
104
|
-
2. `Project Type`
|
|
105
|
-
3. `Problem Space`
|
|
106
|
-
4. `Product Role In The Ecosystem`
|
|
107
|
-
5. `Primary Audience`
|
|
108
|
-
6. `Technology Base`
|
|
109
|
-
7. `Methodological Base`
|
|
110
|
-
8. `Distinguishing Characteristics`
|
|
111
|
-
9. `What This Project Is Not`
|
|
112
|
-
10. `External Reading Angle`
|
|
113
|
-
11. `Boundary`
|
|
114
|
-
|
|
115
|
-
Section titles may vary slightly if the project requires different wording, but the same informational shape must be preserved.
|
|
116
|
-
|
|
117
|
-
## Section Intent
|
|
118
|
-
|
|
119
|
-
The generated sections should satisfy the following intentions:
|
|
120
|
-
|
|
121
|
-
- `Purpose` states why `ai-intro.md` exists.
|
|
122
|
-
- `Project Type` classifies the product at the highest level.
|
|
123
|
-
- `Problem Space` states the narrow problem the project solves.
|
|
124
|
-
- `Product Role In The Ecosystem` positions it relative to neighboring software categories.
|
|
125
|
-
- `Primary Audience` identifies who uses or integrates the project.
|
|
126
|
-
- `Technology Base` identifies language, platform, packaging, runtime, and major technical assumptions.
|
|
127
|
-
- `Methodological Base` identifies the project-governing method or architectural family only insofar as it helps classify the project.
|
|
128
|
-
- `Distinguishing Characteristics` states the project choices that matter most for identity.
|
|
129
|
-
- `What This Project Is Not` prevents common misclassification.
|
|
130
|
-
- `External Reading Angle` points to a few high-value follow-up documents using relative links only.
|
|
131
|
-
- `Boundary` states what the document does not define.
|
|
132
|
-
|
|
133
|
-
## Acceptance Model
|
|
134
|
-
|
|
135
|
-
The generated `ctx/docs/ai-intro.md` is valid when it:
|
|
136
|
-
|
|
137
|
-
- gives a correct high-level picture of the project;
|
|
138
|
-
- remains specific to the current repository;
|
|
139
|
-
- avoids restating internal documentation structure in detail;
|
|
140
|
-
- helps an AI agent classify the project correctly before reading deeper documents;
|
|
141
|
-
- preserves declarative style and compact scope.
|
package/ctx/assets/.gitkeep
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
package/ctx/docs/AGENTS.md
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
# Project Documentation
|
|
2
|
-
|
|
3
|
-
- Path: `ctx/docs/AGENTS.md`
|
|
4
|
-
- Changed: `20260813`
|
|
5
|
-
|
|
6
|
-
## Purpose
|
|
7
|
-
|
|
8
|
-
Defines the structure of project-level declarative documentation organized by ADSM levels.
|
|
9
|
-
|
|
10
|
-
Documents at this level describe the system as a design object, including meaning, structure, environment, and implementation constraints.
|
|
11
|
-
|
|
12
|
-
## Level Map
|
|
13
|
-
|
|
14
|
-
- `architecture/` — structural form of the system, architectural entities, boundaries, and interaction model.
|
|
15
|
-
- `code/` — engineering invariants governing how architecture is expressed in source code.
|
|
16
|
-
- `environment/` — runtime environment and infrastructural prerequisites required for system operation.
|
|
17
|
-
- `product/` — system meaning, domain entities, and product-level invariants.
|
|
18
|
-
- `AGENTS.md` — level definition for `ctx/docs/`.
|
|
19
|
-
- `ai-intro.md` — entry document for AI agents that positions the project in the broader software landscape and gives initial project understanding.
|
|
20
|
-
- `filesystem.md` — declarative description of top-level repository directories and root-level files, defining repository boundaries and serving as a navigation map.
|
|
21
|
-
|
|
22
|
-
## Level Boundary
|
|
23
|
-
|
|
24
|
-
Defines:
|
|
25
|
-
|
|
26
|
-
- System meaning and domain intent through the documentation dependency chain rooted in `product`.
|
|
27
|
-
- System realization guardrails through `architecture`, `environment`, and `code`.
|
|
28
|
-
- Mandatory declarative constraints that bound any valid implementation.
|
|
29
|
-
|
|
30
|
-
All statements defined at this level and below are mandatory constraints for any valid implementation.
|
|
31
|
-
|
|
32
|
-
Violation of these constraints constitutes an incorrect result, regardless of functional correctness.
|
|
33
|
-
|
|
34
|
-
Does NOT define:
|
|
35
|
-
|
|
36
|
-
- Agent operations, workflow execution, or prompt-routing assets under `ctx/agent/`.
|
|
37
|
-
- Concrete implementation artifacts such as `src/`, `bin/`, `test/`, or other product files.
|
|
38
|
-
- Ad hoc task instructions that bypass or override the documentation dependency order.
|
|
39
|
-
|
|
40
|
-
## Documentation Rules
|
|
41
|
-
|
|
42
|
-
- Use explicit line breaks to keep each durable statement easy to scan.
|
|
43
|
-
- Keep agent documents dense, explicit, and maintainable.
|
|
44
|
-
- Keep skin documents compact, human-readable, and easy to supervise.
|
|
45
|
-
- Split large agent-document areas into natural nested subdocuments instead of over-compressing them for human readability.
|
|
46
|
-
- Preserve project-specific nested subdirectories under the four top-level documentation levels.
|
|
47
|
-
- Keep each documentation level to no more than nine direct directories and nine direct ordinary files, excluding `AGENTS.md` and all matching `*.skin.<lang>.md` files, where practical.
|
|
48
|
-
- When a level deliberately exceeds either value, its `AGENTS.md` must include a `## Documentation Capacity Exception` section that states the exception and its reason.
|
|
49
|
-
|
|
50
|
-
## Level Order
|
|
51
|
-
|
|
52
|
-
Documentation levels form a strict dependency order:
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
product
|
|
56
|
-
↓
|
|
57
|
-
architecture
|
|
58
|
-
↓
|
|
59
|
-
environment
|
|
60
|
-
↓
|
|
61
|
-
code
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
`architecture` translates product intent into stable engineering structure.
|
|
65
|
-
|
|
66
|
-
Lower levels may refine but must not redefine statements established at higher levels.
|
|
67
|
-
|
|
68
|
-
Lower levels may increase explicitness, constraint, and operational precision, but must not introduce new meaning absent from higher levels.
|
|
69
|
-
|
|
70
|
-
They must not add new product capabilities, invariants, authority, or semantic boundaries unless those are first named upstream.
|
|
71
|
-
|
|
72
|
-
## Documentation As A Cognitive Interface
|
|
73
|
-
|
|
74
|
-
Project documentation is the cognitive interface through which humans and agents cooperate across the documentation levels.
|
|
75
|
-
|
|
76
|
-
- It communicates human goals, constraints, and decisions to agents.
|
|
77
|
-
- It communicates agent findings, inconsistencies, and refinements back to humans.
|
|
78
|
-
- It connects the human direction-setting and result-evaluation loop with the agent refinement and execution-support loop.
|
|
79
|
-
- It must keep agent documents precise for agent execution and skin documents concise for human semantic control.
|
|
80
|
-
- It must support the full dependency order from product through architecture, environment, and code.
|
|
81
|
-
|
|
82
|
-
## Project Versus Skill Responsibility
|
|
83
|
-
|
|
84
|
-
Documents under `ctx/docs/` should primarily govern project development rather than explain or enforce ADSM on their own.
|
|
85
|
-
|
|
86
|
-
- Project documentation should define product meaning, architecture, constraints, decisions, and other load-bearing project knowledge.
|
|
87
|
-
- The skill should enforce ADSM structure, document-shape discipline, audit criteria, and compression rules.
|
|
88
|
-
- When a project document can either explain ADSM or help govern the project, prefer the project-governing content and leave ADSM conformance work to the skill.
|
|
89
|
-
|
|
90
|
-
## Documentation Projection Model
|
|
91
|
-
|
|
92
|
-
Documents under `ctx/docs/` are agent-facing operational context documents by default and are written in English unless a more specific rule applies.
|
|
93
|
-
|
|
94
|
-
Human-facing semantic skins use the explicit `*.skin.<lang>.md` suffix, with lowercase ISO 639-1 language codes such as `en`, `ru`, or `es`.
|
|
95
|
-
|
|
96
|
-
An unmarked `*.skin.md` file is invalid. One agent document and all skins with the same basename and directory form one document group.
|
|
97
|
-
|
|
98
|
-
Agents must read every matching skin before changing its matching agent document.
|
|
99
|
-
|
|
100
|
-
If a requested agent-document change would violate a skin, report a human decision instead of silently rewriting meaning.
|
|
101
|
-
|
|
102
|
-
If an agent document and its skin conflict, treat the conflict as projection drift and request a human decision before changing controlled meaning.
|
|
103
|
-
|
|
104
|
-
`overview.md` has no methodology-level status; it is an ordinary agent document unless paired with one or more `overview.skin.<lang>.md` files.
|
|
105
|
-
|
|
106
|
-
`AGENTS.md` files remain short local reading, editing, and routing instructions for agents.
|
|
107
|
-
|
|
108
|
-
`AGENTS.md` files are not full documentation artifacts and must not replace agent documents or semantic skins.
|
|
109
|
-
|
|
110
|
-
Visual, generated, rendered, or auxiliary artifacts belong under `ctx/assets/**` and must not introduce authoritative project meaning.
|
|
111
|
-
|
|
112
|
-
## Document Attributes
|
|
113
|
-
|
|
114
|
-
Documents under `ctx/docs/` use:
|
|
115
|
-
|
|
116
|
-
```md
|
|
117
|
-
- Path: `ctx/docs/{{subdir}}/file.md`
|
|
118
|
-
- Changed: `YYYYMMDD`
|
|
119
|
-
```
|
|
120
|
-
|
|
121
|
-
All stable documents use `Path` and `Changed` attributes.
|