Skip to content

Commit bce2e7e

Browse files
committed
Add COBOL agent skill and prompt to update spec at end
1 parent fa52889 commit bce2e7e

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
applyTo: "**/*.cob"
3+
---
4+
5+
# COBOL Comprehension Instructions
6+
7+
When analyzing COBOL code in this workspace, use these instructions to understand its structure, business logic, and data flow.
8+
9+
## COBOL Structure
10+
- **IDENTIFICATION DIVISION**: Program metadata (PROGRAM-ID)
11+
- **DATA DIVISION**: Variable declarations in WORKING-STORAGE and LINKAGE sections
12+
- **PROCEDURE DIVISION**: Business logic and program flow
13+
14+
## Key Patterns to Identify
15+
1. **Data definitions**: PIC clauses define data types (9 = numeric, X = alphanumeric, V = decimal point)
16+
2. **Program calls**: CALL statements indicate inter-program communication
17+
3. **Control flow**: PERFORM, EVALUATE, IF/ELSE structures
18+
4. **Data operations**: MOVE, ADD, SUBTRACT, MULTIPLY, DIVIDE
19+
20+
## Analysis Approach
21+
When asked to explain COBOL code:
22+
1. Identify the program's purpose from PROGRAM-ID and overall structure
23+
2. Document all data elements and their constraints
24+
3. Trace the business logic in PROCEDURE DIVISION
25+
4. Note any inter-program dependencies (CALL statements)
26+
5. Identify business rules embedded in conditional logic
27+
28+
## Output for SpecOps
29+
When extracting specifications from COBOL, produce plain-language descriptions that:
30+
- A non-programmer domain expert could verify
31+
- Capture business rules, not implementation details
32+
- Document edge cases and error handling
33+
- Note any implicit assumptions in the code

.github/steps/x-review.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,25 @@ Check out these resources to learn more about GitHub Copilot :
3737

3838
- Read the blog that this Skills exercise is based on: [Modernizing legacy code with GitHub Copilot: Tips and examples](https://github.blog/ai-and-ml/github-copilot/modernizing-legacy-code-with-github-copilot-tips-and-examples/)
3939
- Are you not getting the responses you want from Copilot? [Learn prompt engineering](https://docs.github.com/en/copilot/using-github-copilot/copilot-chat/prompt-engineering-for-copilot-chat)
40+
41+
---
42+
43+
### 🧪 Bonus Activity: See SpecOps in Action
44+
45+
Your repository includes the [SpecOps GitHub Action](https://github.com/spec-ops-method/spec-ops-action), which automatically creates issues when the specification changes. Let's see it work!
46+
47+
1. Open the `docs/SPECIFICATION.md` file in your repository.
48+
49+
2. Make a small change to the specification. For example, add a new business rule:
50+
```markdown
51+
### Requirement: Maximum Credit Limit
52+
The system SHALL reject credit operations that would result in a balance exceeding $999,999.99.
53+
```
54+
55+
3. Commit and push your change to the `main` branch.
56+
57+
4. Navigate to the **Actions** tab in your repository and watch the "Create Issues for Specification Changes" workflow run.
58+
59+
5. Once complete, check the **Issues** tab—you should see a new issue created automatically with the diff of your specification change!
60+
61+
This demonstrates the SpecOps principle: **changes flow through specifications**. When business requirements change, the specification is updated first, and automation ensures the change is tracked and reviewed before implementation begins.

0 commit comments

Comments
 (0)