Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .agents/repo-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,13 @@ All AI agent rules live in `.agents/rules/` (single source of truth).

### Always On

| Rule | Description |
| ------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| [`git/no-auto-commit`](rules/git/no-auto-commit.md) | Never commit or push without explicit user approval |
| [`development/coding-conventions`](rules/development/coding-conventions.md) | TS strict, ESM only, naming, formatting, import conventions |
| [`development/file-lifecycle`](rules/development/file-lifecycle.md) | Generated/downloaded file guardrails |
| [`openspec/project-planning-memory`](rules/openspec/project-planning-memory.md) | OpenSpec workflow and project memory |
| [`verification/after-changes`](rules/verification/after-changes.md) | Build, typecheck, test, lint, format checklist |
| Rule | Description |
| ------------------------------------------------------------------------------- | ------------------------------------------------------------ |
| [`git/autonomous-delivery`](rules/git/autonomous-delivery.md) | Commit and push authorized feature work without re-prompting |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Info: no-auto-commit references fully removed

The PR deletes .agents/rules/git/no-auto-commit.md and replaces it with .agents/rules/git/autonomous-delivery.md, updating the rules index and all epic Devin prompt blocks. I grepped the entire repo for no-auto-commit and found zero remaining references, so no dangling links to the removed rule file exist. The .agents/repo-guide.md index row and docs/roadmap/README.md conventions were both updated consistently.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

| [`development/coding-conventions`](rules/development/coding-conventions.md) | TS strict, ESM only, naming, formatting, import conventions |
| [`development/file-lifecycle`](rules/development/file-lifecycle.md) | Generated/downloaded file guardrails |
| [`openspec/project-planning-memory`](rules/openspec/project-planning-memory.md) | OpenSpec workflow and project memory |
| [`verification/after-changes`](rules/verification/after-changes.md) | Build, typecheck, test, lint, format checklist |

### On Demand (model_decision)

Expand Down
26 changes: 26 additions & 0 deletions .agents/rules/git/autonomous-delivery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
trigger: always_on
description: Commit and push authorized feature work without re-prompting.
---

# Autonomous Delivery Rule

## Rule

Once the user authorizes implementation, that authorization includes creating
and pushing verified atomic commits to the scoped feature branch. Do not pause
to request a second commit or push confirmation.

Before committing and pushing:

1. Inspect the exact staged files and diff.
2. Run the relevant verification gates and record known blockers.
3. Use a scoped, public-safe commit message and author identity where required.
4. Push only the intended feature branch and report the resulting commit/MR.

## Actions that remain gated

- destructive history rewrites or force-pushes;
- direct protected-branch updates or merges;
- releases and package publication;
- expanding the branch, repository, or delivery scope.
40 changes: 0 additions & 40 deletions .agents/rules/git/no-auto-commit.md

This file was deleted.

4 changes: 3 additions & 1 deletion docs/roadmap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,7 @@ Otherwise: open https://app.devin.ai/ → New session → paste the **Devin prom
- Every operation needs an entry in `packages/adt-cli/tests/e2e/parity.<area>.test.ts`.
- Real SAP fixtures in `@abapify/adt-fixtures` (mark `TODO-synthetic` only when no capture available).
- abapGit-style filenames everywhere a file path is emitted (use `adtUriToAbapGitPath`).
- No commits without explicit user approval (per repo `.agents/rules/git/no-auto-commit`).
- Authorized implementation is committed and pushed as verified atomic slices
without a separate confirmation prompt (see
`.agents/rules/git/autonomous-delivery`).
- Run `bunx nx format:write` before signalling done.
2 changes: 1 addition & 1 deletion docs/roadmap/epics/_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Read these files first:

Implement everything in the "Scope" section. Stay strictly within "Out of scope" boundaries.
Run the full Acceptance block before declaring done.
Do NOT commit unless explicitly approved by the operator.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.

If you encounter blockers (missing contract, undecided design choice), document them in
docs/roadmap/epics/eXX-NAME.md under a new "Open questions" section and stop — don't guess.
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e01-include.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e01-include.md

