Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .windsurf/rules/nx-monorepo-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ For packages in `packages/plugins/`:

```bash
bunx nx g @nx/js:lib \
--name=oat \
--directory=packages/plugins/oat \
--importPath=@abapify/oat \
--name=custom-format \
--directory=packages/plugins/custom-format \
--importPath=@abapify/custom-format \
--bundler=none \
--unitTestRunner=none \
--linter=eslint
Expand Down
1 change: 0 additions & 1 deletion .windsurf/rules/spec-first-then-code.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ description: When making any changes for any of spec-driven packages
## Spec Domains

- `openspec/specs/adk/` — ADK (ABAP Development Kit, TS native way to work with ABAP code and other objects)
- `openspec/specs/oat/` — OAT (Alternative to AbapGit and gCTS way of representing ABAP objects in a file tree)
- `openspec/specs/adt-cli/` — ADT CLI (alternative to piper CLI solution to operate with ABAP backend)
- `openspec/specs/adt-client/` — ADT Client (abstracted ADT API communication)
- `openspec/specs/cicd/` — CI/CD pipeline architecture
4 changes: 2 additions & 2 deletions .windsurf/rules/tmp-folder-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ description: If you want to create some test output which is not supposed to be

```bash
# ✅ CORRECT - Use tmp/ for experiments
npx adt import transport TR001 ./tmp/test-transport --format oat --debug
npx adt import transport TR001 ./tmp/test-transport --format abapgit --debug

# ❌ WRONG - Don't create test files in root
npx adt import transport TR001 ./test-transport-import --format oat --debug
npx adt import transport TR001 ./test-transport-import --format abapgit --debug
```

### Exception: E2E Tests
Expand Down
3 changes: 1 addition & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bunx nx lint
├── samples/ # Example projects
├── tools/ # Nx plugins/tools
├── openspec/ # OpenSpec specs and changes (source of truth)
│ ├── specs/ # Domain specifications (adk, adt-cli, oat, cicd, etc.)
│ ├── specs/ # Domain specifications (adk, adt-cli, cicd, etc.)
│ ├── changes/ # Proposed changes (one folder per change)
│ └── config.yaml # OpenSpec project configuration
├── docs/ # Architecture docs, migration notes, examples
Expand Down Expand Up @@ -205,7 +205,6 @@ Specifications live in `openspec/specs/` organized by domain:
- `openspec/specs/adt-cli/` — CLI design and plugin architecture
- `openspec/specs/adt-client/` — ADT API client
- `openspec/specs/cicd/` — CI/CD pipeline architecture
- `openspec/specs/oat/` — OAT file format

### Before implementing a new feature:

Expand Down
3 changes: 1 addition & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ openspec/
│ ├── adk/ # ABAP Development Kit
│ ├── adt-cli/ # ADT CLI design and plugins
│ ├── adt-client/ # ADT API client
│ ├── cicd/ # CI/CD pipeline
│ └── oat/ # OAT file format
│ └── cicd/ # CI/CD pipeline
├── changes/ # Proposed changes (one folder per change)
└── config.yaml # Project configuration
```
Expand Down
2 changes: 1 addition & 1 deletion docs/architecture/adk-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ includeType: 'testclasses' → zcl_example.clas.testclasses.abap

```
┌─────────────────────────────────────────────────────────────┐
│ Format Plugins (@abapify/abapgit, @abapify/oat)
│ Format Plugins (@abapify/adt-plugin-abapgit)
│ - Serialize ADK → Files │
│ - Deserialize Files → ADK │
│ - NO direct ADT Client access │
Expand Down
26 changes: 13 additions & 13 deletions docs/architecture/plugin-system.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## Overview

The ADT CLI now implements a plugin-based configuration system where format handlers (like OAT) can leverage ADK for proper serialization/deserialization of ABAP objects received from the ADT client.
The ADT CLI implements a plugin-based configuration system where format handlers (like abapGit) can leverage ADK for proper serialization/deserialization of ABAP objects received from the ADT client.

## Architecture

### Core Components

1. **Format Registry** (`/lib/formats/format-registry.ts`)
- Manages format plugins (OAT, abapGit, etc.)
- Manages format plugins (abapGit, etc.)
- Auto-registers available object types from ObjectRegistry
- Provides unified interface for format operations

Expand All @@ -23,14 +23,14 @@ The ADT CLI now implements a plugin-based configuration system where format hand
- Preserves original ADT XML context for round-trip compatibility
- Enhances ObjectData with ADK spec metadata

### Enhanced OAT Format
### Enhanced abapGit Format

The OAT format now properly leverages ADK for serialization/deserialization:
The abapGit format leverages ADK for serialization/deserialization:

#### Serialization Flow

```
ADT Client → ADK Bridge → ObjectData (with ADK spec) → OAT Format → YAML files
ADT Client → ADK Bridge → ObjectData (with ADK spec) → abapGit Format → .abap + .xml files
```

#### Key Improvements
Expand All @@ -43,13 +43,13 @@ ADT Client → ADK Bridge → ObjectData (with ADK spec) → OAT Format → YAML
#### Code Example

```typescript
// Enhanced serialization in OAT format
// Pseudocode – illustrative only, not the exact implementation
// Enhanced serialization in abapGit format
const adkSpec = objectData.metadata?.adkSpec
? this.createAdkSpecFromExistingData(objectData, objectType)
: this.convertObjectDataToAdkSpec(objectData, objectType);

