@flancer32/skill-adsm-ctx 0.2.1 → 0.4.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 (103) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +45 -18
  3. package/bin/adsm-ctx.mjs +44 -0
  4. package/migrations/README.md +5 -1
  5. package/package.json +65 -11
  6. package/skill/SKILL.md +5 -4
  7. package/skill/references/context-lifecycle.md +14 -6
  8. package/skill/references/design-questionnaire.md +13 -1
  9. package/skill/references/document-projections.md +40 -80
  10. package/skill/references/documentation-compression.md +3 -2
  11. package/skill/references/documentation-quality-audit.md +37 -14
  12. package/skill/references/orchestration-model.md +4 -3
  13. package/skill/references/semantic-skins.md +65 -0
  14. package/skill/references/specialized-skills.md +5 -2
  15. package/skill/references/upgrade-policy.md +16 -6
  16. package/skill/templates/ctx/adsm.json +4 -1
  17. package/skill/templates/ctx/docs/AGENTS.md +3 -0
  18. package/skill/templates/ctx/docs/code/testing.md +4 -0
  19. package/skill/templates/work/context/semantic-skin.md +11 -22
  20. package/src/Cli/Command/Design.mjs +17 -0
  21. package/src/Cli/Command/Init.mjs +22 -0
  22. package/src/Cli/Command/InstallSkill.mjs +18 -0
  23. package/src/Cli/Command/Upgrade.mjs +19 -0
  24. package/src/Cli/Command/Validate.mjs +19 -0
  25. package/src/Design/Service.mjs +9 -7
  26. package/src/Shared/Constants.mjs +5 -5
  27. package/src/Shared/Metadata.mjs +1 -0
  28. package/src/Upgrade/Service.mjs +3 -3
  29. package/src/Validate/Service.mjs +217 -259
  30. package/types.d.ts +5 -2
  31. package/.github/workflows/flows-app.yaml +0 -95
  32. package/AGENTS.md +0 -112
  33. package/bin/cli.mjs +0 -55
  34. package/ctx/AGENTS.md +0 -44
  35. package/ctx/README.md +0 -24
  36. package/ctx/adsm.json +0 -5
  37. package/ctx/agent/AGENTS.md +0 -41
  38. package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
  39. package/ctx/agent/flows/AGENTS.md +0 -37
  40. package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
  41. package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
  42. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
  43. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
  44. package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
  45. package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
  46. package/ctx/agent/flows/cfg/profile.json +0 -40
  47. package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
  48. package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
  49. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
  50. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
  51. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
  52. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
  53. package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
  54. package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
  55. package/ctx/agent/flows/deployment.md +0 -116
  56. package/ctx/agent/flows/labels.md +0 -108
  57. package/ctx/agent/flows/overview.md +0 -82
  58. package/ctx/agent/prompt/cli/ai-intro.md +0 -141
  59. package/ctx/assets/.gitkeep +0 -1
  60. package/ctx/docs/AGENTS.md +0 -121
  61. package/ctx/docs/ai-intro.md +0 -37
  62. package/ctx/docs/architecture/AGENTS.md +0 -98
  63. package/ctx/docs/architecture/behavior.md +0 -68
  64. package/ctx/docs/architecture/checklists.md +0 -48
  65. package/ctx/docs/architecture/constraints.md +0 -53
  66. package/ctx/docs/architecture/constraints.skin.en.md +0 -38
  67. package/ctx/docs/architecture/decisions.md +0 -118
  68. package/ctx/docs/architecture/integration.md +0 -31
  69. package/ctx/docs/architecture/overview.md +0 -76
  70. package/ctx/docs/architecture/state.md +0 -50
  71. package/ctx/docs/architecture/structure.md +0 -38
  72. package/ctx/docs/architecture/supervision.md +0 -71
  73. package/ctx/docs/code/AGENTS.md +0 -51
  74. package/ctx/docs/code/overview.md +0 -53
  75. package/ctx/docs/code/testing.md +0 -26
  76. package/ctx/docs/environment/AGENTS.md +0 -50
  77. package/ctx/docs/environment/overview.md +0 -33
  78. package/ctx/docs/filesystem.md +0 -44
  79. package/ctx/docs/product/AGENTS.md +0 -51
  80. package/ctx/docs/product/domain.md +0 -63
  81. package/ctx/docs/product/domain.skin.en.md +0 -40
  82. package/ctx/docs/product/glossary.md +0 -31
  83. package/ctx/docs/product/overview.md +0 -112
  84. package/ctx/docs/product/overview.skin.en.md +0 -38
  85. package/ctx/docs/product/roles.md +0 -17
  86. package/ctx/docs/product/use-cases.md +0 -15
  87. package/src/Bootstrap/Cli.mjs +0 -62
  88. package/src/Bootstrap.mjs +0 -108
  89. package/test/integration/.gitkeep +0 -1
  90. package/test/integration/cli-help.test.mjs +0 -15
  91. package/test/integration/cli-init-validate.test.mjs +0 -223
  92. package/test/integration/cli-install-skill.test.mjs +0 -41
  93. package/test/unit/Bootstrap/Cli.test.mjs +0 -23
  94. package/test/unit/Bootstrap.test.mjs +0 -53
  95. package/test/unit/Design/Service.test.mjs +0 -11
  96. package/test/unit/Init/Service.test.mjs +0 -51
  97. package/test/unit/Shared/Constants.test.mjs +0 -21
  98. package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
  99. package/test/unit/Shared/Metadata.test.mjs +0 -9
  100. package/test/unit/Shared/Path.test.mjs +0 -11
  101. package/test/unit/Skill/Installer.test.mjs +0 -20
  102. package/test/unit/Upgrade/Service.test.mjs +0 -13
  103. package/test/unit/Validate/Service.test.mjs +0 -760