Read AGENTS.md, docs/roadmap/README.md, then this epic file. Implement Scope strictly.
Reference impl at /tmp/sapcli-ref/sapcli/ (clone if missing).
Do NOT commit without explicit user approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
Run the Acceptance block before declaring done.
```
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e02-function.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e02-function.md

Read AGENTS.md, docs/roadmap/README.md, then this epic file. Implement Scope strictly.
Reference: /tmp/sapcli-ref/sapcli/sap/cli/function.py + sap/adt/function.py
Do NOT commit without explicit user approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e03-badi.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
```
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e03-badi.md
Read AGENTS.md + docs/roadmap/README.md first. Reference: /tmp/sapcli-ref/sapcli/sap/cli/badi.py.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Implementation notes (first pass)
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e04-strust.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
```
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e04-strust.md
Read AGENTS.md + docs/roadmap/README.md. Reference: /tmp/sapcli-ref/sapcli/sap/cli/strust.py.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions (post-landing)
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e05-format-plugin-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e05-format-plugin-api.md
Read AGENTS.md + docs/roadmap/README.md, then this spec. This epic is foundation for E06/E07/E08;
breakages will block multiple downstream sessions.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e06-gcts-format-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e06-gcts-format-plugi
Read AGENTS.md, docs/roadmap/README.md, e05-format-plugin-api.md, then this file.
Reference SAP help docs for gCTS file layout — capture and pin locally before coding handlers.
This epic must NOT introduce gCTS *commands* (those are E07). Only serialization.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e07-gcts-command-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e07-gcts-command-plugin.md
Read AGENTS.md, docs/roadmap/README.md, e05-format-plugin-api.md, e06-gcts-format-plugin.md.
Reference: /tmp/sapcli-ref/sapcli/sap/cli/gcts.py and sap/rest/gcts/.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e08-checkin.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e08-checkin.md
Read AGENTS.md, docs/roadmap/README.md, e05-format-plugin-api.md, packages/adk/AGENTS.md.
Reference: /tmp/sapcli-ref/sapcli/sap/cli/checkin.py.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e09-acds-parser.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ bunx nx build acds && bunx nx test acds
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e09-acds-parser.md
Read packages/acds/AGENTS.md and the existing grammar/parser. Refer to SAP CDS DDL spec.
This is foundation for RAP epics — keep API stable.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e10-rap-bdef.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e10-rap-bdef.md
Reads: AGENTS.md, docs/roadmap/README.md, e09-acds-parser.md, packages/adk/AGENTS.md.
Reference: /tmp/sapcli-ref/sapcli/sap/cli/behaviordefinition.py.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Delivered (2025-PR-103)
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e11-rap-srvd.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ packages/adt-plugin-abapgit/tests/filename/adt-uri-to-path.test.ts
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e11-rap-srvd.md
Reads: AGENTS.md, docs/roadmap/README.md, e09-acds-parser.md.
Capture a real SRVD source from any S/4HANA sample app for reference.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Status: Landed
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e12-rap-srvb.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
```
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e12-rap-srvb.md
Reads: AGENTS.md, docs/roadmap/README.md, packages/adt-mcp/src/lib/tools/publish-service-binding.ts.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Status: Landed
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e13-startrfc.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e13-startrfc.md
Reads: AGENTS.md, docs/roadmap/README.md.
Reference: /tmp/sapcli-ref/sapcli/sap/cli/startrfc.py and sap/rfc/.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions
Expand Down
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e14-flp.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ packages/adt-fixtures/src/mock-server/routes.ts
```
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e14-flp.md
Reference: /tmp/sapcli-ref/sapcli/sap/cli/flp.py.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```
2 changes: 1 addition & 1 deletion docs/roadmap/epics/e15-wb.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ bunx nx typecheck && bunx nx lint && bunx nx format:write
```
Spec: /mnt/wsl/workspace/ubuntu/adt-cli/docs/roadmap/epics/e15-wb.md
Reference: /tmp/sapcli-ref/sapcli/sap/cli/wb.py and our existing MCP tools.
Do NOT commit without approval.
Commit and push verified changes to the scoped feature branch without a separate confirmation prompt.
```

## Open questions (post-real-SAP sweep, TRL 2025-11)
Expand Down
44 changes: 44 additions & 0 deletions openspec/changes/add-delegated-assistant-read-scope/design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Design: delegated-assistant read scope

## Decision

`delegated-assistant` is a product-neutral signed invocation identity for an
interactive MCP client acting on behalf of one authenticated principal. Its
credential carries the fixed `server` and `read` classes plus one
System/Destination binding. The server's catalogue remains the only
tool-to-class authority.

The exact constraint is:

```ts
{
kind: 'delegated-assistant-read-v1';
threadId: string;
executionId: string;
systemSid: string;
}
```

`threadId` and `executionId` are UUIDs. Limits are empty because operational
rate limits remain server-owned and do not determine tool admission.

## Enforcement