const serializer = SerializerRegistry.get('oat');
const serialized = serializer.serialize(adkSpec);
const serialized = serializeWithAbapGit(adkSpec);
```

### Object Type Support
Expand Down Expand Up @@ -81,23 +81,23 @@ The plugin system is automatically configured through:

## Usage

### Transport Import with Enhanced OAT
### Transport Import with abapGit

```bash
adt import transport TR001234 ./output --format oat --debug
adt import transport TR001234 ./output --format abapgit --debug
```

This command now:

1. Retrieves transport objects via ADT client
2. Converts to ADK specs using appropriate adapters
3. Serializes using OAT format with full ADK context
3. Serializes using abapGit format with full ADK context
4. Preserves all metadata for round-trip compatibility

### Supported Workflows

- **Import**: ADT → ADK → OAT YAML files
- **Export**: OAT YAML files → ADK → ADT (future)
- **Import**: ADT → ADK → abapGit files (.abap + .xml)
- **Export**: abapGit files → ADK → ADT
- **Round-trip**: Maintains data integrity throughout the process

## Future Enhancements
Expand Down
35 changes: 6 additions & 29 deletions docs/design/export-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The current export implementation in `ExportService` tries to iterate over files directly,
but this is wrong because:

1. **Each format has different file structures** - OAT uses `.oat.xml`, abapGit uses `.abap` + `.xml`
1. **Each format has different file structures** - abapGit uses `.abap` + `.xml`
2. **Only the plugin knows how to read its format** - file discovery is format-specific
3. **Plugin should not be responsible for deployment** - only for format mapping

Expand Down Expand Up @@ -33,7 +33,7 @@ but this is wrong because:
┌─────────────────────────────────────────────────────────────┐
│ Plugin (format.export generator) │
│ - Receives FileTree │
│ - Iterates files in its format (*.oat.xml, *.abap, etc.) │
│ - Iterates files in its format (*.abap, *.xml, etc.)
│ - Parses each file into ADK object │
│ - Yields ADK objects (does NOT deploy) │
└─────────────────────────────────────────────────────────────┘
Expand Down Expand Up @@ -148,28 +148,6 @@ async exportTransport(options: TransportExportOptions): Promise<ExportResult> {
}
```

### Plugin Implementation Example (OAT)

```typescript
// In @abapify/oat plugin
async function* export(fileTree: FileTree): AsyncGenerator<AdkObject> {
// Plugin knows OAT format: *.oat.xml files
for await (const file of fileTree.glob('**/*.oat.xml')) {
const content = await fileTree.read(file);

// Parse OAT XML → extract type, name, source, metadata
const parsed = parseOatXml(content);

// Create ADK object with data
const adkObject = adk.get(parsed.name, parsed.type);
adkObject.setSource(parsed.source);
adkObject.setMetadata(parsed.metadata);

yield adkObject;
}
}
```

### Plugin Implementation Example (abapGit)

