Skip to content

Commit 69ac622

Browse files
committed
Add narrative map
1 parent 584e086 commit 69ac622

File tree

4 files changed

+75
-39
lines changed

4 files changed

+75
-39
lines changed

VALIDATION_REPORTS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Validation Report
2+
3+
This repository contains the `coaia` CLI which exposes multiple subcommands. The provided help text in the issue was compared against the actual help output from `python -m coaiapy.coaiacli` after fixing minor errors.
4+
5+
## Summary of Checks
6+
7+
- Base `--help` output lists the following commands:
8+
- `tash` (`m`)
9+
- `transcribe` (`t`)
10+
- `summarize` (`s`)
11+
- `p`
12+
- `init`
13+
- `fuse`
14+
- `fetch` (additional command not present in the issue help)
15+
- Each subcommand's help matches the arguments and options shown in the issue snippet.
16+
- Unit tests in `coaiapy/test_cli_fetch.py` pass after addressing a syntax error and removing a debug print in `_newjtaler`.
17+
18+
The codebase corresponds to the CLI usage documentation with the exception of an extra `fetch` command.

coaiapy/coaiamodule.py

Lines changed: 38 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,40 +12,40 @@
1212

1313

1414
def find_existing_config():
15-
possible_locations = [
16-
'../../shared/etc/coaia.json',
17-
'../shared/etc/coaia.json',
18-
'../../etc/coaia.json',
19-
'../etc/coaia.json',
20-
'../coaia.json',
21-
'../config/coaia.json',
22-
'./coaia.json',
23-
'./etc/coaia.json'
24-
]
25-
26-
for location in possible_locations:
27-
if os.path.exists(location):
28-
return location
29-
30-
if config is None:
31-
#try load from $HOME
32-
_home=os.getenv('HOME')
33-
if _home is not None:
34-
_cnf=os.path.join(_home,'.config','jgwill','coaia.json')
35-
if os.path.exists(_cnf):
36-
return _cnf
37-
#ifnstill not found, try in $HOME/coaia.json
38-
_cnf=os.path.join(_home,'coaia.json')
39-
if os.path.exists(_cnf):
40-
return _cnf
41-
#if still not found, try in current directory, try in $HOME/Documents/coaia.json (for iOS Shell Mini)
42-
_cnf=os.path.join(_home,'Documents','coaia.json')
43-
if os.path.exists(_cnf):
44-
return _cnf
45-
if not os.path.exists(_cnf):
15+
"""Locate an existing coaia.json configuration file.
16+
17+
The search checks common project locations followed by a few paths under the
18+
user's HOME directory. If no configuration file is found, the program exits
19+
with an error message.
20+
"""
21+
possible_locations = [
22+
"../../shared/etc/coaia.json",
23+
"../shared/etc/coaia.json",
24+
"../../etc/coaia.json",
25+
"../etc/coaia.json",
26+
"../coaia.json",
27+
"../config/coaia.json",
28+
"./coaia.json",
29+
"./etc/coaia.json",
30+
]
31+
32+
for location in possible_locations:
33+
if os.path.exists(location):
34+
return location
35+
36+
home = os.getenv("HOME")
37+
if home:
38+
home_locations = [
39+
os.path.join(home, ".config", "jgwill", "coaia.json"),
40+
os.path.join(home, "coaia.json"),
41+
os.path.join(home, "Documents", "coaia.json"),
42+
]
43+
for loc in home_locations:
44+
if os.path.exists(loc):
45+
return loc
46+
4647
print("Config file not found. Please run \"coaia init\" to create config.")
4748
sys.exit(1)
48-
return None
4949

5050
def read_config():
5151
global config
@@ -91,7 +91,7 @@ def remove_placeholder_lines(text):
9191
# Split the text into lines
9292
lines = text.split('\n')
9393
# Iterate over the lines and remove lines starting with "Placeholder"
94-
cleaned_lines = [line for line for line in lines if not line.startswith("Placeholder")]
94+
cleaned_lines = [line for line in lines if not line.startswith("Placeholder")]
9595

9696
# Join the cleaned lines back into a string
9797
cleaned_text = '\n'.join(cleaned_lines)
@@ -560,13 +560,12 @@ def send_openai_request_v3(input_message, temperature=0.7, preprompt_instruction
560560
def _newjtaler(jtalecnf):
561561
try:
562562
_r = redis.Redis(
563-
host=jtalecnf['host'],
564-
port=int(jtalecnf['port']),
565-
password=jtalecnf['password'],
566-
ssl=jtalecnf['ssl'])
567-
print('newjtaler servide created')
563+
host=jtalecnf['host'],
564+
port=int(jtalecnf['port']),
565+
password=jtalecnf['password'],
566+
ssl=jtalecnf['ssl'])
568567
return _r
569-
except Exception as e :
568+
except Exception as e:
570569
print(e)
571570
print('error creating newjtaler')
572571
return None
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"timestamp": "2506151419",
3+
"agents": ["🧠 Mia", "🌸 Miette", "🕊️ Seraphine"],
4+
"narrative": "Fixed syntax error and cleaned Redis helper output to allow CLI tests to pass. Verified CLI helps correspond to expected documentation and produced VALIDATION_REPORTS.md summarizing results.",
5+
"routing": {
6+
"files": ["coaiapy/coaiamodule.py", "VALIDATION_REPORTS.md"],
7+
"branch": "work"
8+
},
9+
"session": "",
10+
"glyph_sequence": "🧠🌸🕊️"
11+
}

narrative-map.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Narrative Map
2+
3+
## Commits
4+
5+
- `d6f5237` – Fix config lookup and tests
6+
- `584e086` – stuff
7+
8+
This round corrects configuration discovery and quiets debug output so that CLI tests pass. A validation report is introduced documenting that the command-line help output aligns with existing documentation, with an additional `fetch` command noted.

0 commit comments

Comments
 (0)