The invocation verifier accepts only the exact claim shape. HTTP session
identity remains bound to the credential JTI. `tools/list` filters registered
tools through the operation-class catalogue, and dispatch repeats the same
class and Destination checks before acquiring a lease.

The client requests the coarse read envelope by obtaining this credential. It
does not send tool names, Destination keys, or resource-broadening arguments.

## Alternatives rejected

- Product-specific agent IDs: rejected because the public MCP server must
remain reusable outside one consumer.
- Client-maintained tool allowlists: rejected because they drift from the
server catalogue.
- Reusing `system-assistant`: rejected because it lacks explicit thread and
execution binding and is retained only for compatibility.
- Adding `safe_execute`: rejected because checks require a separate exact,
single-use grant.
28 changes: 28 additions & 0 deletions openspec/changes/add-delegated-assistant-read-scope/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Add a delegated-assistant read scope

## Why

An interactive assistant needs to discover and call the read tools permitted
to its authenticated principal without duplicating the MCP server's tool
catalogue in every client.

## What changes

- Add one product-neutral `delegated-assistant` signed invocation policy.
- Bind the policy to the authenticated principal, MCP execution, thread, and
one System/Destination.
- Let the server's operation-class catalogue select all permitted `server`
and `read` tools at discovery and dispatch.

## Non-goals

- This change adds no product-specific agent name or workflow.
- This change adds no `safe_execute` or `write` authority.
- This change adds no client-provided tool-name allowlist or call-count limit.
- This change does not alter ordinary OAuth, bearer, proxy, or stdio modes.

## Validation

- Invocation tests prove only the exact delegated read policy is accepted.
- HTTP integration proves multiple read tools are advertised.
- Scope tests prove write and `safe_execute` tools remain absent and denied.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
## ADDED Requirements

### Requirement: Delegated assistants receive a server-owned read catalogue

The server SHALL accept an exact signed delegated-assistant policy bound to
one principal, thread, execution, System, and Destination. The resulting MCP
catalogue SHALL contain every registered tool whose server-owned operation
class is `server` or `read`.

#### Scenario: Delegated assistant lists tools

- **GIVEN** a valid delegated-assistant credential requests the read envelope
- **WHEN** the client calls `tools/list`
- **THEN** the server advertises multiple permitted read tools without a
client-provided tool-name allowlist

#### Scenario: A new read tool is registered

- **GIVEN** a new tool has a complete `read` catalogue classification
- **WHEN** a delegated assistant refreshes `tools/list`
- **THEN** the new tool is admitted without changing the client credential
contract

### Requirement: Delegated read authority cannot widen

The server SHALL reject malformed delegated-assistant policies and SHALL deny
`safe_execute`, `write`, unknown, and out-of-Destination operations at both
catalogue and dispatch.

#### Scenario: Delegated assistant attempts a write

- **WHEN** the client requests or directly calls a write-class tool
- **THEN** the tool is absent from discovery and dispatch returns
`mcp_scope_denied` before a Destination lease or SAP operation

#### Scenario: Delegated policy carries additional authority

- **WHEN** the signed claim adds a tool list, resource override, non-empty
limits, another operation class, or an additional Destination
- **THEN** the invocation exposes no MCP tools
13 changes: 13 additions & 0 deletions openspec/changes/add-delegated-assistant-read-scope/tasks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Tasks

- [x] Define the product-neutral delegated-assistant read policy.
- [x] Add failing policy-parser and HTTP catalogue tests.
- [x] Implement exact invocation verification.
- [x] Prove catalogue and dispatch remain server-owned and read-only.
- [ ] Run adt-mcp build, typecheck, tests, lint, and full-tree formatting.
- Focused policy, catalogue, and signed-JWT tests pass.
- Scoped ESLint and Prettier checks pass; strict OpenSpec validation passes.
- Full build/typecheck and server-construction tests remain blocked by the
pre-existing dependency-tree mismatch (Zod 4 versus
`zod-to-json-schema`, stale generated declarations). A clean frozen
install is unavailable under the current registry policy.
2 changes: 2 additions & 0 deletions packages/adt-mcp/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ export {
} from './lib/http/server';
export {
createMcpInvocationVerifier,
parseDelegatedAssistantReadPolicy,
parseScopedAdtInvocationPolicy,
parseSafeExecutePolicy,
type DelegatedAssistantReadPolicy,
type ScopedAdtInvocationPolicy,
type McpInvocationJsonValue,
type McpInvocationVerifier,
Expand Down
Loading