```typescript
Expand Down Expand Up @@ -253,10 +231,9 @@ async function* export(fileTree: FileTree): AsyncGenerator<AdkObject> {
### Remaining TODO

1. Update `AdtPlugin` interface with `export` generator in `@abapify/adt-plugin`
2. Implement `export` generator in OAT plugin
3. Add bulk activation to ADK (if not exists)
4. Remove export commands from `@abapify/adt-cli` (now in separate plugin)
5. Wire up full export flow in adt-export command
2. Add bulk activation to ADK (if not exists)
3. Remove export commands from `@abapify/adt-cli` (now in separate plugin)
4. Wire up full export flow in adt-export command

## Usage

Expand All @@ -271,7 +248,7 @@ export default {
Then use:

```bash
adt export --source ./my-objects --format oat --transport DEVK900123
adt export --source ./my-objects --format abapgit --transport DEVK900123
```

## Open Questions
Expand Down
6 changes: 3 additions & 3 deletions docs/examples/intelligent-adk-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ if (domainObj.kind === 'Domain') {
## Plugin Integration

```typescript
// Example: Enhanced OAT Plugin using intelligent objects
class EnhancedOatPlugin implements FormatPlugin {
// Example: Enhanced abapGit Plugin using intelligent objects
class EnhancedAbapGitPlugin implements FormatPlugin {
async serialize(
objects: AdkObjectBase[],
targetPath: string,
Expand All @@ -101,7 +101,7 @@ class EnhancedOatPlugin implements FormatPlugin {
const methods = classObj.getMethods();
const isAbstract = classObj.isAbstract();

// Enhanced metadata for OAT format
// Enhanced metadata for abapGit format
const enhancedMetadata = {
...metadata,
methodCount: methods.length,
Expand Down
8 changes: 4 additions & 4 deletions docs/planning/abap-code-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Implement a complete CI/CD pipeline for ABAP code review using transport request

- **[#3] Transport Import Stage** - Extract and serialize transport objects
- Status: `status:ready`
- Dependencies: ADT CLI auth, ADK adapters, OAT format
- Dependencies: ADT CLI auth, ADK adapters, abapGit format
- Estimated effort: 2-3 days
- **[#4] Quality Check Stage** - ATC integration with multi-platform output
- Status: `status:ready`
Expand Down Expand Up @@ -69,7 +69,7 @@ Implement a complete CI/CD pipeline for ABAP code review using transport request

- ADT CLI authentication system (✅ exists)
- ADK object adapters (✅ exists)
- OAT format specification (✅ exists)
- abapGit format specification (✅ exists)
- ATC API integration (❓ needs investigation)

### Risks
Expand All @@ -81,7 +81,7 @@ Implement a complete CI/CD pipeline for ABAP code review using transport request

## Success Metrics

- [ ] Complete transport import with OAT output
- [ ] Complete transport import with abapGit output
- [ ] ATC integration with GitLab Code Quality format
- [ ] Markdown report generation with quality metrics
- [ ] End-to-end pipeline execution < 5 minutes for typical transport
Expand All @@ -92,7 +92,7 @@ Implement a complete CI/CD pipeline for ABAP code review using transport request
1. Start with Issue #3 (Transport Import Stage)
2. Implement basic ADT API integration for transport object retrieval
3. Add ADK integration for type-safe serialization
4. Create OAT format output generation
4. Create abapGit format output generation
5. Move to Quality Check Stage (Issue #4)

## Notes
Expand Down
6 changes: 3 additions & 3 deletions docs/planning/current-sprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ _Ready for next phase implementation_
1. **Transport Import Implementation** (#3) ✅ COMPLETED
- [x] ADT API integration for transport object retrieval
- [x] ADK integration for type-safe object serialization
- [x] OAT format output generation
- [x] abapGit format output generation
- [x] Error handling and logging
- [ ] Unit tests and integration tests

Expand Down Expand Up @@ -86,7 +86,7 @@ _None identified_

- ✅ ADT CLI authentication system (available)
- ✅ ADK object adapters (available)
- ✅ OAT format specification (available)
- ✅ abapGit format specification (available)
- ❓ ATC API documentation (needs research)

## Daily Progress
Expand All @@ -103,7 +103,7 @@ _None identified_
- Begin Transport Import Stage implementation (#3)
- Start with ADT API integration research
- Set up development environment for testing
- Focus on transport object retrieval and OAT serialization
- Focus on transport object retrieval and abapGit serialization

## Notes

Expand Down
4 changes: 2 additions & 2 deletions docs/planning/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Create a platform-agnostic, developer-friendly CI/CD pipeline for ABAP code revi
- CI/CD pipeline specification
- [ ] **Transport Import Stage** (#3)
- Extract ABAP objects from transport requests
- OAT format serialization
- Multiple output format support (OAT, abapGit, JSON)
- abapGit format serialization
- Multiple output format support (abapGit, JSON)
- [ ] **Quality Check Stage** (#4)
- ATC integration with transport objects
- Multi-platform output (GitLab, GitHub, SARIF, console)
Expand Down
6 changes: 3 additions & 3 deletions openspec/specs/adk/intelligent-object-factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ class ClassObjectImpl implements ClassObject {
Plugins will receive intelligent ADK objects instead of raw data:

```typescript
// OAT Plugin usage
class OatPlugin implements FormatPlugin {
// abapGit Plugin usage
class AbapGitPlugin implements FormatPlugin {
async serialize(
objects: AdkObjectBase[],
targetPath: string,
Expand Down Expand Up @@ -239,7 +239,7 @@ class OatPlugin implements FormatPlugin {
2. **Implement object factory** - Create AdkObjectFactory with ADT client integration
3. **Create object implementations** - Implement ClassObjectImpl, InterfaceObjectImpl, etc.
4. **Integrate with existing adapters** - Reuse current XML parsing logic
5. **Update plugins** - Modify OAT plugin to use new intelligent objects
5. **Update plugins** - Modify abapGit plugin to use new intelligent objects

## Benefits

Expand Down
4 changes: 2 additions & 2 deletions openspec/specs/adk/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ this.handlers.set(
);
```

### With OAT Format
### With abapGit Format

ADK specifications serve as the canonical representation for OAT metadata storage, ensuring type safety and consistency across the entire toolchain.
ADK specifications serve as the canonical representation for abapGit metadata storage, ensuring type safety and consistency across the entire toolchain.

## Quality Requirements

Expand Down
Loading
Loading