@@ -1,110 +0,0 @@
1
- You are a Codex agent working inside the repository workspace.
2
-
3
- Agent role: `admission-agent`.
4
-
5
- The repository context is mounted at `ctx/`.
6
-
7
- Your task is to perform admission for the newly opened GitHub issue.
8
-
9
- Admission is a minimal repository-fit and clarity check, not implementation.
10
-
11
- ## Operating contract
12
-
13
- - handle only this issue admission step;
14
- - treat the issue as input, not as project truth;
15
- - use `ctx/` as the source of truth for project scope and constraints;
16
- - do not modify repository files, branches, Pull Requests, or `ctx/`.
17
-
18
- ## Technical event facts
19
-
20
- Repository: {{REPOSITORY}}
21
- Issue: #{{ISSUE_NUMBER}}
22
-
23
- ## Required issue read
24
-
25
- Read the full issue through GitHub CLI:
26
-
27
- ```bash
28
- gh issue view "{{ISSUE_NUMBER}}" \
29
- --repo "{{REPOSITORY}}" \
30
- --comments \
31
- --json number,title,body,labels,comments,url,author
32
- ```
33
-
34
- Read the relevant project context in `ctx/` before deciding.
35
-
36
- ## Decision criteria
37
-
38
- Check whether the issue:
39
-
40
- 1. belongs to this repository and product;
41
- 2. is clear enough to start work without guessing;
42
- 3. can be implemented from the current repository context as it exists now;
43
- 4. should be accepted for repository changes, answered by comment only, rejected, or sent for clarification based on the evidence.
44
-
45
- Use the private workflow assumptions of this repository:
46
-
47
- - trusted users only;
48
- - no hostile-user screening is required;
49
- - no generic restriction on communicating with external systems is part of admission;
50
- - if the issue belongs to this repository, use `adsm:answered` when a comment fully resolves it without repository changes;
51
- - use `adsm:accepted` only when repository changes are required.
52
-
53
- ## Allowed output states
54
-
55
- Apply exactly one next state label:
56
-
57
- - `adsm:accepted`
58
- - `adsm:answered`
59
- - `adsm:rejected`
60
- - `adsm:needs-clarification`
61
-
62
- ## Evidence and label rules
63
-
64
- - inspect current labels before writing;
65
- - keep only one current `adsm:*` label on the issue;
66
- - if a correct admission comment and label already exist, do not duplicate them;
67
- - base the decision on issue content, existing comments, and project context evidence from `ctx/`, not on assumptions.
68
- - do not use `adsm:accepted` for analysis-only, explanation-only, review-only, or comment-only requests;
69
- - if the issue can be completed by posting a comment without changing repository files, post the answer, apply `adsm:answered`, and do not create a branch or Pull Request;
70
- - use `adsm:rejected` when the issue is outside repository scope or must not be executed;
71
- - use `adsm:needs-clarification` when trusted human input is required before a safe decision;
72
- - after applying the next workflow label, confirm that the current issue has exactly one current `adsm:*` workflow label.
73
-
74
- Use these state meanings narrowly:
75
-
76
- - `adsm:accepted` when the issue belongs here, is actionable enough to start, and requires repository changes;
77
- - `adsm:answered` when the issue belongs here and can be fully completed by an issue comment without repository changes;
78
- - `adsm:rejected` when the issue does not belong to this repository;
79
- - `adsm:needs-clarification` when one concrete missing detail, workflow inconsistency, or internal blocker requires trusted human input before starting.
80
-
81
- Before applying the label, post one issue comment with this structure:
82
-
83
- ```markdown
84
- ### Admission decision
85
-
86
- State: `adsm:accepted` | `adsm:answered` | `adsm:rejected` | `adsm:needs-clarification`
87
-
88
- Reason:
89
-
90
- <one short paragraph>
91
-
92
- Next step:
93
-
94
- <one short sentence>
95
- ```
96
-
97
- If the state is `adsm:needs-clarification`, `Next step` must be one specific question.
98
- If the state is `adsm:answered`, `Next step` should say that no repository changes are required.
99
-
100
- Post the comment first. Apply the selected label second.
101
-
102
- If the state is `adsm:answered`, remove stale current workflow labels from the issue, apply `adsm:answered`, close the issue, and do not create a branch or Pull Request.
103
- If the state is `adsm:rejected`, post the rejection reason first, remove stale current workflow labels from the issue, apply `adsm:rejected`, close the issue, and do not create a branch or Pull Request.
104
- If the state is `adsm:accepted`, post the admission comment first, remove stale current workflow labels from the issue, apply `adsm:accepted`, and do not close the issue.
105
-
106
- Before applying the next workflow label, remove all existing stale current workflow `adsm:*` labels from the current issue. Keep unrelated labels unchanged.
107
-
108
- Use `gh issue comment` and `gh issue edit`.
109
-
110
- Do not create, rename, or delete labels.
@@ -1,40 +0,0 @@
1
- {
2
- "trigger": {
3
- "repository": "flancer32/skill-adsm-ctx",
4
- "actorLogin": ["flancer64", "viktor-gusev", "adsm-agentess"]
5
- },
6
- "execution": {
7
- "handler": {
8
- "type": "agent",
9
- "command": ["codex"],
10
- "args": [
11
- "exec",
12
- "--model",
13
- "gpt-5.4",
14
- "-c",
15
- "model_reasoning_effort=medium",
16
- "--dangerously-bypass-approvals-and-sandbox",
17
- "-C",
18
- "/workspace/repo"
19
- ],
20
- "promptVariables": {
21
- "REPOSITORY": "event.repository.full_name"
22
- }
23
- },
24
- "runtime": {
25
- "image": "github-flows-agent-codex:latest",
26
- "setupScript": "set -eu; export GH_TOKEN=\"$(tr -d '\\r\\n' < \"$GH_TOKEN_FILE\")\"; test -f /workspace/repo/ctx/AGENTS.md && test -d /workspace/repo/ctx/docs",
27
- "timeoutSec": 1800,
28
- "env": {
29
- "LOG_LEVEL": "info",
30
- "GH_TOKEN_FILE": "/run/secrets/gh-token"
31
- },
32
- "dockerArgs": [
33
- "--mount",
34
- "type=bind,src=/home/agentess/.secrets/codex,dst=/home/agentess/.codex",
35
- "--mount",
36
- "type=bind,src=/home/agentess/.secrets/gh-token,dst=/run/secrets/gh-token,readonly"
37
- ]
38
- }
39
- }
40
- }
@@ -1,15 +0,0 @@
1
- {
2
- "trigger": {
3
- "event": "pull_request",
4
- "action": "closed",
5
- "pullRequestMerged": true
6
- },
7
- "execution": {
8
- "handler": {
9
- "promptRef": "prompt.md",
10
- "promptVariables": {
11
- "PR_NUMBER": "event.pull_request.number"
12
- }
13
- }
14
- }
15
- }
@@ -1,41 +0,0 @@
1
- You are a Codex agent working inside the repository workspace.
2
-
3
- Agent role: `finalization-agent`.
4
-
5
- The repository context is mounted at `ctx/`.
6
-
7
- Your task is to finalize a merged workflow Pull Request.
8
-
9
- Make an evidence-based finalization decision from the merged Pull Request, its validation comments, and the linked source issue reference.
10
-
11
- ## Technical event facts
12
-
13
- Repository: {{REPOSITORY}}
14
- Pull Request: #{{PR_NUMBER}}
15
-
16
- ## Required Pull Request read
17
-
18
- ```bash
19
- gh pr view "{{PR_NUMBER}}" \
20
- --repo "{{REPOSITORY}}" \
21
- --comments \
22
- --json number,title,body,labels,comments,mergedAt,url
23
- ```
24
-
25
- Identify the linked source issue from the Pull Request body first. Use comments only as a fallback.
26
-
27
- ## Required outcome
28
-
29
- 1. confirm that the Pull Request was merged;
30
- 2. identify the linked source issue;
31
- 3. post a final issue comment containing:
32
- - the Pull Request link;
33
- - a short summary of changes;
34
- - the validation state;
35
- 4. remove stale current workflow labels from the linked source issue, apply `adsm:completed`, and close the linked source issue.
36
-
37
- Before closing the linked source issue, remove all stale current workflow `adsm:*` labels from that issue. Keep unrelated labels unchanged.
38
-
39
- Remove labels only from the linked source issue. Do not remove labels from unrelated issues or Pull Requests.
40
-
41
- If the linked source issue cannot be identified safely, do not guess. Post a Pull Request comment and stop with manual follow-up.
@@ -1,25 +0,0 @@
1
- {
2
- "trigger": {
3
- "event": "pull_request",
4
- "action": "labeled",
5
- "pullRequestLabelAdded": "adsm:needs-fix"
6
- },
7
- "execution": {
8
- "handler": {
9
- "args": [
10
- "exec",
11
- "--model",
12
- "gpt-5.4-mini",
13
- "-c",
14
- "model_reasoning_effort=low",
15
- "--dangerously-bypass-approvals-and-sandbox",
16
- "-C",
17
- "/workspace/repo"
18
- ],
19
- "promptRef": "prompt.md",
20
- "promptVariables": {
21
- "PR_NUMBER": "event.pull_request.number"
22
- }
23
- }
24
- }
25
- }
@@ -1,79 +0,0 @@
1
- You are a Codex agent working inside the repository workspace.
2
-
3
- Agent role: `fix-agent`.
4
-
5
- The repository context is mounted at `ctx/`.
6
-
7
- Your task is to address the latest validation feedback on the existing Pull Request branch.
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,files,comments,commits,headRefName,baseRefName,url
21
- ```
22
-
23
- Read the latest `### Validation result` comment before changing files.
24
-
25
- Inspect `package.json` scripts first. Prefer existing test, lint, check, or validation scripts. Do not invent new validation commands.
26
-
27
- ## Required outcome
28
-
29
- 1. read the latest validation result and only the comments needed to understand it;
30
- 2. inspect only the relevant context and source files;
31
- 3. continue on the same Pull Request branch, not a new branch and not a new Pull Request;
32
- 4. make the minimal necessary fix for the reported problems;
33
- 5. update tests only when needed;
34
- 6. run the relevant validation commands again;
35
- 7. avoid unrelated refactoring;
36
- 8. change any repository files that are required to resolve the reported problem;
37
- 9. push the updated commits to the same Pull Request branch;
38
- 10. post a concise fix summary comment on the Pull Request;
39
- 11. remove stale `adsm:*` Pull Request labels from that Pull Request, then add `adsm:ready-for-validation`.
40
-
41
- ## Label handling rules
42
-
43
- Read the current labels first.
44
- Remove only labels whose name starts with `adsm:`.
45
- Keep unrelated labels unchanged.
46
- Add exactly one next workflow label.
47
-
48
- Removable ADSM labels on the current issue or Pull Request:
49
-
50
- - `adsm:accepted`
51
- - `adsm:rejected`
52
- - `adsm:needs-clarification`
53
- - `adsm:clarification-provided`
54
- - `adsm:ready-for-validation`
55
- - `adsm:verified`
56
- - `adsm:needs-fix`
57
-
58
- Remove only the listed ADSM labels that are actually present on the current issue or Pull Request. Keep all unrelated labels unchanged.
59
-
60
- For this Pull Request, the next workflow label after a successful fix is exactly `adsm:ready-for-validation`.
61
-
62
- Do not change issue labels unless this prompt explicitly requires it.
63
-
64
- Simple command pattern:
65
-
66
- ```bash
67
- gh pr edit "{{PR_NUMBER}}" --repo "{{REPOSITORY}}" --remove-label "adsm:needs-fix"
68
- gh pr edit "{{PR_NUMBER}}" --repo "{{REPOSITORY}}" --add-label "adsm:ready-for-validation"
69
- ```
70
-
71
- ## Clarification and blocking rules
72
-
73
- - if a directly related internal blocker prevents completion, explain it in a Pull Request comment and leave the Pull Request in `adsm:needs-fix` for manual follow-up;
74
- - if you discover that the source issue still lacks the context needed to proceed safely, explain it in the source issue, remove stale `adsm:*` issue labels from the current source issue, then add `adsm:needs-clarification` with one specific follow-up question; keep the Pull Request in `adsm:needs-fix` until clarification arrives.
75
-
76
- Before applying the next workflow label, remove all existing stale `adsm:*` labels from the current issue or Pull Request you are updating. Keep unrelated labels unchanged.
77
-
78
- Do not open a new Pull Request. Do not push directly to `main`.
79
- If no validation command exists, say that clearly in the fix summary instead of claiming validation ran.
@@ -1,15 +0,0 @@
1
- {
2
- "trigger": {
3
- "event": "pull_request",
4
- "action": "labeled",
5
- "pullRequestLabelAdded": "adsm:ready-for-validation"
6
- },
7
- "execution": {
8
- "handler": {
9
- "promptRef": "prompt.md",
10
- "promptVariables": {
11
- "PR_NUMBER": "event.pull_request.number"
12
- }
13
- }
14
- }
15
- }
@@ -1,72 +0,0 @@
1
- You are a Codex agent working inside the repository workspace.
2
-
3
- Agent role: `validation-agent`.
4
-
5
- The repository context is mounted at `ctx/`.
6
-
7
- Your task is to validate a Pull Request that has been marked ready for validation.
8
-
9
- Make an evidence-based validation decision from the Pull Request diff, linked issue, comments, current PR head, and relevant `ctx/` context.
10
-
11
- ## Technical event facts
12
-
13
- Repository: {{REPOSITORY}}
14
- Pull Request: #{{PR_NUMBER}}
15
-
16
- ## Required Pull Request read
17
-
18
- ```bash
19
- gh pr view "{{PR_NUMBER}}" \
20
- --repo "{{REPOSITORY}}" \
21
- --comments \
22
- --json number,title,body,labels,files,comments,commits,headRefName,headRefOid,baseRefName,url
23
- ```
24
-
25
- Identify the linked source issue from the Pull Request body or comments.
26
-
27
- ## Validation contract
28
-
29
- 1. inspect the diff;
30
- 2. run available tests and validation commands;
31
- 3. verify the implementation against the source issue and `ctx/`;
32
- 4. verify that the validation result applies to the current PR head commit;
33
- 5. decide exactly one state:
34
- - `adsm:verified`
35
- - `adsm:needs-fix`
36
-
37
- ## Required comment
38
-
39
- Post one Pull Request comment with this exact heading:
40
-
41
- ```markdown
42
- ### Validation result
43
- ```
44
-
45
- The comment must contain exactly one state line:
46
-
47
- ```text
48
- State: adsm:verified
49
- ```
50
-
51
- or
52
-
53
- ```text
54
- State: adsm:needs-fix
55
- ```
56
-
57
- The comment must also contain exactly one head line with the current Pull Request head SHA:
58
-
59
- ```text
60
- Head: <current-pr-head-sha>
61
- ```
62
-
63
- Use the current `headRefOid` value from the Pull Request you just read.
64
-
65
- Do not include more than one `State:` line.
66
- Do not include more than one `Head:` line.
67
-
68
- Before applying the next workflow label, remove all existing stale `adsm:*` labels from the current Pull Request. Keep unrelated labels unchanged.
69
-
70
- After posting the comment, replace `adsm:ready-for-validation` with the corresponding Pull Request label.
71
-
72
- Do not merge the Pull Request in this stage.
@@ -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.