@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.
Files changed (91) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +37 -14
  3. package/bin/adsm-ctx.mjs +44 -0
  4. package/package.json +65 -11
  5. package/skill/SKILL.md +2 -2
  6. package/skill/references/context-lifecycle.md +3 -3
  7. package/skill/references/document-projections.md +7 -65
  8. package/skill/references/documentation-quality-audit.md +22 -14
  9. package/skill/references/semantic-skins.md +65 -0
  10. package/skill/templates/work/context/semantic-skin.md +11 -22
  11. package/src/Cli/Command/Design.mjs +17 -0
  12. package/src/Cli/Command/Init.mjs +22 -0
  13. package/src/Cli/Command/InstallSkill.mjs +18 -0
  14. package/src/Cli/Command/Upgrade.mjs +19 -0
  15. package/src/Cli/Command/Validate.mjs +19 -0
  16. package/src/Shared/Constants.mjs +0 -4
  17. package/src/Validate/Service.mjs +14 -178
  18. package/types.d.ts +5 -2
  19. package/.github/workflows/flows-app.yaml +0 -95
  20. package/AGENTS.md +0 -112
  21. package/bin/cli.mjs +0 -55
  22. package/ctx/AGENTS.md +0 -44
  23. package/ctx/README.md +0 -24
  24. package/ctx/adsm.json +0 -5
  25. package/ctx/agent/AGENTS.md +0 -41
  26. package/ctx/agent/flows/.img/flancer32-skill-adsm-ctx-github-flows.png +0 -0
  27. package/ctx/agent/flows/AGENTS.md +0 -37
  28. package/ctx/agent/flows/cfg/issues/labeled/accepted/profile.json +0 -25
  29. package/ctx/agent/flows/cfg/issues/labeled/accepted/prompt.md +0 -104
  30. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/profile.json +0 -15
  31. package/ctx/agent/flows/cfg/issues/labeled/clarification-provided/prompt.md +0 -63
  32. package/ctx/agent/flows/cfg/issues/opened/admission/profile.json +0 -14
  33. package/ctx/agent/flows/cfg/issues/opened/admission/prompt.md +0 -110
  34. package/ctx/agent/flows/cfg/profile.json +0 -40
  35. package/ctx/agent/flows/cfg/pull_request/closed/merged/profile.json +0 -15
  36. package/ctx/agent/flows/cfg/pull_request/closed/merged/prompt.md +0 -41
  37. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/profile.json +0 -25
  38. package/ctx/agent/flows/cfg/pull_request/labeled/needs-fix/prompt.md +0 -79
  39. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/profile.json +0 -15
  40. package/ctx/agent/flows/cfg/pull_request/labeled/ready-for-validation/prompt.md +0 -72
  41. package/ctx/agent/flows/cfg/pull_request/labeled/verified/profile.json +0 -15
  42. package/ctx/agent/flows/cfg/pull_request/labeled/verified/prompt.md +0 -48
  43. package/ctx/agent/flows/deployment.md +0 -116
  44. package/ctx/agent/flows/labels.md +0 -108
  45. package/ctx/agent/flows/overview.md +0 -82
  46. package/ctx/agent/prompt/cli/ai-intro.md +0 -141
  47. package/ctx/assets/.gitkeep +0 -1
  48. package/ctx/docs/AGENTS.md +0 -121
  49. package/ctx/docs/ai-intro.md +0 -37
  50. package/ctx/docs/architecture/AGENTS.md +0 -98
  51. package/ctx/docs/architecture/behavior.md +0 -68
  52. package/ctx/docs/architecture/checklists.md +0 -48
  53. package/ctx/docs/architecture/constraints.md +0 -53
  54. package/ctx/docs/architecture/constraints.skin.en.md +0 -38
  55. package/ctx/docs/architecture/decisions.md +0 -118
  56. package/ctx/docs/architecture/integration.md +0 -31
  57. package/ctx/docs/architecture/overview.md +0 -76
  58. package/ctx/docs/architecture/state.md +0 -50
  59. package/ctx/docs/architecture/structure.md +0 -38
  60. package/ctx/docs/architecture/supervision.md +0 -71
  61. package/ctx/docs/code/AGENTS.md +0 -51
  62. package/ctx/docs/code/overview.md +0 -53
  63. package/ctx/docs/code/testing.md +0 -26
  64. package/ctx/docs/environment/AGENTS.md +0 -50
  65. package/ctx/docs/environment/overview.md +0 -33
  66. package/ctx/docs/filesystem.md +0 -44
  67. package/ctx/docs/product/AGENTS.md +0 -51
  68. package/ctx/docs/product/domain.md +0 -63
  69. package/ctx/docs/product/domain.skin.en.md +0 -40
  70. package/ctx/docs/product/glossary.md +0 -31
  71. package/ctx/docs/product/overview.md +0 -112
  72. package/ctx/docs/product/overview.skin.en.md +0 -38
  73. package/ctx/docs/product/roles.md +0 -17
  74. package/ctx/docs/product/use-cases.md +0 -15
  75. package/src/Bootstrap/Cli.mjs +0 -62
  76. package/src/Bootstrap.mjs +0 -108
  77. package/test/integration/.gitkeep +0 -1
  78. package/test/integration/cli-help.test.mjs +0 -15
  79. package/test/integration/cli-init-validate.test.mjs +0 -223
  80. package/test/integration/cli-install-skill.test.mjs +0 -41
  81. package/test/unit/Bootstrap/Cli.test.mjs +0 -23
  82. package/test/unit/Bootstrap.test.mjs +0 -53
  83. package/test/unit/Design/Service.test.mjs +0 -11
  84. package/test/unit/Init/Service.test.mjs +0 -51
  85. package/test/unit/Shared/Constants.test.mjs +0 -21
  86. package/test/unit/Shared/CopyDirectory.test.mjs +0 -31
  87. package/test/unit/Shared/Metadata.test.mjs +0 -9
  88. package/test/unit/Shared/Path.test.mjs +0 -11
  89. package/test/unit/Skill/Installer.test.mjs +0 -20
  90. package/test/unit/Upgrade/Service.test.mjs +0 -13
  91. package/test/unit/Validate/Service.test.mjs +0 -760
