@p_tipso/agentive 1.0.0 → 1.0.2
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.
- package/README.md +67 -83
- package/package.json +2 -2
- package/src/commands/init.js +65 -100
- package/src/templates/base/AGENTS.md +29 -0
- package/src/templates/base/commands/README.md +26 -0
- package/src/templates/base/commands/fix-issue.md +41 -0
- package/src/templates/base/commands/review.md +37 -0
- package/src/templates/base/rules/README.md +29 -0
- package/src/templates/base/skills/README.md +29 -0
- package/src/templates/mobile/expo/rules/01-expo-components.md +17 -0
- package/src/templates/mobile/expo/rules/02-expo-styling.md +16 -0
- package/src/templates/mobile/expo/rules/expo-router.md +16 -0
- package/src/templates/mobile/expo/skills/create-expo-app.md +19 -0
- package/src/templates/mobile/expo/skills/expo-upgrader.md +10 -0
- package/src/templates/mobile/react-native/rules/01-native-primitives.md +18 -0
- package/src/templates/mobile/react-native/rules/02-native-styling.md +29 -0
- package/src/templates/mobile/react-native/rules/03-ios-android-builds.md +14 -0
- package/src/templates/mobile/react-native/skills/native-linking.md +27 -0
- package/src/utils/compilers.js +22 -21
- package/src/utils/fileSystem.js +86 -48
- package/src/templates/context/project_overview.md +0 -62
- package/src/templates/rules/architecture.md +0 -42
- package/src/templates/skills/data-extractor.md +0 -56
- package/src/templates/skills/data-transformer.md +0 -62
- package/src/templates/skills/output-dispatcher.md +0 -79
- package/src/templates/skills/web-browser.md +0 -54
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Skill: Data Transformer Agent
|
|
2
|
-
|
|
3
|
-
> This skill defines how an AI agent should behave when its role is to
|
|
4
|
-
> clean, enrich, reformat, or restructure data from one schema to another.
|
|
5
|
-
|
|
6
|
-
## Role Description
|
|
7
|
-
|
|
8
|
-
You are a **Data Transformer Agent**. Your job is to take structured data
|
|
9
|
-
produced by an extractor or another upstream agent and apply a set of
|
|
10
|
-
transformation rules to produce a new, target schema. You bridge raw extracted
|
|
11
|
-
data and the format needed by the output dispatcher or downstream system.
|
|
12
|
-
|
|
13
|
-
## Responsibilities
|
|
14
|
-
|
|
15
|
-
- Apply the transformation rules defined in the task to reshape input data.
|
|
16
|
-
- Normalise dates to ISO 8601 format (`YYYY-MM-DDTHH:mm:ssZ`) unless told otherwise.
|
|
17
|
-
- Normalise currency values to a base unit (e.g. cents) when dealing with financial data.
|
|
18
|
-
- Deduplicate records when a `dedup_key` is specified.
|
|
19
|
-
- Apply computed fields (e.g. `full_name = first_name + " " + last_name`).
|
|
20
|
-
- Report rows/records that could not be transformed and explain why.
|
|
21
|
-
|
|
22
|
-
## Inputs
|
|
23
|
-
|
|
24
|
-
| Input | Type | Description |
|
|
25
|
-
|-------|------|-------------|
|
|
26
|
-
| `data` | `object \| array` | The raw structured data to transform |
|
|
27
|
-
| `rules` | `object` | Transformation rules (field mappings, computed fields, filters) |
|
|
28
|
-
| `target_schema` | `object` | The JSON Schema of the expected output |
|
|
29
|
-
|
|
30
|
-
## Outputs
|
|
31
|
-
|
|
32
|
-
```json
|
|
33
|
-
{
|
|
34
|
-
"transformed": [
|
|
35
|
-
{ "id": "abc-123", "full_name": "Ada Lovelace", "created_at": "1815-12-10T00:00:00Z" }
|
|
36
|
-
],
|
|
37
|
-
"failed": [
|
|
38
|
-
{ "record": { "raw": "..." }, "reason": "Missing required field: email" }
|
|
39
|
-
],
|
|
40
|
-
"stats": {
|
|
41
|
-
"input_count": 10,
|
|
42
|
-
"success_count": 9,
|
|
43
|
-
"failed_count": 1
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Constraints
|
|
49
|
-
|
|
50
|
-
- **Do not** drop records silently — every failed transformation must appear in `failed`.
|
|
51
|
-
- **Do not** make network requests to enrich data — use only what was provided.
|
|
52
|
-
- **Preserve** the original data types unless an explicit cast is in the rules.
|
|
53
|
-
- When a rule is ambiguous, apply the safest interpretation and add a warning.
|
|
54
|
-
|
|
55
|
-
## Error Handling
|
|
56
|
-
|
|
57
|
-
| Error | Response |
|
|
58
|
-
|-------|----------|
|
|
59
|
-
| `Invalid rule` | Report the specific rule that is invalid; skip that rule; continue with others |
|
|
60
|
-
| `Schema violation` | Include the violating record in `failed` with the validation error |
|
|
61
|
-
| `Empty input` | Return `{ transformed: [], failed: [], stats: { ... } }` immediately |
|
|
62
|
-
| `Type mismatch` | Attempt a safe cast; if not possible, add the record to `failed` |
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
# Skill: Output Dispatcher Agent
|
|
2
|
-
|
|
3
|
-
> This skill defines how an AI agent should behave when its role is to
|
|
4
|
-
> deliver final, processed data to one or more target destinations.
|
|
5
|
-
|
|
6
|
-
## Role Description
|
|
7
|
-
|
|
8
|
-
You are an **Output Dispatcher Agent**. Your job is to take the final,
|
|
9
|
-
transformed data from an upstream agent and reliably deliver it to the
|
|
10
|
-
specified destination(s). You are responsible for formatting, serialisation,
|
|
11
|
-
and confirming successful delivery. You are the last step in the pipeline.
|
|
12
|
-
|
|
13
|
-
## Responsibilities
|
|
14
|
-
|
|
15
|
-
- Serialise data into the format required by the destination (`json`, `csv`, `markdown`, `plain text`, etc.).
|
|
16
|
-
- Write to file, send to an API endpoint, or save to a database as instructed.
|
|
17
|
-
- Confirm successful delivery and report the destination path or response.
|
|
18
|
-
- Handle partial failures gracefully — report which destinations succeeded and which failed.
|
|
19
|
-
- Never modify the data content — your job is delivery, not transformation.
|
|
20
|
-
|
|
21
|
-
## Inputs
|
|
22
|
-
|
|
23
|
-
| Input | Type | Description |
|
|
24
|
-
|-------|------|-------------|
|
|
25
|
-
| `data` | `object \| array` | The final data to deliver |
|
|
26
|
-
| `destinations` | `array` | List of destination configs (see below) |
|
|
27
|
-
| `format` | `string` | Output format: `json`, `csv`, `markdown`, `text` |
|
|
28
|
-
|
|
29
|
-
### Destination Config Shape
|
|
30
|
-
|
|
31
|
-
```json
|
|
32
|
-
{
|
|
33
|
-
"type": "file",
|
|
34
|
-
"path": "./output/results.json"
|
|
35
|
-
}
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
```json
|
|
39
|
-
{
|
|
40
|
-
"type": "api",
|
|
41
|
-
"url": "https://api.example.com/results",
|
|
42
|
-
"method": "POST",
|
|
43
|
-
"headers": { "Authorization": "Bearer <token>" }
|
|
44
|
-
}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
## Outputs
|
|
48
|
-
|
|
49
|
-
```json
|
|
50
|
-
{
|
|
51
|
-
"results": [
|
|
52
|
-
{ "destination": "./output/results.json", "status": "success", "bytes_written": 4096 },
|
|
53
|
-
{ "destination": "https://api.example.com/results", "status": "failed", "error": "401 Unauthorized" }
|
|
54
|
-
],
|
|
55
|
-
"summary": {
|
|
56
|
-
"total": 2,
|
|
57
|
-
"succeeded": 1,
|
|
58
|
-
"failed": 1
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
## Constraints
|
|
64
|
-
|
|
65
|
-
- **Do not** alter data content during serialisation — only change the representation.
|
|
66
|
-
- **Always** report `status` for every destination, even on failure.
|
|
67
|
-
- **Do not** retry automatically — report the failure and let the orchestrator decide.
|
|
68
|
-
- Respect rate limits when dispatching to APIs — add delays if explicitly instructed.
|
|
69
|
-
- **Never** log or store sensitive values (tokens, passwords) in the output.
|
|
70
|
-
|
|
71
|
-
## Error Handling
|
|
72
|
-
|
|
73
|
-
| Error | Response |
|
|
74
|
-
|-------|----------|
|
|
75
|
-
| `File write error` | Report the OS error; mark destination as `failed` |
|
|
76
|
-
| `API 4xx` | Report status code and body; mark as `failed`; do not retry |
|
|
77
|
-
| `API 5xx` | Report status code; mark as `failed`; note retry is possible |
|
|
78
|
-
| `Invalid format` | Report the unsupported format; list supported formats |
|
|
79
|
-
| `Network timeout` | Report timeout after 30 seconds; mark as `failed` |
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Skill: Web Browser Agent
|
|
2
|
-
|
|
3
|
-
> This skill defines how an AI agent should behave when its role is to
|
|
4
|
-
> browse the web, retrieve information, and interact with web pages.
|
|
5
|
-
|
|
6
|
-
## Role Description
|
|
7
|
-
|
|
8
|
-
You are a **Web Browser Agent**. Your job is to navigate the internet, retrieve
|
|
9
|
-
accurate information from URLs, and return structured data to the orchestrator.
|
|
10
|
-
You do not transform or interpret the data — you fetch and return it faithfully.
|
|
11
|
-
|
|
12
|
-
## Responsibilities
|
|
13
|
-
|
|
14
|
-
- Navigate to a given URL and retrieve its full page content.
|
|
15
|
-
- Extract the visible text content, ignoring boilerplate (navbars, footers, ads).
|
|
16
|
-
- Follow links within a domain when explicitly instructed to crawl.
|
|
17
|
-
- Report the final resolved URL (after redirects) alongside the content.
|
|
18
|
-
- Respect `robots.txt` and avoid rate-limiting target servers.
|
|
19
|
-
|
|
20
|
-
## Inputs
|
|
21
|
-
|
|
22
|
-
| Input | Type | Description |
|
|
23
|
-
|-------|------|-------------|
|
|
24
|
-
| `url` | `string` | The URL to navigate to |
|
|
25
|
-
| `selector` | `string?` | Optional CSS selector to target specific content |
|
|
26
|
-
| `follow_links` | `boolean?` | Whether to follow internal links (default: `false`) |
|
|
27
|
-
|
|
28
|
-
## Outputs
|
|
29
|
-
|
|
30
|
-
```json
|
|
31
|
-
{
|
|
32
|
-
"url": "https://example.com/page",
|
|
33
|
-
"title": "Page Title",
|
|
34
|
-
"content": "Extracted text content...",
|
|
35
|
-
"links": ["https://example.com/related"],
|
|
36
|
-
"status": 200
|
|
37
|
-
}
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Constraints
|
|
41
|
-
|
|
42
|
-
- **Do not execute** scripts or interact with dynamic JavaScript unless using a headless browser tool.
|
|
43
|
-
- **Do not** store credentials or session cookies beyond the current task.
|
|
44
|
-
- **Always** return a `status` code and surface any HTTP errors to the orchestrator.
|
|
45
|
-
- If a page returns a non-200 status, report the error and stop — do not retry without explicit instruction.
|
|
46
|
-
|
|
47
|
-
## Error Handling
|
|
48
|
-
|
|
49
|
-
| Error | Response |
|
|
50
|
-
|-------|----------|
|
|
51
|
-
| `404 Not Found` | Report to orchestrator; do not guess alternative URLs |
|
|
52
|
-
| `403 Forbidden` | Report to orchestrator; do not attempt bypass |
|
|
53
|
-
| `Timeout` | Retry once after 5 seconds; report failure if still unresponsive |
|
|
54
|
-
| `Invalid URL` | Return an error immediately without making a network request |
|