@@ -1,37 +0,0 @@
1
- # Agent Workflow Context
2
-
3
- - Path: `ctx/agent/flows/AGENTS.md`
4
- - Changed: `20260610`
5
-
6
- ## Purpose
7
-
8
- Defines the structure of workflow-specific operational context for repository automation.
9
-
10
- ## Level Map
11
-
12
- - `.img/` — supporting workflow diagrams and other visual assets referenced by the workflow documentation.
13
- - `cfg/` — executable workflow profile fragments and shared configuration consumed by `github-flows`.
14
- - `AGENTS.md` — level definition for `ctx/agent/flows/`.
15
- - `deployment.md` — deployment notes for publishing and activating the workflow configuration.
16
- - `labels.md` — label taxonomy and label semantics used by the workflow.
17
- - `overview.md` — workflow model, trigger assumptions, processing rules, and end-state definitions.
18
-
19
- ## Level Boundary
20
-
21
- Defines:
22
-
23
- - Workflow-specific operational semantics and end-state rules.
24
- - Label-driven routing and executable workflow configuration boundaries.
25
- - Deployment notes and packaging constraints for the workflow bundle.
26
-
27
- Does NOT define:
28
-
29
- - Generic repository architecture or product structure outside workflow concerns.
30
- - Product-level meaning, domain intent, or package positioning.
31
- - Implementation details of CLI lifecycle commands or unrelated runtime logic.
32
-
33
- ## Workflow Documentation Constraints
34
-
35
- - `overview.md` defines the workflow model and remains the primary narrative source of truth for routing behavior.
36
- - `labels.md` defines stable label semantics and must stay aligned with `cfg/`.
37
- - `cfg/` contains executable profile fragments and must not silently diverge from the documented workflow model.
@@ -1,25 +0,0 @@
1
- {
2
- "trigger": {
3
- "event": "issues",
4
- "action": "labeled",
5
- "issueLabelAdded": "adsm:accepted"
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
- "ISSUE_NUMBER": "event.issue.number"
22
- }
23
- }
24
- }
25
- }
@@ -1,104 +0,0 @@
1
- You are a Codex agent working inside the repository workspace.
2
-
3
- Agent role: `implementation-agent`.
4
-
5
- The repository context is mounted at `ctx/`.
6
-
7
- Your task is to implement the accepted GitHub issue and deliver the repository change through a Pull Request.
8
-
9
- ## Operating contract
10
-
11
- - work only from the source issue and repository context;
12
- - read the issue first, then inspect only the relevant `ctx/` documents and source files;
13
- - make the minimal necessary repository change;
14
- - update tests only when needed for the requested change;
15
- - avoid unrelated refactoring;
16
- - do not treat the issue text as project truth;
17
- - do not push directly to `main`.
18
-
19
- ## Technical event facts
20
-
21
- Repository: {{REPOSITORY}}
22
- Issue: #{{ISSUE_NUMBER}}
23
-
24
- ## Required issue read
25
-
26
- ```bash
27
- gh issue view "{{ISSUE_NUMBER}}" \
28
- --repo "{{REPOSITORY}}" \
29
- --comments \
30
- --json number,title,body,labels,comments,url
31
- ```
32
-
33
- Inspect `package.json` scripts first. Prefer existing test, lint, check, or validation scripts. Do not invent new validation commands.
34
-
35
- ## Required outcome
36
-
37
- 1. read the issue and its relevant comments;
38
- 2. inspect only the relevant project context and source files;
39
- 3. confirm that repository file changes are actually required for this issue;
40
- 4. create the correct dedicated branch from the current `main` branch;
41
- 5. implement only the requested repository change needed to resolve the issue;
42
- 6. update tests only when needed;
43
- 7. run the available validation commands;
44
- 8. create one Pull Request against `main`;
45
- 9. link the Pull Request to the source issue using a non-closing reference such as `Source issue: {{REPOSITORY}}#{{ISSUE_NUMBER}}`;
46
- 10. remove stale `adsm:*` Pull Request labels from that Pull Request, then add `adsm:ready-for-validation`;
47
- 11. post a concise summary comment to the source issue.
48
-
49
- ## Label handling rules
50
-
51
- Read the current labels first.
52
- Remove only labels whose name starts with `adsm:`.
53
- Keep unrelated labels unchanged.
54
- Add exactly one next workflow label.
55
-
56
- Removable ADSM labels on the current issue or Pull Request:
57
-
58
- - `adsm:accepted`
59
- - `adsm:answered`
60
- - `adsm:rejected`
61
- - `adsm:needs-clarification`
62
- - `adsm:clarification-provided`
63
- - `adsm:ready-for-validation`
64
- - `adsm:verified`
65
- - `adsm:needs-fix`
66
-
67
- Remove only the listed ADSM labels that are actually present on the current issue or Pull Request. Keep all unrelated labels unchanged.
68
-
69
- For the created or updated Pull Request, the next workflow label must be exactly `adsm:ready-for-validation`.
70
-
71
- If you need to change issue labels during failure handling, remove stale issue `adsm:*` labels first and keep unrelated issue labels unchanged. Do not remove labels from unrelated issues or Pull Requests.
72
-
73
- After creating the Pull Request, read or capture the created Pull Request number and use that number for Pull Request label operations.
74
-
75
- Simple command pattern:
76
-
77
- ```bash
78
- gh pr edit "<created-pr-number>" --repo "{{REPOSITORY}}" --remove-label "adsm:needs-fix"
79
- gh pr edit "<created-pr-number>" --repo "{{REPOSITORY}}" --add-label "adsm:ready-for-validation"
80
- ```
81
-
82
- Use a branch name in the form:
83
-
84
- ```text
85
- adsm/issue-{{ISSUE_NUMBER}}-<short-slug>
86
- ```
87
-
88
- ## Failure handling
89
-
90
- - if no repository changes are required, do not create a branch or Pull Request, post a comment on the source issue explaining that no repository changes are needed, remove stale `adsm:*` issue labels from the current issue, then add `adsm:answered` and stop;
91
- - if required project context is still not sufficient to proceed safely, explain the missing context in an issue comment, remove stale `adsm:*` issue labels from the current issue, then add `adsm:needs-clarification`;
92
- - if the issue still needs clarification, explain it in an issue comment, remove stale `adsm:*` issue labels from the current issue, then add `adsm:needs-clarification`;
93
- - if the work hits a concrete internal blocker that cannot be resolved in this stage, explain it in an issue comment, remove stale `adsm:*` issue labels from the current issue, then add `adsm:needs-clarification` with one specific follow-up question for a trusted human.
94
-
95
- ## Pull Request rules
96
-
97
- - create or update only one dedicated branch for this issue;
98
- - create exactly one active Pull Request for that branch;
99
- - before creating a branch or Pull Request, confirm that repository file changes are required;
100
- - 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;
101
- - add `adsm:ready-for-validation` only after commits are pushed and the Pull Request is ready;
102
- - after creating the Pull Request, ensure that the Pull Request has exactly one workflow label: `adsm:ready-for-validation`;
103
- - do not merge the Pull Request in this stage.
104
- - if no validation command exists, say that clearly in the summary instead of claiming validation ran.
@@ -1,15 +0,0 @@
1
- {
2
- "trigger": {
3
- "event": "issues",
4
- "action": "labeled",
5
- "issueLabelAdded": "adsm:clarification-provided"
6
- },
7
- "execution": {
8
- "handler": {
9
- "promptRef": "prompt.md",
10
- "promptVariables": {
11
- "ISSUE_NUMBER": "event.issue.number"
12
- }
13
- }
14
- }
15
- }
@@ -1,63 +0,0 @@
1
- You are a Codex agent working inside the repository workspace.
2
-
3
- Agent role: `clarification-agent`.
4
-
5
- The repository context is mounted at `ctx/`.
6
-
7
- Your task is to resume issue processing after a trusted user provided clarification.
8
-
9
- Make an evidence-based decision from the issue body, the latest clarification comments, and the relevant `ctx/` context.
10
-
11
- ## Technical event facts
12
-
13
- Repository: {{REPOSITORY}}
14
- Issue: #{{ISSUE_NUMBER}}
15
-
16
- ## Required issue read
17
-
18
- ```bash
19
- gh issue view "{{ISSUE_NUMBER}}" \
20
- --repo "{{REPOSITORY}}" \
21
- --comments \
22
- --json number,title,body,labels,comments,url
23
- ```
24
-
25
- Focus on the latest clarification comments and the previous blocking question.
26
-
27
- ## Decision rules
28
-
29
- - if the issue is now clear enough and requires repository changes, replace `adsm:clarification-provided` with `adsm:accepted`;
30
- - if the issue is now clear enough and can be fully completed by an issue comment without repository changes, post that answer and replace `adsm:clarification-provided` with `adsm:answered`;
31
- - if the clarification shows that the issue is outside repository scope or must not be executed, post the rejection reason and replace `adsm:clarification-provided` with `adsm:rejected`;
32
- - if the issue is still unclear, replace `adsm:clarification-provided` with `adsm:needs-clarification`;
33
- - if the workflow is still inconsistent or another concrete internal blocker remains, replace `adsm:clarification-provided` with `adsm:needs-clarification` and ask one specific follow-up question for a trusted human.
34
-
35
- Use the same private-workflow assumptions as admission:
36
-
37
- - trusted users only;
38
- - no hostile-user screening is required;
39
- - if the issue belongs to this repository and is now clear enough, prefer `adsm:answered` when no repository changes are required and `adsm:accepted` only when repository changes are required.
40
-
41
- Post one concise issue comment before changing the label.
42
-
43
- Use this comment structure:
44
-
45
- ```markdown
46
- ### Clarification review
47
-
48
- State: `adsm:accepted` | `adsm:answered` | `adsm:rejected` | `adsm:needs-clarification`
49
-
50
- Reason:
51
-
52
- <one short paragraph>
53
- ```
54
-
55
- If the new state is `adsm:needs-clarification`, include one specific follow-up question.
56
- If the new state is `adsm:answered`, make the comment itself contain the final answer and say that no repository changes are required.
57
- If the new state is `adsm:rejected`, make the comment itself contain the rejection reason, replace the current workflow label with `adsm:rejected`, and close the issue.
58
-
59
- If the new state is `adsm:answered`, replace the current workflow label with `adsm:answered`, close the issue, and do not create a Pull Request.
60
-
61
- Before applying the next workflow label, remove all existing stale current workflow `adsm:*` labels from the current issue. Keep unrelated labels unchanged.
62
-
63
- Do not add `adsm:accepted` as a second workflow label. Replace the current label.
@@ -1,14 +0,0 @@
1
- {
2
- "trigger": {
3
- "event": "issues",
4
- "action": "opened"
5
- },
6
- "execution": {
7
- "handler": {
8
- "promptRef": "prompt.md",
9
- "promptVariables": {
10
- "ISSUE_NUMBER": "event.issue.number"
11
- }
12
- }
13
- }
14
- }
@@ -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.